static void XAAFillEllipseSolid(DrawablePtr pDraw, GCPtr pGC, xArc *arc) { XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_GC(pGC); register int x, y, e; int yk, xk, ym, xm, dx, dy, xorg, yorg; int slw; miFillArcRec info; (*infoRec->SetupForSolidFill)(infoRec->pScrn, pGC->fgPixel, pGC->alu, pGC->planemask); miFillArcSetup(arc, &info); MIFILLARCSETUP(); if (pGC->miTranslate) { xorg += pDraw->x; yorg += pDraw->y; } while (y > 0) { MIFILLARCSTEP(slw); if (slw > 0) { (*infoRec->SubsequentSolidFillRect)(infoRec->pScrn, xorg - x, yorg - y, slw, 1); if (miFillArcLower(slw)) (*infoRec->SubsequentSolidFillRect)(infoRec->pScrn, xorg - x, yorg + y + dy, slw, 1); } } SET_SYNC_FLAG(infoRec); }
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); }
/* Wheee, circles... */ static void CreatorFillEllipseSolid(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; int x, y, e, yk, xk, ym, xm, dx, dy, xorg, yorg, slw; /* 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); } /* Start computing the rects. */ miFillArcSetup(arc, &info); MIFILLARCSETUP(); if(pGC->miTranslate) { xorg += pDrawable->x; yorg += pDrawable->y; } while(y > 0) { MIFILLARCSTEP(slw); if(slw > 0) { /* Render. */ FFBFifo(pFfb, 4); FFB_WRITE64(&ffb->by, yorg - y, xorg - x); FFB_WRITE64_2(&ffb->bh, 1, slw); if(miFillArcLower(slw)) { FFBFifo(pFfb, 4); FFB_WRITE64(&ffb->by, yorg + y + dy, xorg - x); FFB_WRITE64_2(&ffb->bh, 1, slw); } } } 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); }
static void mfbFillEllipseSolid( DrawablePtr pDraw, xArc *arc, register int rop) { int x, y, e; int yk, xk, ym, xm, dx, dy, xorg, yorg; register int slw; miFillArcRec info; PixelType *addrlt, *addrlb; register PixelType *addrl; register int n; int nlwidth; register int xpos; PixelType startmask, endmask; int nlmiddle; mfbGetPixelWidthAndPointer(pDraw, nlwidth, addrlt); miFillArcSetup(arc, &info); MIFILLARCSETUP(); xorg += pDraw->x; yorg += pDraw->y; addrlb = addrlt; addrlt += nlwidth * (yorg - y); addrlb += nlwidth * (yorg + y + dy); while (y) { addrlt += nlwidth; addrlb -= nlwidth; MIFILLARCSTEP(slw); if (!slw) continue; xpos = xorg - x; addrl = mfbScanlineOffset(addrlt, (xpos >> PWSH)); if (((xpos & PIM) + slw) < PPW) { maskpartialbits(xpos, slw, startmask); if (rop == RROP_BLACK) *addrl &= ~startmask; else if (rop == RROP_WHITE) *addrl |= startmask; else *addrl ^= startmask; if (miFillArcLower(slw)) { addrl = mfbScanlineOffset(addrlb, (xpos >> PWSH)); if (rop == RROP_BLACK) *addrl &= ~startmask; else if (rop == RROP_WHITE) *addrl |= startmask; else *addrl ^= startmask; } continue; } maskbits(xpos, slw, startmask, endmask, nlmiddle); if (startmask) { if (rop == RROP_BLACK) *addrl++ &= ~startmask; else if (rop == RROP_WHITE) *addrl++ |= startmask; else *addrl++ ^= startmask; } n = nlmiddle; if (rop == RROP_BLACK) while (n--) *addrl++ = 0; else if (rop == RROP_WHITE) while (n--) *addrl++ = ~0; else while (n--) *addrl++ ^= ~0; if (endmask) { if (rop == RROP_BLACK) *addrl &= ~endmask; else if (rop == RROP_WHITE) *addrl |= endmask; else *addrl ^= endmask; } if (!miFillArcLower(slw)) continue; addrl = mfbScanlineOffset(addrlb, (xpos >> PWSH)); if (startmask) { if (rop == RROP_BLACK) *addrl++ &= ~startmask; else if (rop == RROP_WHITE) *addrl++ |= startmask; else *addrl++ ^= startmask; } n = nlmiddle; if (rop == RROP_BLACK) while (n--) *addrl++ = 0; else if (rop == RROP_WHITE) while (n--) *addrl++ = ~0; else while (n--) *addrl++ ^= ~0; if (endmask) { if (rop == RROP_BLACK) *addrl &= ~endmask; else if (rop == RROP_WHITE) *addrl |= endmask; else *addrl ^= endmask; } }