Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 42292

My Graphics appear upside down?

$
0
0
Hey,

I have been playing with the graphics class in vb.net and for some reason everything I draw appears upside down.

Here are the co-ordinates going in

From: X - 338 Y - 581 To: X - 338 Y - 564
From: X - 338 Y - 564 To: X - 338 Y - 564
From: X - 338 Y - 564 To: X - 389 Y - 564
From: X - 389 Y - 564 To: X - 394 Y - 564
From: X - 394 Y - 564 To: X - 394 Y - 611
From: X - 394 Y - 611 To: X - 394 Y - 616
From: X - 394 Y - 616 To: X - 335 Y - 616
From: X - 335 Y - 616 To: X - 335 Y - 616
From: X - 335 Y - 616 To: X - 335 Y - 603

Code:

  g.DrawLine(New Pen(newColor, size), x_loc(k), y_loc(k), x_loc(k + 1), y_loc(k + 1))
                        Console.WriteLine("From: X - " & x_loc(k) & " Y - " & y_loc(k) & " To: X - " & x_loc(k + 1) & " Y - " & y_loc(k + 1))

This is what I end up with

Attachment 99451

And while typing this I figured out what could be wrong!!

I am guessing my origin for the drawing is set to the top leftcorner of the picture box I am drawing in, is it possible to change the origin to the bottom left corner?
Attached Images
 

Viewing all articles
Browse latest Browse all 42292

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>