MCPcopy Index your code
hub / github.com/apache/echarts / buildPath

Method buildPath

src/chart/candlestick/CandlestickView.ts:259–278  ·  view source on GitHub ↗
(ctx: CanvasRenderingContext2D, shape: NormalBoxPathShape)

Source from the content-addressed store, hash-verified

257 }
258
259 buildPath(ctx: CanvasRenderingContext2D, shape: NormalBoxPathShape) {
260 const ends = shape.points;
261
262 if (this.__simpleBox) {
263 ctx.moveTo(ends[4][0], ends[4][1]);
264 ctx.lineTo(ends[6][0], ends[6][1]);
265 }
266 else {
267 ctx.moveTo(ends[0][0], ends[0][1]);
268 ctx.lineTo(ends[1][0], ends[1][1]);
269 ctx.lineTo(ends[2][0], ends[2][1]);
270 ctx.lineTo(ends[3][0], ends[3][1]);
271 ctx.closePath();
272
273 ctx.moveTo(ends[4][0], ends[4][1]);
274 ctx.lineTo(ends[5][0], ends[5][1]);
275 ctx.moveTo(ends[6][0], ends[6][1]);
276 ctx.lineTo(ends[7][0], ends[7][1]);
277 }
278 }
279}
280
281

Callers

nothing calls this directly

Calls 1

moveToMethod · 0.45

Tested by

no test coverage detected