Fix origins on alpha pixmaps - thanks tor. Images on toolbars and other places shag, baby!

This commit is contained in:
blizzard%redhat.com 1999-06-23 11:12:13 +00:00
parent c7361a9220
commit 533e108b45

View File

@ -160,10 +160,10 @@ nsImageXlib::Draw(nsIRenderingContext &aContext,
XLIB_RGB_DITHER_MAX,
mImageBits, mRowBytes);
}
if (nsnull != mAlphaPixmap) {
// set up the gc to use the alpha pixmap for clipping
XSetClipOrigin(gDisplay, drawing->GetGC(), 0, 0);
XSetClipOrigin(gDisplay, drawing->GetGC(), aX, aY);
XSetClipMask(gDisplay, drawing->GetGC(), mAlphaPixmap);
}
@ -171,9 +171,9 @@ nsImageXlib::Draw(nsIRenderingContext &aContext,
mImagePixmap, // source
drawing->GetDrawable(), // dest
drawing->GetGC(), // GC
aX, aY, // xsrc, ysrc
0, 0, // xsrc, ysrc
aWidth, aHeight, // width, height
0, 0); // xdest, ydest
aX, aY); // xdest, ydest
if (mAlphaPixmap != nsnull) {
XSetClipOrigin(gDisplay, drawing->GetGC(), 0, 0);