WPF Point?

  • Thread starter Thread starter Roger Frost
  • Start date Start date
R

Roger Frost

I need to draw a single point with WPF but there doesn't seem to be a class
that represents the most fundamental geometric object.

Any idea's?
 
Roger said:
I need to draw a single point with WPF but there doesn't seem to be a
class that represents the most fundamental geometric object.

WPF doesn't have a pixel grid, so it's not possible to draw a 'point'.
Maybe you want a rectangle of height and width 1? (ie. 1/96th of an inch)

Alun Harford
 
I need to draw a single point with WPF but there doesn't seem to be a class
that represents the most fundamental geometric object.

Any idea's?

WPF is a vector based engine Microsoft WinForms graphics library (GDI
+) is raster based. When working with rasterized graphics you
typically manipulate pixels, with vectors are not defined in pixel
units. Attempting to draw a pixel at x,y on a WPF canvas is a working
"against the grain". Having said that you'll probably find what you're
looking for in BitmapSource class in System.Windows.Media.Imaging

Reference:
http://msdn.microsoft.com/en-us/library/system.windows.media.imaging.bitmapsource.aspx
http://thewpfblog.com/?p=19
 
I need to draw a single point with WPF but there doesn't seem to be a
WPF is a vector based engine Microsoft WinForms graphics library (GDI
+) is raster based. When working with rasterized graphics you
typically manipulate pixels, with vectors are not defined in pixel
units. Attempting to draw a pixel at x,y on a WPF canvas is a working
"against the grain". Having said that you'll probably find what you're
looking for in BitmapSource class in System.Windows.Media.Imaging

Reference:
http://msdn.microsoft.com/en-us/library/system.windows.media.imaging.bitmapsource.aspx
http://thewpfblog.com/?p=19


Well dang, I guess I'll be scaling ellipses then, I want to stay within
System.Windows.Shapes

Thanks,
Roger
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top