Paint

paint


struct PaintingContext
Properties
markDirtyCallback: () => void = () => {}
__ctx: any = null
__gl: GraphicsAdapter | null = null
__offscreen_canvas: any = null
__program: any = null
stagedChanges: boolean = false
dirty: boolean = false
fastPoints: boolean = false
fastPointsBuffer: any = null
__currentColor: number[] | null = null
pointsCounter: number = 0
cacheSize: [number, number] = [0, 0]
Methods
flush( ) -> void
__beforeDraw( ) -> void
__afterDraw( ) -> void
__setColor( color: any ) -> void
fillRect( pos: float2,size: float2,color: any ) -> void
fillCircle( pos: float2,radius: number,color: any ) -> void
fillArc( pos: float2,radius: number,startAngle: number,endAngle: number,color: any ) -> void
line( pos1: float2,pos2: float2,color: any,width: number ) -> void
circle( pos: float2,radius: number,color: any,width: number ) -> void
arc( pos: float2,radius: number,startAngle: number,endAngle: number,color: any,width: number ) -> void
text( pos: float2,text: string,color: any ) -> void
startPath( pos: float2 ) -> void
lineTo( pos: float2 ) -> void
strokePath( color: any,width: number ) -> void
fillPath( color: any ) -> void
setStrokeWidth( width: number ) -> void
setFont( font: string ) -> void
setFontSize( size: number ) -> void
setTextAlign( align: CanvasTextAlign ) -> void
setTextBaseline( baseline: CanvasTextBaseline ) -> void
setLineCap( cap: "butt" | "round" | "square" ) -> void
setLineJoin( join: CanvasLineJoin ) -> void
setMiterLimit( limit: number ) -> void
setShadowColor( color: float4 ) -> void
setShadowBlur( blur: number ) -> void
setShadowOffset( offset: float2 ) -> void
setGlobalAlpha( alpha: number ) -> void
setGlobalCompositeOperation( op: string ) -> void
setImageSmoothingEnabled( enabled: boolean ) -> void
setImageSmoothingQuality( quality: ImageSmoothingQuality ) -> void
setLineDash( dash: number[] ) -> void
setLineDashOffset( offset: number ) -> void
setTransform( a: number,b: number,c: number,d: number,e: number,f: number ) -> void
resetTransform( ) -> void
scale( v: float2 ) -> void
rotate( angle: number ) -> void
translate( v: float2 ) -> void
flushPoints( ) -> void
point( pos: float2,color: any ) -> void
vector( pos: float2,dir: float2,color: float4,width: number ) -> void
grid( center: float2,count: float2,gap: float2,color: float4,width: number ) -> void