Access to the Graphics object

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Michal Blazejczyk
Newbie
Newbie
Posts: 64
Joined: Fri Jun 16, 2006 12:00 am

Access to the Graphics object

Post by Michal Blazejczyk » Fri Sep 08, 2006 3:51 pm

Hi,

I'm trying to do custom painting over a chart. I subscribe to the AfterDraw event. If I call chart.CreateGraphics() in my event handler, it works fine but whatever I paint gets painted over (I can see it's there because it flickers as I resize the chart).

The reason I want access to Graphics is that I need to paint a bitmap using InterpolationMode.NearestNeighbor. Graphics3D doesn't seem to support this functionality.

Best,
Michal
Best,
Michal Blazejczyk
Lead Programmer
Genome Quebec

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Tue Sep 12, 2006 10:42 am

Hi Michal,

I'm afraid this is not possible because this method is not accessible.

Could you please send us an example we can run "as-is" to reproduce the problem here so that we can try to find a solution to your problem?

You can post your files at news://www.steema.net/steema.public.attachments newsgroup.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Michal Blazejczyk
Newbie
Newbie
Posts: 64
Joined: Fri Jun 16, 2006 12:00 am

Post by Michal Blazejczyk » Tue Sep 12, 2006 2:54 pm

Hi,

Well, there isn't really an example I could send you.

However, I found a solution: one needs to create a class derived from TChart, override the OnPaint(), call base.OnPaint() first and then do whatever painting needs to be done.

Voila!

Best,
Michal Blazejczyk
Best,
Michal Blazejczyk
Lead Programmer
Genome Quebec

Post Reply