471,357 Members | 1,177 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,357 software developers and data experts.

WPF Point?

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 Frost
"Logic Is Syntax Independent"

Aug 31 '08 #1
4 15835
On Sun, 31 Aug 2008 16:07:46 -0700, Roger Frost <fr*****@hotmail.com>
wrote:
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?
Don't rely on me for expert WPF advice. However, my observation is that
WPF is a much more geometry-based graphical API than, for example, GDI+.
In particular, when you write that "a single point" is "the most
fundamental geometric object", that's not actually true in a purely
mathematical sense. Likewise, in WPF I don't think there's any such thing
as a point that can be visualized, so there wouldn't be any point in
providing any way to represent one as a visual object.

You should decide on what shape you want to draw the point, and then
create a suitably sized object of that shape to represent your point.

Pete
Aug 31 '08 #2
Roger Frost wrote:
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
Aug 31 '08 #3
On Aug 31, 6:07 pm, "Roger Frost" <fros...@hotmail.comwrote:
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 Frost
"Logic Is Syntax Independent"
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/libr...mapsource.aspx
http://thewpfblog.com/?p=19
Aug 31 '08 #4
>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 Frost
"Logic Is Syntax Independent"

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/libr...mapsource.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

Sep 1 '08 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

687 posts views Thread by cody | last post: by
9 posts views Thread by pout | last post: by
3 posts views Thread by Action | last post: by
1 post views Thread by Tamir Khason | last post: by
3 posts views Thread by Peter Proost | last post: by
39 posts views Thread by DanielJohnson | last post: by
39 posts views Thread by rembremading | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.