Changeset 104


Ignore:
Timestamp:
Feb 16, 2007, 7:34:38 PM (17 years ago)
Author:
イグトランス (egtra)
Message:

Boolean対応ほか微修正

Location:
Include/Classes/System/Drawing
Files:
2 added
9 edited

Legend:

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

    r77 r104  
    4141    End Sub
    4242
    43     Function Operator ==(c As Color) As BOOL
     43    Function Operator ==(c As Color) As Boolean
    4444        Return Equals(c)
    4545    End Function
    4646
    47     Function Operator <>(c As Color) As BOOL
     47    Function Operator <>(c As Color) As Boolean
    4848        Return Not Equals(c)
    4949    End Function
     
    109109    End Function
    110110
    111     Function Equals(c As Color) As BOOL
     111    Function Equals(c As Color) As Boolean
    112112        Return argb = c.argb
    113113    End Function
  • Include/Classes/System/Drawing/Graphics.ab

    r33 r104  
    44#define __SYSTEM_DRAWING_GRAPHICS_AB__
    55
    6 #include <GdiPlusGpStabus.ab>
     6Class Brush : End Class
     7Class Pen : End Class
     8Class StringFormat : End Class
     9Class Image : End Class
     10Class ImageAttributes : End Class
     11Class Metafile : End Class
     12Class Region : End Class
     13Class GraphicsPath : End Class
     14Class CachedBitmap : End Class
     15
     16#include <GdiplusGpStubs.ab>
    717#include <GdiPlusFlat.ab>
    8 #include <Classes/System/Drawing/Graphics/misc.ab>
    9 #include <Classes/System/Drawing/Graphics/Rectangle.ab>
    10 #include <Classes/System/Drawing/Graphics/RectangleF.ab>
    11 #include <Classes/System/Drawing/Graphics/Point.ab>
    12 #include <Classes/System/Drawing/Graphics/PointF.ab>
    13 #include <Classes/System/Drawing/Graphics/SizeF.ab>
    14 #include <Classes/System/Drawing/Graphics/Brush.ab>
    15 #include <Classes/System/Drawing/Graphics/Pen.ab>
    16 #include <Classes/System/Drawing/Graphics/Region.ab>
    17 #include <Classes/System/Drawing/Graphics/StringFormat.ab>
    18 #include <Classes/System/Drawing/Graphics/Image.ab>
    19 #include <Classes/System/Drawing/Graphics/Drawing2D/misc.ab>
    20 #include <Classes/System/Drawing/Graphics/Drawing2D/Matrix.ab>
     18#include <Classes/System/Drawing/misc.ab>
     19#include <Classes/System/Drawing/Rectangle.ab>
     20#include <Classes/System/Drawing/RectangleF.ab>
     21#include <Classes/System/Drawing/Point.ab>
     22#include <Classes/System/Drawing/PointF.ab>
     23#include <Classes/System/Drawing/SizeF.ab>
     24#include <Classes/System/Drawing/Font.ab>
     25'#include <Classes/System/Drawing/Brush.ab>
     26'#include <Classes/System/Drawing/Pen.ab>
     27'#include <Classes/System/Drawing/Region.ab>
     28'#include <Classes/System/Drawing/StringFormat.ab>
     29'#include <Classes/System/Drawing/Image.ab>
     30#include <Classes/System/Drawing/Drawing2D/misc.ab>
     31#include <Classes/System/Drawing/Drawing2D/Matrix.ab>
    2132
    2233Class Graphics
     
    225236        Dim graphics = 0 As *GpGraphics
    226237        If (image != 0)
    227             lastResult = GdipGetImageGraphicsContext(image->nativeImage, graphics)
     238            lastResult = GdipGetImageGraphicsContext(image->NativeImage, graphics)
    228239        End If
    229240        SetNativeGraphics(graphics)
     
    443454    End Function
    444455
    445     Function DrawArc(ByRef pen As /*Const*/ Pen, ByRef rect As /*Const*/ RectangleF, startAngle As Single, sweepAngle As Single) As Status
     456    Function DrawArc(ByRef pen As /*Const*/ Pen, ByRef rect As /*Const*/ Rectangle, startAngle As Single, sweepAngle As Single) As Status
    446457        Return DrawArc(pen, rect.X, rect.Y, rect.Width, rect.Height, startAngle, sweepAngle)
    447458    End Function
     
    467478    End Function
    468479
    469     Function DrawBeziers(ByRef pen As /*Const*/ Pen, points As /*Const*/ *Point count As Long) As Status
     480    Function DrawBeziers(ByRef pen As /*Const*/ Pen, points As /*Const*/ *Point, count As Long) As Status
    470481        Return SetStatus(GdipDrawBeziersI(nativeGraphics, pen->nativePen, points, count))
    471482    End Function
     
    706717    End Function
    707718
    708     Function DrawString(str As PCWSTR, length As Long, ByRef font As /*Const*/ Font, ByRef layoutRect As /*Const*/ RectangleF,
     719    Function DrawString(str As PCWSTR, length As Long, ByRef font As /*Const*/ Font, ByRef layoutRect As /*Const*/ Rectangle,
    709720        ByRef stringFormat As /*Const*/ StringFormat, ByRef brush As /*Const*/ Brush) As Status
    710721
     
    721732            nativeFormat = 0
    722733        End If
    723         Return SetStatus(GdipDrawString( nativeGraphics, str, length, nativeFont, layoutRect, nativeFormat, 0))
     734        Return SetStatus(GdipDrawString(nativeGraphics, str, length, nativeFont, layoutRect, nativeFormat, 0))
    724735    End Function
    725736
     
    746757        End If
    747758        Return SetStatus(GdipDrawString(nativeGraphics, str, length, nativeFont, layoutRect, nativeFormat, nativeBrush))
     759    End Function
     760
     761    Function DrawString(str As PCWSTR, length As Long, ByRef font As /*Const*/ Font, ByRef origin As /*Const*/ Point) As Status
     762        Dim rect As RectangleF(origin.X, origin.Y, 0.0, 0.0)
     763        Dim nativeFont As *GpFont
     764        If VarPtr(font) <> 0 Then
     765            nativeFont = font.nativeFormat
     766        Else
     767            nativeFont = 0
     768        End If
     769        Return SetStatus(GdipDrawString(nativeGraphics, str, length, nativeFont, rect, 0, 0))
     770    End Function
     771
     772    Function DrawString(str As PCWSTR, length As Long, ByRef font As /*Const*/ Font, ByRef origin As /*Const*/ PointF,
     773        ByRef brush As /*Const*/ Brush) As Status
     774
     775        Dim rect As RectangleF(origin.X, origin.Y, 0.0, 0.0)
     776        Dim nativeFont As *GpFont
     777        If VarPtr(font) <> 0 Then
     778            nativeFont = font.nativeFormat
     779        Else
     780            nativeFont = 0
     781        End If
     782        Dim nativeBrush As *GpBrush
     783        If VarPtr(brush) <> 0 Then
     784            nativeBrush = brush.nativeFormat
     785        Else
     786            nativeBrush = 0
     787        End If
     788        Return SetStatus(GdipDrawString(nativeGraphics, str, length, nativeFont, rect, 0, nativeBrush))
    748789    End Function
    749790
     
    760801
    761802    Function DrawString(str As PCWSTR, length As Long, ByRef font As /*Const*/ Font, ByRef origin As /*Const*/ PointF,
    762         ByRef brush As /*Const*/ Brush) As Status
     803        ByRef stringFormat As /*Const*/ StringFormat) As Status
    763804
    764805        Dim rect As RectangleF(origin.X, origin.Y, 0.0, 0.0)
     
    769810            nativeFont = 0
    770811        End If
    771         Dim nativeBrush As *GpBrush
    772         If VarPtr(brush) <> 0 Then
    773             nativeBrush = brush.nativeFormat
    774         Else
    775             nativeBrush = 0
    776         End If
    777         Return SetStatus(GdipDrawString(nativeGraphics, str, length, nativeFont, rect, 0, nativeBrush))
    778     End Function
    779 
    780     Function DrawString(str As PCWSTR, length As Long, ByRef font As /*Const*/ Font, ByRef origin As /*Const*/ PointF) As Status
     812        Dim nativeFormat As *GpStringFormat
     813        If VarPtr(stringFormat) <> 0 Then
     814            nativeFormat = stringFormat.nativeFormat
     815        Else
     816            nativeFormat = 0
     817        End If
     818        Return SetStatus(GdipDrawString(nativeGraphics, str, length, nativeFont, rect, nativeFormat, 0))
     819    End Function
     820
     821    Function DrawString(str As PCWSTR, length As Long, ByRef font As /*Const*/ Font, ByRef origin As /*Const*/ PointF,
     822        ByRef stringFormat As /*Const*/ StringFormat, ByRef brush As /*Const*/ Brush) As Status
     823
    781824        Dim rect As RectangleF(origin.X, origin.Y, 0.0, 0.0)
    782825        Dim nativeFont As *GpFont
     
    786829            nativeFont = 0
    787830        End If
    788         Return SetStatus(GdipDrawString(nativeGraphics, str, length, nativeFont, rect, 0, 0))
    789     End Function
    790 
    791     Function DrawString(str As PCWSTR, length As Long, ByRef font As /*Const*/ Font, ByRef origin As /*Const*/ PointF,
    792         ByRef stringFormat As /*Const*/ StringFormat) As Status
    793 
    794         Dim rect As RectangleF(origin.X, origin.Y, 0.0, 0.0)
     831        Dim nativeFormat As *GpStringFormat
     832        If VarPtr(stringFormat) <> 0 Then
     833            nativeFormat = stringFormat.nativeFormat
     834        Else
     835            nativeFormat = 0
     836        End If
     837        If VarPtr(brush) <> 0 Then
     838            nativeBrush = brush.nativeFormat
     839        Else
     840            nativeBrush = 0
     841        End If
     842        Return SetStatus(GdipDrawString( nativeGraphics, str, length, nativeFont, rect, nativeFormat, nativeBrush))
     843    End Function
     844
     845    Const Function MeasureString(str As PCWSTR, length As Long, ByRef font As /*Const*/ Font, ByRef layoutRect As /*Const*/ RectangleF,
     846        ByRef stringFormat As /*Const*/ StringFormat, ByRef boundingBox As RectangleF) As Status
     847
     848        Return MeasureString(str, length, font, layoutRect, stringFormat, boundingBox, ByVal 0, ByVal 0)
     849    End Function
     850
     851    Const Function MeasureString(str As PCWSTR, length As Long, ByRef font As /*Const*/ Font, ByRef layoutRect As /*Const*/ RectangleF,
     852        ByRef stringFormat As /*Const*/ StringFormat, ByRef boundingBox As RectangleF,
     853        ByRef codepointsFitted As Long) As Status
     854
     855        Return MeasureString(str, length, font, layoutRect, stringFormat, boundingBox, codepointsFitted, ByVal 0)
     856    End Function
     857
     858    Const Function MeasureString(str As PCWSTR, length As Long, ByRef font As /*Const*/ Font, ByRef layoutRect As /*Const*/ RectangleF,
     859        ByRef stringFormat As /*Const*/ StringFormat, ByRef boundingBox As RectangleF,
     860        ByRef codepointsFitted As Long, ByRef linesFilled As Long) As Status
     861
    795862        Dim nativeFont As *GpFont
    796863        If VarPtr(font) <> 0 Then
     
    805872            nativeFormat = 0
    806873        End If
    807         Return SetStatus(GdipDrawString(nativeGraphics, str, length, nativeFont, rect, nativeFormat, 0))
    808     End Function
    809 
    810     Function DrawString(str As PCWSTR, length As Long, ByRef font As /*Const*/ Font, ByRef origin As /*Const*/ PointF,
    811         ByRef stringFormat As /*Const*/ StringFormat, ByRef brush As /*Const*/ Brush) As Status
    812 
    813         Dim rect As RectangleF(origin.X, origin.Y, 0.0, 0.0)
    814         Dim nativeFont As *GpFont
    815         If VarPtr(font) <> 0 Then
    816             nativeFont = font.nativeFormat
    817         Else
    818             nativeFont = 0
    819         End If
    820         Dim nativeFormat As *GpStringFormat
    821         If VarPtr(stringFormat) <> 0 Then
    822             nativeFormat = stringFormat.nativeFormat
    823         Else
    824             nativeFormat = 0
    825         End If
    826         If VarPtr(brush) <> 0 Then
    827             nativeBrush = brush.nativeFormat
    828         Else
    829             nativeBrush = 0
    830         End If
    831         Return SetStatus(GdipDrawString( nativeGraphics, str, length, nativeFont, rect, nativeFormat, nativeBrush))
    832     End Function
    833 
    834     Const Function MeasureString(str As PCWSTR, length As Long, ByRef font As /*Const*/ Font, ByRef layoutRect As /*Const*/ RectangleF,
    835         ByRef stringFormat As /*Const*/ StringFormat, ByRef boundingBox As RectangleF) As Status
    836 
    837         Return MeasureString(str, length, font, layoutRect, stringFormat, boundingBox, ByVal 0, ByVal 0)
    838     End Function
    839 
    840     Const Function MeasureString(str As PCWSTR, length As Long, ByRef font As /*Const*/ Font, ByRef layoutRect As /*Const*/ RectangleF,
    841         ByRef stringFormat As /*Const*/ StringFormat, ByRef boundingBox As RectangleF,
    842         ByRef codepointsFitted As Long) As Status
    843 
    844         Return MeasureString(str, length, font, layoutRect, stringFormat, boundingBox, codepointsFitted, ByVal 0)
    845     End Function
    846 
    847     Const Function MeasureString(str As PCWSTR, length As Long, ByRef font As /*Const*/ Font, ByRef layoutRect As /*Const*/ RectangleF,
    848         ByRef stringFormat As /*Const*/ StringFormat, ByRef boundingBox As RectangleF,
    849         ByRef codepointsFitted As Long, ByRef linesFilled As Long) As Status
    850 
    851         Dim nativeFont As *GpFont
    852         If VarPtr(font) <> 0 Then
    853             nativeFont = font.nativeFormat
    854         Else
    855             nativeFont = 0
    856         End If
    857         Dim nativeFormat As *GpStringFormat
    858         If VarPtr(stringFormat) <> 0 Then
    859             nativeFormat = stringFormat.nativeFormat
    860         Else
    861             nativeFormat = 0
    862         End If
    863874        Return SetStatus(GdipMeasureString(nativeGraphics, str, length, nativeFont, layoutRect, nativeFormat,
    864875            boundingBox, codepointsFitted, linesFilled))
     
    869880        ByRef size As SizeF) As Status
    870881
    871             Return MeasureString, str, length, font, layoutRectSize, stringFormat, size, ByVal 0, ByVal 0)
     882            Return MeasureString(str, length, font, layoutRectSize, stringFormat, size, ByVal 0, ByVal 0)
    872883    End Function
    873884
     
    876887        ByRef size As SizeF, ByRef codepointsFitted As Long) As Status
    877888
    878             Return MeasureString, str, length, font, layoutRectSize, stringFormat, size, codepointsFitted, ByVal 0)
     889            Return MeasureString(str, length, font, layoutRectSize, stringFormat, size, codepointsFitted, ByVal 0)
    879890    End Function
    880891
     
    906917            nativeFont, layoutRect, nativeFormat, pBoundingBox, codepointsFitted, linesFilled))
    907918
    908         If VarPtr(size) <> 0 And status = Ok Then
     919        If VarPtr(size) <> 0 And status = Status.Ok Then
    909920            size.Width  = boundingBox.Width
    910921            size.Height = boundingBox.Height
     
    10501061    ' native format differs from this Graphics.
    10511062
    1052     Function DrawCachedBitmap(ByRef cb As CachedBitma, x As Long, y As Long) As Status
     1063    Function DrawCachedBitmap(ByRef cb As CachedBitmap, x As Long, y As Long) As Status
    10531064        Return SetStatus(GdipDrawCachedBitmap(nativeGraphics, cb->nativeCachedBitmap, x, y))
    10541065    End Function
     
    10611072        Dim nativeImage As *GpImage
    10621073        If VarPtr(image) <> 0 Then
    1063             nativeImage = image.nativeImage
     1074            nativeImage = image.NativeImage
    10641075        Else
    10651076            nativeImage = 0
     
    10751086        Dim nativeImage As *GpImage
    10761087        If VarPtr(image) <> 0 Then
    1077             nativeImage = image.nativeImage
     1088            nativeImage = image.NativeImage
    10781089        Else
    10791090            nativeImage = 0
     
    10891100        Dim nativeImage As *GpImage
    10901101        If VarPtr(image) <> 0 Then
    1091             nativeImage = image.nativeImage
     1102            nativeImage = image.NativeImage
    10921103        Else
    10931104            nativeImage = 0
     
    11031114        Dim nativeImage As *GpImage
    11041115        If VarPtr(image) <> 0 Then
    1105             nativeImage = image.nativeImage
     1116            nativeImage = image.NativeImage
    11061117        Else
    11071118            nativeImage = 0
     
    11251136        Dim nativeImage As *GpImage
    11261137        If VarPtr(image) <> 0 Then
    1127             nativeImage = image.nativeImage
     1138            nativeImage = image.NativeImage
    11281139        Else
    11291140            nativeImage = 0
     
    11391150        Dim nativeImage As *GpImage
    11401151        If VarPtr(image) <> 0 Then
    1141             nativeImage = image.nativeImage
     1152            nativeImage = image.NativeImage
    11421153        Else
    11431154            nativeImage = 0
     
    11511162        Dim nativeImage As *GpImage
    11521163        If VarPtr(image) <> 0 Then
    1153             nativeImage = image.nativeImage
     1164            nativeImage = image.NativeImage
    11541165        Else
    11551166            nativeImage = 0
     
    11851196        Dim nativeImage As *GpImage
    11861197        If VarPtr(image) <> 0 Then
    1187             nativeImage = image.nativeImage
     1198            nativeImage = image.NativeImage
    11881199        Else
    11891200            nativeImage = 0
     
    11911202        Dim nativeImageAttr As *GpImageAttributes
    11921203        If VarPtr(imageAttributes) <> 0 Then
    1193             nativeImageAttr = image.nativeImageAttr
     1204            nativeImageAttr = image.NativeImageAttr
    11941205        Else
    11951206            nativeImageAttr = 0
     
    12281239        Dim nativeImage As *GpImage
    12291240        If VarPtr(image) <> 0 Then
    1230             nativeImage = image.nativeImage
     1241            nativeImage = image.NativeImage
    12311242        Else
    12321243            nativeImage = 0
     
    12341245        Dim nativeImageAttr As *GpImageAttributes
    12351246        If VarPtr(imageAttributes) <> 0 Then
    1236             nativeImageAttr = image.nativeImageAttr
     1247            nativeImageAttr = image.NativeImageAttr
    12371248        Else
    12381249            nativeImageAttr = 0
     
    12481259        Dim nativeImage As *GpImage
    12491260        If VarPtr(image) <> 0 Then
    1250             nativeImage = image.nativeImage
     1261            nativeImage = image.NativeImage
    12511262        Else
    12521263            nativeImage = 0
     
    12811292        Dim nativeImage As *GpImage
    12821293        If VarPtr(image) <> 0 Then
    1283             nativeImage = image.nativeImage
     1294            nativeImage = image.NativeImage
    12841295        Else
    12851296            nativeImage = 0
     
    12871298        Dim nativeImageAttr As *GpImageAttributes
    12881299        If VarPtr(imageAttributes) <> 0 Then
    1289             nativeImageAttr = image.nativeImageAttr
     1300            nativeImageAttr = image.NativeImageAttr
    12901301        Else
    12911302            nativeImageAttr = 0
     
    13101321    End Function
    13111322
    1312     Function DrawImage(ByRef image As Image, destPoints As /*Const*/ Point, count As Long,
    1313         srcx As Long, srcy As Long, srcwidth As Long, srcheight As Long, srcUnit As GraphicsUnit,
     1323    Function DrawImage(ByRef image As Image, destPoints As /*Const*/ Point, count As Long, _
     1324        srcx As Long, srcy As Long, srcwidth As Long, srcheight As Long, srcUnit As GraphicsUnit, _
    13141325        ByRef imageAttributes As /*Const*/ ImageAttributes,
    1315         DrawImageAbort callback As DrawImageAbort) As Status
     1326        callback As DrawImageAbort) As Status
    13161327
    13171328        Return DrawImage(image, destPoints, count, srcx, srcy, srcwidth, srcheight, srcUnit, imageAttributes, callback, 0)
     
    13241335        Dim nativeImage As *GpImage
    13251336        If VarPtr(image) <> 0 Then
    1326             nativeImage = image.nativeImage
     1337            nativeImage = image.NativeImage
    13271338        Else
    13281339            nativeImage = 0
     
    13301341        Dim nativeImageAttr As *GpImageAttributes
    13311342        If VarPtr(imageAttributes) <> 0 Then
    1332             nativeImageAttr = image.nativeImageAttr
     1343            nativeImageAttr = image.NativeImageAttr
    13331344        Else
    13341345            nativeImageAttr = 0
     
    14021413        Dim nativeImage As /*Const*/ *GpMetafile
    14031414        If VarPtr(metafile) <> 0 Then
    1404             nativeImage = metafile.nativeImage
     1415            nativeImage = metafile.NativeImage
    14051416        Else
    14061417            nativeImage = 0
     
    14081419        Dim nativeImageAttr As *GpImageAttributes
    14091420        If VarPtr(imageAttributes) <> 0 Then
    1410             nativeImageAttr = image.nativeImageAttr
     1421            nativeImageAttr = image.NativeImageAttr
    14111422        Else
    14121423            nativeImageAttr = 0
     
    14341445        Dim nativeImage As /*Const*/ *GpMetafile
    14351446        If VarPtr(metafile) <> 0 Then
    1436             nativeImage = metafile.nativeImage
     1447            nativeImage = metafile.NativeImage
    14371448        Else
    14381449            nativeImage = 0
     
    14401451        Dim nativeImageAttr As *GpImageAttributes
    14411452        If VarPtr(imageAttributes) <> 0 Then
    1442             nativeImageAttr = image.nativeImageAttr
     1453            nativeImageAttr = image.NativeImageAttr
    14431454        Else
    14441455            nativeImageAttr = 0
     
    14661477        Dim nativeImage As /*Const*/ *GpMetafile
    14671478        If VarPtr(metafile) <> 0 Then
    1468             nativeImage = metafile.nativeImage
     1479            nativeImage = metafile.NativeImage
    14691480        Else
    14701481            nativeImage = 0
     
    14721483        Dim nativeImageAttr As *GpImageAttributes
    14731484        If VarPtr(imageAttributes) <> 0 Then
    1474             nativeImageAttr = image.nativeImageAttr
     1485            nativeImageAttr = image.NativeImageAttr
    14751486        Else
    14761487            nativeImageAttr = 0
     
    14981509        Dim nativeImage As /*Const*/ *GpMetafile
    14991510        If VarPtr(metafile) <> 0 Then
    1500             nativeImage = metafile.nativeImage
     1511            nativeImage = metafile.NativeImage
    15011512        Else
    15021513            nativeImage = 0
     
    15041515        Dim nativeImageAttr As *GpImageAttributes
    15051516        If VarPtr(imageAttributes) <> 0 Then
    1506             nativeImageAttr = image.nativeImageAttr
     1517            nativeImageAttr = image.NativeImageAttr
    15071518        Else
    15081519            nativeImageAttr = 0
     
    15301541        Dim nativeImage As /*Const*/ *GpMetafile
    15311542        If VarPtr(metafile) <> 0 Then
    1532             nativeImage = metafile.nativeImage
     1543            nativeImage = metafile.NativeImage
    15331544        Else
    15341545            nativeImage = 0
     
    15361547        Dim nativeImageAttr As *GpImageAttributes
    15371548        If VarPtr(imageAttributes) <> 0 Then
    1538             nativeImageAttr = image.nativeImageAttr
     1549            nativeImageAttr = image.NativeImageAttr
    15391550        Else
    15401551            nativeImageAttr = 0
     
    15621573        Dim nativeImage As /*Const*/ *GpMetafile
    15631574        If VarPtr(metafile) <> 0 Then
    1564             nativeImage = metafile.nativeImage
     1575            nativeImage = metafile.NativeImage
    15651576        Else
    15661577            nativeImage = 0
     
    15681579        Dim nativeImageAttr As *GpImageAttributes
    15691580        If VarPtr(imageAttributes) <> 0 Then
    1570             nativeImageAttr = image.nativeImageAttr
     1581            nativeImageAttr = image.NativeImageAttr
    15711582        Else
    15721583            nativeImageAttr = 0
     
    15971608        Dim nativeImage As /*Const*/ *GpMetafile
    15981609        If VarPtr(metafile) <> 0 Then
    1599             nativeImage = metafile.nativeImage
     1610            nativeImage = metafile.NativeImage
    16001611        Else
    16011612            nativeImage = 0
     
    16031614        Dim nativeImageAttr As *GpImageAttributes
    16041615        If VarPtr(imageAttributes) <> 0 Then
    1605             nativeImageAttr = image.nativeImageAttr
     1616            nativeImageAttr = image.NativeImageAttr
    16061617        Else
    16071618            nativeImageAttr = 0
    16081619        End If
    16091620
    1610         Return SetStatus(GdipEnumerateMetafileSrcRectDestPoint(nativeGraphics,
    1611             nativeImage, destPoint, srcRect, srcUnit, callback, callbackData, nativeImageAttr)
    1612     End Function
    1613 
    1614     Function EnumerateMetafile(ByRef metafile As /*Const*/ Metafile,
    1615         ByRef destPoint As /*Const*/ Point, ByRef srcRect As /*Const*/ Rectangle, srcUnit As GraphicsUnit,
     1621        Return SetStatus(GdipEnumerateMetafileSrcRectDestPoint(nativeGraphics, _
     1622            nativeImage, destPoint, srcRect, srcUnit, callback, callbackData, nativeImageAttr))
     1623    End Function
     1624
     1625    Function EnumerateMetafile(ByRef metafile As /*Const*/ Metafile, _
     1626        ByRef destPoint As /*Const*/ Point, ByRef srcRect As /*Const*/ Rectangle, srcUnit As GraphicsUnit, _
    16161627        callback As EnumerateMetafileProc) As Status
    16171628
     
    16191630    End Function
    16201631
    1621     Function EnumerateMetafile(ByRef metafile As /*Const*/ Metafile,
    1622         ByRef destPoint As /*Const*/ Point, ByRef srcRect As /*Const*/ Rectangle, srcUnit As GraphicsUnit,
     1632    Function EnumerateMetafile(ByRef metafile As /*Const*/ Metafile, _
     1633        ByRef destPoint As /*Const*/ Point, ByRef srcRect As /*Const*/ Rectangle, srcUnit As GraphicsUnit, _
    16231634        callback As EnumerateMetafileProc, callbackData As VoidPtr) As Status
    16241635
     
    16261637    End Function
    16271638
    1628     Function EnumerateMetafile(ByRef metafile As /*Const*/ Metafile,
    1629         ByRef destPoint As /*Const*/ Point, ByRef srcRect As /*Const*/ Rectangle, srcUnit As GraphicsUnit,
     1639    Function EnumerateMetafile(ByRef metafile As /*Const*/ Metafile, _
     1640        ByRef destPoint As /*Const*/ Point, ByRef srcRect As /*Const*/ Rectangle, srcUnit As GraphicsUnit, _
    16301641        callback As EnumerateMetafileProc, callbackData As VoidPtr, ByRef imageAttributes As /*Const*/ ImageAttributes) As Status
    16311642
    16321643        Dim nativeImage As /*Const*/ *GpMetafile
    16331644        If VarPtr(metafile) <> 0 Then
    1634             nativeImage = metafile.nativeImage
     1645            nativeImage = metafile.NativeImage
    16351646        Else
    16361647            nativeImage = 0
     
    16381649        Dim nativeImageAttr As *GpImageAttributes
    16391650        If VarPtr(imageAttributes) <> 0 Then
    1640             nativeImageAttr = image.nativeImageAttr
     1651            nativeImageAttr = image.NativeImageAttr
    16411652        Else
    16421653            nativeImageAttr = 0
    16431654        End If
    16441655
    1645         Return SetStatus(GdipEnumerateMetafileSrcRectDestPointI(nativeGraphics,
    1646             nativeImage, destPoint, srcRect, srcUnit, callback, callbackData, nativeImageAttr)
    1647     End Function
    1648 
    1649     Function EnumerateMetafile(ByRef metafile As /*Const*/ Metafile,
    1650         ByRef destRect As /*Const*/ RectangleF, ByRef srcRect As /*Const*/ RectangleF, srcUnit As GraphicsUnit,
     1656        Return SetStatus(GdipEnumerateMetafileSrcRectDestPointI(nativeGraphics, _
     1657            nativeImage, destPoint, srcRect, srcUnit, callback, callbackData, nativeImageAttr))
     1658    End Function
     1659
     1660    Function EnumerateMetafile(ByRef metafile As /*Const*/ Metafile, _
     1661        ByRef destRect As /*Const*/ RectangleF, ByRef srcRect As /*Const*/ RectangleF, srcUnit As GraphicsUnit, _
    16511662        callback As EnumerateMetafileProc) As Status
    16521663
     
    16541665    End Function
    16551666
    1656     Function EnumerateMetafile(ByRef metafile As /*Const*/ Metafile,
    1657         ByRef destRect As /*Const*/ RectangleF, ByRef srcRect As /*Const*/ RectangleF, srcUnit As GraphicsUnit,
     1667    Function EnumerateMetafile(ByRef metafile As /*Const*/ Metafile, _
     1668        ByRef destRect As /*Const*/ RectangleF, ByRef srcRect As /*Const*/ RectangleF, srcUnit As GraphicsUnit, _
    16581669        callback As EnumerateMetafileProc, callbackData As VoidPtr) As Status
    16591670
     
    16611672    End Function
    16621673
    1663     Function EnumerateMetafile(ByRef metafile As /*Const*/ Metafile,
    1664         ByRef destRect As /*Const*/ RectangleF, ByRef srcRect As /*Const*/ RectangleF, srcUnit As GraphicsUnit,
     1674    Function EnumerateMetafile(ByRef metafile As /*Const*/ Metafile, _
     1675        ByRef destRect As /*Const*/ RectangleF, ByRef srcRect As /*Const*/ RectangleF, srcUnit As GraphicsUnit, _
    16651676        callback As EnumerateMetafileProc, callbackData As VoidPtr, ByRef imageAttributes As /*Const*/ ImageAttributes) As Status
    16661677
    16671678        Dim nativeImage As /*Const*/ *GpMetafile
    16681679        If VarPtr(metafile) <> 0 Then
    1669             nativeImage = metafile.nativeImage
     1680            nativeImage = metafile.NativeImage
    16701681        Else
    16711682            nativeImage = 0
     
    16731684        Dim nativeImageAttr As *GpImageAttributes
    16741685        If VarPtr(imageAttributes) <> 0 Then
    1675             nativeImageAttr = image.nativeImageAttr
     1686            nativeImageAttr = image.NativeImageAttr
    16761687        Else
    16771688            nativeImageAttr = 0
    16781689        End If
    16791690
    1680         Return SetStatus(GdipEnumerateMetafileSrcRectDestRect(nativeGraphics,
     1691        Return SetStatus(GdipEnumerateMetafileSrcRectDestRect(nativeGraphics, _
    16811692            nativeImage, destRect, srcRect, srcUnit, callback, callbackData, nativeImageAttr))
    16821693    End Function
    16831694
    1684     Function EnumerateMetafile(ByRef metafile As /*Const*/ Metafile,
    1685         ByRef destRect As /*Const*/ Rectangle, ByRef srcRect As /*Const*/ Rectangle, srcUnit As GraphicsUnit,
     1695    Function EnumerateMetafile(ByRef metafile As /*Const*/ Metafile, _
     1696        ByRef destRect As /*Const*/ Rectangle, ByRef srcRect As /*Const*/ Rectangle, srcUnit As GraphicsUnit, _
    16861697        callback As EnumerateMetafileProc) As Status
    16871698
     
    16891700    End Function
    16901701
    1691     Function EnumerateMetafile(ByRef metafile As /*Const*/ Metafile,
    1692         ByRef destRect As /*Const*/ Rectangle, ByRef srcRect As /*Const*/ Rectangle, srcUnit As GraphicsUnit,
     1702    Function EnumerateMetafile(ByRef metafile As /*Const*/ Metafile, _
     1703        ByRef destRect As /*Const*/ Rectangle, ByRef srcRect As /*Const*/ Rectangle, srcUnit As GraphicsUnit, _
    16931704        callback As EnumerateMetafileProc, callbackData As VoidPtr) As Status
    16941705
     
    16961707    End Function
    16971708
    1698     Function EnumerateMetafile(ByRef metafile As /*Const*/ Metafile,
    1699         ByRef destRect As /*Const*/ Rectangle, ByRef srcRect As /*Const*/ Rectangle, srcUnit As GraphicsUnit,
     1709    Function EnumerateMetafile(ByRef metafile As /*Const*/ Metafile, _
     1710        ByRef destRect As /*Const*/ Rectangle, ByRef srcRect As /*Const*/ Rectangle, srcUnit As GraphicsUnit, _
    17001711        callback As EnumerateMetafileProc, callbackData As VoidPtr, ByRef imageAttributes As /*Const*/ ImageAttributes) As Status
    17011712
    17021713        Dim nativeImage As /*Const*/ *GpMetafile
    17031714        If VarPtr(metafile) <> 0 Then
    1704             nativeImage = metafile.nativeImage
     1715            nativeImage = metafile.NativeImage
    17051716        Else
    17061717            nativeImage = 0
     
    17081719        Dim nativeImageAttr As *GpImageAttributes
    17091720        If VarPtr(imageAttributes) <> 0 Then
    1710             nativeImageAttr = image.nativeImageAttr
     1721            nativeImageAttr = image.NativeImageAttr
    17111722        Else
    17121723            nativeImageAttr = 0
    17131724        End If
    17141725
    1715         Return SetStatus(GdipEnumerateMetafileSrcRectDestRectI(nativeGraphics,
     1726        Return SetStatus(GdipEnumerateMetafileSrcRectDestRectI(nativeGraphics, _
    17161727            nativeImage, destRect, srcRect, srcUnit, callback, callbackData, nativeImageAttr))
    17171728    End Function
    17181729
    1719     Function EnumerateMetafile(ByRef metafile As /*Const*/ Metafile,
    1720         destPoints As /*Const*/ *PointF, count As Long, ByRef srcRect As /*Const*/ RectangleF, srcUnit As GraphicsUnit,
     1730    Function EnumerateMetafile(ByRef metafile As /*Const*/ Metafile, _
     1731        destPoints As /*Const*/ *PointF, count As Long, ByRef srcRect As /*Const*/ RectangleF, srcUnit As GraphicsUnit, _
    17211732        callback As EnumerateMetafileProc) As Status
    17221733
     
    17241735    End Function
    17251736
    1726     Function EnumerateMetafile(ByRef metafile As /*Const*/ Metafile,
    1727         destPoints As /*Const*/ *PointF, count As Long, ByRef srcRect As /*Const*/ RectangleF, srcUnit As GraphicsUnit,
     1737    Function EnumerateMetafile(ByRef metafile As /*Const*/ Metafile, _
     1738        destPoints As /*Const*/ *PointF, count As Long, ByRef srcRect As /*Const*/ RectangleF, srcUnit As GraphicsUnit, _
    17281739        callback As EnumerateMetafileProc, callbackData As VoidPtr) As Status
    17291740
     
    17311742    End Function
    17321743
    1733     Function EnumerateMetafile(ByRef metafile As /*Const*/ Metafile,
    1734         destPoints As /*Const*/ *PointF, count As Long, ByRef srcRect As /*Const*/ RectangleF, srcUnit As GraphicsUnit,
     1744    Function EnumerateMetafile(ByRef metafile As /*Const*/ Metafile, _
     1745        destPoints As /*Const*/ *PointF, count As Long, ByRef srcRect As /*Const*/ RectangleF, srcUnit As GraphicsUnit, _
    17351746        callback As EnumerateMetafileProc, callbackData As VoidPtr, ByRef imageAttributes As /*Const*/ ImageAttributes) As Status
    17361747
    17371748        Dim nativeImage As /*Const*/ *GpMetafile
    17381749        If VarPtr(metafile) <> 0 Then
    1739             nativeImage = metafile.nativeImage
     1750            nativeImage = metafile.NativeImage
    17401751        Else
    17411752            nativeImage = 0
     
    17431754        Dim nativeImageAttr As *GpImageAttributes
    17441755        If VarPtr(imageAttributes) <> 0 Then
    1745             nativeImageAttr = image.nativeImageAttr
     1756            nativeImageAttr = image.NativeImageAttr
    17461757        Else
    17471758            nativeImageAttr = 0
    17481759        End If
    17491760
    1750         Return SetStatus(GdipEnumerateMetafileSrcRectDestPoints(nativeGraphics,
    1751             nativeImage, destPoints, count, srcRect, srcUnit, callback, callbackData, nativeImageAttr)
    1752     End Function
    1753 
    1754     Function EnumerateMetafile(ByRef metafile As /*Const*/ Metafile,
    1755         destPoints As /*Const*/ *Point, count As Long, ByRef srcRect As /*Const*/ Rectangle, srcUnit As GraphicsUnit,
     1761        Return SetStatus(GdipEnumerateMetafileSrcRectDestPoints(nativeGraphics, _
     1762            nativeImage, destPoints, count, srcRect, srcUnit, callback, callbackData, nativeImageAttr))
     1763    End Function
     1764
     1765    Function EnumerateMetafile(ByRef metafile As /*Const*/ Metafile, _
     1766        destPoints As /*Const*/ *Point, count As Long, ByRef srcRect As /*Const*/ Rectangle, srcUnit As GraphicsUnit, _
    17561767        callback As EnumerateMetafileProc) As Status
    17571768
     
    17591770    End Function
    17601771
    1761     Function EnumerateMetafile(ByRef metafile As /*Const*/ Metafile,
    1762         destPoints As /*Const*/ *Point, count As Long, ByRef srcRect As /*Const*/ Rectangle, srcUnit As GraphicsUnit,
     1772    Function EnumerateMetafile(ByRef metafile As /*Const*/ Metafile, _
     1773        destPoints As /*Const*/ *Point, count As Long, ByRef srcRect As /*Const*/ Rectangle, srcUnit As GraphicsUnit, _
    17631774        callback As EnumerateMetafileProc, callbackData As VoidPtr) As Status
    17641775
     
    17661777    End Function
    17671778
    1768     Function EnumerateMetafile(ByRef metafile As /*Const*/ Metafile,
    1769         destPoints As /*Const*/ *Point, count As Long, ByRef srcRect As /*Const*/ Rectangle, srcUnit As GraphicsUnit,
     1779    Function EnumerateMetafile(ByRef metafile As /*Const*/ Metafile, _
     1780        destPoints As /*Const*/ *Point, count As Long, ByRef srcRect As /*Const*/ Rectangle, srcUnit As GraphicsUnit, _
    17701781        callback As EnumerateMetafileProc, callbackData As VoidPtr, ByRef imageAttributes As /*Const*/ ImageAttributes) As Status
    17711782
    17721783        Dim nativeImage As /*Const*/ *GpMetafile
    17731784        If VarPtr(metafile) <> 0 Then
    1774             nativeImage = metafile.nativeImage
     1785            nativeImage = metafile.NativeImage
    17751786        Else
    17761787            nativeImage = 0
     
    17781789        Dim nativeImageAttr As *GpImageAttributes
    17791790        If VarPtr(imageAttributes) <> 0 Then
    1780             nativeImageAttr = image.nativeImageAttr
     1791            nativeImageAttr = image.NativeImageAttr
    17811792        Else
    17821793            nativeImageAttr = 0
    17831794        End If
    17841795
    1785         Return SetStatus(GdipEnumerateMetafileSrcRectDestPointsI(nativeGraphics,
    1786             nativeImage, destPoints, count, srcRect, srcUnit, callback, callbackData, nativeImageAttr)
     1796        Return SetStatus(GdipEnumerateMetafileSrcRectDestPointsI(nativeGraphics, nativeImage, _
     1797            destPoints, count, srcRect, srcUnit, callback, callbackData, nativeImageAttr))
    17871798    End Function
    17881799
     
    19801991
    19811992Private
    1982     Sub Graphics(ByRef gr As Graphics)
    1983         Debug
    1984     End Sub
     1993'   Sub Graphics(ByRef gr As Graphics)
     1994'       Debug
     1995'   End Sub
    19851996    Sub Operator =(ByRef gr As Graphics)
    19861997        Debug
     
    19892000Protected
    19902001    Sub Graphics(graphics As *GpGraphics)
    1991         lastResult = Ok
     2002        lastResult = Status.Ok
    19922003        SetNativeGraphics(graphics)
    19932004    End Sub
     
    20082019    End Function
    20092020
    2010     Function GetNativePen(const Pen* pen) As *GpPen
     2021    Function GetNativePen(pen As /*Const*/ *Pen) As *GpPen
    20112022        Return pen->nativePen
    20122023    End Function
  • Include/Classes/System/Drawing/Point.ab

    r29 r104  
    5151    End Sub
    5252
    53     Function IsEmpty() As BOOL
     53    Function IsEmpty() As Boolean
    5454        If x = 0 And y = 0 Then
    5555            Return _System_TRUE
     
    8080    End Function
    8181
    82     Function Operator == (sz As Point) As BOOL
     82    Function Operator == (sz As Point) As Boolean
    8383        Return Equals(sz)
    8484    End Function
    8585
    86     Function Operator <> (sz As Point) As BOOL
     86    Function Operator <> (sz As Point) As Boolean
    8787        Return Not Equals(sz)
    8888    End Function
     
    118118    End Function
    119119
    120     Function Equals(pt As Point) As BOOL
     120    Function Equals(pt As Point) As Boolean
    121121        If x = pt.x And y = pt.y Then
    122122            Equals = _System_TRUE
  • Include/Classes/System/Drawing/PointF.ab

    r77 r104  
    4545    End Sub
    4646
    47     Function IsEmpty() As BOOL
     47    Function IsEmpty() As Boolean
    4848        If x = 0 And y = 0 Then
    4949            Return _System_TRUE
     
    8787    End Function
    8888
    89     Function Operator == (sz As PointF) As BOOL
     89    Function Operator == (sz As PointF) As Boolean
    9090        Return Equals(sz)
    9191    End Function
    9292
    93     Function Operator <> (sz As PointF) As BOOL
     93    Function Operator <> (sz As PointF) As Boolean
    9494        Return Not Equals(sz)
    9595    End Function
     
    125125    End Function
    126126
    127     Function Equals(pt As PointF) As BOOL
     127    Function Equals(pt As PointF) As Boolean
    128128        If x = pt.x And y = pt.y Then
    129129            Equals = _System_TRUE
  • Include/Classes/System/Drawing/Rectangle.ab

    r77 r104  
    110110    End Function
    111111
    112     Function IsEmpty() As BOOL
     112    Function IsEmpty() As Boolean
    113113        If Width <= 0 Or Height <= 0 Then
    114114            IsEmpty = _System_TRUE
     
    140140    End Function
    141141
    142     Function Equals(ByRef rc As Rectangle) As BOOL
     142    Function Equals(ByRef rc As Rectangle) As Boolean
    143143        If X = rc.X And Y = rc.Y And Width = rc.Width And Height = rc.Height Then
    144144            Equals = _System_TRUE
     
    153153    End Function
    154154
    155     Function Contains(x As Long, y As Long) As BOOL
     155    Function Contains(x As Long, y As Long) As Boolean
    156156        If x >= X And x < X + Width And y >= Y And y < Y + Height Then
    157157            Contains = _System_TRUE
     
    161161    End Function
    162162
    163     Function Contains(ByRef pt As Point) As BOOL
     163    Function Contains(ByRef pt As Point) As Boolean
    164164        ContainsPTF = Contains(pt.X, pt.Y)
    165165    End Function
    166166
    167     Function Contains(ByRef rc As Rectangle) As BOOL
     167    Function Contains(ByRef rc As Rectangle) As Boolean
    168168        If X <= rc.X And rc.Right <= Right And Y <= rc.Y And rc.Bottom <= Bottom Then
    169169            ContainsRCF = _System_TRUE
     
    202202    End Function
    203203
    204     Function IntersectsWith(ByRef rc As Rectangle) As BOOL
     204    Function IntersectsWith(ByRef rc As Rectangle) As Boolean
    205205        If Left < rc.Right And _
    206206            Top < rc.Bottom And _
  • Include/Classes/System/Drawing/RectangleF.ab

    r32 r104  
    105105    End Function
    106106
    107     Function IsEmpty() As BOOL
     107    Function IsEmpty() As Boolean
    108108        If Width <= 0 Or Height <= 0 Then
    109109            IsEmpty = _System_TRUE
     
    130130    End Function
    131131
    132     Function Equals(ByRef rc As RectangleF) As BOOL
     132    Function Equals(ByRef rc As RectangleF) As Boolean
    133133        If X = rc.X And Y = rc.Y And Width = rc.Width And Height = rc.Height Then
    134134            Equals = _System_TRUE
     
    143143    End Function
    144144
    145     Function Contains(x As Single, y As Single) As BOOL
     145    Function Contains(x As Single, y As Single) As Boolean
    146146        If x >= X And x < X + Width And y >= Y And y < Y + Height Then
    147147            Contains = _System_TRUE
     
    151151    End Function
    152152
    153     Function Contains(ByRef pt As PointF) As BOOL
     153    Function Contains(ByRef pt As PointF) As Boolean
    154154        ContainsPTF = Contains(pt.X, pt.Y)
    155155    End Function
    156156
    157     Function Contains(ByRef rc As RectangleF) As BOOL
     157    Function Contains(ByRef rc As RectangleF) As Boolean
    158158        If X <= rc.X And rc.Right <= Right And Y <= rc.Y And rc.Bottom <= Bottom Then
    159159            ContainsRCF = _System_TRUE
     
    192192    End Function
    193193
    194     Function IntersectsWith(ByRef rc As RectangleF) As BOOL
     194    Function IntersectsWith(ByRef rc As RectangleF) As Boolean
    195195        If Left < rc.Right And _
    196196            Top < rc.Bottom And _
  • Include/Classes/System/Drawing/Size.ab

    r1 r104  
    5555    End Function
    5656
    57     Function Operator == (sz As Size) As BOOL
     57    Function Operator == (sz As Size) As Boolean
    5858        Return Equals(sz)
    5959    End Function
    6060
    61     Function Operator <> (sz As Size) As BOOL
     61    Function Operator <> (sz As Size) As Boolean
    6262        Return Not Equals(sz)
    6363    End Function
     
    6868    End Sub
    6969
    70     Function Equals(sz As Size) As BOOL
     70    Function Equals(sz As Size) As Boolean
    7171        If width = sz.width And height = sz.height Then
    7272            Equals = _System_TRUE
     
    7676    End Function
    7777
    78     Function IsEmpty() As BOOL
     78    Function IsEmpty() As Boolean
    7979        If width = 0 And height = 0 Then
    8080            Empty = _System_TRUE
  • Include/Classes/System/Drawing/SizeF.ab

    r1 r104  
    5050    End Function
    5151
    52     Function Operator == (sz As SizeF) As BOOL
     52    Function Operator == (sz As SizeF) As Boolean
    5353        Return Equals(sz)
    5454    End Function
    5555
    56     Function Operator <> (sz As SizeF) As BOOL
     56    Function Operator <> (sz As SizeF) As Boolean
    5757        Return Not Equals(sz)
    5858    End Function
     
    6363    End Sub
    6464
    65     Function Equals(sz As SizeF) As BOOL
     65    Function Equals(sz As SizeF) As Boolean
    6666        If width = sz.width And height = sz.height Then
    6767            Equals = _System_TRUE
     
    7171    End Function
    7272
    73     Function IsEmpty() As BOOL
     73    Function IsEmpty() As Boolean
    7474        If width = 0 And height = 0 Then
    7575            Empty = _System_TRUE
  • Include/Classes/System/Drawing/misc.ab

    r33 r104  
    2626End Enum
    2727
    28 Const Enum GraphicsUnit
     28Enum GraphicsUnit
    2929    World       ' 0
    3030    Display     ' 1
Note: See TracChangeset for help on using the changeset viewer.