10 if ((y >= ctx->
view_y) && (y < ctx->view_y + ctx->
view_h)) {
12 if ((x2 < ctx->view_x) || (x1 >= ctx->
view_x + ctx->
view_w) || (filled[y - ctx->
view_y]))
20 if ((x1 >= ctx->
view_x) && (x1 < ctx->view_x + ctx->
view_w))
22 if ((x2 >= ctx->
view_x) && (x2 < ctx->view_x + ctx->
view_w))
42 int d, x1, y1, x2, y2;
43 long long dx, dy, aq, bq, r, rx, ry;
94 static void get_arc_point(
float angle,
float a,
float b,
int *x,
int *y)
110 FBCALL void fb_GfxEllipse(
void *target,
float fx,
float fy,
float radius,
unsigned int color,
float aspect,
float start,
float end,
int fill,
int flags)
113 int x, y, x1, y1, top, bottom;
114 unsigned int orig_color;
115 float a, b, orig_x, orig_y, increment;
146 a = (radius / aspect);
151 b = (radius * aspect);
154 if ((start != 0.0) || (end != 3.141593f * 2.0)) {
172 while (end - start > 2 *
PI)
175 increment = 1 / (sqrt(a) * sqrt(b) * 1.5);
180 for (; start < end + (increment / 2); start += increment) {
184 if ((x1 < context->view_x) || (x1 >= context->
view_x + context->
view_w) ||
185 (y1 < context->view_y) || (y1 >= context->
view_y + context->
view_h))
187 context->
put_pixel(context, x1, y1, color);
196 draw_ellipse(context, x, y, a, b, color, fill, &top, &bottom);
204 SET_DIRTY(context, top, bottom - top + 1);