Lines Matching refs:sx

30 #define SWAP_START_END(sx, sy, ex, ey, dx, dy, dir)          \
34 SWAP_POINTS((sx), (ex), (sy), (ey)); \
36 if ((ex) < (sx)) { \
40 if ((sx) < (ex)) { \
41 SWAP_POINTS((sx), (ex), (sy), (ey)); \
152 int16_t sx = start.x;
156 uint16_t dx = MATH_ABS(ex - sx);
159 SWAP_START_END(sx, sy, ex, ey, dx, dy, dir);
162 float plot = -static_cast<float>(ex - sx) / static_cast<float>(ey - sy);
165 float x0 = sx + offset;
166 float y0 = sy + (x0 - sx) * plot;
167 float x1 = sx - offset;
168 float y1 = sy + (x1 - sx) * plot;
248 sx = x0Int;
256 endPoints0[sy - y0Int] = sx;
260 sx -= dir;
261 drawUtils->DrawPixelInLine(gfxDstBuffer, sx, sy, mask, color, opacity,
265 endPoints0[sy - y0Int] = sx - dir;
272 sx = x3Int;
279 endPoints1[temp1++] = sx;
283 sx += dir;
284 drawUtils->DrawPixelInLine(gfxDstBuffer, sx, sy, mask, color, opacity,
288 endPoints1[temp1++] = sx + dir;
298 sx = x0Int;
307 INCREASE_ACC(acc0, accTemp0, adj0, sx, dir);
308 drawUtils->DrawPixelInLine(gfxDstBuffer, sx + dir, sy, mask,
313 edge1 = sx;
315 INCREASE_ACC(acc0, accTemp0, adj0, sx, dir);
317 drawUtils->DrawPixelInLine(gfxDstBuffer, sx + dir, sy, mask,
322 edge1 = sx;
346 sx = x0Int;
348 drawUtils->DrawPixel(gfxDstBuffer, sx, sy, mask, color, opacity);
353 if (x0Int - sx < MAX_LINE_WIDTH) {
354 endPoints0[x0Int - sx] = sy;
356 sx--;
359 drawUtils->DrawPixelInLine(gfxDstBuffer, sx, sy, mask, color, opacity,
362 if (x0Int - sx < MAX_LINE_WIDTH) {
363 endPoints0[x0Int - sx] = sy - dir;
370 sx = x3Int;
378 sx++;
381 drawUtils->DrawPixelInLine(gfxDstBuffer, sx, sy, mask, color, opacity,
396 sx = x0Int - 1;
404 if (sx >= x1Int) {
406 drawUtils->DrawPixelInLine(gfxDstBuffer, sx, sy + dir, mask,
412 } else if (sx > x2Int) {
415 drawUtils->DrawPixelInLine(gfxDstBuffer, sx, sy + dir, mask,
417 drawUtils->DrawPixelInLine(gfxDstBuffer, sx, syTemp, mask, color,
421 } else if (sx > x3Int) {
423 drawUtils->DrawPixelInLine(gfxDstBuffer, sx, syTemp, mask, color, opacity,
433 rect.SetRect(sx, edge0, sx, edge1);
435 sx--;
443 int16_t sx = start.x;
447 uint16_t dx = MATH_ABS(ex - sx);
453 SWAP_START_END(sx, sy, ex, ey, dx, dy, dir);
458 INCREASE_ACC(acc, accTemp, adj, sx, dir);
461 drawUtils->DrawAdjPixelInLine(gfxDstBuffer, sx, sy, sx + dir, sy, mask,
464 drawUtils->DrawVerPixelInLine(gfxDstBuffer, sx, sy, dir, mask,
472 sx--;
474 drawUtils->DrawAdjPixelInLine(gfxDstBuffer, sx, sy, sx, sy + dir, mask,
477 drawUtils->DrawHorPixelInLine(gfxDstBuffer, sx, sy, dir, mask,