void XAAFillMono8x8PatternSpans( ScrnInfoPtr pScrn, int fg, int bg, int rop, unsigned int planemask, int n, DDXPointPtr ppt, int *pwidth, int fSorted, int pattern0, int pattern1, int xorigin, int yorigin ){ XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_SCRNINFOPTR(pScrn); int patx = pattern0, paty = pattern1; int xorg, yorg, slot; XAACacheInfoPtr pCache = NULL; if(!(infoRec->Mono8x8PatternFillFlags & HARDWARE_PATTERN_PROGRAMMED_BITS)){ pCache = (*infoRec->CacheMono8x8Pattern)(pScrn, pattern0, pattern1); patx = pCache->x; paty = pCache->y; } (*infoRec->SetupForMono8x8PatternFill)(pScrn, patx, paty, fg, bg, rop, planemask); if(infoRec->ClipBox) (*infoRec->SetClippingRectangle)(infoRec->pScrn, infoRec->ClipBox->x1, infoRec->ClipBox->y1, infoRec->ClipBox->x2 - 1, infoRec->ClipBox->y2 - 1); while(n--) { xorg = (ppt->x - xorigin) & 0x07; yorg = (ppt->y - yorigin) & 0x07; if(!(infoRec->Mono8x8PatternFillFlags & HARDWARE_PATTERN_PROGRAMMED_ORIGIN)){ if(infoRec->Mono8x8PatternFillFlags & HARDWARE_PATTERN_PROGRAMMED_BITS) { patx = pattern0; paty = pattern1; XAARotateMonoPattern(&patx, &paty, xorg, yorg, (infoRec->Mono8x8PatternFillFlags & BIT_ORDER_IN_BYTE_MSBFIRST)); xorg = patx; yorg = paty; } else { slot = (yorg << 3) + xorg; xorg = patx + pCache->offsets[slot].x; yorg = paty + pCache->offsets[slot].y; } } (*infoRec->SubsequentMono8x8PatternFillRect)(pScrn, xorg, yorg, ppt->x, ppt->y, *pwidth, 1); ppt++; pwidth++; } if(infoRec->ClipBox) (*infoRec->DisableClipping)(infoRec->pScrn); SET_SYNC_FLAG(infoRec); }
void XAAFillMono8x8PatternRects(ScrnInfoPtr pScrn, int fg, int bg, int rop, unsigned int planemask, int nBox, BoxPtr pBox, int pattern0, int pattern1, int xorigin, int yorigin) { XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_SCRNINFOPTR(pScrn); int patx = pattern0, paty = pattern1; int xorg, yorg; XAACacheInfoPtr pCache = NULL; if (!(infoRec->Mono8x8PatternFillFlags & HARDWARE_PATTERN_PROGRAMMED_BITS)) { pCache = (*infoRec->CacheMono8x8Pattern) (pScrn, pattern0, pattern1); patx = pCache->x; paty = pCache->y; } (*infoRec->SetupForMono8x8PatternFill) (pScrn, patx, paty, fg, bg, rop, planemask); while (nBox--) { xorg = (pBox->x1 - xorigin) & 0x07; yorg = (pBox->y1 - yorigin) & 0x07; if (!(infoRec->Mono8x8PatternFillFlags & HARDWARE_PATTERN_PROGRAMMED_ORIGIN)) { if (infoRec->Mono8x8PatternFillFlags & HARDWARE_PATTERN_PROGRAMMED_BITS) { patx = pattern0; paty = pattern1; XAARotateMonoPattern(&patx, &paty, xorg, yorg, (infoRec->Mono8x8PatternFillFlags & BIT_ORDER_IN_BYTE_MSBFIRST)); xorg = patx; yorg = paty; } else { int slot = (yorg << 3) + xorg; xorg = patx + pCache->offsets[slot].x; yorg = paty + pCache->offsets[slot].y; } } (*infoRec->SubsequentMono8x8PatternFillRect) (pScrn, xorg, yorg, pBox->x1, pBox->y1, pBox->x2 - pBox->x1, pBox->y2 - pBox->y1); pBox++; } SET_SYNC_FLAG(infoRec); }