Диаграммы
This commit is contained in:
40
Report/lab2/newuml/dz-a1-image-effects-classes.puml
Normal file
40
Report/lab2/newuml/dz-a1-image-effects-classes.puml
Normal file
@@ -0,0 +1,40 @@
|
||||
@startuml dz-a1-image-effects-classes
|
||||
title ДЗ.А1 — сервис эффектов палитры (контраст, оттенки серого)
|
||||
|
||||
skinparam classAttributeIconSize 0
|
||||
skinparam shadowing false
|
||||
|
||||
package "Minint.Core.Services" {
|
||||
interface IImageEffectsService {
|
||||
+ ApplyContrast(doc : MinintDocument, factor : double) : void
|
||||
+ ApplyGrayscale(doc : MinintDocument) : void
|
||||
}
|
||||
}
|
||||
|
||||
package "Minint.Core.Services.Impl" {
|
||||
class ImageEffectsService {
|
||||
+ ApplyContrast(doc : MinintDocument, factor : double) : void
|
||||
+ ApplyGrayscale(doc : MinintDocument) : void
|
||||
--
|
||||
{static} - ContrastByte(value : byte, factor : double) : byte
|
||||
}
|
||||
}
|
||||
|
||||
package "Minint.Core.Models" <<Frame>> {
|
||||
class MinintDocument {
|
||||
+ Palette : List~RgbaColor~
|
||||
+ InvalidatePaletteCache() : void
|
||||
}
|
||||
}
|
||||
|
||||
IImageEffectsService <|.. ImageEffectsService : реализует
|
||||
ImageEffectsService ..> MinintDocument : изменяет Palette[i],\ni = 1..Count-1
|
||||
ImageEffectsService ..> MinintDocument : InvalidatePaletteCache()
|
||||
|
||||
note bottom of ImageEffectsService
|
||||
Индекс **0** палитры (прозрачный) не меняется.
|
||||
Контраст: **factor** 0 → серое, 1 → без изменений, >1 → выше контраст.
|
||||
Grayscale: яркость **0,299·R + 0,587·G + 0,114·B** (округление к byte).
|
||||
end note
|
||||
|
||||
@enduml
|
||||
Reference in New Issue
Block a user