Lines partially displayed

Lines partially displayed

Post by Filippo Librin » Mon, 16 Jun 2003 13:19:51



I am trying to plot a graph on a form using the code
below:

GraphicsFun = Me.CreateGraphics
Dim PenColor As New System.Drawing.Pen
(System.Drawing.Color.Black)
For J = 1 To L - 1
IX = Int(X(J)
IY = Int(Y(J)
IXX = Int(X(J + 1))
IYY = Int(Y(J + 1))
GraphicsFun.DrawLine(PenColor, IX, IY, IXX, IYY)
Next

Only a part of the graph appears on the form.  There are
buttons and labels on the form, but not in the area where
the graph fails to be plotted.

Thanks

Filippo Librino

 
 
 

Lines partially displayed

Post by Mike D Sutto » Mon, 16 Jun 2003 20:49:00


Quote:> I am trying to plot a graph on a form using the code
> below:
<snip>
> Only a part of the graph appears on the form.  There are
> buttons and labels on the form, but not in the area where
> the graph fails to be plotted.

You'll need to ask this on a VB.NET or GDI+ group, such as
microsoft.public.dotnet.framework.drawing or any of the groups you'll find
listed on this page:
Http://www.mvps.org/EDais/DotNet/
FWIW though, this C# code based on yours works fine here, you may want to
check your values in the x and y arrays as well as the l variable:

***
int[] x = new int[10] { 10, 20, 30, 40, 50, 60, 70, 80, 90, 100 };
int[] y = new int[10] { 30, 70, 10, 80, 60, 20, 50, 100, 40, 90 };
int iX, iY, iXX, iYY;
int l = 9;

Graphics GraphicsFun = e.Graphics;
Pen BlackPen = new Pen(Color.Black);

for (int j = 0; j < l; j++) {
    iX = x[j];
    iY = y[j];
    iXX = x[j + 1];
    iYY = y[j + 1];

    GraphicsFun.DrawLine(BlackPen, iX, iY, iXX, iYY);

Quote:}

BlackPen.Dispose();
GraphicsFun.Dispose();
***

Hope this helps,

    Mike

 - Microsoft Visual Basic MVP -

WWW: Http://www.mvps.org/EDais/

 
 
 

1. Q: converting and displaying TIF graphics via the command line

I am looking for a (small) program wich is able to convert and display
TIF graphics files via the command line under ms dos (16 bit) (for use
in a batch file).

It should be used in the form    'program file.tif'   (maybe with
additional input of some switches for converting/displaying).

I searched a lot of ftp sites but did not find the appropriate
solution. Can anybody help ?

Christian Peters.

-------------------------------------------------------------------

-------------------------------------------------------------------

2. OLE Viewers??

3. Visual display digitisers for on-line info entry?

4. Projection Technique?

5. Top of the line LCD overhead display ?

6. I need some help please...

7. GL problem displaying a hidden line mesh

8. Are there any centralised approaches?

9. Image Slicer HTML page displays line between images.

10. VRML ON/OFF Line Display

11. Floating-horizon line or big disc display need

12. Hidden line display

13. stenciling to achieve line interlacing for stereo display