@mocanvas/mocanvas · function
declare function drawLabelChip(ctx: CanvasRenderingContext2D, text: string, x: number, y: number, opts: {
background: string;
color: string;
font: string;
paddingX: number;
paddingY: number;
radius: number;
/**
* Widest the whole chip may draw. Text that does not fit is cut and ends
* with an ellipsis. Omitted means no cap, which is what every caller did
* before — and is why one long collaborator name could draw a chip across
* the board it was labelling.
*/
maxWidth?: number;
}): numberThis one ships without a description. The signature above is read from the package, and the guides cover the area it belongs to.
mocanvas is built by Symbio. Free for non-commercial, non-profit and development use; commercial use needs an agreement. Not affiliated with or endorsed by tldraw.