0

Hello :)
i worked many time with the Point structure on my projects
i noticed that there is a brother to Point calls PointF (its Point with floats as X & Y)

the thing i dont understand is why i saw a lot of drawing functions that uses RectangleF and PointF - why is that? the pixels are int... and if i need to draw a string for example why i need to put in a RectangleF as the borders of the string? why not Rectangle?

hope u understand the question
Thanks :)

3
Contributors
2
Replies
3
Views
5 Years
Discussion Span
Last Post by gusano79
2

Well, in the end it all boils down to pixels on a screen of course.
But with the advent of truetype fonts, the discrete handling(with integers) was not sufficient, hence the use of float.
You could perhaps read this article.

0

Well, in the end it all boils down to pixels on a screen of course.
But with the advent of truetype fonts, the discrete handling(with integers) was not sufficient, hence the use of float.
You could perhaps read this article.

It's not just for vector fonts; GDI+ as represented by the Graphics class does a lot more than twiddle pixels. It's also meant for printing and displaying to a variety of devices. To support drawing to a wider range of devices, GDI+ uses a few different but related coordinate spaces that allow you to easily rotate, scale, and translate your graphics in two dimensions.

OpenGL uses floating point coordinates for similar reasons.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.