Skip to content

Commit

Permalink
feat: expose originX, originY in render context
Browse files Browse the repository at this point in the history
  • Loading branch information
Bernankez committed Mar 25, 2024
1 parent 290bd1e commit c4059d9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/core/src/renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ export interface RenderContext {
height: number;
angle: number;
degree: number;
originX: number;
originY: number;
}

export function textRender(context: RenderContext) {
Expand Down Expand Up @@ -59,6 +61,8 @@ export function createTextRenderer(text: string, options?: CreateTextRendererOpt
height,
angle,
degree,
originX: x,
originY: y,
};
render(renderContext);
ctx.restore();
Expand Down

0 comments on commit c4059d9

Please sign in to comment.