canvas-compositor
Version:
a light and performant canvas compositing engine
45 lines (36 loc) • 1.08 kB
JavaScript
/**
* The default color to fill shapes drawn by the canvas context
*/
export const FILL_STYLE = 'black';
/**
* The default color to stroke shapes drawn by the canvas context
*/
export const STROKE_STYLE = 'black';
/**
* The default line cap style for strokes drawn by the canvas. 'round' chosen to match `LINE_JOIN`, which ensures smooth meshing of vertices
*/
export const LINE_CAP = 'round';
/**
* The default stroke width for shapes drawn by the canvas
*/
export const LINE_WIDTH = 1.0;
/**
* The default line join style strokes drawn by the canvas. 'round' chosen for smooth meshing of vertices
*/
export const LINE_JOIN = 'round';
/**
* The default miter limit ratio for mitered line joins
*/
export const MITER_LIMIT = 10;
/**
* The default font for text drawn by the canvas context
*/
export const FONT = '10px sans-serif';
/**
* The default text alignment for text drawn by the canvas context
*/
export const TEXT_ALIGN = 'start';
/**
* The default text baseline for text drawn by the canvas context
*/
export const TEXT_BASELINE = 'alphabetic';