Interface LazyCanvasLayer

interface LazyCanvasLayer {
    align:
        | "left"
        | "center"
        | "right"
        | "start"
        | "end";
    alpha: number;
    angle: number;
    angles: number[];
    baseline:
        | "alphabetic"
        | "top"
        | "hanging"
        | "middle"
        | "ideographic"
        | "bottom";
    centering: "legacy" | "new";
    clockwise: boolean;
    color: string | Gradient | Pattern;
    controlPoint: {
        x: number;
        y: number;
    };
    controlPoints: {
        x: number;
        y: number;
    }[];
    direction: "ltr" | "rtl" | "inherit";
    fill: boolean;
    filter: Filter;
    font: string;
    globalComposite:
        | "color"
        | "source-over"
        | "source-in"
        | "source-out"
        | "source-atop"
        | "destination-over"
        | "destination-in"
        | "destination-out"
        | "destination-atop"
        | "lighter"
        | "copy"
        | "xor"
        | "multiply"
        | "screen"
        | "overlay"
        | "darken"
        | "lighten"
        | "color-dodge"
        | "color-burn"
        | "hard-light"
        | "soft-light"
        | "difference"
        | "exclusion"
        | "hue"
        | "saturation"
        | "luminosity";
    height: number;
    image: string | Uint8Array;
    lineDash: number[];
    multiline: boolean;
    outline: LazyCanvasOutline;
    points: {
        x: number;
        y: number;
    }[];
    radius: number;
    rotation: number;
    shadow: {
        shadowBlur: number;
        shadowColor: string | Gradient | Pattern;
        shadowOffsetX: number;
        shadowOffsetY: number;
    };
    sides: number;
    size: number;
    stroke: number;
    structureType: string;
    text: string;
    type: string;
    weight:
        | "normal"
        | "bold"
        | "italic"
        | "bold italic"
        | "regular"
        | "semi-bold"
        | "extra-bold"
        | "light"
        | "extra-light";
    width: number;
    x: number;
    y: number;
    toJSON(): LazyCanvasLayer;
}

Hierarchy

  • Arc
  • ArcTo
  • Base
  • Bezier
  • Circle
  • Ellipse
  • EllipseImage
  • Image
  • Line
  • Ngon
  • Quadratic
  • Rectangle
  • Square
  • Text
    • LazyCanvasLayer

Properties

align:
    | "left"
    | "center"
    | "right"
    | "start"
    | "end"
alpha: number
angle: number
angles: number[]
baseline:
    | "alphabetic"
    | "top"
    | "hanging"
    | "middle"
    | "ideographic"
    | "bottom"
centering: "legacy" | "new"
clockwise: boolean
color: string | Gradient | Pattern
controlPoint: {
    x: number;
    y: number;
}
controlPoints: {
    x: number;
    y: number;
}[]
direction: "ltr" | "rtl" | "inherit"
fill: boolean
filter: Filter
font: string
globalComposite:
    | "color"
    | "source-over"
    | "source-in"
    | "source-out"
    | "source-atop"
    | "destination-over"
    | "destination-in"
    | "destination-out"
    | "destination-atop"
    | "lighter"
    | "copy"
    | "xor"
    | "multiply"
    | "screen"
    | "overlay"
    | "darken"
    | "lighten"
    | "color-dodge"
    | "color-burn"
    | "hard-light"
    | "soft-light"
    | "difference"
    | "exclusion"
    | "hue"
    | "saturation"
    | "luminosity"
height: number
image: string | Uint8Array
lineDash: number[]
multiline: boolean
points: {
    x: number;
    y: number;
}[]
radius: number
rotation: number
shadow: {
    shadowBlur: number;
    shadowColor: string | Gradient | Pattern;
    shadowOffsetX: number;
    shadowOffsetY: number;
}
sides: number
size: number
stroke: number
structureType: string
text: string
type: string
weight:
    | "normal"
    | "bold"
    | "italic"
    | "bold italic"
    | "regular"
    | "semi-bold"
    | "extra-bold"
    | "light"
    | "extra-light"
width: number
x: number
y: number

Methods