Changeset 473 for trunk/Include/Classes/System/Drawing/Point.ab
- Timestamp:
- Mar 12, 2008, 9:54:46 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Include/Classes/System/Drawing/Point.ab
r303 r473 1 1 ' Classes/System/Drawing/Point.ab 2 2 3 #ifndef __SYSTEM_DRAWING_POINT_AB__ 4 #define __SYSTEM_DRAWING_POINT_AB__ 5 6 #require <Classes/System/Drawing/PointF.ab> 7 #require <Classes/System/Drawing/Size.ab> 8 #require <Classes/System/Drawing/SizeF.ab> 3 Namespace System 4 Namespace Drawing 9 5 10 6 Class Point … … 31 27 32 28 Function X() As Long 33 Returnx29 X = x 34 30 End Function 35 31 … … 39 35 40 36 Function Y() As Long 41 Returny37 X = y 42 38 End Function 43 39 … … 50 46 End Function 51 47 52 Function Operator + 48 Function Operator +(pt As Point) As Point 53 49 Return Add(This, pt) 54 50 End Function 55 51 56 Function Operator + 52 Function Operator +(sz As Size) As Point 57 53 Return Add(This, sz) 58 54 End Function 59 55 60 Function Operator - 56 Function Operator -(pt As Point) As Point 61 57 Return Substract(This, pt) 62 58 End Function 63 59 64 Function Operator - 60 Function Operator -(sz As Size) As Point 65 61 Return Substract(This, sz) 66 62 End Function 67 63 68 Function Operator == 64 Function Operator ==(sz As Point) As Boolean 69 65 Return Equals(sz) 70 66 End Function 71 67 72 Function Operator <> 68 Function Operator <>(sz As Point) As Boolean 73 69 Return Not Equals(sz) 74 70 End Function … … 108 104 109 105 Static Function Ceiling(ptf As PointF) As Point 110 Return New Point( System.Math.Ceiling(ptf.X) As Long, System.Math.Ceiling(ptf.Y) As Long)106 Return New Point(Math.Ceiling(ptf.X) As Long, Math.Ceiling(ptf.Y) As Long) 111 107 End Function 112 108 113 109 Static Function Round(ptf As PointF) As Point 114 Return New Point( System.Math.Round(ptf.X) As Long, System.Math.Round(ptf.Y) As Long)110 Return New Point(Math.Round(ptf.X) As Long, Math.Round(ptf.Y) As Long) 115 111 End Function 116 112 117 113 Static Function Truncate(ptf As PointF) As Point 118 Return New Point( System.Math.Truncate(ptf.X) As Long, System.Math.Truncate(ptf.Y) As Long)114 Return New Point(Math.Truncate(ptf.X) As Long, Math.Truncate(ptf.Y) As Long) 119 115 End Function 120 116 … … 128 124 End Class 129 125 130 #endif '__SYSTEM_DRAWING_POINT_AB__ 126 End Namespace 127 End Namespace
Note:
See TracChangeset
for help on using the changeset viewer.