ClipRectangle problem

TeeChart FireMonkey (Windows,OSX,iOS & Android) for Embarcadero RAD Studio, Delphi and C++ Builder (XE5+)
Post Reply
rdevine
Newbie
Newbie
Posts: 5
Joined: Fri Nov 15, 2002 12:00 am

ClipRectangle problem

Post by rdevine » Tue Apr 01, 2014 2:37 pm

Hi

I've attached a project that shows a problem when I use ClipRectangle with a custom series. If you click Add Data then re-size the form, the button disappears. It re-appears if you move the mouse over it's position. To avoid the problem, comment out the lines with UnClipRectangle and ClipRectangle.

I'm using XE5 with Update 1.

Cheers, Bob
Attachments
TeeChart Test 1.zip
(56.73 KiB) Downloaded 923 times

Yeray
Site Admin
Site Admin
Posts: 9534
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: ClipRectangle problem

Post by Yeray » Wed Apr 02, 2014 2:18 pm

Hi Bob,

You are calling ClipRectangle at the end of the AfterDraw event, leaving the Canvas clipped. I don't see why would you do that.
This works fine:

Code: Select all

  ParentChart.Canvas.ClipRectangle(ParentChart.ChartRect);
  ParentChart.Canvas.TextOut(200, 200, 'Test Text');
  ParentChart.Canvas.UnClipRectangle;
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

rdevine
Newbie
Newbie
Posts: 5
Joined: Fri Nov 15, 2002 12:00 am

Re: ClipRectangle problem

Post by rdevine » Wed Apr 02, 2014 3:05 pm

Yes I'd wondered about that myself... This is old code written in 2001 by someone else which, strangely, has always worked fine. Looks like he got it the wrong way round....

Thanks, Bob

Post Reply