123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194 |
- typedef struct
- {
- int xorg, yorg
- int y
- int dx, dy
- int e
- int ym, yk, xm, xk
- } miFillArc
- typedef struct
- {
- int xorg, yorg
- int y
- int dx, dy
- double e
- double ym, yk, xm, xk
- } miFillArcD
- (((arc)->width <= 800) && ((arc)->height <= 800)))
- !(arc)->width || !(arc)->height || \
- (((arc)->width == 1) && ((arc)->height & 1)))
- x = 0
- y = info.y
- e = info.e
- xk = info.xk
- xm = info.xm
- yk = info.yk
- ym = info.ym
- dx = info.dx
- dy = info.dy
- xorg = info.xorg; \
- yorg = info.yorg
- e += yk
- while (e >= 0) \
- { \
- x++
- xk -= xm
- e += xk
- } \
- y--
- yk -= ym
- slw = (x << 1) + dx
- if ((e == xk) && (slw > 1)) \
- slw--
-
-
- typedef struct
- {
- int x
- int stepx
- int deltax
- int e
- int dy
- int dx
- } miSliceEdge
- typedef struct
- {
- miSliceEdge edge1, edge2
- int min_top_y, max_top_y
- int min_bot_y, max_bot_y
- bool edge1_top, edge2_top
- bool flip_top, flip_bot
- } miArcSlice
- edge.x -= edge.stepx
- edge.e -= edge.dx
- if (edge.e <= 0) \
- { \
- edge.x -= edge.deltax
- edge.e += edge.dy
- }
- ((y >= slice.min_top_y) && (y <= slice.max_top_y))
- ((y >= slice.min_bot_y) && (y <= slice.max_bot_y))
- xl = xorg - x
- xr = xl + slw - 1
- if (slice.edge1_top && (slice.edge1.x < xr)) \
- xr = slice.edge1.x
- if (slice.edge2_top && (slice.edge2.x > xl)) \
- xl = slice.edge2.x
-
- xl = xorg - x
- xr = xl + slw - 1
- if (!slice.edge1_top && (slice.edge1.x > xl)) \
- xl = slice.edge1.x
- if (!slice.edge2_top && (slice.edge2.x < xr)) \
- xr = slice.edge2.x
-
- x = 0
- y = slw >> 1
- yk = y << 3
- xm = 8
- ym = 8
- if (dy) \
- { \
- xk = 0
- if (slw & 1) \
- e = -1
- else \
- e = -(y << 2) - 2
- } \
- else \
- { \
- y++
- yk += 4
- xk = -4
- if (slw & 1) \
- e = -(y << 2) - 3
- else \
- e = - (y << 3)
- }
- ine += inyk
- while (ine >= 0) \
- { \
- inx++
- inxk -= inxm
- ine += inxk
- } \
- iny--
- inyk -= inym
- slw = (inx << 1) + dx
- if ((ine == inxk) && (slw > 1)) \
- slw--
-
|