Skip to content

@burnmark-io/designer-core


@burnmark-io/designer-core / rotate90

Function: rotate90() ​

rotate90(image): RawImageData

Defined in: packages/core/src/render/rotate.ts:16

Rotate an RGBA image 90° clockwise. Output dimensions are swapped: the new width is the old height and vice versa.

Used by the canvas-orientation feature: when a document's canvas.orientation === 'horizontal', exporters and the print pipeline produce a landscape bitmap so consumers do not need to do their own rotation.

Direction (CW) is the natural choice for "tape reads left-to-right": a portrait label rotated CW puts what was the top of the label on the right of the resulting landscape image.

Parameters ​

image ​

RawImageData

Returns ​

RawImageData

Not affiliated with Dymo, Brother, Avery, or any hardware vendor.