Files
Minint/Report/lab2/newuml/oz-p1-container-domain-classes.puml
2026-04-10 02:21:47 +03:00

69 lines
2.1 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
@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