瀏覽代碼

* line.c: make the line drawing example use aliased lines.

git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2796 92316355-f0b4-4df1-b90c-862c8a59935f
remotes/tiles
sam 16 年之前
父節點
當前提交
a25a78d31c
共有 1 個文件被更改,包括 8 次插入2 次删除
  1. +8
    -2
      examples/line.c

+ 8
- 2
examples/line.c 查看文件

@@ -35,9 +35,15 @@ int main(int argc, char *argv[])
int w = pipi_get_image_width(newimg);
int h = pipi_get_image_height(newimg);

while(count--) {
while(count--)
{
pipi_draw_line(newimg,
rand() % w, rand() % h,
rand() % w, rand() % h,
rand(),
0);
pipi_draw_line(newimg,
rand() , rand() % h,
rand() % w, rand() % h,
rand() % w, rand() % h,
rand(),
1);


Loading…
取消
儲存