MCPcopy Create free account
hub / github.com/chartjs/Chart.js / addNormalRectPath

Function addNormalRectPath

src/elements/element.bar.js:123–125  ·  view source on GitHub ↗

* Add a path of a rectangle to the current sub-path * @param {CanvasRenderingContext2D} ctx Context * @param {*} rect Bounding rect

(ctx, rect)

Source from the content-addressed store, hash-verified

121 * @param {*} rect Bounding rect
122 */
123function addNormalRectPath(ctx, rect) {
124 ctx.rect(rect.x, rect.y, rect.w, rect.h);
125}
126
127function inflateRect(rect, amount, refRect = {}) {
128 const x = rect.x !== refRect.x ? -amount : 0;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected