| View previous topic :: View next topic |
| Author |
Message |
P_G Member
Joined: 14 Jun 2004 Posts: 44 Location: Germany
|
Posted: 06/06/05 14:08 Post subject: |
|
|
Hi Kambiz,
For testing I deleted the SelectClipRgn line:
| Code: | procedure TGraphNode.DrawBackground(Canvas: TCanvas);
var
ClipRgn: HRGN;
Bitmap: TBitmap;
Graphic: TGraphic;
begin
if Background.Graphic <> nil then
begin
ClipRgn := CreateClipRgn(Canvas);
try
// SelectClipRgn(Canvas.Handle, ClipRgn);
try
Graphic := Background.Graphic;
Background.OnChange := nil;
Canvas.StretchDraw(BoundsRect, Graphic);
Background.OnChange := BackgroundChanged;
finally
SelectClipRgn(Canvas.Handle, 0);
end;
finally
DeleteObject(ClipRgn);
end;
Canvas.Brush.Style := bsClear;
end;
end; |
Now it seems to work, however I asked myself which problems could occur by doing this, even though I didn't noticed any so far.
P_G
|
|
| Back to top |
|
 |
Kambiz Administrator

Joined: 07 Mar 2003 Posts: 1044 Location: Tehran, Iran
|
Posted: 06/06/05 20:19 Post subject: |
|
|
Asign a background image to a non-rectangular node to see what happens.
_________________ Kambiz |
|
| Back to top |
|
 |
P_G Member
Joined: 14 Jun 2004 Posts: 44 Location: Germany
|
Posted: 07/06/05 09:02 Post subject: |
|
|
This is the only problem? As a matter of fact in most cases I don't need other nodes than rectangular ones. So a good workaround for me could be something like: If all conditions for this bug are met, don't convert the metafile to a bitmap, but skip the clipping. If this is combined with a boolean variable (so the user can choose between bitmap conversion or clipping to workaround) everything would be absolutely perfect.
Yours, P_G
|
|
| Back to top |
|
 |
|