Skip to content

renderSquareControl

renderSquareControl(this, ctx, left, top, styleOverride, fabricObject): void

Defined in: src/controls/controlRendering.ts:98

Render a square control, as per fabric features. This function is written to respect object properties like transparentCorners, cornerSize cornerColor, cornerStrokeColor plus the addition of offsetY and offsetX.

Control

CanvasRenderingContext2D

context to render on

number

x coordinate where the control center should be

number

y coordinate where the control center should be

Partial

override for FabricObject controls style

InteractiveFabricObject

the fabric object for which we are rendering controls

void