interface DrawContext {
    ctx: CanvasRenderingContext2D;
    drawing: Drawing;
    pts: ScreenPoint[];
    rc: PrimitiveRenderContext;
    selected: boolean;
    style: Required<Pick<DrawingStyle, "color" | "lineWidth">> & DrawingStyle;
    formatPrice(price: number): string;
}

Properties

ctx: CanvasRenderingContext2D
drawing: Drawing

Anchors in device px, ready to stroke.

selected: boolean
style: Required<Pick<DrawingStyle, "color" | "lineWidth">> & DrawingStyle

Methods

  • Format a price the way the pane's axis does.

    Parameters

    • price: number

    Returns string