Changeset 241 for branch/egtra-gdiplus/Classes/System/Drawing/Color.ab
- Timestamp:
- May 9, 2007, 10:26:36 PM (17 years ago)
- Location:
- branch/egtra-gdiplus
- Files:
-
- 1 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
branch/egtra-gdiplus/Classes/System/Drawing/Color.ab
r212 r241 4 4 #define __SYSTEM_DRAWING_COLOR_AB__ 5 5 6 #include <GdiplusTypes.ab> 6 7 #include <Classes/System/Math.ab> 7 8 #include <Classes/System/Drawing/Imaging/misc.ab> 9 10 Namespace System 11 Namespace Drawing 8 12 9 13 Class Color 10 14 Public 11 15 Sub Color() 12 argb = MakeARGB(255, 0, 0, 0) ' Black 13 End Sub 14 15 Sub Color(ByRef c As Color) 16 argb = c.argb 16 argb = MakeARGB(255, 0, 0, 0) 'Black 17 17 End Sub 18 18 … … 25 25 End Sub 26 26 27 Sub Color(newArgb As ARGB)27 Sub Color(newArgb As Gdiplus.ARGB) 28 28 argb = newArgb 29 29 End Sub 30 /* 31 Sub Operator =(c As Color) 32 argb = c.argb 33 End Sub 34 */ 30 35 31 Function Operator ==(c As Color) As Boolean 36 32 Return Equals(c) … … 57 53 End Function 58 54 59 Function Value() As ARGB55 Function Value() As Gdiplus.ARGB 60 56 Return argb 61 57 End Function 62 58 63 Sub Value(value As ARGB)59 Sub Value(value As Gdiplus.ARGB) 64 60 argb = value 65 61 End Sub … … 77 73 End Function 78 74 79 Function ToArgb() As ARGB75 Function ToArgb() As Gdiplus.ARGB 80 76 Return argb 81 77 End Function 82 78 83 Static Function FromArgb(argb As ARGB) As Color79 Static Function FromArgb(argb As Gdiplus.ARGB) As Color 84 80 Dim c As Color(argb) 85 81 Rteurn c … … 301 297 End Enum 302 298 */ 303 Static Function MakeARGB(a As Byte, r As Byte, g As Byte, b As Byte) As ARGB304 MakeARGB = (((b As ARGB) <<BLUE_SHIFT) Or _305 ((g As ARGB) <<GREEN_SHIFT) Or _306 ((r As ARGB) <<RED_SHIFT) Or _307 ((a As ARGB) <<ALPHA_SHIFT))299 Static Function MakeARGB(a As Byte, r As Byte, g As Byte, b As Byte) As Gdiplus.ARGB 300 MakeARGB = (((b As Gdiplus.ARGB) << Gdiplus.BLUE_SHIFT) Or _ 301 ((g As Gdiplus.ARGB) << Gdiplus.GREEN_SHIFT) Or _ 302 ((r As Gdiplus.ARGB) << Gdiplus.RED_SHIFT) Or _ 303 ((a As Gdiplus.ARGB) << Gdiplus.ALPHA_SHIFT)) 308 304 End Function 309 305 310 306 Protected 311 argb As ARGB307 argb As Gdiplus.ARGB 312 308 End Class 313 309 310 End Namespace 'Drawing 311 End Namespace 'System 312 314 313 #endif '__SYSTEM_DRAWING_COLOR_AB__
Note:
See TracChangeset
for help on using the changeset viewer.