Files
Minint/Report/lab2/newuml/dz-a1-image-effects-classes.puml
2026-04-10 02:21:47 +03:00

41 lines
1.3 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 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