VB.NET 1.1 Tutorial - GDI+ - Point and PointFPointA Point structure represents an ordered pair of integer x- and y-coordinates that defines a point in a two-dimensional plane. A Point is mathematically equivalent to a vector. By default, GDI+ will interpret the values entered as the amount of pixels to move along the screen. There a three methods of creating a new Point object. Public Sub New( ByVal dw As Integer ) This method contains a single 32-bit integer value. The low-order 16 bits of dw specify the horizontal x-coordinate and the higher 16 bits specify the vertical y-coordinate for the new Point. Public Sub New( ByVal x As Integer, ByVal y As Integer ) This method initializes a new instance of the Point class with the specified coordinates.
Public Sub New( ByVal sz As Size ) This method initializes a new instance of the Point class from a Size object. PointFA PointF structure represents an ordered pair of floating point x- and y-coordinates that defines a point in a two-dimensional plane. However, unlike the Point structure, there is only one method of creating a new PointF object. Public Sub New( ByVal x As Single, ByVal y As Single ) This method initializes a new instance of the Point class with the specified coordinates.
ReferencesFor more information on the Point structure, visit MSDN at microsoft here. For more information on the PointF structure, visit MSDN at microsoft here. What Next?Return to the Tutorial Contents. |