Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Include/Classes/System/Drawing/Color.ab

    r25 r11  
    1818Public
    1919    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
    2521    End Sub
    2622
     
    3026
    3127    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 = newArgb
     28        Argb = MakeARGB(a, r, g, b)
     29    End Sub
     30
     31    Sub Color(argb As ARGB)
     32        Argb = argb
    3733    End Sub
    3834
    3935    Sub Operator =(c As Color)
    40         argb = c.argb
     36        SetValue(c)
    4137    End Sub
    4238
     
    6561    End Function
    6662
    67     Function Value() As ARGB
    68         Return argb
    69     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)
    7268        argb = value
    7369    End Sub
    7470
    7571    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))
    8173    End Sub
    8274
     
    9991    End Function
    10092
    101     Static Function FromArgb(r As Byte, g As Byte, b As Byte) As Color
     93    Static Function FromArgb(r As Byte, g As Byte, b As Byte)
    10294        Dim c As Color(r, g, b)
    10395        Return c
    10496    End Function
    10597
    106     Static Function FromArgb(a As Byte, r As Byte, g As Byte, b As Byte) As Color
     98    Static Function FromArgb(a As Byte, r As Byte, g As Byte, b As Byte)
    10799        Dim c As Color(a, r, g, b)
    108100        Return c
     
    305297    End Enum
    306298*/
    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
     300Private
     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
    308305        MakeARGB = (((b As ARGB) <<  Color_BlueShift) Or _
    309306                    ((g As ARGB) << Color_GreenShift) Or _
Note: See TracChangeset for help on using the changeset viewer.