@startuml abstract SPaintEngine SPainter *-- SPaintEngine SCanvasPaintEngine ..|> SPaintEngine SSvgPaintEngine ..|> SPaintEngine SPaintEngine "1" -- "n" SPaintState SPen -- SPaintState SPen "1" -- "1" SColor SPen "1" -- "1" SGradient SLineGradient ..|> SGradient SRadialGradient ..|> SGradient SPainter "1" *-- "1" SPen class SPen{ color: SColor dashOffset: number lineCapStyle: SLineCapStyle lineDash: number[] | null lineJoinStyle: SLineJoinStyle lineWidth: number miterLimit: number constructor(SPen):void constructor(SColor, number):void constructor():void } class SPaintState{ brush: SBrush font: SFont matrix: SMatrix composite: SComposite pen: SPen constructor(SPaintState): void } class SColor{ alpha: number red: number green: number blue: number constructor(number | string | SColor, number, number, number): void rgb(number, number, number): SColor rgba(number, number, number, number): SColor } class SGradient{ stopList: SGradientStop[] addColorStop(number, SColor): void } @enduml