Class CanvasRenderer
Constructors
(constructor)(_selection, _dndHandler, handlerConfiguration, _rubberbandHandler, _viewportHandler, _spotlightHandler, _hoverHandler, _snapLinesHandler, _canvasElementHandler, _interactiveZonesHandler)
Constructs a new instance of the CanvasRenderer class
Declaration
constructor(_selection: ISelectionHandler, _dndHandler: IDragNDropHandler, handlerConfiguration: IHandlersConfiguration, _rubberbandHandler: RubberbandHandler, _viewportHandler: IViewportHandler, _spotlightHandler: SpotlightHandler, _hoverHandler: IHoverHandler, _snapLinesHandler: ISnapLinesHandler, _canvasElementHandler: ICanvasElementHandler, _interactiveZonesHandler: IInteractiveZonesHandler);
Parameters
Properties
conf
Declaration
set conf(conf: IHandlersConfiguration);
Property Value
previewMode
Declaration
Property Value
style
Declaration
style: CanvasRendererStyle;
Property Value
| Type |
Description |
| CanvasRendererStyle |
|
textRenderer
Declaration
set textRenderer(value: TextRenderer);
Property Value
Methods
applyContextScale(renderingContext, workspace, offset, clipByWorkspace)
Declaration
applyContextScale(renderingContext: CanvasRenderingContext2D, workspace: IWorkspace, offset: PointF, clipByWorkspace?: boolean): CanvasRenderingContext2D;
Parameters
| Type |
Name |
Description |
| CanvasRenderingContext2D |
renderingContext |
|
| IWorkspace |
workspace |
|
| PointF |
offset |
|
| boolean |
clipByWorkspace |
|
Returns
| Type |
Description |
| CanvasRenderingContext2D |
|
clearTextCursor(canvas)
Declaration
clearTextCursor(canvas: HTMLCanvasElement): void;
Parameters
| Type |
Name |
Description |
| HTMLCanvasElement |
canvas |
|
Returns
drawRubberband(context, rubberband, offset)
Declaration
drawRubberband(context: CanvasRenderingContext2D, rubberband: Rubberband, offset: PointF): void;
Parameters
| Type |
Name |
Description |
| CanvasRenderingContext2D |
context |
|
| Rubberband |
rubberband |
|
| PointF |
offset |
|
Returns
drawTextCursor(canvas, itemHandler, callback, workspace, mul, offset)
Declaration
drawTextCursor(canvas: HTMLCanvasElement, itemHandler: BaseRectangleItemHandler, callback: (context: CanvasRenderingContext2D) => void, workspace: IWorkspace, mul: number, offset: PointF): void;
Parameters
| Type |
Name |
Description |
| HTMLCanvasElement |
canvas |
|
| BaseRectangleItemHandler |
itemHandler |
|
| (context: CanvasRenderingContext2D) => void |
callback |
|
| IWorkspace |
workspace |
|
| number |
mul |
|
| PointF |
offset |
|
Returns
drawWaitClock(context, center, mul)
Declaration
drawWaitClock(context: CanvasRenderingContext2D, center: PointF, mul: number): void;
Parameters
| Type |
Name |
Description |
| CanvasRenderingContext2D |
context |
|
| PointF |
center |
|
| number |
mul |
|
Returns
redrawActiveCanvas(layers, activeCanvas, workspace, productHandler, offset)
Declaration
redrawActiveCanvas(layers: Layer[], activeCanvas: HTMLCanvasElement, workspace: IWorkspace, productHandler: IProductHandler, offset: PointF): void;
Parameters
| Type |
Name |
Description |
| Layer[] |
layers |
|
| HTMLCanvasElement |
activeCanvas |
|
| IWorkspace |
workspace |
|
| IProductHandler |
productHandler |
|
| PointF |
offset |
|
Returns
redrawActiveTextCanvas(context, layers)
Declaration
redrawActiveTextCanvas(context: ITextEditorContext, layers: Layer[]): void;
Parameters
Returns
redrawInactiveCanvas(layers, surfaceCanvas, inactiveCanvas, workspace, margins, mul, productHandler, offset, mockupMarginWorkaroundEnabled)
Declaration
redrawInactiveCanvas(layers: Layer[], surfaceCanvas: HTMLCanvasElement, inactiveCanvas: HTMLCanvasElement, workspace: IWorkspace, margins: IMargins, mul: number, productHandler: IProductHandler, offset: PointF, mockupMarginWorkaroundEnabled?: boolean): void;
Parameters
| Type |
Name |
Description |
| Layer[] |
layers |
|
| HTMLCanvasElement |
surfaceCanvas |
|
| HTMLCanvasElement |
inactiveCanvas |
|
| IWorkspace |
workspace |
|
| IMargins |
margins |
|
| number |
mul |
|
| IProductHandler |
productHandler |
|
| PointF |
offset |
|
| boolean |
mockupMarginWorkaroundEnabled |
|
Returns
redrawSelectionCanvas(designCanvas, workspace, style, textContext, viewer, contentAngle, offset, drawShadow, drawSnapLines)
Declaration
redrawSelectionCanvas(designCanvas: HTMLCanvasElement, workspace: IWorkspace, style: CanvasRendererStyle, textContext: ITextLimitsContext & ITextEditorContext & ITranslationsContext, viewer: IViewportContext & IWorkspaceContext & IRulersContext, contentAngle: number, offset: PointF, drawShadow?: boolean, drawSnapLines?: boolean): void;
Parameters
Returns
setLoadingImageUrl(url)
Declaration
setLoadingImageUrl(url: string): void;
Parameters
| Type |
Name |
Description |
| string |
url |
|
Returns
setTextWhizzModule(textWhizz)
Declaration
setTextWhizzModule(textWhizz: typeof TextWhizz): void;
Parameters
| Type |
Name |
Description |
| typeof TextWhizz |
textWhizz |
|
Returns