Hi,
in a printing application I want to print the PointerStyle used for a series with some other information.
Is there an easy way to get an Image or bitmap of a single PointerStyle that I can use in Print?
thanks,
Series Markers
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi matthbri,
Yes, in the next TeeChart for .NET maintenance release you'll be able to do something like this:
However, in the meantime, you can create a class doing this:
and use MyCanvas like this:
Yes, in the next TeeChart for .NET maintenance release you'll be able to do something like this:
Code: Select all
private void button1_Click(object sender, EventArgs e)
{
Bitmap bmp = new Bitmap(10, 10);
Graphics g = Graphics.FromImage(bmp);
SeriesPointer pointer = new SeriesPointer(tChart1.Chart, tChart1[0]);
Graphics3D oldGraphics = tChart1.Graphics3D;
(tChart1.Graphics3D as Graphics3DGdiPlus).Graphics = g;
pointer.Draw(tChart1.Graphics3D, false, 0, 0, 10, 10, points1.Color, points1.Pointer.Style);
bmp.Save("bitmap.bmp");
tChart1.Graphics3D = oldGraphics;
}
Code: Select all
class MyCanvas : Graphics3DGdiPlus
{
public MyCanvas(System.Drawing.Graphics e, Steema.TeeChart.Chart chart) : base(chart)
{
this.g = e;
}
}
Code: Select all
private void button1_Click(object sender, EventArgs e)
{
Bitmap bmp = new Bitmap(10, 10);
Graphics g = Graphics.FromImage(bmp);
SeriesPointer pointer = new SeriesPointer(tChart1.Chart, tChart1[0]);
MyCanvas gg = new MyCanvas(g, tChart1.Chart);
gg.Brush.Color = tChart1.Graphics3D.Brush.Color;
gg.Brush.Visible = tChart1.Graphics3D.Brush.Visible;
pointer.Draw(gg, false, 0, 0, 10, 10, points1.Color, points1.Pointer.Style);
bmp.Save("bitmap.bmp");
}
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |