Lines Matching refs:x
62 static inline RGB555 *GetSurface(int x, int y) in GetSurface() argument
64 return drawi_common.next_surface + x + y * GX_LCD_SIZE_X; in GetSurface()
67 static inline BOOL IsBoundX(DrawiCommon * p, int x) in IsBoundX() argument
69 return (x >= p->clip.o.x) && (x < p->clip.t.x); in IsBoundX()
79 if (p->pos.x >= pc->clip.t.x) in NormalizeRegion()
83 if (p->pos.x - pc->clip.o.x < 0) in NormalizeRegion()
84 p->wid.x += p->pos.x - pc->clip.o.x, p->pos.x = pc->clip.o.x; in NormalizeRegion()
85 if (p->wid.x <= 0) in NormalizeRegion()
87 else if (p->wid.x > pc->clip.t.x - p->pos.x) in NormalizeRegion()
88 p->wid.x = pc->clip.t.x - p->pos.x; in NormalizeRegion()
144 cur_pt.x = 0, cur_pt.y = 0; in InitDraw()
148 p->clip.o.x = 0; in InitDraw()
150 p->clip.t.x = GX_LCD_SIZE_X; in InitDraw()
196 p_bak->o.x = p->clip.o.x; in ClipWindow()
198 p_bak->t.x = p->clip.t.x; in ClipWindow()
209 p->clip.o.x = ox; in ClipWindow()
211 p->clip.t.x = tx; in ClipWindow()
220 p->clip.o.x = p_bak->o.x; in RestoreClipWindow()
222 p->clip.t.x = p_bak->t.x; in RestoreClipWindow()
234 void FillRect(int x, int y, int wx, int wy, RGB555 col) in FillRect() argument
237 r.pos.x = x, r.pos.y = y; in FillRect()
238 r.wid.x = wx, r.wid.y = wy; in FillRect()
241 RGB555 *p = GetSurface(r.pos.x, r.pos.y); in FillRect()
244 MI_CpuFill16(p, col, r.wid.x * sizeof(RGB555)); in FillRect()
250 void BlitRect(int x, int y, int wx, int wy, RGB555 * src, int stroke) in BlitRect() argument
253 r.pos.x = x, r.pos.y = y; in BlitRect()
254 r.wid.x = wx, r.wid.y = wy; in BlitRect()
257 RGB555 *p = GetSurface(r.pos.x, r.pos.y); in BlitRect()
260 MI_CpuCopy16(src, p, r.wid.x * sizeof(RGB555)); in BlitRect()
267 void TransRect(int x, int y, int wx, int wy, RGB555 * src, int stroke) in TransRect() argument
270 r.pos.x = x, r.pos.y = y; in TransRect()
271 r.wid.x = wx, r.wid.y = wy; in TransRect()
274 RGB555 *p = GetSurface(r.pos.x, r.pos.y); in TransRect()
279 for (i = 0; i < r.wid.x; ++i) in TransRect()
329 if (!IsBoundY(pc, sy) || (sx >= pc->clip.t.x)) in DrawLine()
333 if (sx < pc->clip.o.x) in DrawLine()
334 wx += sx, sx = pc->clip.o.x; in DrawLine()
335 if (wx > pc->clip.t.x - sx) in DrawLine()
336 wx = pc->clip.t.x - sx; in DrawLine()
379 int ax, ay, x, y; in DrawCircle() local
383 x = dx / 65536, y = dy / 65536; in DrawCircle()
384 if (IsBoundX(pc, x) && IsBoundY(pc, y)) in DrawCircle()
385 *GetSurface(x, y) = col; in DrawCircle()
389 void DrawText(int x, int y, const char *s, ...) in DrawText() argument
397 DrawTextLen(x, y, temp, sizeof(temp) - 1); in DrawText()
400 void DrawTextLen(int x, int y, const char *s, int n) in DrawTextLen() argument
404 RGB555 *p = GetSurface(x, y); in DrawTextLen()
444 int tx = x + px; in DrawTextLen()
445 if ((tx > pc->clip.o.x - 8) && (y > pc->clip.o.y - 8) && in DrawTextLen()
446 (tx < pc->clip.t.x) && (y < pc->clip.t.y)) in DrawTextLen()
452 if (pc->clip.o.x - tx > 0) in DrawTextLen()
453 base = pc->clip.o.x - tx; in DrawTextLen()
454 else if (wx > pc->clip.t.x - tx) in DrawTextLen()
455 wx = pc->clip.t.x - tx; in DrawTextLen()