Is it possible to use as parameters float instead of int for the Rectangle class in c#?! Or any way in which I can do this by creating maybe a new class similar to Rectangle that takes as parameters float?
I am trying to use this within the e.Graphics.DrawEllipse
.
Example :
e.Graphics.DrawEllipse(new Pen(Brushes.Black, stroke), new Rectangle(10,20,30,40);
Instead of 10,20,30,40 I would like to use floats.
Any help appreciated. Thanks.
There is the
RectangleF
class inSystem.Drawing
which takessingle-precision
floating point
numbers as parameters:http://msdn.microsoft.com/EN-US/library/kwafa1d7(v=VS.110,d=hv.2).aspx