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

Function subPixelOpt

src/component/axis/axisBreakHelperImpl.ts:216–227  ·  view source on GitHub ↗
(brkCoord: number)

Source from the content-addressed store, hash-verified

214
215 // Apply `subPixelOptimizeLine` for alignning with break ticks.
216 function subPixelOpt(brkCoord: number): number {
217 const pBrk: number[] = [];
218 const dummyP: number[] = [];
219 pBrk[dimBrk] = dummyP[dimBrk] = brkCoord;
220 pBrk[dimZigzag] = coordSysRect[XY[dimZigzag]];
221 dummyP[dimZigzag] = zigzagCoordMax;
222 const dummyShape = {x1: pBrk[0], y1: pBrk[1], x2: dummyP[0], y2: dummyP[1]};
223 subPixelOptimizeLine(dummyShape, dummyShape, {lineWidth: 1});
224 pBrk[0] = dummyShape.x1;
225 pBrk[1] = dummyShape.y1;
226 return pBrk[dimBrk];
227 }
228 startCoord = subPixelOpt(startCoord);
229 endCoord = subPixelOpt(endCoord);
230

Callers 1

addZigzagShapesFunction · 0.85

Calls 1

subPixelOptimizeLineFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…