UNPKG

@nmmty/lazycanvas

Version:

A simple way to interact with @napi-rs/canvas in an advanced way!

163 lines (162 loc) 6.77 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.FillType = exports.ColorSpace = exports.GlobalCompositeOperation = exports.LinkType = exports.PatternType = exports.Centring = exports.Export = exports.LineJoin = exports.LineCap = exports.TextDirection = exports.TextBaseline = exports.TextAlign = exports.FontWeight = exports.GradientType = exports.LayerScaleType = exports.LayerType = void 0; var LayerType; (function (LayerType) { LayerType["Base"] = "base"; LayerType["Arc"] = "arc"; LayerType["ArcTo"] = "arcTo"; LayerType["BezierCurve"] = "bezierCurve"; LayerType["Clip"] = "clip"; LayerType["Image"] = "image"; LayerType["Line"] = "line"; LayerType["Path"] = "path"; LayerType["QuadraticCurve"] = "quadraticCurve"; LayerType["Morph"] = "morph"; LayerType["Text"] = "text"; LayerType["Group"] = "group"; LayerType["Clear"] = "clear"; })(LayerType || (exports.LayerType = LayerType = {})); var LayerScaleType; (function (LayerScaleType) { LayerScaleType["Pixel"] = "px"; LayerScaleType["Percent"] = "%"; LayerScaleType["Canvas"] = "canvas"; LayerScaleType["None"] = "none"; })(LayerScaleType || (exports.LayerScaleType = LayerScaleType = {})); var GradientType; (function (GradientType) { GradientType["Linear"] = "linear"; GradientType["Radial"] = "radial"; GradientType["Conic"] = "conic"; })(GradientType || (exports.GradientType = GradientType = {})); var FontWeight; (function (FontWeight) { FontWeight[FontWeight["Thin"] = 100] = "Thin"; FontWeight[FontWeight["ExtraLight"] = 200] = "ExtraLight"; FontWeight[FontWeight["Light"] = 300] = "Light"; FontWeight[FontWeight["Regular"] = 400] = "Regular"; FontWeight[FontWeight["Medium"] = 500] = "Medium"; FontWeight[FontWeight["SemiBold"] = 600] = "SemiBold"; FontWeight[FontWeight["Bold"] = 700] = "Bold"; FontWeight[FontWeight["ExtraBold"] = 800] = "ExtraBold"; FontWeight[FontWeight["Black"] = 900] = "Black"; FontWeight[FontWeight["ExtraBlack"] = 950] = "ExtraBlack"; })(FontWeight || (exports.FontWeight = FontWeight = {})); var TextAlign; (function (TextAlign) { TextAlign["Left"] = "left"; TextAlign["Right"] = "right"; TextAlign["Center"] = "center"; TextAlign["Start"] = "start"; TextAlign["End"] = "end"; })(TextAlign || (exports.TextAlign = TextAlign = {})); var TextBaseline; (function (TextBaseline) { TextBaseline["Top"] = "top"; TextBaseline["Hanging"] = "hanging"; TextBaseline["Middle"] = "middle"; TextBaseline["Alphabetic"] = "alphabetic"; TextBaseline["Ideographic"] = "ideographic"; TextBaseline["Bottom"] = "bottom"; })(TextBaseline || (exports.TextBaseline = TextBaseline = {})); var TextDirection; (function (TextDirection) { TextDirection["LeftToRight"] = "ltr"; TextDirection["RightToLeft"] = "rtl"; TextDirection["Inherit"] = "inherit"; })(TextDirection || (exports.TextDirection = TextDirection = {})); var LineCap; (function (LineCap) { LineCap["Butt"] = "butt"; LineCap["Round"] = "round"; LineCap["Square"] = "square"; })(LineCap || (exports.LineCap = LineCap = {})); var LineJoin; (function (LineJoin) { LineJoin["Bevel"] = "bevel"; LineJoin["Round"] = "round"; LineJoin["Miter"] = "miter"; })(LineJoin || (exports.LineJoin = LineJoin = {})); var Export; (function (Export) { Export["CANVAS"] = "canvas"; Export["CTX"] = "ctx"; Export["BUFFER"] = "buffer"; Export["PNG"] = "png"; Export["JPEG"] = "jpeg"; Export["JPG"] = "jpg"; Export["SVG"] = "svg"; Export["GIF"] = "gif"; Export["WEBP"] = "webp"; Export["YAML"] = "yaml"; Export["JSON"] = "json"; })(Export || (exports.Export = Export = {})); var Centring; (function (Centring) { Centring["Start"] = "start"; Centring["StartTop"] = "start-top"; Centring["StartBottom"] = "start-bottom"; Centring["Center"] = "center"; Centring["CenterTop"] = "center-top"; Centring["CenterBottom"] = "center-bottom"; Centring["End"] = "end"; Centring["EndTop"] = "end-top"; Centring["EndBottom"] = "end-bottom"; Centring["None"] = "none"; })(Centring || (exports.Centring = Centring = {})); var PatternType; (function (PatternType) { PatternType["Repeat"] = "repeat"; PatternType["RepeatX"] = "repeat-x"; PatternType["RepeatY"] = "repeat-y"; PatternType["NoRepeat"] = "no-repeat"; })(PatternType || (exports.PatternType = PatternType = {})); var LinkType; (function (LinkType) { LinkType["Width"] = "width"; LinkType["Height"] = "height"; LinkType["X"] = "x"; LinkType["Y"] = "y"; })(LinkType || (exports.LinkType = LinkType = {})); var GlobalCompositeOperation; (function (GlobalCompositeOperation) { GlobalCompositeOperation["SourceOver"] = "source-over"; GlobalCompositeOperation["SourceIn"] = "source-in"; GlobalCompositeOperation["SourceOut"] = "source-out"; GlobalCompositeOperation["SourceAtop"] = "source-atop"; GlobalCompositeOperation["DestinationOver"] = "destination-over"; GlobalCompositeOperation["DestinationIn"] = "destination-in"; GlobalCompositeOperation["DestinationOut"] = "destination-out"; GlobalCompositeOperation["DestinationAtop"] = "destination-atop"; GlobalCompositeOperation["Lighter"] = "lighter"; GlobalCompositeOperation["Copy"] = "copy"; GlobalCompositeOperation["Xor"] = "xor"; GlobalCompositeOperation["Multiply"] = "multiply"; GlobalCompositeOperation["Screen"] = "screen"; GlobalCompositeOperation["Overlay"] = "overlay"; GlobalCompositeOperation["Darken"] = "darken"; GlobalCompositeOperation["Lighten"] = "lighten"; GlobalCompositeOperation["ColorDodge"] = "color-dodge"; GlobalCompositeOperation["ColorBurn"] = "color-burn"; GlobalCompositeOperation["HardLight"] = "hard-light"; GlobalCompositeOperation["SoftLight"] = "soft-light"; GlobalCompositeOperation["Difference"] = "difference"; GlobalCompositeOperation["Exclusion"] = "exclusion"; GlobalCompositeOperation["Hue"] = "hue"; GlobalCompositeOperation["Saturation"] = "saturation"; GlobalCompositeOperation["Color"] = "color"; GlobalCompositeOperation["Luminosity"] = "luminosity"; })(GlobalCompositeOperation || (exports.GlobalCompositeOperation = GlobalCompositeOperation = {})); var ColorSpace; (function (ColorSpace) { ColorSpace["RGB565"] = "rgb565"; ColorSpace["RGBA4444"] = "rgba4444"; ColorSpace["RGBA444"] = "rgba444"; })(ColorSpace || (exports.ColorSpace = ColorSpace = {})); var FillType; (function (FillType) { FillType["Solid"] = "solid"; FillType["Gradient"] = "gradient"; FillType["Pattern"] = "pattern"; })(FillType || (exports.FillType = FillType = {}));