static void CreatorFillArcSliceSolid(DrawablePtr pDrawable, GCPtr pGC, xArc *arc) { WindowPtr pWin = (WindowPtr) pDrawable; FFBPtr pFfb = GET_FFB_FROM_SCREEN(pDrawable->pScreen); CreatorPrivGCPtr gcPriv = CreatorGetGCPrivate (pGC); ffb_fbcPtr ffb = pFfb->regs; miFillArcRec info; miArcSliceRec slice; int x, y, e, yk, xk, ym, xm, dx, dy, xorg, yorg, slw; int ya, xl, xr, xc; /* Get the RP ready. */ if(gcPriv->stipple == NULL) { FFB_ATTR_GC(pFfb, pGC, pWin, FFB_PPC_APE_DISABLE | FFB_PPC_CS_CONST, FFB_DRAWOP_RECTANGLE); } else { unsigned int fbc; FFBSetStipple(pFfb, ffb, gcPriv->stipple, FFB_PPC_CS_CONST, FFB_PPC_CS_MASK); FFB_WRITE_PMASK(pFfb, ffb, pGC->planemask); FFB_WRITE_DRAWOP(pFfb, ffb, FFB_DRAWOP_RECTANGLE); fbc = FFB_FBC_WIN(pWin); fbc = (fbc & ~FFB_FBC_XE_MASK) | FFB_FBC_XE_OFF; FFB_WRITE_FBC(pFfb, ffb, fbc); FFB_WRITE_FBC(pFfb, ffb, FFB_FBC_WIN(pWin)); } miFillArcSetup(arc, &info); miFillArcSliceSetup(arc, &slice, pGC); MIFILLARCSETUP(); slw = arc->height; if (slice.flip_top || slice.flip_bot) slw += (arc->height >> 1) + 1; if (pGC->miTranslate) { xorg += pDrawable->x; yorg += pDrawable->y; slice.edge1.x += pDrawable->x; slice.edge2.x += pDrawable->x; } while (y > 0) { MIFILLARCSTEP(slw); MIARCSLICESTEP(slice.edge1); MIARCSLICESTEP(slice.edge2); if (miFillSliceUpper(slice)) { ya = yorg - y; MIARCSLICEUPPER(xl, xr, slice, slw); ADDSLICESPANS(slice.flip_top); } if (miFillSliceLower(slice)) { ya = yorg + y + dy; MIARCSLICELOWER(xl, xr, slice, slw); ADDSLICESPANS(slice.flip_bot); } } pFfb->rp_active = 1; FFBSync(pFfb, ffb); }
static void XAAFillArcSliceSolid(DrawablePtr pDraw, GCPtr pGC, xArc *arc) { XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_GC(pGC); int yk, xk, ym, xm, dx, dy, xorg, yorg, slw; register int x, y, e; miFillArcRec info; miArcSliceRec slice; int ya, xl, xr, xc; (*infoRec->SetupForSolidFill)(infoRec->pScrn, pGC->fgPixel, pGC->alu, pGC->planemask); miFillArcSetup(arc, &info); miFillArcSliceSetup(arc, &slice, pGC); MIFILLARCSETUP(); slw = arc->height; if (slice.flip_top || slice.flip_bot) slw += (arc->height >> 1) + 1; if (pGC->miTranslate) { xorg += pDraw->x; yorg += pDraw->y; slice.edge1.x += pDraw->x; slice.edge2.x += pDraw->x; } while (y > 0) { MIFILLARCSTEP(slw); MIARCSLICESTEP(slice.edge1); MIARCSLICESTEP(slice.edge2); if (miFillSliceUpper(slice)) { ya = yorg - y; MIARCSLICEUPPER(xl, xr, slice, slw); ADDSLICESPANS(slice.flip_top); } if (miFillSliceLower(slice)) { ya = yorg + y + dy; MIARCSLICELOWER(xl, xr, slice, slw); ADDSLICESPANS(slice.flip_bot); } } SET_SYNC_FLAG(infoRec); }