Changes in Include/Classes/System/Drawing/Point.ab [11:29]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Include/Classes/System/Drawing/Point.ab
r11 r29 4 4 #define __SYSTEM_DRAWING_POINT_AB__ 5 5 6 #include <Classes/System/Drawing/PointF.ab> 6 7 #include <Classes/System/Drawing/Size.ab> 7 8 #include <Classes/System/Drawing/SizeF.ab> … … 64 65 65 66 Function Operator + (pt As Point) As Point 66 Return Add( pt)67 Return Add(This, pt) 67 68 End Function 68 69 69 70 Function Operator + (sz As Size) As Point 70 Return Add( sz)71 Return Add(This, sz) 71 72 End Function 72 73 73 74 Function Operator - (pt As Point) As Point 74 Return Substract( pt)75 Return Substract(This, pt) 75 76 End Function 76 77 77 78 Function Operator - (sz As Size) As Point 78 Return Substract( sz)79 Return Substract(This, sz) 79 80 End Function 80 81 … … 87 88 End Function 88 89 89 Function Add(ptAs Point) As Point90 Dim ret As Point( x + pt.x, y + pt.y)90 Static Function Add(pt1 As Point, pt2 As Point) As Point 91 Dim ret As Point(pt1.x + pt2.x, pt1.y + pt2.y) 91 92 Return ret 92 93 End Function 93 94 94 Function Add(sz As Size) As Point95 Dim ret As Point( x + sz.width, y + sz.height)95 Static Function Add(pt As Point, sz As Size) As Point 96 Dim ret As Point(pt.x + sz.Width, pt.y + sz.Height) 96 97 Return ret 97 98 End Function … … 99 100 Function Offset(pt As Point) As Point 100 101 Dim ret As Point(x + pt.x, y + pt.y) 101 End Function102 103 Function Offset(dx As Long, dy As Long) As Point104 Dim ret As Point(x + dx, y + dy)105 End Function106 107 Function Substract(pt As Point) As Point108 Dim ret As Point(x - pt.x, y - pt.y)109 102 Return ret 110 103 End Function 111 104 112 Function Substract(sz As Size) As Point 113 Dim ret As Point(x - sz.width, y - sz.height) 105 Sub Offset(dx As Long, dy As Long) 106 x += dx 107 y += dy 108 End Sub 109 110 Static Function Substract(pt1 As Point, pt2 As Point) As Point 111 Dim ret As Point(pt1.x - pt2.x, pt1.y - pt2.y) 112 Return ret 113 End Function 114 115 Static Function Substract(pt As Point, sz As Size) As Point 116 Dim ret As Point(pt.x - sz.Width, pt.y - sz.Height) 114 117 Return ret 115 118 End Function
Note:
See TracChangeset
for help on using the changeset viewer.