Ignore:
Timestamp:
May 9, 2007, 10:26:36 PM (17 years ago)
Author:
イグトランス (egtra)
Message:

GDI+に対して名前空間で囲ったものの、現在コンパイルできないため分岐させておく

Location:
branch/egtra-gdiplus
Files:
1 edited
1 copied

Legend:

Unmodified
Added
Removed
  • branch/egtra-gdiplus/Classes/System/Drawing/Color.ab

    r212 r241  
    44#define __SYSTEM_DRAWING_COLOR_AB__
    55
     6#include <GdiplusTypes.ab>
    67#include <Classes/System/Math.ab>
    78#include <Classes/System/Drawing/Imaging/misc.ab>
     9
     10Namespace System
     11Namespace Drawing
    812
    913Class Color
    1014Public
    1115    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
    1717    End Sub
    1818
     
    2525    End Sub
    2626
    27     Sub Color(newArgb As ARGB)
     27    Sub Color(newArgb As Gdiplus.ARGB)
    2828        argb = newArgb
    2929    End Sub
    30 /*
    31     Sub Operator =(c As Color)
    32         argb = c.argb
    33     End Sub
    34 */
     30
    3531    Function Operator ==(c As Color) As Boolean
    3632        Return Equals(c)
     
    5753    End Function
    5854
    59     Function Value() As ARGB
     55    Function Value() As Gdiplus.ARGB
    6056        Return argb
    6157    End Function
    6258
    63     Sub Value(value As ARGB)
     59    Sub Value(value As Gdiplus.ARGB)
    6460        argb = value
    6561    End Sub
     
    7773    End Function
    7874
    79     Function ToArgb() As ARGB
     75    Function ToArgb() As Gdiplus.ARGB
    8076        Return argb
    8177    End Function
    8278
    83     Static Function FromArgb(argb As ARGB) As Color
     79    Static Function FromArgb(argb As Gdiplus.ARGB) As Color
    8480        Dim c As Color(argb)
    8581        Rteurn c
     
    301297    End Enum
    302298*/
    303     Static Function MakeARGB(a As Byte, r As Byte, g As Byte, b As Byte) As ARGB
    304         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))
    308304    End Function
    309305
    310306Protected
    311     argb As ARGB
     307    argb As Gdiplus.ARGB
    312308End Class
    313309
     310End Namespace 'Drawing
     311End Namespace 'System
     312
    314313#endif '__SYSTEM_DRAWING_COLOR_AB__
Note: See TracChangeset for help on using the changeset viewer.