PointF

PointF serializable

System.Drawing (system.drawing.dll) struct

This is a value type that represents a point in a 2D coordinate system. It uses reals to define the X and Y coordinates of that point (c.f. Point ).

As with Point , a PointF {0.0, 0.0} is located at the center of the pixel (0,0). However, if you specify a point at {0.5, 0.5} and draw a single pixel at that location, the rendering engine must resolve that into something it can draw on the device's pixel array, as it will impact at least 4 adjacent pixels in that grid. The method it uses to resolve that issue is determined by various properties of the Graphics object, including PixelOffsetMode , CompositingMode , and SmoothingMode .

There are comparison operators between PointF objects, and addition and subtraction operators for Size objects (but not SizeF objects, curiously).

Conversions between PointF and Point are handled through methods and operators on the Point class.

 public struct  PointF  {  // Public Constructors  public  PointF  (float  x  , float  y  );  // Public Static Fields  public static readonly PointF  Empty  ;  // = {X=0, Y=0}   // Public Instance Properties  public bool  IsEmpty  {get; }    public float  X  {set; get; }    public float  Y  {set; get; }  // Public Static Methods  public static PointF operator  -  (PointF  pt  , Size  sz  );    public static PointF operator  +  (PointF  pt  , Size  sz  );    public static bool operator  !=  (PointF  left  , PointF  right  );    public static bool operator  ==  (PointF  left  , PointF  right  );  // Public Instance Methods  public override bool  Equals  (object  obj  );  // overrides ValueType  public override int  GetHashCode  ();  // overrides ValueType  public override string  ToString  ();  // overrides ValueType  } 

Hierarchy

System.Object System.ValueType PointF

Returned By

System.Drawing.Drawing2D.GraphicsPath.{GetLastPoint() , PathPoints} , System.Drawing.Drawing2D.PathData.Points , System.Drawing.Drawing2D.PathGradientBrush.{CenterPoint , FocusScales} , RectangleF.Location , SizeF.ToPointF()

Passed To

Multiple types



. Net Windows Forms in a Nutshell
.NET Windows Forms in a Nutshell
ISBN: 0596003382
EAN: 2147483647
Year: 2002
Pages: 794

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net