Changeset 303 for trunk/Include/Classes/System/Drawing/Point.ab
- Timestamp:
- Aug 24, 2007, 11:14:46 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Include/Classes/System/Drawing/Point.ab
r223 r303 75 75 76 76 Static Function Add(pt1 As Point, pt2 As Point) As Point 77 Dim ret As Point(pt1.x + pt2.x, pt1.y + pt2.y) 78 Return ret 77 Return New Point(pt1.x + pt2.x, pt1.y + pt2.y) 79 78 End Function 80 79 81 80 Static Function Add(pt As Point, sz As Size) As Point 82 Dim ret As Point(pt.x + sz.Width, pt.y + sz.Height) 83 Return ret 81 Return New Point(pt.x + sz.Width, pt.y + sz.Height) 84 82 End Function 85 83 86 84 Function Offset(pt As Point) As Point 87 Dim ret As Point(x + pt.x, y + pt.y) 88 Return ret 85 Return New Point(x + pt.x, y + pt.y) 89 86 End Function 90 87 … … 95 92 96 93 Static Function Substract(pt1 As Point, pt2 As Point) As Point 97 Dim ret As Point(pt1.x - pt2.x, pt1.y - pt2.y) 98 Return ret 94 Return New Point(pt1.x - pt2.x, pt1.y - pt2.y) 99 95 End Function 100 96 101 97 Static Function Substract(pt As Point, sz As Size) As Point 102 Dim ret As Point(pt.x - sz.Width, pt.y - sz.Height) 103 Return ret 98 Return New Point(pt.x - sz.Width, pt.y - sz.Height) 104 99 End Function 105 100 … … 113 108 114 109 Static Function Ceiling(ptf As PointF) As Point 115 Dim pt As Size(Math.Ceiling(ptf.width), Math.Ceiling(ptf.height)) 116 Return pt 110 Return New Point(System.Math.Ceiling(ptf.X) As Long, System.Math.Ceiling(ptf.Y) As Long) 117 111 End Function 118 112 119 113 Static Function Round(ptf As PointF) As Point 120 Dim pt As Point(Math.Round(ptf.width), Math.Round(ptf.height)) 121 Return pt 114 Return New Point(System.Math.Round(ptf.X) As Long, System.Math.Round(ptf.Y) As Long) 122 115 End Function 123 116 124 117 Static Function Truncate(ptf As PointF) As Point 125 Dim pt As Point(Math.Truncate(ptf.width), Math.Truncate(ptf.height)) 126 Return pt 118 Return New Point(System.Math.Truncate(ptf.X) As Long, System.Math.Truncate(ptf.Y) As Long) 127 119 End Function 128 120 129 121 Function Operator () As PointF 130 Return ReturnPointF(X, Y)122 Return New PointF(X, Y) 131 123 End Function 132 124
Note:
See TracChangeset
for help on using the changeset viewer.