@startuml
abstract SPaintEngine
SPainter *-- SPaintEngine
SCanvasPaintEngine ..|> SPaintEngine
SSvgPaintEngine ..|> SPaintEngine
SPaintEngine "1" -- "n" SPaintState
SPainter "1" *-- "1" SFont

class SFont{
    name: string
    size: number
    textAlign: STextAlign
    textBaseLine: STextBaseLine
    textDirection: STextDirection
    constructor(string, number):void
}

class SPaintState{
    brush: SBrush
    composite: SComposite
    font: SFont
    matrix: SMatrix
    pen: SPen
    constructor(SPaintState): void
}
@enduml
