瀏覽代碼

* Fixed triangle routine so that it fits perfectly from one side to the other one (I know, that's no clear)

tags/v0.99.beta14
Jean-Yves Lamoureux jylam 18 年之前
父節點
當前提交
05aa158fed
共有 1 個檔案被更改,包括 3 行新增3 行删除
  1. +3
    -3
      cucul/triangle.c

+ 3
- 3
cucul/triangle.c 查看文件

@@ -132,13 +132,13 @@ int cucul_fill_triangle(cucul_canvas_t *cv, int x1, int y1, int x2, int y2,
}

/* Rescale xa and xb, slightly cropping */
xa = (xa + 2) / 4;
xb = (xb - 2) / 4;
xa = xa / 4;
xb = xb / 4;

if(xb < 0) continue;
if(xa > xmax) continue;
if(xa < 0) xa = 0;
if(xb > xmax) xb = xmax;
if((xb) > xmax) xb = xmax;

for(x = xa; x <= xb; x++)
cucul_putchar(cv, x, y, ch);


Loading…
取消
儲存