Changeset 282 for Include/Classes/System/Drawing
- Timestamp:
- Jul 2, 2007, 1:33:52 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Include/Classes/System/Drawing/Color.ab
r212 r282 112 112 Function GetHue() As Single 113 113 Dim max As Long, min As Long, d As Long 114 max = Math.Max(Math.Max(r, g), b) 115 min = Math.Min(Math.Min(r, g), b) 114 Dim r = R 115 Dim g = G 116 Dim b = B 117 max = System.Math.Max(System.Math.Max(r, g), b) 118 min = System.Math.Min(System.Math.Min(r, g), b) 116 119 d = max - min 117 120 If g = max Then … … 128 131 Function GetSaturation() As Single 129 132 Dim max As Long, min As Long 130 max = Math.Max(Math.Max(r, g), b) 131 min = Math.Min(Math.Min(r, g), b) 133 Dim r = R 134 Dim g = G 135 Dim b = B 136 max = System.Math.Max(System.Math.Max(r, g), b) 137 min = System.Math.Min(System.Math.Min(r, g), b) 132 138 Return (max - min) / max 133 139 End Function … … 135 141 Function GetBrightness() As Single 136 142 Dim max As Long 137 max = Math.Max(Math.Max(r, g), b) 143 Dim r = R 144 Dim g = G 145 Dim b = B 146 max = System.Math.Max(System.Math.Max(r, g), b) 138 147 Return max * (1 / 255) 139 148 End Function
Note:
See TracChangeset
for help on using the changeset viewer.