Skip to main content

utils

import {...} from "@revideo/2d/lib/utils";

Functions

adjustRectRadius

public adjustRectRadiusradius: numberhorizontal: numbervertical: numberrect: BBox: number

Parameters


arc

public arccontext: CanvasRenderingContext2DPath2Dcenter: Vector2radius: numberstartAngle: number = 0endAngle: number = ...counterclockwise: boolean = false: void

Parameters


arcTo

Parameters


bezierCurveTo

Parameters


canvasStyleParser

public canvasStyleParserstyle: PossibleCanvasStyle: nullGradientPatternColor

Parameters


drawImage

Parameters


drawLine

Parameters


drawPivot

public drawPivotcontext: CanvasRenderingContext2DPath2Doffset: Vector2radius: number = 8: void

Parameters


drawPolygon

public drawPolygonpath: CanvasRenderingContext2DPath2Drect: BBoxsides: number: void

Parameters


drawRect

Parameters


drawRoundRect

Parameters


fillRect

Parameters


is

public isTklass: (): object: any => object is T

Create a predicate that checks if the given object is an instance of the given class.

Type Parameters

Parameters

  • klass: ()

    The class to check against.


lineTo

Parameters


moveTo

Parameters


quadraticCurveTo

Parameters


resolveCanvasStyle

Parameters


strokeRect

public strokeRectcontext: CanvasRenderingContext2Drect: BBox: void

Parameters