Changes in Include/Classes/System/Drawing/Color.ab [25:11]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Include/Classes/System/Drawing/Color.ab
r25 r11 18 18 Public 19 19 Sub Color() 20 argb = MakeARGB(255, 0, 0, 0) ' Black 21 End Sub 22 23 Sub Color(ByRef c As Color) 24 argb = c.argb 20 Argb = 0 ' Black 25 21 End Sub 26 22 … … 30 26 31 27 Sub Color(a As Byte, r As Byte, g As Byte, b As Byte) 32 argb = MakeARGB(a, r, g, b)33 End Sub 34 35 Sub Color( newArgb As ARGB)36 argb = newArgb28 Argb = MakeARGB(a, r, g, b) 29 End Sub 30 31 Sub Color(argb As ARGB) 32 Argb = argb 37 33 End Sub 38 34 39 35 Sub Operator =(c As Color) 40 argb = c.argb36 SetValue(c) 41 37 End Sub 42 38 … … 65 61 End Function 66 62 67 Function Value() As ARGB68 Returnargb69 End Function 70 71 Sub Value(value As ARGB)63 Function GetValue() As ARGB 64 GetValue = argb 65 End Function 66 67 Sub SetValue(value As ARGB) 72 68 argb = value 73 69 End Sub 74 70 75 71 Sub SetFromCOLORREF(rgb As COLORREF) 76 If (rgb And &hff000000) = &h01000000 Then 77 Exit Sub ' インデックス指定は無効 78 Else 79 argb = Color_MakeARGB(255, GetRValue(rgb), GetGValue(rgb), GetBValue(rgb)) 80 End If 72 argb = Color_MakeARGB(255, GetRValue(rgb), GetGValue(rgb), GetBValue(rgb)) 81 73 End Sub 82 74 … … 99 91 End Function 100 92 101 Static Function FromArgb(r As Byte, g As Byte, b As Byte) As Color93 Static Function FromArgb(r As Byte, g As Byte, b As Byte) 102 94 Dim c As Color(r, g, b) 103 95 Return c 104 96 End Function 105 97 106 Static Function FromArgb(a As Byte, r As Byte, g As Byte, b As Byte) As Color98 Static Function FromArgb(a As Byte, r As Byte, g As Byte, b As Byte) 107 99 Dim c As Color(a, r, g, b) 108 100 Return c … … 305 297 End Enum 306 298 */ 307 Static Function MakeARGB(a As Byte, r As Byte, g As Byte, b As Byte) As ARGB 299 ' Assemble A, R, G, B values into a 32-bit integer 300 Private 301 Static Function MakeARGB(/*IN*/ a As Byte, 302 /*IN*/ r As Byte, 303 /*IN*/ g As Byte, 304 /*IN*/ b As Byte) As ARGB 308 305 MakeARGB = (((b As ARGB) << Color_BlueShift) Or _ 309 306 ((g As ARGB) << Color_GreenShift) Or _
Note:
See TracChangeset
for help on using the changeset viewer.