From c6f54982a3659c5a3c2bc689f810524e575f7184 Mon Sep 17 00:00:00 2001 From: mattias Date: Wed, 14 Dec 2005 01:47:45 +0000 Subject: [PATCH] fixed -dVerboseStretchCopyArea git-svn-id: trunk@8311 - --- lcl/interfaces/gtk/gtkobject.inc | 52 ++++++++++++++++---------------- lcl/interfaces/gtk/gtkproc.inc | 28 ++++++++--------- 2 files changed, 40 insertions(+), 40 deletions(-) diff --git a/lcl/interfaces/gtk/gtkobject.inc b/lcl/interfaces/gtk/gtkobject.inc index e318d015b6..1264f6a688 100644 --- a/lcl/interfaces/gtk/gtkobject.inc +++ b/lcl/interfaces/gtk/gtkobject.inc @@ -2753,7 +2753,7 @@ var if SizeChange then begin {$IFDEF VerboseStretchCopyArea} Depth:=gdk_visual_get_system^.Depth; - DebugLn('ScaleAndROP Scaling buffer: ',Width,' x ',Height,' x ',Depth,' CopyingWholeSrc=',CopyingWholeSrc); + DebugLn('ScaleAndROP Scaling buffer: '+dbgs(Width),' x '+dbgs(Height),' x '+dbgs(Depth),' CopyingWholeSrc='+dbgs(CopyingWholeSrc)); {$ENDIF} // Scale the src part to a temporary pixmap with the size of the // destination rectangle @@ -2785,7 +2785,7 @@ var Depth:=gdk_visual_get_system^.Depth; {$IFDEF VerboseStretchCopyArea} - DebugLn('ScaleAndROP Creating rop buffer: ',Width,' x ',Height,' x ',Depth); + DebugLn('ScaleAndROP Creating rop buffer: '+dbgs(Width),' x '+dbgs(Height),' x '+dbgs(Depth)); {$ENDIF} TempPixmap := gdk_pixmap_new(nil,SrcWidth,SrcHeight,Depth); gdk_window_copy_area(TempPixmap, fGC, 0, 0, @@ -2806,7 +2806,7 @@ var if TempPixmap=nil then exit; if (ROp=WHITENESS) or (ROp=BLACKNESS) or (ROp=DSTINVERT) then begin {$IFDEF VerboseStretchCopyArea} - DebugLn('ROPFillBuffer ROp=',ROp); + DebugLn('ROPFillBuffer ROp='+dbgs(ROp)); {$ENDIF} with TDeviceContext(DC) do begin @@ -2905,9 +2905,9 @@ var {$IFDEF VerboseStretchCopyArea} DebugLn('SrcDevBitmapToDrawable ', ' SrcPixmap=',DbgS(SrcPixmap), - ' XSrc=',XSrc,' YSrc=',YSrc,' SrcWidth=',SrcWidth,' SrcHeight=',SrcHeight, + ' XSrc='+dbgs(XSrc),' YSrc='+dbgs(YSrc),' SrcWidth='+dbgs(SrcWidth),' SrcHeight='+dbgs(SrcHeight), ' MaskPixmap=',DbgS(MaskPixmap), - ' XMask=',XMask,' YMask=',YMask, + ' XMask='+dbgs(XMask),' YMask='+dbgs(YMask), ''); {$ENDIF} @@ -3057,7 +3057,7 @@ var begin Result := IsValidDC(DestDC) and IsValidDC(SrcDC); {$IFDEF VerboseStretchCopyArea} - DebugLn('StretchCopyArea Start ',Result); + DebugLn('StretchCopyArea Start '+dbgs(Result)); {$ENDIF} if not Result then exit; if (Width=0) or (Height=0) then exit; @@ -3083,16 +3083,16 @@ begin end; {$IFDEF VerboseStretchCopyArea} - DebugLn('TGtkWidgetSet.StretchCopyArea BEFORE CLIPPING X=',X,' Y=',Y,' Width=',Width,' Height=',Height, - ' XSrc=',XSrc,' YSrc=',YSrc,' SrcWidth=',SrcWidth,' SrcHeight=',SrcHeight, + DebugLn('TGtkWidgetSet.StretchCopyArea BEFORE CLIPPING X='+dbgs(X),' Y='+dbgs(Y),' Width='+dbgs(Width),' Height='+dbgs(Height), + ' XSrc='+dbgs(XSrc)+' YSrc='+dbgs(YSrc)+' SrcWidth='+dbgs(SrcWidth)+' SrcHeight='+dbgs(SrcHeight), ' SrcDrawable=',DbgS(TDeviceContext(SrcDC).Drawable), - ' SrcOrigin=',SrcDCOrigin.X,',',SrcDCOrigin.Y, - ' DestDrawable=',DbgS(TDeviceContext(DestDC).Drawable), - ' DestOrigin=',DestDCOrigin.X,',',DestDCOrigin.Y, - ' Mask=',DbgS(Mask),' XMask=',XMask,' YMask=',YMask, - ' SizeChange=',SizeChange,' ROpIsSpecial=',ROpIsSpecial, - ' DestWhole=',DestWholeWidth,',',DestWholeHeight, - ' SrcWhole=',SrcWholeWidth,',',SrcWholeHeight, + ' SrcOrigin='+dbgs(SrcDCOrigin), + ' DestDrawable='+DbgS(TDeviceContext(DestDC).Drawable), + ' DestOrigin='+dbgs(DestDCOrigin), + ' Mask='+DbgS(Mask)+' XMask='+dbgs(XMask)+' YMask='+dbgs(YMask), + ' SizeChange='+dbgs(SizeChange)+' ROpIsSpecial='+dbgs(ROpIsSpecial), + ' DestWhole='+dbgs(DestWholeWidth)+','+dbgs(DestWholeHeight), + ' SrcWhole='+dbgs(SrcWholeWidth)+','+dbgs(SrcWholeHeight), ''); {$ENDIF} @@ -3111,7 +3111,7 @@ begin NewSrcWidth:=SrcWidth+XSrc; NewWidth:=((Width*NewSrcWidth) div SrcWidth); {$IFDEF VerboseStretchCopyArea} - DebugLn('StretchCopyArea Cliping Src to left NewSrcWidth=',NewSrcWidth,' NewWidth=',NewWidth); + DebugLn('StretchCopyArea Cliping Src to left NewSrcWidth='+dbgs(NewSrcWidth),' NewWidth='+dbgs(NewWidth)); {$ENDIF} if NewWidth=0 then exit; inc(X,Width-NewWidth); @@ -3125,7 +3125,7 @@ begin NewSrcHeight:=SrcHeight+YSrc; NewHeight:=((Height*NewSrcHeight) div SrcHeight); {$IFDEF VerboseStretchCopyArea} - DebugLn('StretchCopyArea Cliping Src to top NewSrcHeight=',NewSrcHeight,' NewHeight=',NewHeight); + DebugLn('StretchCopyArea Cliping Src to top NewSrcHeight='+dbgs(NewSrcHeight),' NewHeight='+dbgs(NewHeight)); {$ENDIF} if NewHeight=0 then exit; inc(Y,Height-NewHeight); @@ -3139,7 +3139,7 @@ begin NewSrcWidth:=SrcWholeWidth-XSrc; Width:=((Width*NewSrcWidth) div SrcWidth); {$IFDEF VerboseStretchCopyArea} - DebugLn('StretchCopyArea Cliping Src to right NewSrcWidth=',NewSrcWidth,' NewWidth=',Width); + DebugLn('StretchCopyArea Cliping Src to right NewSrcWidth='+dbgs(NewSrcWidth),' NewWidth='+dbgs(Width)); {$ENDIF} if (Width=0) then exit; if (X+Width<=0) then exit; @@ -3151,7 +3151,7 @@ begin NewSrcHeight:=SrcWholeHeight-YSrc; Height:=((Height*NewSrcHeight) div SrcHeight); {$IFDEF VerboseStretchCopyArea} - DebugLn('StretchCopyArea Cliping Src to bottom NewSrcHeight=',NewSrcHeight,' NewHeight=',Height); + DebugLn('StretchCopyArea Cliping Src to bottom NewSrcHeight='+dbgs(NewSrcHeight),' NewHeight='+dbgs(Height)); {$ENDIF} if (Height=0) then exit; if (Y+Height<=0) then exit; @@ -3172,13 +3172,13 @@ begin TempMaskPixmap:=nil; {$IFDEF VerboseStretchCopyArea} - write('TGtkWidgetSet.StretchCopyArea AFTER CLIPPING X=',X,' Y=',Y,' Width=',Width,' Height=',Height, - ' XSrc=',XSrc,' YSrc=',YSrc,' SrcWidth=',SrcWidth,' SrcHeight=',SrcHeight, - ' SrcDrawable=',DbgS(TDeviceContext(SrcDC).Drawable), - ' DestDrawable=',DbgS(TDeviceContext(DestDC).Drawable), - ' Mask=',DbgS(Mask),' XMask=',XMask,' YMask=',YMask, - ' SizeChange=',SizeChange,' ROpIsSpecial=',ROpIsSpecial, - ' CopyingWholeSrc=',CopyingWholeSrc); + write('TGtkWidgetSet.StretchCopyArea AFTER CLIPPING X='+dbgs(X)+' Y='+dbgs(Y)+' Width='+dbgs(Width)+' Height='+dbgs(Height), + ' XSrc='+dbgs(XSrc),' YSrc='+dbgs(YSrc)+' SrcWidth='+dbgs(SrcWidth)+' SrcHeight='+dbgs(SrcHeight), + ' SrcDrawable='+DbgS(TDeviceContext(SrcDC).Drawable), + ' DestDrawable='+DbgS(TDeviceContext(DestDC).Drawable), + ' Mask='+DbgS(Mask)+' XMask='+dbgs(XMask)+' YMask='+dbgs(YMask), + ' SizeChange='+dbgs(SizeChange)+' ROpIsSpecial='+dbgs(ROpIsSpecial), + ' CopyingWholeSrc='+dbgs(CopyingWholeSrc)); write(' ROp='); case ROp of SRCCOPY : DebugLn('SRCCOPY'); diff --git a/lcl/interfaces/gtk/gtkproc.inc b/lcl/interfaces/gtk/gtkproc.inc index 674720fa3a..9eb1ec90d6 100644 --- a/lcl/interfaces/gtk/gtkproc.inc +++ b/lcl/interfaces/gtk/gtkproc.inc @@ -1149,9 +1149,9 @@ begin {$IFDEF VerboseStretchCopyArea} DebugLn('MergeClipping START DestinationDC=',DbgS(DestinationDC), ' DestinationGC=',DbgS(DestinationGC), - ' X=',X,' Y=',Y,' Width=',Width,' Height=',Height, + ' X='+dbgs(X),' Y='+dbgs(Y),' Width='+dbgs(Width),' Height='+dbgs(Height), ' ClipMergeMask=',DbgS(ClipMergeMask), - ' ClipMergeMaskX=',ClipMergeMaskX,' ClipMergeMaskY=',ClipMergeMaskY); + ' ClipMergeMaskX=',dbgs(ClipMergeMaskX),' ClipMergeMaskY=',dbgs(ClipMergeMaskY)); {$ENDIF} // activate clipping region of destination @@ -1246,9 +1246,9 @@ begin {$IFDEF VerboseStretchCopyArea} DebugLn('ScalePixmap ScaleGC=',DbgS(ScaleGC), ' SrcPixmap=[',GetWindowDebugReport(SrcPixmap),']', - ' SrcX=',SrcX,' SrcY=',SrcY,' SrcWidth=',SrcWidth,' SrcHeight=',SrcHeight, + ' SrcX='+dbgs(SrcX),' SrcY='+dbgs(SrcY),' SrcWidth='+dbgs(SrcWidth),' SrcHeight='+dbgs(SrcHeight), ' NewPixmap=[',GetWindowDebugReport(NewPixmap),']', - ' NewWidth=',NewWidth,' NewHeight=',NewHeight); + ' NewWidth='+dbgs(NewWidth),' NewHeight='+dbgs(NewHeight)); {$ENDIF} Result := False; if SrcPixmap=nil then begin @@ -1289,7 +1289,7 @@ begin // Creating PixBuf from pixmap {$IFDEF VerboseStretchCopyArea} - DebugLn('ScalePixmap Creating PixBuf from pixmap SrcWhole=',SrcWholeWidth,',',SrcWholeHeight); + DebugLn('ScalePixmap Creating PixBuf from pixmap SrcWhole='+dbgs(SrcWholeWidth),','+dbgs(SrcWholeHeight)); {$ENDIF} ScaleSRC := gdk_pixbuf_get_from_drawable(nil,SrcPixmap, SrcColorMap,0,0,SrcX,SrcY,SrcWidth,SrcHeight); @@ -1301,10 +1301,10 @@ begin // Scaling PixBuf {$IFDEF VerboseStretchCopyArea} DebugLn('ScalePixmap Scaling PixBuf ', - ' Width=',gdk_pixbuf_get_width(ScaleSrc), - ' Height=',gdk_pixbuf_get_height(ScaleSrc), - ' HasAlpha=',gdk_pixbuf_get_has_alpha(ScaleSrc), - ' RowStride=',gdk_pixbuf_get_rowstride(ScaleSrc), + ' Width='+dbgs(gdk_pixbuf_get_width(ScaleSrc)), + ' Height='+dbgs(gdk_pixbuf_get_height(ScaleSrc)), + ' HasAlpha='+dbgs(gdk_pixbuf_get_has_alpha(ScaleSrc)), + ' RowStride='+dbgs(gdk_pixbuf_get_rowstride(ScaleSrc)), ''); {$ENDIF} ScaleDest := gdk_pixbuf_scale_simple(ScaleSRC,NewWidth,NewHeight,ScaleMethod); @@ -1318,10 +1318,10 @@ begin // Creating pixmap from scaled pixbuf {$IFDEF VerboseStretchCopyArea} DebugLn('ScalePixmap Creating pixmap from scaled pixbuf', - ' Width=',gdk_pixbuf_get_width(ScaleDest), - ' Height=',gdk_pixbuf_get_height(ScaleDest), - ' HasAlpha=',gdk_pixbuf_get_has_alpha(ScaleDest), - ' RowStride=',gdk_pixbuf_get_rowstride(ScaleDest), + ' Width='+dbgs(gdk_pixbuf_get_width(ScaleDest)), + ' Height='+dbgs(gdk_pixbuf_get_height(ScaleDest)), + ' HasAlpha='+dbgs(gdk_pixbuf_get_has_alpha(ScaleDest)), + ' RowStride='+dbgs(gdk_pixbuf_get_rowstride(ScaleDest)), ''); {$ENDIF} DummyMask:=nil; @@ -1338,7 +1338,7 @@ begin gdk_window_get_size(PGDKWindow(NewPixmap),@NewWholeWidth,@NewWholeHeight); DebugLn('ScalePixmap RESULT NewPixmap=',DbgS(NewPixmap), ' DummyMask=',DbgS(DummyMask), - ' NewWidth=',NewWholeWidth,' NewHeight=',NewWholeHeight, + ' NewWidth='+dbgs(NewWholeWidth),' NewHeight='+dbgs(NewWholeHeight), ''); {$ENDIF} if DummyMask<>nil then gdk_pixmap_unref(DummyMask);