hai

Are you writing your own components and need help with how to set them up or have questions about the components you are deriving from ? Ask them here.
Post Reply
ashok.durai
In need of some credit
In need of some credit
Posts: 1
Joined: Thu Dec 20, 2012 2:08 pm

hai

Post by ashok.durai » Thu Dec 20, 2012 2:21 pm

this is my query,
My panel size is 400*300 ,in this panel i plot a sine wave sucessfully by using paint event and
for(int i=0;i<MAX_SIZE;i++)
{
y.y = (int)(sin(i/50.0)*100 +150);
y.x =i;

}

dc.DrawSpline(MAX_SIZE,y);

when i increase my MAX_SIZE value from 400 to 4000 means the line cannot print in the panel.so i need a help to plot the line within the panel by resizing the pixel size..

Manolo
Can't get richer than this
Can't get richer than this
Posts: 712
Joined: Mon Apr 30, 2012 11:07 pm

Re: hai

Post by Manolo » Fri Dec 21, 2012 2:31 am

What do you mean by "resizing the pixel size"?
If you want to draw 4000 units in a 400 pixels window, either you set some kind of zoom (e.g. skip 9 of every 10 points) or you need a bigger, scrollable, window.

Post Reply