diff options
author | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2007-07-09 10:17:25 +0000 |
---|---|---|
committer | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2007-07-09 10:17:25 +0000 |
commit | d49777ea0ba70640d6ca0b9aeb8fa461c51a0cc0 (patch) | |
tree | 0fb25d283da8c823c2bcf05c4980c7a353d6285d | |
parent | 507c84feef852c0b9763a1b1ca11232fb6c4b1a6 (diff) | |
download | fpGUI-d49777ea0ba70640d6ca0b9aeb8fa461c51a0cc0.tar.xz |
GFX: minor changes to the Paint event.
-rw-r--r-- | gfx/gdi/gfx_gdi.pas | 9 | ||||
-rw-r--r-- | gfx/x11/gfx_x11.pas | 8 |
2 files changed, 11 insertions, 6 deletions
diff --git a/gfx/gdi/gfx_gdi.pas b/gfx/gdi/gfx_gdi.pas index d131bd11..fa285bdf 100644 --- a/gfx/gdi/gfx_gdi.pas +++ b/gfx/gdi/gfx_gdi.pas @@ -1654,11 +1654,12 @@ begin r.Right := PaintStruct.rcPaint.Right; r.Bottom := PaintStruct.rcPaint.Bottom; - OldCanvas := Canvas; - FCanvas := TGDICanvas.Create(PaintStruct.hdc); + // graemeg: What is this extra canvas used for???? +// OldCanvas := Canvas; +// FCanvas := TGDICanvas.Create(PaintStruct.hdc); OnPaint(Self, r); - Canvas.Free; - FCanvas := OldCanvas; +// Canvas.Free; +// FCanvas := OldCanvas; end; Windows.EndPaint(Handle, @PaintStruct); end; diff --git a/gfx/x11/gfx_x11.pas b/gfx/x11/gfx_x11.pas index d825c78f..f49228cb 100644 --- a/gfx/x11/gfx_x11.pas +++ b/gfx/x11/gfx_x11.pas @@ -1663,11 +1663,15 @@ begin end; etMouseWheel: begin - + // it's handled in etMousePressed end; etPaint: begin - if Assigned(OnPaint) then OnPaint(Self, Rect(AEvent.X, AEvent.Y, AEvent.Width, AEvent.Height)); +// if Assigned(OnPaint) then OnPaint(Self, Rect(AEvent.X, AEvent.Y, AEvent.Width, AEvent.Height)); + // We are ignoring the rectangle from the XEvent and rather use the + // full window rectangle. + if Assigned(OnPaint) then + OnPaint(Self, Rect(0, 0, Width, Height)); end; etMove: begin |