Changeset 166 for Include/Classes
- Timestamp:
- Mar 13, 2007, 11:55:49 AM (18 years ago)
- Location:
- Include/Classes/System
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
Include/Classes/System/DateTime.ab
r163 r166 82 82 83 83 'Copy Constructor 84 Sub DateTime( ByRef datetime As DateTime)84 Sub DateTime(ByRef datetime As DateTime) 85 85 This.m_Date = datetime.m_Date 86 86 End Sub … … 89 89 End Sub 90 90 91 Function Operator + (ByRef value As TimeSpan) As DateTime91 Function Operator + (ByRef value As TimeSpan) As DateTime 92 92 Dim date As DateTime(Ticks + value.Ticks) 93 93 Return date 94 94 End Function 95 95 96 Function Operator - (ByRef value As DateTime) As TimeSpan96 Function Operator - (ByRef value As DateTime) As TimeSpan 97 97 Return TimeSpan.FromTicks(Ticks - value.Ticks) 98 98 End Function 99 99 100 Function Operator - (ByRef value As TimeSpan) As DateTime100 Function Operator - (ByRef value As TimeSpan) As DateTime 101 101 Dim date As DateTime(Ticks - value.Ticks) 102 102 Return date … … 254 254 Return False 255 255 End If 256 End Function 257 258 Override Function GetHashCode() As Long 259 Return HIDWORD(m_Date) Xor LODWORD(m_Date) 256 260 End Function 257 261 -
Include/Classes/System/Drawing/CharacterRange.ab
r11 r166 42 42 End Sub 43 43 44 Function Operator == 44 Function Operator ==(c As CharacterRange) 45 45 Return Equals(c) 46 46 End Function 47 47 48 Function Operator <> 48 Function Operator <>(c As CharacterRange) 49 49 Return Not Equals(c) 50 50 End Function … … 52 52 Function Equals(c As CharacterRange) 53 53 Return first = c.first And length = c.length 54 End Function 55 56 Override Function GetHashCode() As Long 57 Return first Xor length 54 58 End Function 55 59 -
Include/Classes/System/Drawing/Color.ab
r104 r166 75 75 Sub SetFromCOLORREF(rgb As COLORREF) 76 76 If (rgb And &hff000000) = &h01000000 Then 77 Exit Sub ' インデックス指定は無効77 Exit Sub ' パレットインデックス指定は無効 78 78 Else 79 79 argb = Color_MakeARGB(255, GetRValue(rgb), GetGValue(rgb), GetBValue(rgb)) … … 107 107 Dim c As Color(a, r, g, b) 108 108 Return c 109 End Function 110 111 Override Function GetHashCode() As Long 112 Return argb As Long 109 113 End Function 110 114 -
Include/Classes/System/Drawing/Point.ab
r104 r166 126 126 End Function 127 127 128 Override Function GetHashCode() As Long 129 Return x Xor _System_BSwap(y As DWord) 130 End Function 131 128 132 Static Function Ceiling(ptf As PointF) As Point 129 133 Dim pt As Size(Math.Ceiling(ptf.width), Math.Ceiling(ptf.height)) -
Include/Classes/System/Drawing/PointF.ab
r104 r166 133 133 End Function 134 134 135 Override Function GetHashCode() As Long 136 Return GetDWord(VarPtr(x)) Xor _System_BSwap(GetDWord(VarPtr(x))) 137 End Function 138 135 139 Private 136 140 x As Single -
Include/Classes/System/Drawing/Rectangle.ab
r104 r166 148 148 End Function 149 149 150 Override Function GetHashCode() As Long 151 Return x Xor _System_BSwap(y) Xor width Xor _System_BSwap(height) 152 End Function 153 150 154 Static Function FromLTRB(l As Long, t As Long, r As Long, b As Long) As Rectangle 151 155 Dim rect As Rectangle(l, t, r - l, r - b) -
Include/Classes/System/Drawing/RectangleF.ab
r104 r166 113 113 End Function 114 114 115 Function Operator = 115 Function Operator =(ByRef rc As RectangleF) 116 116 With rc 117 117 x = .x … … 122 122 End Function 123 123 124 Function Operator == 124 Function Operator ==(ByRef rc As RectangleF) 125 125 Return Equals(rc) 126 126 End Function 127 127 128 Function Operator <> 128 Function Operator <>(ByRef rc As RectangleF) 129 129 Return Not Equals(rc) 130 130 End Function … … 136 136 Equals = _System_FALSE 137 137 End If 138 End Function 139 140 Override Function GetHashCode() As Long 141 Return GetDWord(VarPtr(x)) Xor _System_BSwap(GetDWord(VarPtr(y))) Xor GetDWord(VarPtr(width)) Xor _System_BSwap(GetDWord(VarPtr(height))) 138 142 End Function 139 143 -
Include/Classes/System/Drawing/Size.ab
r104 r166 40 40 End Sub 41 41 42 Function Operator + 42 Function Operator +(sz As Size) As Size 43 43 Dim ret As Size(width + sz.width, height + sz.height) 44 44 Return ret 45 45 End Function 46 46 47 Function Operator - 47 Function Operator -(sz As Size) As Size 48 48 Dim ret As Size(width - sz.width, height - sz.height) 49 49 Return ret … … 55 55 End Function 56 56 57 Function Operator == 57 Function Operator ==(sz As Size) As Boolean 58 58 Return Equals(sz) 59 59 End Function 60 60 61 Function Operator <> 61 Function Operator <>(sz As Size) As Boolean 62 62 Return Not Equals(sz) 63 63 End Function 64 64 65 Sub Operator = 65 Sub Operator =(ByRef sz As Size) 66 66 width = sz.width 67 67 height = sz.height … … 74 74 Equals = _System_FALSE 75 75 End If 76 End Function 77 78 Override Function GetHashCode() As Long 79 Return width Xor _System_BSwap(height) 76 80 End Function 77 81 -
Include/Classes/System/Drawing/SizeF.ab
r104 r166 40 40 End Sub 41 41 42 Function Operator + 42 Function Operator +(sz As SizeF) As SizeF 43 43 Dim ret As SizeF(width + sz.width, height + sz.height) 44 44 Return ret 45 45 End Function 46 46 47 Function Operator - 47 Function Operator -(sz As SizeF) As SizeF 48 48 Dim ret As SizeF(width - sz.width, height - sz.height) 49 49 Return ret 50 50 End Function 51 51 52 Function Operator == 52 Function Operator ==(sz As SizeF) As Boolean 53 53 Return Equals(sz) 54 54 End Function 55 55 56 Function Operator <> 56 Function Operator <>(sz As SizeF) As Boolean 57 57 Return Not Equals(sz) 58 58 End Function 59 59 60 Sub Operator = 60 Sub Operator =(ByRef sz As SizeF) 61 61 width = sz.width 62 62 height = sz.height … … 70 70 End If 71 71 End Function 72 73 Override Function GetHashCode() As Long 74 Return VarPtr(GetDWord(width)) Xor _System_BSwap(VarPtr(GetDWord(height))) 72 75 73 76 Function IsEmpty() As Boolean
Note:
See TracChangeset
for help on using the changeset viewer.