}
}
+long long unsigned int compare64(long long unsigned int*data1, long long unsigned int*data2, int len)
+{
+ long long unsigned int c;
+ int t;
+ for(t=0;t<len;t++) {
+ c |= data1[t]&data2[t];
+ }
+ return c;
+}
+
GBool BitmapOutputDev::intersection()
{
SplashBitmap*boolpoly = boolpolybitmap;
int t;
int len = height*width8;
- unsigned int c=0;
- if(len & (sizeof(unsigned int)-1)) {
- Guchar c2=0;
- for(t=0;t<len;t++) {
- c2 |= polypixels[t]&textpixels[t];
- }
- c = c2;
- } else {
- len /= sizeof(unsigned int);
- for(t=0;t<len;t++) {
- c |= (((unsigned int*)polypixels)[t]) & (((unsigned int*)textpixels)[t]);
+ unsigned long long int c=0;
+ assert(sizeof(unsigned long long int)==8);
+ {
+ if((polypixels&7) || (textpixels&7)) {
+ msg("<warning> Non-optimal alignment");
+ }
+ int l2 = len;
+ len /= sizeof(unsigned long long int);
+ c = compare64((unsigned long long int*)polypixels, (unsigned long long int*)textpixels, len);
+ int l1 = len*sizeof(unsigned long long int);
+ for(t=l1;t<l2;t++) {
+ c |= (unsigned long long int)(polypixels[t]&textpixels[t]);
}
}
if(c)
void BitmapOutputDev::endPage()
{
msg("<verbose> endPage (BitmapOutputDev)");
+
+ /* notice: we're not fully done yet with this page- there might still be
+ a few calls to drawLink() yet to come */
+}
+void BitmapOutputDev::finishPage()
+{
+ msg("<verbose> finishPage (BitmapOutputDev)");
+ gfxdev->endPage();
if(layerstate == STATE_BITMAP_IS_ABOVE) {
this->flushText();
rgbdev->endPage();
clip0dev->endPage();
clip1dev->endPage();
- gfxdev->endPage();
}
GBool BitmapOutputDev::upsideDown()
}
void BitmapOutputDev::eoClip(GfxState *state)
{
- return;
msg("<debug> eoClip");
boolpolydev->eoClip(state);
booltextdev->eoClip(state);
#if (xpdfMajorVersion*10000 + xpdfMinorVersion*100 + xpdfUpdateVersion) < 30207
GfxState*state1 = state->copy();
GfxState*state2 = state->copy();
+ state1->setPath(0);
state1->setPath(state->getPath()->copy());
+ state2->setPath(0);
state2->setPath(state->getPath()->copy());
#else
GfxState*state1 = state->copy(gTrue);
#if (xpdfMajorVersion*10000 + xpdfMinorVersion*100 + xpdfUpdateVersion) < 30207
GfxState*state1 = state->copy();
GfxState*state2 = state->copy();
+ state1->setPath(0);
state1->setPath(state->getPath()->copy());
+ state2->setPath(0);
state2->setPath(state->getPath()->copy());
#else
GfxState*state1 = state->copy(gTrue);