Lines Matching refs:x
58 static bool outside(int x, int y) in outside() argument
60 return x < 0 || x >= gr_draw->width || y < 0 || y >= gr_draw->height; in outside()
68 void gr_font_size(int *x, int *y) in gr_font_size() argument
70 *x = gr_font->cwidth; in gr_font_size()
106 void gr_text(int x, int y, const char *s, bool bold) in gr_text() argument
114 x += overscan_offset_x; in gr_text()
119 if (outside(x, y) || outside(x+font->cwidth-1, y+font->cheight-1)) break; in gr_text()
127 unsigned char* dst_p = gr_draw->data + y*gr_draw->row_bytes + x*gr_draw->pixel_bytes; in gr_text()
133 x += font->cwidth; in gr_text()
137 void gr_texticon(int x, int y, GRSurface* icon) { in gr_texticon() argument
145 x += overscan_offset_x; in gr_texticon()
148 if (outside(x, y) || outside(x+icon->width-1, y+icon->height-1)) return; in gr_texticon()
151 unsigned char* dst_p = gr_draw->data + y*gr_draw->row_bytes + x*gr_draw->pixel_bytes; in gr_texticon()
180 for (int x = 0; x < gr_draw->width; ++x) { in gr_clear() local
203 int x, y; in gr_fill() local
206 for (x = x1; x < x2; ++x) { in gr_fill()
215 int x, y; in gr_fill() local
218 for (x = x1; x < x2; ++x) { in gr_fill()
319 int x;
320 for (x = 0; x <= 1200; ++x) {
321 if (x < 400) {
324 gr_color(0, (x-400)%128, 0, 255);
329 GRSurface* frame = images[x%frames];
330 gr_blit(frame, 0, 0, frame->width, frame->height, x, 0);
338 gr_text(300+x, 275, "pack my box with five dozen liquor jugs", 1);
341 gr_fill(gr_draw->width - 200 - x, 300, gr_draw->width - x, 500);
350 printf("%.2f fps\n", ((double)x) / (end-start));