diff options
Diffstat (limited to 'tqtinterface/qt4/src/kernel/tqpaintdevice_x11.cpp')
-rw-r--r-- | tqtinterface/qt4/src/kernel/tqpaintdevice_x11.cpp | 148 |
1 files changed, 74 insertions, 74 deletions
diff --git a/tqtinterface/qt4/src/kernel/tqpaintdevice_x11.cpp b/tqtinterface/qt4/src/kernel/tqpaintdevice_x11.cpp index fd4cc0b..de0695f 100644 --- a/tqtinterface/qt4/src/kernel/tqpaintdevice_x11.cpp +++ b/tqtinterface/qt4/src/kernel/tqpaintdevice_x11.cpp @@ -248,7 +248,7 @@ int TQPaintDevice::x11AppDpiY(int screen) TQt::RasterOp documentation defines all the possible values. If \a ignoreMask is FALSE (the default) and \a src is a - masked TQPixmap, the entire blit is masked by \a{src}->tqmask(). + masked TQPixmap, the entire blit is masked by \a{src}->mask(). If \a src, \a dst, \a sw or \a sh is 0, bitBlt() does nothing. If \a sw or \a sh is negative bitBlt() copies starting at \a sx (and @@ -311,11 +311,11 @@ printf("[WARNING] bitBlt( TQPaintDevice *dst, int dx, int dy, const TQPaintDevic // sw != pm->width() || sh != pm->height() || ignoreMask ) { // TQPixmap *tmp = new TQPixmap( sw, sh, pm->depth() ); // bitBlt( tmp, 0, 0, pm, sx, sy, sw, sh, TQt::CopyROP, TRUE ); -// if ( pm->tqmask() && !ignoreMask ) { -// TQBitmap tqmask( sw, sh ); -// bitBlt( &tqmask, 0, 0, pm->tqmask(), sx, sy, sw, sh, +// if ( pm->mask() && !ignoreMask ) { +// TQBitmap mask( sw, sh ); +// bitBlt( &mask, 0, 0, pm->mask(), sx, sy, sw, sh, // TQt::CopyROP, TRUE ); -// tmp->setMask( tqmask ); +// tmp->setMask( mask ); // } // pm = tmp; // } else { @@ -389,18 +389,18 @@ printf("[WARNING] bitBlt( TQPaintDevice *dst, int dx, int dy, const TQPaintDevic // bool include_inferiors = FALSE; // bool graphics_exposure = FALSE; // TQPixmap *src_pm; -// TQBitmap *tqmask; +// TQBitmap *mask; // // if ( ts == TQInternal::Pixmap ) { // src_pm = (TQPixmap*)src; // if ( src_pm->x11Screen() != dst->x11Screen() ) // src_pm->x11SetScreen( dst->x11Screen() ); // mono_src = src_pm->depth() == 1; -// tqmask = ignoreMask ? 0 : src_pm->data->tqmask; +// mask = ignoreMask ? 0 : src_pm->data->mask; // } else { // src_pm = 0; // mono_src = FALSE; -// tqmask = 0; +// mask = 0; // include_inferiors = ((TQWidget*)src)->testWFlags(TQt::WPaintUnclipped); // graphics_exposure = td == TQInternal::Widget; // } @@ -430,25 +430,25 @@ printf("[WARNING] bitBlt( TQPaintDevice *dst, int dx, int dy, const TQPaintDevic // alpha->x11RenderHandle() && // dst->x11RenderHandle()) { // XRenderPictureAttributes pattr; -// ulong pictqmask = 0; +// ulong picmask = 0; // if (include_inferiors) { // pattr.subwindow_mode = IncludeInferiors; -// pictqmask |= CPSubwindowMode; +// picmask |= CPSubwindowMode; // } // if (graphics_exposure) { // pattr.graphics_exposures = TRUE; -// pictqmask |= CPGraphicsExposure; +// picmask |= CPGraphicsExposure; // } -// if (pictqmask) -// XRenderChangePicture(dpy, dst->x11RenderHandle(), pictqmask, &pattr); +// if (picmask) +// XRenderChangePicture(dpy, dst->x11RenderHandle(), picmask, &pattr); // XRenderComposite(dpy, PictOpOver, src->x11RenderHandle(), // alpha->x11RenderHandle(), dst->x11RenderHandle(), // sx, sy, sx, sy, dx, dy, sw, sh); // // restore attributes // pattr.subwindow_mode = ClipByChildren; // pattr.graphics_exposures = FALSE; -// if (pictqmask) -// XRenderChangePicture(dpy, dst->x11RenderHandle(), pictqmask, &pattr); +// if (picmask) +// XRenderChangePicture(dpy, dst->x11RenderHandle(), picmask, &pattr); // return; // } // } @@ -456,25 +456,25 @@ printf("[WARNING] bitBlt( TQPaintDevice *dst, int dx, int dy, const TQPaintDevic // // GC gc; // -// if ( tqmask && !mono_src ) { // fast masked blt +// if ( mask && !mono_src ) { // fast masked blt // bool temp_gc = FALSE; -// if ( tqmask->data->maskgc ) { -// gc = (GC)tqmask->data->maskgc; // we have a premade tqmask GC +// if ( mask->data->maskgc ) { +// gc = (GC)mask->data->maskgc; // we have a premade mask GC // } else { // if ( FALSE && src_pm->optimization() == TQPixmap::NormalOptim ) { // #### cache disabled // // Compete for the global cache // gc = cache_mask_gc( dpy, dst->handle(), -// tqmask->data->ser_no, -// tqmask->handle() ); +// mask->data->ser_no, +// mask->handle() ); // } else { -// // Create a new tqmask GC. If BestOptim, we store the tqmask GC -// // with the tqmask (not at the pixmap). This way, many pixmaps -// // which have a common tqmask will be optimized at no extra cost. +// // Create a new mask GC. If BestOptim, we store the mask GC +// // with the mask (not at the pixmap). This way, many pixmaps +// // which have a common mask will be optimized at no extra cost. // gc = XCreateGC( dpy, dst->handle(), 0, 0 ); // XSetGraphicsExposures( dpy, gc, False ); -// XSetClipMask( dpy, gc, tqmask->handle() ); +// XSetClipMask( dpy, gc, mask->handle() ); // if ( src_pm->optimization() == TQPixmap::BestOptim ) { -// tqmask->data->maskgc = gc; +// mask->data->maskgc = gc; // } else { // temp_gc = TRUE; // } @@ -509,14 +509,14 @@ printf("[WARNING] bitBlt( TQPaintDevice *dst, int dx, int dy, const TQPaintDevic // XCopyArea( dpy, src->handle(), dst->handle(), gc, sx, sy, sw, sh, dx, dy ); // } else if ( mono_src ) { // src is bitmap // XGCValues gcvals; -// ulong valtqmask = GCBackground | GCForeground | GCFillStyle | +// ulong valmask = GCBackground | GCForeground | GCFillStyle | // GCStipple | GCTileStipXOrigin | GCTileStipYOrigin; // if ( td == TQInternal::Widget ) { // set GC colors // TQWidget *w = (TQWidget *)dst; // gcvals.background = w->backgroundColor().pixel( dst->x11Screen() ); // gcvals.foreground = w->foregroundColor().pixel( dst->x11Screen() ); // if ( include_inferiors ) { -// valtqmask |= GCSubwindowMode; +// valmask |= GCSubwindowMode; // gcvals.subwindow_mode = IncludeInferiors; // } // } else if ( mono_dst ) { @@ -532,31 +532,31 @@ printf("[WARNING] bitBlt( TQPaintDevice *dst, int dx, int dy, const TQPaintDevic // gcvals.ts_x_origin = dx - sx; // gcvals.ts_y_origin = dy - sy; // -// bool cliptqmask = FALSE; -// if ( tqmask ) { +// bool clipmask = FALSE; +// if ( mask ) { // if ( ((TQPixmap*)src)->data->selfmask ) { // gcvals.fill_style = FillStippled; // } else { -// XSetClipMask( dpy, gc, tqmask->handle() ); +// XSetClipMask( dpy, gc, mask->handle() ); // XSetClipOrigin( dpy, gc, dx-sx, dy-sy ); -// cliptqmask = TRUE; +// clipmask = TRUE; // } // } // -// XChangeGC( dpy, gc, valtqmask, &gcvals ); +// XChangeGC( dpy, gc, valmask, &gcvals ); // XFillRectangle( dpy,dst->handle(), gc, dx, dy, sw, sh ); // -// valtqmask = GCFillStyle | GCTileStipXOrigin | GCTileStipYOrigin; +// valmask = GCFillStyle | GCTileStipXOrigin | GCTileStipYOrigin; // gcvals.fill_style = FillSolid; // gcvals.ts_x_origin = 0; // gcvals.ts_y_origin = 0; // if ( include_inferiors ) { -// valtqmask |= GCSubwindowMode; +// valmask |= GCSubwindowMode; // gcvals.subwindow_mode = ClipByChildren; // } -// XChangeGC( dpy, gc, valtqmask, &gcvals ); +// XChangeGC( dpy, gc, valmask, &gcvals ); // -// if ( cliptqmask ) { +// if ( clipmask ) { // XSetClipOrigin( dpy, gc, 0, 0 ); // XSetClipMask( dpy, gc, None ); // } @@ -1355,7 +1355,7 @@ static void cleanup_mask_gc() } } -static GC cache_mask_gc( Display *dpy, Drawable hd, int mask_no, Pixmap tqmask ) +static GC cache_mask_gc( Display *dpy, Drawable hd, int mask_no, Pixmap mask ) { if ( !init_mask_gc ) { // first time initialization init_mask_gc = TRUE; @@ -1369,7 +1369,7 @@ static GC cache_mask_gc( Display *dpy, Drawable hd, int mask_no, Pixmap tqmask ) p->gc = XCreateGC( dpy, hd, 0, 0 ); XSetGraphicsExposures( dpy, p->gc, False ); } - XSetClipMask( dpy, p->gc, tqmask ); + XSetClipMask( dpy, p->gc, mask ); p->mask_no = mask_no; } return p->gc; @@ -1390,7 +1390,7 @@ static GC cache_mask_gc( Display *dpy, Drawable hd, int mask_no, Pixmap tqmask ) TQt::RasterOp documentation defines all the possible values. If \a ignoreMask is FALSE (the default) and \a src is a - masked TQPixmap, the entire blit is masked by \a{src}->tqmask(). + masked TQPixmap, the entire blit is masked by \a{src}->mask(). If \a src, \a dst, \a sw or \a sh is 0, bitBlt() does nothing. If \a sw or \a sh is negative bitBlt() copies starting at \a sx (and @@ -1450,11 +1450,11 @@ void bitBlt( TQPaintDevice *dst, int dx, int dy, sw != pm->width() || sh != pm->height() || ignoreMask ) { TQPixmap *tmp = new TQPixmap( sw, sh, pm->depth() ); bitBlt( tmp, 0, 0, pm, sx, sy, sw, sh, TQt::CopyROP, TRUE ); - if ( pm->tqmask() && !ignoreMask ) { - TQBitmap tqmask( sw, sh ); - bitBlt( &tqmask, 0, 0, pm->tqmask(), sx, sy, sw, sh, + if ( pm->mask() && !ignoreMask ) { + TQBitmap mask( sw, sh ); + bitBlt( &mask, 0, 0, pm->mask(), sx, sy, sw, sh, TQt::CopyROP, TRUE ); - tmp->setMask( tqmask ); + tmp->setMask( mask ); } pm = tmp; } else { @@ -1528,18 +1528,18 @@ void bitBlt( TQPaintDevice *dst, int dx, int dy, bool include_inferiors = FALSE; bool graphics_exposure = FALSE; TQPixmap *src_pm; - TQBitmap *tqmask; + TQBitmap *mask; if ( ts == TQInternal::Pixmap ) { src_pm = (TQPixmap*)src; if ( src_pm->x11Screen() != dst->x11Screen() ) src_pm->x11SetScreen( dst->x11Screen() ); mono_src = src_pm->depth() == 1; - tqmask = ignoreMask ? 0 : src_pm->data->tqmask; + mask = ignoreMask ? 0 : src_pm->data->mask; } else { src_pm = 0; mono_src = FALSE; - tqmask = 0; + mask = 0; include_inferiors = ((TQWidget*)src)->testWFlags(TQt::WPaintUnclipped); graphics_exposure = td == TQInternal::Widget; } @@ -1569,25 +1569,25 @@ void bitBlt( TQPaintDevice *dst, int dx, int dy, alpha->x11RenderHandle() && dst->x11RenderHandle()) { XRenderPictureAttributes pattr; - ulong pictqmask = 0; + ulong picmask = 0; if (include_inferiors) { pattr.subwindow_mode = IncludeInferiors; - pictqmask |= CPSubwindowMode; + picmask |= CPSubwindowMode; } if (graphics_exposure) { pattr.graphics_exposures = TRUE; - pictqmask |= CPGraphicsExposure; + picmask |= CPGraphicsExposure; } - if (pictqmask) - XRenderChangePicture(dpy, dst->x11RenderHandle(), pictqmask, &pattr); + if (picmask) + XRenderChangePicture(dpy, dst->x11RenderHandle(), picmask, &pattr); XRenderComposite(dpy, PictOpOver, src->x11RenderHandle(), alpha->x11RenderHandle(), dst->x11RenderHandle(), sx, sy, sx, sy, dx, dy, sw, sh); // restore attributes pattr.subwindow_mode = ClipByChildren; pattr.graphics_exposures = FALSE; - if (pictqmask) - XRenderChangePicture(dpy, dst->x11RenderHandle(), pictqmask, &pattr); + if (picmask) + XRenderChangePicture(dpy, dst->x11RenderHandle(), picmask, &pattr); return; } } @@ -1595,25 +1595,25 @@ void bitBlt( TQPaintDevice *dst, int dx, int dy, GC gc; - if ( tqmask && !mono_src ) { // fast masked blt + if ( mask && !mono_src ) { // fast masked blt bool temp_gc = FALSE; - if ( tqmask->data->maskgc ) { - gc = (GC)tqmask->data->maskgc; // we have a premade tqmask GC + if ( mask->data->maskgc ) { + gc = (GC)mask->data->maskgc; // we have a premade mask GC } else { if ( FALSE && src_pm->optimization() == TQPixmap::NormalOptim ) { // #### cache disabled // Compete for the global cache gc = cache_mask_gc( dpy, dst->handle(), - tqmask->data->ser_no, - tqmask->handle() ); + mask->data->ser_no, + mask->handle() ); } else { - // Create a new tqmask GC. If BestOptim, we store the tqmask GC - // with the tqmask (not at the pixmap). This way, many pixmaps - // which have a common tqmask will be optimized at no extra cost. + // Create a new mask GC. If BestOptim, we store the mask GC + // with the mask (not at the pixmap). This way, many pixmaps + // which have a common mask will be optimized at no extra cost. gc = XCreateGC( dpy, dst->handle(), 0, 0 ); XSetGraphicsExposures( dpy, gc, False ); - XSetClipMask( dpy, gc, tqmask->handle() ); + XSetClipMask( dpy, gc, mask->handle() ); if ( src_pm->optimization() == TQPixmap::BestOptim ) { - tqmask->data->maskgc = gc; + mask->data->maskgc = gc; } else { temp_gc = TRUE; } @@ -1648,14 +1648,14 @@ void bitBlt( TQPaintDevice *dst, int dx, int dy, XCopyArea( dpy, src->handle(), dst->handle(), gc, sx, sy, sw, sh, dx, dy ); } else if ( mono_src ) { // src is bitmap XGCValues gcvals; - ulong valtqmask = GCBackground | GCForeground | GCFillStyle | + ulong valmask = GCBackground | GCForeground | GCFillStyle | GCStipple | GCTileStipXOrigin | GCTileStipYOrigin; if ( td == TQInternal::Widget ) { // set GC colors TQWidget *w = (TQWidget *)dst; gcvals.background = w->backgroundColor().pixel( dst->x11Screen() ); gcvals.foreground = w->foregroundColor().pixel( dst->x11Screen() ); if ( include_inferiors ) { - valtqmask |= GCSubwindowMode; + valmask |= GCSubwindowMode; gcvals.subwindow_mode = IncludeInferiors; } } else if ( mono_dst ) { @@ -1671,31 +1671,31 @@ void bitBlt( TQPaintDevice *dst, int dx, int dy, gcvals.ts_x_origin = dx - sx; gcvals.ts_y_origin = dy - sy; - bool cliptqmask = FALSE; - if ( tqmask ) { + bool clipmask = FALSE; + if ( mask ) { if ( ((TQPixmap*)src)->data->selfmask ) { gcvals.fill_style = FillStippled; } else { - XSetClipMask( dpy, gc, tqmask->handle() ); + XSetClipMask( dpy, gc, mask->handle() ); XSetClipOrigin( dpy, gc, dx-sx, dy-sy ); - cliptqmask = TRUE; + clipmask = TRUE; } } - XChangeGC( dpy, gc, valtqmask, &gcvals ); + XChangeGC( dpy, gc, valmask, &gcvals ); XFillRectangle( dpy,dst->handle(), gc, dx, dy, sw, sh ); - valtqmask = GCFillStyle | GCTileStipXOrigin | GCTileStipYOrigin; + valmask = GCFillStyle | GCTileStipXOrigin | GCTileStipYOrigin; gcvals.fill_style = FillSolid; gcvals.ts_x_origin = 0; gcvals.ts_y_origin = 0; if ( include_inferiors ) { - valtqmask |= GCSubwindowMode; + valmask |= GCSubwindowMode; gcvals.subwindow_mode = ClipByChildren; } - XChangeGC( dpy, gc, valtqmask, &gcvals ); + XChangeGC( dpy, gc, valmask, &gcvals ); - if ( cliptqmask ) { + if ( clipmask ) { XSetClipOrigin( dpy, gc, 0, 0 ); XSetClipMask( dpy, gc, None ); } |