mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-05-29 20:22:39 +02:00
implemented Double Buffering for synedit and deactivated multi buffering in TGTKObject.ExtTextOut
git-svn-id: trunk@5015 -
This commit is contained in:
parent
f5dd8a454e
commit
b6593d0a09
@ -62,7 +62,7 @@ interface
|
|||||||
|
|
||||||
uses
|
uses
|
||||||
{$IFDEF SYN_LAZARUS}
|
{$IFDEF SYN_LAZARUS}
|
||||||
FPCAdds, LCLIntf, LCLType, LMessages,
|
FPCAdds, LCLIntf, LCLType, LMessages, LCLProc,
|
||||||
{$ELSE}
|
{$ELSE}
|
||||||
Windows,
|
Windows,
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
@ -531,6 +531,10 @@ type
|
|||||||
procedure PaintGutter(AClip: TRect; FirstLine, LastLine: integer); virtual;
|
procedure PaintGutter(AClip: TRect; FirstLine, LastLine: integer); virtual;
|
||||||
procedure PaintTextLines(AClip: TRect; FirstLine, LastLine,
|
procedure PaintTextLines(AClip: TRect; FirstLine, LastLine,
|
||||||
FirstCol, LastCol: integer); virtual;
|
FirstCol, LastCol: integer); virtual;
|
||||||
|
{$IFDEF SYN_LAZARUS}
|
||||||
|
procedure StartPaintBuffer(const ClipRect: TRect);
|
||||||
|
procedure EndPaintBuffer(const ClipRect: TRect);
|
||||||
|
{$ENDIF}
|
||||||
procedure RecalcCharExtent;
|
procedure RecalcCharExtent;
|
||||||
procedure RedoItem; //sbs 2000-11-19
|
procedure RedoItem; //sbs 2000-11-19
|
||||||
procedure SetCaretXY(Value: TPoint); virtual;
|
procedure SetCaretXY(Value: TPoint); virtual;
|
||||||
@ -547,6 +551,10 @@ type
|
|||||||
protected
|
protected
|
||||||
fGutterWidth: Integer;
|
fGutterWidth: Integer;
|
||||||
fInternalImage: TSynInternalImage;
|
fInternalImage: TSynInternalImage;
|
||||||
|
{$IFNDEF DisableDoubleBuf}
|
||||||
|
BufferBitmap: TBitmap; // the double buffer
|
||||||
|
SavedCanvas: TCanvas; // the normal TCustomControl canvas during paint
|
||||||
|
{$ENDIF}
|
||||||
procedure DoOnClearBookmark(var Mark: TSynEditMark); virtual; // djlp - 2000-08-29
|
procedure DoOnClearBookmark(var Mark: TSynEditMark); virtual; // djlp - 2000-08-29
|
||||||
procedure DoOnCommandProcessed(Command: TSynEditorCommand; AChar: char;
|
procedure DoOnCommandProcessed(Command: TSynEditorCommand; AChar: char;
|
||||||
Data: pointer); virtual;
|
Data: pointer); virtual;
|
||||||
@ -618,7 +626,7 @@ type
|
|||||||
function PrevWordPos: TPoint; virtual;
|
function PrevWordPos: TPoint; virtual;
|
||||||
function PixelsToRowColumn(Pixels: TPoint): TPoint;
|
function PixelsToRowColumn(Pixels: TPoint): TPoint;
|
||||||
{$IFDEF SYN_LAZARUS}
|
{$IFDEF SYN_LAZARUS}
|
||||||
function PixelsToLogicalPos(Pixels: TPoint): TPoint;
|
function PixelsToLogicalPos(const Pixels: TPoint): TPoint;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
procedure Redo;
|
procedure Redo;
|
||||||
procedure RegisterCommandHandler(AHandlerProc: THookedCommandEvent;
|
procedure RegisterCommandHandler(AHandlerProc: THookedCommandEvent;
|
||||||
@ -750,12 +758,12 @@ type
|
|||||||
published
|
published
|
||||||
// inherited properties
|
// inherited properties
|
||||||
property Align;
|
property Align;
|
||||||
|
{$IFDEF SYN_LAZARUS}
|
||||||
|
property BlockIndent;
|
||||||
|
{$ENDIF}
|
||||||
{$IFDEF SYN_COMPILER_4_UP}
|
{$IFDEF SYN_COMPILER_4_UP}
|
||||||
property Anchors;
|
property Anchors;
|
||||||
{$IFNDEF SYN_LAZARUS}
|
|
||||||
// ToDo Constraints
|
|
||||||
property Constraints;
|
property Constraints;
|
||||||
{$ENDIF}
|
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
property Color;
|
property Color;
|
||||||
property Ctl3D;
|
property Ctl3D;
|
||||||
@ -784,10 +792,8 @@ type
|
|||||||
property OnDragDrop;
|
property OnDragDrop;
|
||||||
property OnDragOver;
|
property OnDragOver;
|
||||||
{$IFDEF SYN_COMPILER_4_UP}
|
{$IFDEF SYN_COMPILER_4_UP}
|
||||||
{$IFNDEF SYN_LAZARUS}
|
|
||||||
// ToDo Docking
|
// ToDo Docking
|
||||||
property OnEndDock;
|
property OnEndDock;
|
||||||
{$ENDIF}
|
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
property OnEndDrag;
|
property OnEndDrag;
|
||||||
property OnEnter;
|
property OnEnter;
|
||||||
@ -799,16 +805,11 @@ type
|
|||||||
property OnMouseMove;
|
property OnMouseMove;
|
||||||
property OnMouseUp;
|
property OnMouseUp;
|
||||||
{$IFDEF SYN_COMPILER_4_UP}
|
{$IFDEF SYN_COMPILER_4_UP}
|
||||||
{$IFNDEF SYN_LAZARUS}
|
|
||||||
// ToDo Docking
|
// ToDo Docking
|
||||||
property OnStartDock;
|
property OnStartDock;
|
||||||
{$ENDIF}
|
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
property OnStartDrag;
|
property OnStartDrag;
|
||||||
// TCustomSynEdit properties
|
// TCustomSynEdit properties
|
||||||
{$IFDEF SYN_LAZARUS}
|
|
||||||
property BlockIndent;
|
|
||||||
{$ENDIF}
|
|
||||||
property BookMarkOptions;
|
property BookMarkOptions;
|
||||||
property BorderStyle;
|
property BorderStyle;
|
||||||
property ExtraLineSpacing;
|
property ExtraLineSpacing;
|
||||||
@ -961,7 +962,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
{$IFDEF SYN_LAZARUS}
|
{$IFDEF SYN_LAZARUS}
|
||||||
function TCustomSynEdit.PixelsToLogicalPos(Pixels: TPoint): TPoint;
|
function TCustomSynEdit.PixelsToLogicalPos(const Pixels: TPoint): TPoint;
|
||||||
begin
|
begin
|
||||||
Result:=PhysicalToLogicalPos(PixelsToRowColumn(Pixels));
|
Result:=PhysicalToLogicalPos(PixelsToRowColumn(Pixels));
|
||||||
end;
|
end;
|
||||||
@ -2175,6 +2176,7 @@ begin
|
|||||||
// Get the invalidated rect. Compute the invalid area in lines / columns.
|
// Get the invalidated rect. Compute the invalid area in lines / columns.
|
||||||
{$IFDEF SYN_LAZARUS}
|
{$IFDEF SYN_LAZARUS}
|
||||||
rcClip:=Rect(0,0,Width,Height);
|
rcClip:=Rect(0,0,Width,Height);
|
||||||
|
StartPaintBuffer(rcClip);
|
||||||
Include(fStateFlags,sfPainting);
|
Include(fStateFlags,sfPainting);
|
||||||
{$ELSE}
|
{$ELSE}
|
||||||
rcClip := Canvas.ClipRect;
|
rcClip := Canvas.ClipRect;
|
||||||
@ -2208,6 +2210,9 @@ begin
|
|||||||
// If there is a custom paint handler call it.
|
// If there is a custom paint handler call it.
|
||||||
DoOnPaint;
|
DoOnPaint;
|
||||||
finally
|
finally
|
||||||
|
{$IFDEF SYN_LAZARUS}
|
||||||
|
EndPaintBuffer(rcClip);
|
||||||
|
{$ENDIF}
|
||||||
UpdateCaret;
|
UpdateCaret;
|
||||||
{$IFDEF SYN_LAZARUS}
|
{$IFDEF SYN_LAZARUS}
|
||||||
Exclude(fStateFlags,sfPainting);
|
Exclude(fStateFlags,sfPainting);
|
||||||
@ -3146,6 +3151,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
// Do everything else with API calls. This (maybe) realizes the new pen color.
|
// Do everything else with API calls. This (maybe) realizes the new pen color.
|
||||||
dc := Canvas.Handle;
|
dc := Canvas.Handle;
|
||||||
|
|
||||||
// If anything of the two pixel space before the text area is visible, then
|
// If anything of the two pixel space before the text area is visible, then
|
||||||
// fill it with the component background color.
|
// fill it with the component background color.
|
||||||
if (AClip.Left < fGutterWidth + 2) then begin
|
if (AClip.Left < fGutterWidth + 2) then begin
|
||||||
@ -3200,6 +3206,38 @@ begin
|
|||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{$IFDEF SYN_LAZARUS}
|
||||||
|
procedure TCustomSynEdit.StartPaintBuffer(const ClipRect: TRect);
|
||||||
|
begin
|
||||||
|
if (SavedCanvas<>nil) then RaiseGDBException('');
|
||||||
|
{$IFNDEF DisableDoubleBuf}
|
||||||
|
if BufferBitmap=nil then
|
||||||
|
BufferBitmap:=TBitmap.Create;
|
||||||
|
if BufferBitmap.Width<ClipRect.Right then
|
||||||
|
BufferBitmap.Width:=ClipRect.Right;
|
||||||
|
if BufferBitmap.Height<ClipRect.Bottom then
|
||||||
|
BufferBitmap.Height:=ClipRect.Bottom;
|
||||||
|
SavedCanvas:=Canvas;
|
||||||
|
Canvas:=BufferBitmap.Canvas;
|
||||||
|
{$ENDIF}
|
||||||
|
end;
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
|
{$IFDEF SYN_LAZARUS}
|
||||||
|
procedure TCustomSynEdit.EndPaintBuffer(const ClipRect: TRect);
|
||||||
|
begin
|
||||||
|
{$IFNDEF DisableDoubleBuf}
|
||||||
|
if (SavedCanvas=nil) then RaiseGDBException('');
|
||||||
|
if not (SavedCanvas is TControlCanvas) then RaiseGDBException('');
|
||||||
|
Canvas:=SavedCanvas;
|
||||||
|
SavedCanvas:=nil;
|
||||||
|
//writeln('TCustomSynEdit.EndPaintBuffer A');
|
||||||
|
Canvas.CopyRect(ClipRect,BufferBitmap.Canvas,ClipRect);
|
||||||
|
//writeln('TCustomSynEdit.EndPaintBuffer END');
|
||||||
|
{$ENDIF}
|
||||||
|
end;
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
procedure TCustomSynEdit.Update;
|
procedure TCustomSynEdit.Update;
|
||||||
begin
|
begin
|
||||||
{$IFDEF SYN_LAZARUS}
|
{$IFDEF SYN_LAZARUS}
|
||||||
@ -7347,13 +7385,17 @@ end;
|
|||||||
|
|
||||||
procedure TCustomSynEdit.DestroyWnd;
|
procedure TCustomSynEdit.DestroyWnd;
|
||||||
begin
|
begin
|
||||||
if (eoDropFiles in fOptions) and not (csDesigning in ComponentState) then
|
if (eoDropFiles in fOptions) and not (csDesigning in ComponentState) then begin
|
||||||
{$IFDEF SYN_LAZARUS}
|
{$IFDEF SYN_LAZARUS}
|
||||||
// ToDo DragAcceptFiles
|
// ToDo DragAcceptFiles
|
||||||
;
|
;
|
||||||
{$ELSE}
|
{$ELSE}
|
||||||
DragAcceptFiles(Handle, FALSE);
|
DragAcceptFiles(Handle, FALSE);
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
end;
|
||||||
|
{$IFNDEF DisableDoubleBuf}
|
||||||
|
FreeAndNil(BufferBitmap);
|
||||||
|
{$ENDIF}
|
||||||
inherited DestroyWnd;
|
inherited DestroyWnd;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -712,7 +712,7 @@ type
|
|||||||
TransparentColor: TColor);
|
TransparentColor: TColor);
|
||||||
procedure Chord(x,y,width,height,angle1,angle2 : Integer);
|
procedure Chord(x,y,width,height,angle1,angle2 : Integer);
|
||||||
procedure Chord(x,y,width,height,SX,SY,EX,EY : Integer);
|
procedure Chord(x,y,width,height,SX,SY,EX,EY : Integer);
|
||||||
Procedure CopyRect(const Dest : TRect; Canvas : TCanvas; const Source : TRect);
|
Procedure CopyRect(const Dest: TRect; SrcCanvas: TCanvas; const Source: TRect);
|
||||||
Procedure Draw(X,Y: Integer; Graphic : TGraphic);
|
Procedure Draw(X,Y: Integer; Graphic : TGraphic);
|
||||||
procedure StretchDraw(const ARect: TRect; Graphic: TGraphic);
|
procedure StretchDraw(const ARect: TRect; Graphic: TGraphic);
|
||||||
procedure Ellipse(const ARect: TRect);
|
procedure Ellipse(const ARect: TRect);
|
||||||
@ -1261,6 +1261,9 @@ end.
|
|||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.104 2004/01/05 01:18:15 mattias
|
||||||
|
implemented Double Buffering for synedit and deactivated multi buffering in TGTKObject.ExtTextOut
|
||||||
|
|
||||||
Revision 1.103 2004/01/03 23:14:59 mattias
|
Revision 1.103 2004/01/03 23:14:59 mattias
|
||||||
default font can now change height and fixed gtk crash
|
default font can now change height and fixed gtk crash
|
||||||
|
|
||||||
|
@ -62,16 +62,15 @@ end;
|
|||||||
{-----------------------------------------------}
|
{-----------------------------------------------}
|
||||||
{-- TCanvas.CopyRect --}
|
{-- TCanvas.CopyRect --}
|
||||||
{-----------------------------------------------}
|
{-----------------------------------------------}
|
||||||
Procedure TCanvas.CopyRect(const Dest : TRect; Canvas : TCanvas;
|
Procedure TCanvas.CopyRect(const Dest: TRect; SrcCanvas: TCanvas;
|
||||||
const Source: TRect);
|
const Source: TRect);
|
||||||
var
|
var
|
||||||
SH, SW, DH, DW: Integer;
|
SH, SW, DH, DW: Integer;
|
||||||
Begin
|
Begin
|
||||||
//this SHOULD stretch the image to the new canvas, but it doesn't yet.....
|
//this SHOULD stretch the image to the new canvas, but it doesn't yet.....
|
||||||
Assert(False, Format('Trace:==> [TCanvas.CopyRect] ', []));
|
Assert(False, Format('Trace:==> [TCanvas.CopyRect] ', []));
|
||||||
if Canvas <> nil
|
if SrcCanvas<> nil then begin
|
||||||
then begin
|
SrcCanvas.RequiredState([csHandleValid, csBrushValid]);
|
||||||
Canvas.RequiredState([csHandleValid, csBrushValid]);
|
|
||||||
RequiredState([csHandleValid, csBrushValid]);
|
RequiredState([csHandleValid, csBrushValid]);
|
||||||
|
|
||||||
SH := Source.Bottom - Source.Top;
|
SH := Source.Bottom - Source.Top;
|
||||||
@ -80,11 +79,11 @@ Begin
|
|||||||
DH := Dest.Bottom - Dest.Top;
|
DH := Dest.Bottom - Dest.Top;
|
||||||
DW := Dest.Right - Dest.Left;
|
DW := Dest.Right - Dest.Left;
|
||||||
if (Dh=0) and (DW=0) then exit;
|
if (Dh=0) and (DW=0) then exit;
|
||||||
//writeln('TCanvas.CopyRect ',ClassName,' Canvas=',Canvas.ClassName,' ',
|
//writeln('TCanvas.CopyRect ',ClassName,' SRcCanvas=',SrcCanvas.ClassName,' ',
|
||||||
// ' Src=',Source.Left,',',Source.Top,',',SW,',',SH,
|
// ' Src=',Source.Left,',',Source.Top,',',SW,',',SH,
|
||||||
// ' Dest=',Dest.Left,',',Dest.Top,',',DW,',',DH);
|
// ' Dest=',Dest.Left,',',Dest.Top,',',DW,',',DH);
|
||||||
StretchBlt(FHandle, Dest.Left, Dest.Top, DW, DH,
|
StretchBlt(FHandle, Dest.Left, Dest.Top, DW, DH,
|
||||||
Canvas.FHandle, Source.Left, Source.Top, SW, SH, CopyMode);
|
SrcCanvas.FHandle, Source.Left, Source.Top, SW, SH, CopyMode);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
Assert(False, Format('Trace:<== [TCanvas.CopyRect] ', []));
|
Assert(False, Format('Trace:<== [TCanvas.CopyRect] ', []));
|
||||||
@ -1254,6 +1253,9 @@ end;
|
|||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.61 2004/01/05 01:18:15 mattias
|
||||||
|
implemented Double Buffering for synedit and deactivated multi buffering in TGTKObject.ExtTextOut
|
||||||
|
|
||||||
Revision 1.60 2004/01/03 23:14:59 mattias
|
Revision 1.60 2004/01/03 23:14:59 mattias
|
||||||
default font can now change height and fixed gtk crash
|
default font can now change height and fixed gtk crash
|
||||||
|
|
||||||
|
@ -5644,6 +5644,16 @@ begin
|
|||||||
{$ENDIF GTK2}
|
{$ENDIF GTK2}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function GetTextHeight(DCTextMetric: TDevContextTextMetric): integer;
|
||||||
|
// IMPORTANT: Before this call: UpdateDCTextMetric(TDeviceContext(DC));
|
||||||
|
begin
|
||||||
|
{$IfDef Win32}
|
||||||
|
Result := DCTextMetric.TextMetric.tmHeight div 2;
|
||||||
|
{$Else}
|
||||||
|
Result := DCTextMetric.TextMetric.tmAscent;
|
||||||
|
{$EndIf}
|
||||||
|
end;
|
||||||
|
|
||||||
{$IFDEF ASSERT_IS_ON}
|
{$IFDEF ASSERT_IS_ON}
|
||||||
{$UNDEF ASSERT_IS_ON}
|
{$UNDEF ASSERT_IS_ON}
|
||||||
{$C-}
|
{$C-}
|
||||||
@ -5654,6 +5664,9 @@ end;
|
|||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.239 2004/01/05 01:18:15 mattias
|
||||||
|
implemented Double Buffering for synedit and deactivated multi buffering in TGTKObject.ExtTextOut
|
||||||
|
|
||||||
Revision 1.238 2004/01/04 16:44:33 mattias
|
Revision 1.238 2004/01/04 16:44:33 mattias
|
||||||
updated gtk2 package
|
updated gtk2 package
|
||||||
|
|
||||||
|
@ -451,14 +451,6 @@ Function DeleteAmpersands(var Str : String) : Longint;
|
|||||||
function Ampersands2Underscore(Src: PChar) : PChar;
|
function Ampersands2Underscore(Src: PChar) : PChar;
|
||||||
function RemoveAmpersands(Src: PChar; LineLength : Longint) : PChar;
|
function RemoveAmpersands(Src: PChar; LineLength : Longint) : PChar;
|
||||||
|
|
||||||
{$Ifdef GTK2}
|
|
||||||
Procedure GetTextExtentIgnoringAmpersands(FontDesc : PPangoFontDescription; Str : PChar;
|
|
||||||
LineLength : Longint; lbearing, rbearing, width, ascent, descent : Pgint);
|
|
||||||
{$Else}
|
|
||||||
Procedure GetTextExtentIgnoringAmpersands(Font : PGDKFont; Str : PChar;
|
|
||||||
LineLength : Longint; lbearing, rbearing, width, ascent, descent : Pgint);
|
|
||||||
{$EndIf}
|
|
||||||
|
|
||||||
function GetAccelGroup(const Widget: PGtkWidget;
|
function GetAccelGroup(const Widget: PGtkWidget;
|
||||||
CreateIfNotExists: boolean): PGTKAccelGroup;
|
CreateIfNotExists: boolean): PGTKAccelGroup;
|
||||||
procedure SetAccelGroup(const Widget: PGtkWidget;
|
procedure SetAccelGroup(const Widget: PGtkWidget;
|
||||||
@ -510,20 +502,26 @@ Function GetStyleWidget(const WName : String) : PGTKWidget;
|
|||||||
Procedure StyleFillRectangle(drawable : PGDKDrawable; GC : PGDKGC; Color : TColorRef; x, y, width, height : gint);
|
Procedure StyleFillRectangle(drawable : PGDKDrawable; GC : PGDKGC; Color : TColorRef; x, y, width, height : gint);
|
||||||
Function StyleForegroundColor(Color : TColorRef; DefaultColor : PGDKColor): PGDKColor;
|
Function StyleForegroundColor(Color : TColorRef; DefaultColor : PGDKColor): PGDKColor;
|
||||||
|
|
||||||
|
// fonts
|
||||||
{$Ifdef GTK2}
|
{$Ifdef GTK2}
|
||||||
function LoadDefaultFontDesc: PPangoFontDescription;
|
function LoadDefaultFontDesc: PPangoFontDescription;
|
||||||
{$Else}
|
Procedure GetTextExtentIgnoringAmpersands(FontDesc : PPangoFontDescription; Str : PChar;
|
||||||
|
LineLength : Longint; lbearing, rbearing, width, ascent, descent : Pgint);
|
||||||
|
{$ENDIF}
|
||||||
|
{$IFDEF GTK1}
|
||||||
|
function FontIsDoubleByteCharsFont(TheFont: PGdkFont): boolean;
|
||||||
function LoadDefaultFont: PGDKFont;
|
function LoadDefaultFont: PGDKFont;
|
||||||
|
Procedure GetTextExtentIgnoringAmpersands(Font : PGDKFont; Str : PChar;
|
||||||
|
LineLength : Longint; lbearing, rbearing, width, ascent, descent : Pgint);
|
||||||
{$EndIf}
|
{$EndIf}
|
||||||
function GetDefaultFontName: string;
|
function GetDefaultFontName: string;
|
||||||
|
Procedure FillScreenFonts(ScreenFonts : TStrings);
|
||||||
|
function GetTextHeight(DCTextMetric: TDevContextTextMetric): integer;
|
||||||
|
|
||||||
procedure RealizeGDKColor(ColorMap: PGdkColormap; Color: PGDKColor);
|
procedure RealizeGDKColor(ColorMap: PGdkColormap; Color: PGDKColor);
|
||||||
procedure RealizeGtkStyleColor(Style: PGTKStyle; Color: PGDKColor);
|
procedure RealizeGtkStyleColor(Style: PGTKStyle; Color: PGDKColor);
|
||||||
Function GetSysGCValues(Color: TColorRef; ThemeWidget: PGtkWidget): TGDKGCValues;
|
Function GetSysGCValues(Color: TColorRef; ThemeWidget: PGtkWidget): TGDKGCValues;
|
||||||
|
|
||||||
{$Ifdef GTK1}
|
|
||||||
function FontIsDoubleByteCharsFont(TheFont: PGdkFont): boolean;
|
|
||||||
{$EndIf}
|
|
||||||
|
|
||||||
Function GDKPixel2GDIRGB(Pixel : Longint; Visual : PGDKVisual;
|
Function GDKPixel2GDIRGB(Pixel : Longint; Visual : PGDKVisual;
|
||||||
Colormap : PGDKColormap) : TGDIRGB;
|
Colormap : PGDKColormap) : TGDIRGB;
|
||||||
@ -531,8 +529,6 @@ Function GDKPixel2GDIRGB(Pixel : Longint; Visual : PGDKVisual;
|
|||||||
Function GetWindowDecorations(AForm : TCustomForm) : Longint;
|
Function GetWindowDecorations(AForm : TCustomForm) : Longint;
|
||||||
Function GetWindowFunction(AForm : TCustomForm) : Longint;
|
Function GetWindowFunction(AForm : TCustomForm) : Longint;
|
||||||
|
|
||||||
Procedure FillScreenFonts(ScreenFonts : TStrings);
|
|
||||||
|
|
||||||
function GetGDKMouseCursor(Cursor: TCursor): PGdkCursor;
|
function GetGDKMouseCursor(Cursor: TCursor): PGdkCursor;
|
||||||
Procedure FreeGDKCursors;
|
Procedure FreeGDKCursors;
|
||||||
|
|
||||||
|
@ -72,12 +72,12 @@ begin
|
|||||||
DCOrigin:=GetDCOffset(TDeviceContext(DC));
|
DCOrigin:=GetDCOffset(TDeviceContext(DC));
|
||||||
inc(X,DCOrigin.X);
|
inc(X,DCOrigin.X);
|
||||||
inc(Y,DCOrigin.Y);
|
inc(Y,DCOrigin.Y);
|
||||||
{$IFNDEF DisableDoubleBuf}
|
{$IFDEF DebugGDKTraps}
|
||||||
BeginGDKErrorTrap;
|
BeginGDKErrorTrap;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
gdk_draw_arc(Drawable, GC, 0, X, Y, Width, Height,
|
gdk_draw_arc(Drawable, GC, 0, X, Y, Width, Height,
|
||||||
Angle1 shl 2, Angle2 shl 2);
|
Angle1 shl 2, Angle2 shl 2);
|
||||||
{$IFNDEF DisableDoubleBuf}
|
{$IFDEF DebugGDKTraps}
|
||||||
EndGDKErrorTrap;
|
EndGDKErrorTrap;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
end else
|
end else
|
||||||
@ -755,7 +755,7 @@ begin
|
|||||||
//write('TgtkObject.CreateBitmap->');
|
//write('TgtkObject.CreateBitmap->');
|
||||||
GdiObject := NewGDIObject(gdiBitmap);
|
GdiObject := NewGDIObject(gdiBitmap);
|
||||||
|
|
||||||
{$IFNDEF DisableDoubleBuf}
|
{$IFDEF DebugGDKTraps}
|
||||||
BeginGDKErrorTrap;
|
BeginGDKErrorTrap;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
@ -792,7 +792,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
GdiObject^.Colormap := gdk_colormap_new(GdiObject^.Visual, GdkTrue);
|
GdiObject^.Colormap := gdk_colormap_new(GdiObject^.Visual, GdkTrue);
|
||||||
{$IFNDEF DisableDoubleBuf}
|
{$IFDEF DebugGDKTraps}
|
||||||
EndGDKErrorTrap;
|
EndGDKErrorTrap;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
@ -972,7 +972,7 @@ begin
|
|||||||
|
|
||||||
sError := '';
|
sError := '';
|
||||||
|
|
||||||
{$IFNDEF DisableDoubleBuf}
|
{$IFDEF DebugGDKTraps}
|
||||||
BeginGDKErrorTrap;
|
BeginGDKErrorTrap;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
@ -1048,7 +1048,7 @@ begin
|
|||||||
, [lbStyle]);
|
, [lbStyle]);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{$IFNDEF DisableDoubleBuf}
|
{$IFDEF DebugGDKTraps}
|
||||||
EndGDKErrorTrap;
|
EndGDKErrorTrap;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
@ -1120,7 +1120,7 @@ begin
|
|||||||
|
|
||||||
Depth := -1;
|
Depth := -1;
|
||||||
|
|
||||||
{$IFNDEF DisableDoubleBuf}
|
{$IFDEF DebugGDKTraps}
|
||||||
BeginGDKErrorTrap;
|
BeginGDKErrorTrap;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
if (IsValidDC(DC) and (TDeviceContext(DC).Drawable <> nil)) then begin
|
if (IsValidDC(DC) and (TDeviceContext(DC).Drawable <> nil)) then begin
|
||||||
@ -1136,7 +1136,7 @@ begin
|
|||||||
then begin
|
then begin
|
||||||
Result := 0;
|
Result := 0;
|
||||||
WriteLn(Format('ERROR: [TgtkObject.CreateCompatibleBitmap] Illegal depth %d', [Depth]));
|
WriteLn(Format('ERROR: [TgtkObject.CreateCompatibleBitmap] Illegal depth %d', [Depth]));
|
||||||
{$IFNDEF DisableDoubleBuf}
|
{$IFDEF DebugGDKTraps}
|
||||||
EndGDKErrorTrap;
|
EndGDKErrorTrap;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
Exit;
|
Exit;
|
||||||
@ -1164,7 +1164,7 @@ begin
|
|||||||
|
|
||||||
GdiObject^.Colormap := gdk_colormap_new(GdiObject^.Visual, GdkTrue);
|
GdiObject^.Colormap := gdk_colormap_new(GdiObject^.Visual, GdkTrue);
|
||||||
|
|
||||||
{$IFNDEF DisableDoubleBuf}
|
{$IFDEF DebugGDKTraps}
|
||||||
EndGDKErrorTrap;
|
EndGDKErrorTrap;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
@ -1592,7 +1592,7 @@ begin
|
|||||||
|
|
||||||
PaletteVisual := nil;
|
PaletteVisual := nil;
|
||||||
|
|
||||||
{$IFNDEF DisableDoubleBuf}
|
{$IFDEF DebugGDKTraps}
|
||||||
BeginGDKErrorTrap;
|
BeginGDKErrorTrap;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
@ -1603,7 +1603,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
PaletteColormap := GDK_Colormap_new(PaletteVisual, GdkTrue);
|
PaletteColormap := GDK_Colormap_new(PaletteVisual, GdkTrue);
|
||||||
|
|
||||||
{$IFNDEF DisableDoubleBuf}
|
{$IFDEF DebugGDKTraps}
|
||||||
EndGDKErrorTrap;
|
EndGDKErrorTrap;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
@ -1671,7 +1671,7 @@ begin
|
|||||||
p:=nil; // automatically create transparency mask
|
p:=nil; // automatically create transparency mask
|
||||||
Window:=nil; // use the X root window for colormap
|
Window:=nil; // use the X root window for colormap
|
||||||
|
|
||||||
{$IFNDEF DisableDoubleBuf}
|
{$IFDEF DebugGDKTraps}
|
||||||
BeginGDKErrorTrap;
|
BeginGDKErrorTrap;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
@ -1708,7 +1708,7 @@ begin
|
|||||||
DisposeGDIObject(GdiObject);
|
DisposeGDIObject(GdiObject);
|
||||||
GdiObject:=nil;
|
GdiObject:=nil;
|
||||||
end;
|
end;
|
||||||
{$IFNDEF DisableDoubleBuf}
|
{$IFDEF DebugGDKTraps}
|
||||||
EndGDKErrorTrap;
|
EndGDKErrorTrap;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
end;
|
end;
|
||||||
@ -3003,7 +3003,7 @@ var
|
|||||||
CharsWritten, CurX, i: integer;
|
CharsWritten, CurX, i: integer;
|
||||||
LinePos: PChar;
|
LinePos: PChar;
|
||||||
begin
|
begin
|
||||||
{$IFNDEF DisableDoubleBuf}
|
{$IFDEF DebugGDKTraps}
|
||||||
BeginGDKErrorTrap;
|
BeginGDKErrorTrap;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
with TDeviceContext(DC) do begin
|
with TDeviceContext(DC) do begin
|
||||||
@ -3035,7 +3035,7 @@ var
|
|||||||
gdk_draw_line(Buffer, GC, TxtPt.X, Y, TxtPt.X+UnderLineLen, Y);
|
gdk_draw_line(Buffer, GC, TxtPt.X, Y, TxtPt.X+UnderLineLen, Y);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
{$IFNDEF DisableDoubleBuf}
|
{$IFDEF DebugGDKTraps}
|
||||||
EndGDKErrorTrap;
|
EndGDKErrorTrap;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
end;
|
end;
|
||||||
@ -3104,10 +3104,9 @@ begin
|
|||||||
Height := Rect^.Bottom - Rect^.Top;
|
Height := Rect^.Bottom - Rect^.Top;
|
||||||
SelectedColors := dcscCustom;
|
SelectedColors := dcscCustom;
|
||||||
EnsureGCColor(DC, dccCurrentBackColor, True, False);
|
EnsureGCColor(DC, dccCurrentBackColor, True, False);
|
||||||
{$IFNDEF DisableDoubleBuf}
|
{$IFDEF EnableDoubleBuf}
|
||||||
buffered := True;
|
buffered := True;
|
||||||
buffer := gdk_pixmap_new(Drawable, Width, Height, -1);
|
buffer := gdk_pixmap_new(Drawable, Width, Height, -1);
|
||||||
BeginGDKErrorTrap;
|
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
if buffered then begin
|
if buffered then begin
|
||||||
Left:=0;
|
Left:=0;
|
||||||
@ -3116,7 +3115,7 @@ begin
|
|||||||
Left:=Rect^.Left+DCOrigin.X;
|
Left:=Rect^.Left+DCOrigin.X;
|
||||||
Top:=Rect^.Top+DCOrigin.Y;
|
Top:=Rect^.Top+DCOrigin.Y;
|
||||||
end;
|
end;
|
||||||
{$IFNDEF DisableDoubleBuf}
|
{$IFDEF DebugGDKTraps}
|
||||||
BeginGDKErrorTrap;
|
BeginGDKErrorTrap;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
if IsBackgroundColor(TColor(CurrentBackColor.ColorRef)) then
|
if IsBackgroundColor(TColor(CurrentBackColor.ColorRef)) then
|
||||||
@ -3124,7 +3123,7 @@ begin
|
|||||||
Left, Top, Width, Height)
|
Left, Top, Width, Height)
|
||||||
else
|
else
|
||||||
gdk_draw_rectangle(buffer, GC, 1, Left, Top, Width, Height);
|
gdk_draw_rectangle(buffer, GC, 1, Left, Top, Width, Height);
|
||||||
{$IFNDEF DisableDoubleBuf}
|
{$IFDEF DebugGDKTraps}
|
||||||
EndGDKErrorTrap;
|
EndGDKErrorTrap;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
end;
|
end;
|
||||||
@ -3132,11 +3131,7 @@ begin
|
|||||||
if UseFont<>nil then begin
|
if UseFont<>nil then begin
|
||||||
LineLen := FindChar(#10,Str,Count);
|
LineLen := FindChar(#10,Str,Count);
|
||||||
UpdateDCTextMetric(TDeviceContext(DC));
|
UpdateDCTextMetric(TDeviceContext(DC));
|
||||||
{$IfDef Win32}
|
LineHeight:=GetTextHeight(DCTextMetric);
|
||||||
LineHeight := DCTextMetric.TextMetric.tmHeight div 2;
|
|
||||||
{$Else}
|
|
||||||
LineHeight := DCTextMetric.TextMetric.tmAscent;
|
|
||||||
{$EndIf}
|
|
||||||
if Buffered then begin
|
if Buffered then begin
|
||||||
TxtPt.X := 0;
|
TxtPt.X := 0;
|
||||||
TxtPt.Y := LineHeight;
|
TxtPt.Y := LineHeight;
|
||||||
@ -3168,11 +3163,11 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
If UnRef then begin
|
If UnRef then begin
|
||||||
{$IFNDEF DisableDoubleBuf}
|
{$IFDEF DebugGDKTraps}
|
||||||
BeginGDKErrorTrap;
|
BeginGDKErrorTrap;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
GDK_Font_UnRef(UseFont);
|
GDK_Font_UnRef(UseFont);
|
||||||
{$IFNDEF DisableDoubleBuf}
|
{$IFDEF DebugGDKTraps}
|
||||||
EndGDKErrorTrap;
|
EndGDKErrorTrap;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
end;
|
end;
|
||||||
@ -8250,15 +8245,14 @@ var
|
|||||||
temp_color : TGDKColor;
|
temp_color : TGDKColor;
|
||||||
Region: PGdiObject;
|
Region: PGdiObject;
|
||||||
RGNType : Longint;
|
RGNType : Longint;
|
||||||
//DCOrigin: TPoint;
|
|
||||||
OffsetXY: TPoint;
|
OffsetXY: TPoint;
|
||||||
begin
|
begin
|
||||||
// activate clipping region of destination
|
// activate clipping region of destination
|
||||||
SelectGDIRegion(DestDC);
|
SelectGDIRegion(DestDC);
|
||||||
temp_mask := nil;
|
temp_mask := nil;
|
||||||
if ((ClipMergeMask <> NIL) {and (ClipMergeMask^.UseMask)}
|
if ((ClipMergeMask = NIL)
|
||||||
and (ClipMergeMask^.GDIBitmapMaskObject <> nil)) then
|
or (ClipMergeMask^.GDIBitmapMaskObject = nil)) then exit;
|
||||||
begin
|
|
||||||
BeginGDKErrorTrap;
|
BeginGDKErrorTrap;
|
||||||
// create temporary mask with the size of the destination rectangle
|
// create temporary mask with the size of the destination rectangle
|
||||||
temp_mask := PGdkBitmap(gdk_pixmap_new(NIL, width, height, 1));
|
temp_mask := PGdkBitmap(gdk_pixmap_new(NIL, width, height, 1));
|
||||||
@ -8286,7 +8280,6 @@ var
|
|||||||
// The X,Y coordinate in the destination relates to
|
// The X,Y coordinate in the destination relates to
|
||||||
// 0,0 in the temporary mask.
|
// 0,0 in the temporary mask.
|
||||||
// The clip region of dest is always at 0,0 in dest
|
// The clip region of dest is always at 0,0 in dest
|
||||||
//DCOrigin:=GetDCOffset(TDeviceContext(DestDC));
|
|
||||||
OffsetXY:=Point(-X,-Y);
|
OffsetXY:=Point(-X,-Y);
|
||||||
// 1. Move the region
|
// 1. Move the region
|
||||||
gdk_region_offset(Region^.GDIRegionObject,OffsetXY.X,OffsetXY.Y);
|
gdk_region_offset(Region^.GDIRegionObject,OffsetXY.X,OffsetXY.Y);
|
||||||
@ -8313,7 +8306,6 @@ var
|
|||||||
gdk_gc_set_clip_origin(DestGC, x, y);
|
gdk_gc_set_clip_origin(DestGC, x, y);
|
||||||
EndGDKErrorTrap;
|
EndGDKErrorTrap;
|
||||||
end;
|
end;
|
||||||
end;
|
|
||||||
|
|
||||||
Procedure ResetClipping(DestGC : PGDKGC);
|
Procedure ResetClipping(DestGC : PGDKGC);
|
||||||
begin
|
begin
|
||||||
@ -8408,9 +8400,9 @@ var
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
Function ScaleAndROP(DestGC: PGDKGC;
|
Function ScaleAndROP(DestGC: PGDKGC;
|
||||||
SRC: PGDKDrawable; SRCBitmap: PGDIObject): Boolean;
|
Src: PGDKDrawable; SrcBitmap: PGDIObject): Boolean;
|
||||||
var
|
var
|
||||||
SRCClip : PGDKPixmap;
|
SrcClip : PGDKPixmap;
|
||||||
begin
|
begin
|
||||||
Result := False;
|
Result := False;
|
||||||
|
|
||||||
@ -8421,11 +8413,11 @@ var
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
// get source mask for clipping
|
// get source mask for clipping
|
||||||
If (SRCBitmap <> nil)
|
If (SrcBitmap <> nil)
|
||||||
and (SRCBitmap^.GDIBitmapMaskObject <> nil) then
|
and (SrcBitmap^.GDIBitmapMaskObject <> nil) then
|
||||||
SRCClip := SRCBitmap^.GDIBitmapMaskObject
|
SrcClip := SrcBitmap^.GDIBitmapMaskObject
|
||||||
else
|
else
|
||||||
SRCClip := nil;
|
SrcClip := nil;
|
||||||
|
|
||||||
// create a temporary buffer for raster operations and scaling
|
// create a temporary buffer for raster operations and scaling
|
||||||
Case ROP of
|
Case ROP of
|
||||||
@ -8435,7 +8427,7 @@ var
|
|||||||
begin
|
begin
|
||||||
ScaleBMP := CreateCompatibleBitmap(0, Width, Height);
|
ScaleBMP := CreateCompatibleBitmap(0, Width, Height);
|
||||||
Scale := PGdiObject(ScaleBMP);
|
Scale := PGdiObject(ScaleBMP);
|
||||||
Scale^.GDIBitmapMaskObject := SRCClip;
|
Scale^.GDIBitmapMaskObject := SrcClip;
|
||||||
SetRasterOperation(DestGC);
|
SetRasterOperation(DestGC);
|
||||||
Result := True;
|
Result := True;
|
||||||
exit; //skip scaling
|
exit; //skip scaling
|
||||||
@ -8443,9 +8435,9 @@ var
|
|||||||
else begin
|
else begin
|
||||||
// create a temporary compatible bitmap with the size
|
// create a temporary compatible bitmap with the size
|
||||||
// of the source and the source mask
|
// of the source and the source mask
|
||||||
ScaleBMP := CreateCompatibleBitmap(0, SRCWidth, SRCHeight);
|
ScaleBMP := CreateCompatibleBitmap(0, SrcWidth, SrcHeight);
|
||||||
Scale := PGdiObject(ScaleBMP);
|
Scale := PGdiObject(ScaleBMP);
|
||||||
Scale^.GDIBitmapMaskObject := SRCClip;
|
Scale^.GDIBitmapMaskObject := SrcClip;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -8465,7 +8457,7 @@ var
|
|||||||
// copy source into scale buffer
|
// copy source into scale buffer
|
||||||
BeginGDKErrorTrap;
|
BeginGDKErrorTrap;
|
||||||
gdk_window_copy_area(Scale^.GDIPixmapObject, fGC, 0, 0,
|
gdk_window_copy_area(Scale^.GDIPixmapObject, fGC, 0, 0,
|
||||||
SRC, XSRC, YSRC, SRCWidth, SRCHeight);
|
Src, XSrc, YSrc, SrcWidth, SrcHeight);
|
||||||
EndGDKErrorTrap;
|
EndGDKErrorTrap;
|
||||||
|
|
||||||
// restore the raster operation back to SRCCOPY in the destination GC
|
// restore the raster operation back to SRCCOPY in the destination GC
|
||||||
@ -8517,6 +8509,22 @@ var
|
|||||||
DestDevContext:=TDeviceContext(DestDC);
|
DestDevContext:=TDeviceContext(DestDC);
|
||||||
SrcGDIBitmap:=SrcDevContext.CurrentBitmap;
|
SrcGDIBitmap:=SrcDevContext.CurrentBitmap;
|
||||||
|
|
||||||
|
if (SrcGDIBitmap=nil) then exit;
|
||||||
|
if (SrcGDIBitmap^.GDIBitmapMaskObject=nil)
|
||||||
|
and (Width=SrcWidth) and (Height=SrcHeight)
|
||||||
|
and (ROP=SRCCOPY)
|
||||||
|
then begin
|
||||||
|
// simply copy the area
|
||||||
|
//writeln('DrawableToDrawable Simple copy');
|
||||||
|
BeginGDKErrorTrap;
|
||||||
|
gdk_window_copy_area(DestDevContext.Drawable, DestDevContext.GC, X, Y,
|
||||||
|
SrcGDIBitmap^.GDIPixmapObject, XSrc, YSrc, Width, Height);
|
||||||
|
EndGDKErrorTrap;
|
||||||
|
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
// create a temporary graphic context for the scale and raster operations
|
// create a temporary graphic context for the scale and raster operations
|
||||||
fGC := GDK_GC_New(DestDevContext.Drawable);
|
fGC := GDK_GC_New(DestDevContext.Drawable);
|
||||||
|
|
||||||
@ -8722,10 +8730,10 @@ var DCOrigin: TPoint;
|
|||||||
begin
|
begin
|
||||||
Assert(True, Format('trace:> [TgtkObject.StretchBlt] DestDC:0x%x; X:%d, Y:%d, Width:%d, Height:%d; SrcDC:0x%x; XSrc:%d, YSrc:%d, SrcWidth:%d, SrcHeight:%d; Rop:0x%x', [DestDC, X, Y, Width, Height, SrcDC, XSrc, YSrc, SrcWidth, SrcHeight, Rop]));
|
Assert(True, Format('trace:> [TgtkObject.StretchBlt] DestDC:0x%x; X:%d, Y:%d, Width:%d, Height:%d; SrcDC:0x%x; XSrc:%d, YSrc:%d, SrcWidth:%d, SrcHeight:%d; Rop:0x%x', [DestDC, X, Y, Width, Height, SrcDC, XSrc, YSrc, SrcWidth, SrcHeight, Rop]));
|
||||||
Result := IsValidDC(DestDC) and IsValidDC(SrcDC);
|
Result := IsValidDC(DestDC) and IsValidDC(SrcDC);
|
||||||
|
if not Result then exit;
|
||||||
if (Width=0) and (Height=0) then exit;
|
if (Width=0) and (Height=0) then exit;
|
||||||
if (SrcWidth=0) and (SrcHeight=0) then exit;
|
if (SrcWidth=0) and (SrcHeight=0) then exit;
|
||||||
if Result
|
|
||||||
then begin
|
|
||||||
with TDeviceContext(DestDC) do begin
|
with TDeviceContext(DestDC) do begin
|
||||||
DCOrigin:=GetDCOffset(TDeviceContext(DestDC));
|
DCOrigin:=GetDCOffset(TDeviceContext(DestDC));
|
||||||
Inc(X,DCOrigin.X);
|
Inc(X,DCOrigin.X);
|
||||||
@ -8737,10 +8745,10 @@ begin
|
|||||||
Inc(YSrc,DCOrigin.Y);
|
Inc(YSrc,DCOrigin.Y);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
//writeln('TgtkObject.StretchBlt X=',X,' Y=',Y,' Width=',Width,' Height=',Height,
|
{writeln('TgtkObject.StretchBlt X=',X,' Y=',Y,' Width=',Width,' Height=',Height,
|
||||||
// ' XSrc=',XSrc,' YSrc=',YSrc,' SrcWidth=',SrcWidth,' SrcHeight=',SrcHeight,
|
' XSrc=',XSrc,' YSrc=',YSrc,' SrcWidth=',SrcWidth,' SrcHeight=',SrcHeight,
|
||||||
// ' SrcDrawable=',HexStr(Cardinal(TDeviceContext(SrcDC).Drawable),8),
|
' SrcDrawable=',HexStr(Cardinal(TDeviceContext(SrcDC).Drawable),8),
|
||||||
// ' DestDrawable=',HexStr(Cardinal(TDeviceContext(DestDC).Drawable),8));
|
' DestDrawable=',HexStr(Cardinal(TDeviceContext(DestDC).Drawable),8));}
|
||||||
|
|
||||||
If TDeviceContext(SrcDC).Drawable = nil then begin
|
If TDeviceContext(SrcDC).Drawable = nil then begin
|
||||||
If TDeviceContext(DestDC).Drawable = nil then
|
If TDeviceContext(DestDC).Drawable = nil then
|
||||||
@ -8754,7 +8762,6 @@ begin
|
|||||||
else
|
else
|
||||||
Result := DrawableToDrawable;
|
Result := DrawableToDrawable;
|
||||||
end;
|
end;
|
||||||
end;
|
|
||||||
Assert(True, Format('trace:< [TgtkObject.StretchBlt] DestDC:0x%x --> %s', [DestDC, BOOL_TEXT[Result]]));
|
Assert(True, Format('trace:< [TgtkObject.StretchBlt] DestDC:0x%x --> %s', [DestDC, BOOL_TEXT[Result]]));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -9092,6 +9099,9 @@ end;
|
|||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.310 2004/01/05 01:18:16 mattias
|
||||||
|
implemented Double Buffering for synedit and deactivated multi buffering in TGTKObject.ExtTextOut
|
||||||
|
|
||||||
Revision 1.309 2004/01/03 23:15:00 mattias
|
Revision 1.309 2004/01/03 23:15:00 mattias
|
||||||
default font can now change height and fixed gtk crash
|
default font can now change height and fixed gtk crash
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user