Constructors
Properties
Accessors
context
- get context(): CanvasRenderingContext2D
Returns CanvasRenderingContext2D
dimensionMin
- get dimensionMin(): number
Returns number
height
- get height(): number
Returns number
width
- get width(): number
Returns number
x
- get x(): number
Returns number
y
- get y(): number
Returns number
Methods
absToRegionPoint
- absToRegionPoint(pt, source, clamped): {
x: number;
y: number;
} Parameters
- pt: Point
- source: "screen"
- clamped: boolean
Returns {
x: number;
y: number;
}
applyRegionOffset
- applyRegionOffset(p): {
x: number;
y: number;
} Returns {
x: number;
y: number;
}
clear
- clear(): void
Returns void
drawBounds
- drawBounds(strokeStyle, lineWidth?): void
Parameters
- strokeStyle: string
- lineWidth: number = 1
Returns void
drawCircles
- drawCircles(relativeCircles, fillStyle, strokeStyle?, lineWidth?): void
Parameters
- relativeCircles: CirclePositioned[]
- fillStyle: string
- strokeStyle: string = ...
- lineWidth: number = 1
Returns void
drawConnectedPoints
- drawConnectedPoints(points, strokeStyle, lineWidth?): void
Parameters
- points: Point[]
- strokeStyle: string
- lineWidth: number = 1
Returns void
drawConnectedPointsRelative
- drawConnectedPointsRelative(relativePoints, strokeStyle, lineWidth?): void
Parameters
- relativePoints: Point[]
- strokeStyle: string
- lineWidth: number = 1
Returns void
fill
- fill(fillStyle?): void
Returns void
fillText
- fillText(text, point, fillStyle?, font, baseline?, align?): void
Parameters
- text: string
- point: Point
- fillStyle: string = ...
- font: string
- baseline: CanvasTextBaseline = ...
- align: CanvasTextAlign = ...
Returns void
fillTextRelative
- fillTextRelative(text, relPos, fillStyle?, font, baseline?, align?): void
Parameters
- text: string
- relPos: Point
- fillStyle: string = ...
- font: string
- baseline: CanvasTextBaseline = ...
- align: CanvasTextAlign = ...
Returns void
recomputeRegion
- recomputeRegion(): void
Returns void
toAbsRegion
- toAbsRegion(regionRel, scaleBy?): {
x: number;
y: number;
} Parameters
- regionRel: Point
- scaleBy: "both" = ...
Returns {
x: number;
y: number;
}
toRelPoint
- toRelPoint(pt, source?, kind?, clamped?): {
x: number;
y: number;
} Parameters
- pt: Point
- source: "source" | "screen" = ...
- kind: "independent" = ...
- clamped: boolean = true
Returns {
x: number;
y: number;
}
Draws on a canvas, constrained to a specific region