• Home
  • Raw
  • Download

Lines Matching refs:buf

50 void clearBuffer(Buffer* buf, uint32_t pixel) {  in clearBuffer()  argument
51 android_memset32(buf->pixels, pixel, buf->s * buf->h * 4); in clearBuffer()
54 void drawTwoPixels(Buffer* buf, uint32_t pixel, ssize_t x, ssize_t y, size_t w) { in drawTwoPixels() argument
55 if (y>0 && y<ssize_t(buf->h)) { in drawTwoPixels()
56 uint32_t* bits = buf->pixels + y * buf->s; in drawTwoPixels()
57 if (x>=0 && x<ssize_t(buf->w)) { in drawTwoPixels()
61 if ((x+W)>=0 && (x+W)<ssize_t(buf->w)) { in drawTwoPixels()
67 void drawHLine(Buffer* buf, uint32_t pixel, ssize_t x, ssize_t y, size_t w) { in drawHLine() argument
68 if (y>0 && y<ssize_t(buf->h)) { in drawHLine()
74 if (x+w > buf->w) { in drawHLine()
75 W = buf->w - x; in drawHLine()
78 uint32_t* bits = buf->pixels + y * buf->s + x; in drawHLine()
84 void drawRect(Buffer* buf, uint32_t pixel, ssize_t x, ssize_t y, size_t w, size_t h) { in drawRect() argument
94 if (x+w > buf->w) W = buf->w - x; in drawRect()
95 if (y+h > buf->h) H = buf->h - y; in drawRect()
97 uint32_t* bits = buf->pixels + y * buf->s + x; in drawRect()
100 bits += buf->s; in drawRect()
105 void drawCircle(Buffer* buf, uint32_t pixel, in drawCircle() argument
113 drawHLine(buf, pixel, x0-radius, y0, 2*radius); in drawCircle()
115 drawTwoPixels(buf, pixel, x0-radius, y0, 2*radius); in drawCircle()
127 drawHLine(buf, pixel, x0-x, y0+y, 2*x); in drawCircle()
128 drawHLine(buf, pixel, x0-x, y0-y, 2*x); in drawCircle()
129 drawHLine(buf, pixel, x0-y, y0+x, 2*y); in drawCircle()
130 drawHLine(buf, pixel, x0-y, y0-x, 2*y); in drawCircle()
132 drawTwoPixels(buf, pixel, x0-x, y0+y, 2*x); in drawCircle()
133 drawTwoPixels(buf, pixel, x0-x, y0-y, 2*x); in drawCircle()
134 drawTwoPixels(buf, pixel, x0-y, y0+x, 2*y); in drawCircle()
135 drawTwoPixels(buf, pixel, x0-y, y0-x, 2*y); in drawCircle()