Ignore:
Timestamp:
Aug 24, 2007, 11:14:46 AM (17 years ago)
Author:
イグトランス (egtra)
Message:

フルコンパイルでのミスあぶり出し。註:修正は全て@300や@301以前に行われた。

File:
1 edited

Legend:

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

    r282 r303  
    6969            Exit Sub ' パレットインデックス指定は無効
    7070        Else
    71             argb = Color_MakeARGB(255, GetRValue(rgb), GetGValue(rgb), GetBValue(rgb))
     71            argb = MakeARGB(255, GetRValue(rgb) As Byte, GetGValue(rgb) As Byte, GetBValue(rgb) As Byte)
    7272        End If
    7373    End Sub
     
    8282
    8383    Static Function FromArgb(argb As ARGB) As Color
    84         Dim c As Color(argb)
    85         Rteurn c
     84        Return New Color(argb)
    8685    End Function
    8786
    8887    Static Function FromArgb(a As Byte, base As Color) As Color
    89         Dim c As Color(a, base.R, base.G, base.B)
    90         Return c
     88        Return New Color(a, base.R, base.G, base.B)
    9189    End Function
    9290
    9391    Static Function FromArgb(r As Byte, g As Byte, b As Byte) As Color
    94         Dim c As Color(r, g, b)
    95         Return c
     92        Return New Color(r, g, b)
    9693    End Function
    9794
    9895    Static Function FromArgb(a As Byte, r As Byte, g As Byte, b As Byte) As Color
    99         Dim c As Color(a, r, g, b)
    100         Return c
     96        Return New Color(a, r, g, b)
    10197    End Function
    10298
     
    119115        d = max - min
    120116        If g = max Then
    121             Return (b - r) As Double / d * 60 + 120
     117            Return ((b - r) As Double / d * 60.0 + 120.0) As Single
    122118        ElseIf b = max Then
    123             Return (r - g) As Double / d * 60 + 240
     119            Return ((r - g) As Double / d * 60 + 240) As Single
    124120        ElseIf g < b Then
    125             Return (g - b) As Double / d * 60 + 360
     121            Return ((g - b) As Double / d * 60 + 360) As Single
    126122        Else
    127             Return (g - b) As Double / d * 60
     123            Return ((g - b) As Double / d * 60) As Single
    128124        EndIf
    129125    End Function
    130126
    131127    Function GetSaturation() As Single
    132         Dim max As Long, min As Long
    133128        Dim r = R
    134129        Dim g = G
    135130        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)
     131        Dim max = System.Math.Max(System.Math.Max(r, g), b) As Long
     132        Dim min = System.Math.Min(System.Math.Min(r, g), b) As Long
    138133        Return (max - min) / max
    139134    End Function
    140135
    141136    Function GetBrightness() As Single
    142         Dim max As Long
    143137        Dim r = R
    144138        Dim g = G
    145139        Dim b = B
    146         max = System.Math.Max(System.Math.Max(r, g), b)
     140        Dim max = System.Math.Max(System.Math.Max(r, g), b)
    147141        Return max * (1 / 255)
    148142    End Function
Note: See TracChangeset for help on using the changeset viewer.