Диаграммы

This commit is contained in:
2026-04-10 02:21:47 +03:00
parent 8580dbc199
commit 72db2c0a47
12 changed files with 252 additions and 12 deletions

View File

@@ -0,0 +1,68 @@
@startuml oz-p1-container-domain-classes
title ОЗ.П1 — структура графического контейнера и представление цвета пикселя\n(модуль Minint.Core.Models)
skinparam classAttributeIconSize 0
skinparam shadowing false
class MinintContainer <<графический контейнер>> {
+ Width : int
+ Height : int
+ Documents : List~MinintDocument~ {readOnly}
+ PixelCount : int <<get>>
--
+ MinintContainer(width, height)
+ AddNewDocument(name : string) : MinintDocument
}
class MinintDocument <<кадр / документ>> {
+ Name : string
+ FrameDelayMs : uint
+ Palette : List~RgbaColor~ {readOnly}
+ Layers : List~MinintLayer~ {readOnly}
+ IndexByteWidth : int <<get>>
--
+ MinintDocument(name : string)
+ FindColorCached(color : RgbaColor) : int
+ EnsureColorCached(color : RgbaColor) : int
+ InvalidatePaletteCache() : void
}
class MinintLayer <<растровый слой>> {
+ Name : string
+ IsVisible : bool
+ Opacity : byte
+ Pixels : int[] {readOnly}
--
+ MinintLayer(name, pixelCount)
}
class RgbaColor <<record struct,\nцвет пикселя>> {
+ R : byte
+ G : byte
+ B : byte
+ A : byte
--
{static} Transparent : RgbaColor
+ ToPackedRgba() : uint
+ ToPackedArgb() : uint
{static} FromPackedRgba(packed : uint) : RgbaColor
}
MinintContainer "1" *-- "0..*" MinintDocument : содержит
MinintDocument "1" *-- "0..*" MinintLayer : содержит
MinintDocument "1" *-- "1..*" RgbaColor : Palette
MinintLayer ..> RgbaColor : Pixels[i] — индекс\nв Palette документа
note bottom of MinintLayer
Логический «пиксель» слоя в памяти —
целочисленный **индекс** в палитре документа.
Полное описание цвета — элемент **RgbaColor**
в **MinintDocument.Palette**.
end note
note right of MinintContainer
Общие для всех документов размеры холста (**Width**, **Height**).
Число ячеек растра: **PixelCount** = Width × Height.
end note
@enduml