Changeset 104 for Include/Classes
- Timestamp:
- Feb 16, 2007, 7:34:38 PM (18 years ago)
- Location:
- Include/Classes/System/Drawing
- Files:
-
- 2 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
Include/Classes/System/Drawing/Color.ab
r77 r104 41 41 End Sub 42 42 43 Function Operator ==(c As Color) As B OOL43 Function Operator ==(c As Color) As Boolean 44 44 Return Equals(c) 45 45 End Function 46 46 47 Function Operator <>(c As Color) As B OOL47 Function Operator <>(c As Color) As Boolean 48 48 Return Not Equals(c) 49 49 End Function … … 109 109 End Function 110 110 111 Function Equals(c As Color) As B OOL111 Function Equals(c As Color) As Boolean 112 112 Return argb = c.argb 113 113 End Function -
Include/Classes/System/Drawing/Graphics.ab
r33 r104 4 4 #define __SYSTEM_DRAWING_GRAPHICS_AB__ 5 5 6 #include <GdiPlusGpStabus.ab> 6 Class Brush : End Class 7 Class Pen : End Class 8 Class StringFormat : End Class 9 Class Image : End Class 10 Class ImageAttributes : End Class 11 Class Metafile : End Class 12 Class Region : End Class 13 Class GraphicsPath : End Class 14 Class CachedBitmap : End Class 15 16 #include <GdiplusGpStubs.ab> 7 17 #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> 21 32 22 33 Class Graphics … … 225 236 Dim graphics = 0 As *GpGraphics 226 237 If (image != 0) 227 lastResult = GdipGetImageGraphicsContext(image-> nativeImage, graphics)238 lastResult = GdipGetImageGraphicsContext(image->NativeImage, graphics) 228 239 End If 229 240 SetNativeGraphics(graphics) … … 443 454 End Function 444 455 445 Function DrawArc(ByRef pen As /*Const*/ Pen, ByRef rect As /*Const*/ Rectangle F, startAngle As Single, sweepAngle As Single) As Status456 Function DrawArc(ByRef pen As /*Const*/ Pen, ByRef rect As /*Const*/ Rectangle, startAngle As Single, sweepAngle As Single) As Status 446 457 Return DrawArc(pen, rect.X, rect.Y, rect.Width, rect.Height, startAngle, sweepAngle) 447 458 End Function … … 467 478 End Function 468 479 469 Function DrawBeziers(ByRef pen As /*Const*/ Pen, points As /*Const*/ *Point count As Long) As Status480 Function DrawBeziers(ByRef pen As /*Const*/ Pen, points As /*Const*/ *Point, count As Long) As Status 470 481 Return SetStatus(GdipDrawBeziersI(nativeGraphics, pen->nativePen, points, count)) 471 482 End Function … … 706 717 End Function 707 718 708 Function DrawString(str As PCWSTR, length As Long, ByRef font As /*Const*/ Font, ByRef layoutRect As /*Const*/ Rectangle F,719 Function DrawString(str As PCWSTR, length As Long, ByRef font As /*Const*/ Font, ByRef layoutRect As /*Const*/ Rectangle, 709 720 ByRef stringFormat As /*Const*/ StringFormat, ByRef brush As /*Const*/ Brush) As Status 710 721 … … 721 732 nativeFormat = 0 722 733 End If 723 Return SetStatus(GdipDrawString( 734 Return SetStatus(GdipDrawString(nativeGraphics, str, length, nativeFont, layoutRect, nativeFormat, 0)) 724 735 End Function 725 736 … … 746 757 End If 747 758 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)) 748 789 End Function 749 790 … … 760 801 761 802 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 Status803 ByRef stringFormat As /*Const*/ StringFormat) As Status 763 804 764 805 Dim rect As RectangleF(origin.X, origin.Y, 0.0, 0.0) … … 769 810 nativeFont = 0 770 811 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 781 824 Dim rect As RectangleF(origin.X, origin.Y, 0.0, 0.0) 782 825 Dim nativeFont As *GpFont … … 786 829 nativeFont = 0 787 830 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 795 862 Dim nativeFont As *GpFont 796 863 If VarPtr(font) <> 0 Then … … 805 872 nativeFormat = 0 806 873 End If 807 Return SetStatus(GdipDrawString(nativeGraphics, str, length, nativeFont, rect, nativeFormat, 0))808 End Function809 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 Status812 813 Dim rect As RectangleF(origin.X, origin.Y, 0.0, 0.0)814 Dim nativeFont As *GpFont815 If VarPtr(font) <> 0 Then816 nativeFont = font.nativeFormat817 Else818 nativeFont = 0819 End If820 Dim nativeFormat As *GpStringFormat821 If VarPtr(stringFormat) <> 0 Then822 nativeFormat = stringFormat.nativeFormat823 Else824 nativeFormat = 0825 End If826 If VarPtr(brush) <> 0 Then827 nativeBrush = brush.nativeFormat828 Else829 nativeBrush = 0830 End If831 Return SetStatus(GdipDrawString( nativeGraphics, str, length, nativeFont, rect, nativeFormat, nativeBrush))832 End Function833 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 Status836 837 Return MeasureString(str, length, font, layoutRect, stringFormat, boundingBox, ByVal 0, ByVal 0)838 End Function839 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 Status843 844 Return MeasureString(str, length, font, layoutRect, stringFormat, boundingBox, codepointsFitted, ByVal 0)845 End Function846 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 Status850 851 Dim nativeFont As *GpFont852 If VarPtr(font) <> 0 Then853 nativeFont = font.nativeFormat854 Else855 nativeFont = 0856 End If857 Dim nativeFormat As *GpStringFormat858 If VarPtr(stringFormat) <> 0 Then859 nativeFormat = stringFormat.nativeFormat860 Else861 nativeFormat = 0862 End If863 874 Return SetStatus(GdipMeasureString(nativeGraphics, str, length, nativeFont, layoutRect, nativeFormat, 864 875 boundingBox, codepointsFitted, linesFilled)) … … 869 880 ByRef size As SizeF) As Status 870 881 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) 872 883 End Function 873 884 … … 876 887 ByRef size As SizeF, ByRef codepointsFitted As Long) As Status 877 888 878 Return MeasureString ,str, length, font, layoutRectSize, stringFormat, size, codepointsFitted, ByVal 0)889 Return MeasureString(str, length, font, layoutRectSize, stringFormat, size, codepointsFitted, ByVal 0) 879 890 End Function 880 891 … … 906 917 nativeFont, layoutRect, nativeFormat, pBoundingBox, codepointsFitted, linesFilled)) 907 918 908 If VarPtr(size) <> 0 And status = Ok Then919 If VarPtr(size) <> 0 And status = Status.Ok Then 909 920 size.Width = boundingBox.Width 910 921 size.Height = boundingBox.Height … … 1050 1061 ' native format differs from this Graphics. 1051 1062 1052 Function DrawCachedBitmap(ByRef cb As CachedBitma , x As Long, y As Long) As Status1063 Function DrawCachedBitmap(ByRef cb As CachedBitmap, x As Long, y As Long) As Status 1053 1064 Return SetStatus(GdipDrawCachedBitmap(nativeGraphics, cb->nativeCachedBitmap, x, y)) 1054 1065 End Function … … 1061 1072 Dim nativeImage As *GpImage 1062 1073 If VarPtr(image) <> 0 Then 1063 nativeImage = image. nativeImage1074 nativeImage = image.NativeImage 1064 1075 Else 1065 1076 nativeImage = 0 … … 1075 1086 Dim nativeImage As *GpImage 1076 1087 If VarPtr(image) <> 0 Then 1077 nativeImage = image. nativeImage1088 nativeImage = image.NativeImage 1078 1089 Else 1079 1090 nativeImage = 0 … … 1089 1100 Dim nativeImage As *GpImage 1090 1101 If VarPtr(image) <> 0 Then 1091 nativeImage = image. nativeImage1102 nativeImage = image.NativeImage 1092 1103 Else 1093 1104 nativeImage = 0 … … 1103 1114 Dim nativeImage As *GpImage 1104 1115 If VarPtr(image) <> 0 Then 1105 nativeImage = image. nativeImage1116 nativeImage = image.NativeImage 1106 1117 Else 1107 1118 nativeImage = 0 … … 1125 1136 Dim nativeImage As *GpImage 1126 1137 If VarPtr(image) <> 0 Then 1127 nativeImage = image. nativeImage1138 nativeImage = image.NativeImage 1128 1139 Else 1129 1140 nativeImage = 0 … … 1139 1150 Dim nativeImage As *GpImage 1140 1151 If VarPtr(image) <> 0 Then 1141 nativeImage = image. nativeImage1152 nativeImage = image.NativeImage 1142 1153 Else 1143 1154 nativeImage = 0 … … 1151 1162 Dim nativeImage As *GpImage 1152 1163 If VarPtr(image) <> 0 Then 1153 nativeImage = image. nativeImage1164 nativeImage = image.NativeImage 1154 1165 Else 1155 1166 nativeImage = 0 … … 1185 1196 Dim nativeImage As *GpImage 1186 1197 If VarPtr(image) <> 0 Then 1187 nativeImage = image. nativeImage1198 nativeImage = image.NativeImage 1188 1199 Else 1189 1200 nativeImage = 0 … … 1191 1202 Dim nativeImageAttr As *GpImageAttributes 1192 1203 If VarPtr(imageAttributes) <> 0 Then 1193 nativeImageAttr = image. nativeImageAttr1204 nativeImageAttr = image.NativeImageAttr 1194 1205 Else 1195 1206 nativeImageAttr = 0 … … 1228 1239 Dim nativeImage As *GpImage 1229 1240 If VarPtr(image) <> 0 Then 1230 nativeImage = image. nativeImage1241 nativeImage = image.NativeImage 1231 1242 Else 1232 1243 nativeImage = 0 … … 1234 1245 Dim nativeImageAttr As *GpImageAttributes 1235 1246 If VarPtr(imageAttributes) <> 0 Then 1236 nativeImageAttr = image. nativeImageAttr1247 nativeImageAttr = image.NativeImageAttr 1237 1248 Else 1238 1249 nativeImageAttr = 0 … … 1248 1259 Dim nativeImage As *GpImage 1249 1260 If VarPtr(image) <> 0 Then 1250 nativeImage = image. nativeImage1261 nativeImage = image.NativeImage 1251 1262 Else 1252 1263 nativeImage = 0 … … 1281 1292 Dim nativeImage As *GpImage 1282 1293 If VarPtr(image) <> 0 Then 1283 nativeImage = image. nativeImage1294 nativeImage = image.NativeImage 1284 1295 Else 1285 1296 nativeImage = 0 … … 1287 1298 Dim nativeImageAttr As *GpImageAttributes 1288 1299 If VarPtr(imageAttributes) <> 0 Then 1289 nativeImageAttr = image. nativeImageAttr1300 nativeImageAttr = image.NativeImageAttr 1290 1301 Else 1291 1302 nativeImageAttr = 0 … … 1310 1321 End Function 1311 1322 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, _ 1314 1325 ByRef imageAttributes As /*Const*/ ImageAttributes, 1315 DrawImageAbortcallback As DrawImageAbort) As Status1326 callback As DrawImageAbort) As Status 1316 1327 1317 1328 Return DrawImage(image, destPoints, count, srcx, srcy, srcwidth, srcheight, srcUnit, imageAttributes, callback, 0) … … 1324 1335 Dim nativeImage As *GpImage 1325 1336 If VarPtr(image) <> 0 Then 1326 nativeImage = image. nativeImage1337 nativeImage = image.NativeImage 1327 1338 Else 1328 1339 nativeImage = 0 … … 1330 1341 Dim nativeImageAttr As *GpImageAttributes 1331 1342 If VarPtr(imageAttributes) <> 0 Then 1332 nativeImageAttr = image. nativeImageAttr1343 nativeImageAttr = image.NativeImageAttr 1333 1344 Else 1334 1345 nativeImageAttr = 0 … … 1402 1413 Dim nativeImage As /*Const*/ *GpMetafile 1403 1414 If VarPtr(metafile) <> 0 Then 1404 nativeImage = metafile. nativeImage1415 nativeImage = metafile.NativeImage 1405 1416 Else 1406 1417 nativeImage = 0 … … 1408 1419 Dim nativeImageAttr As *GpImageAttributes 1409 1420 If VarPtr(imageAttributes) <> 0 Then 1410 nativeImageAttr = image. nativeImageAttr1421 nativeImageAttr = image.NativeImageAttr 1411 1422 Else 1412 1423 nativeImageAttr = 0 … … 1434 1445 Dim nativeImage As /*Const*/ *GpMetafile 1435 1446 If VarPtr(metafile) <> 0 Then 1436 nativeImage = metafile. nativeImage1447 nativeImage = metafile.NativeImage 1437 1448 Else 1438 1449 nativeImage = 0 … … 1440 1451 Dim nativeImageAttr As *GpImageAttributes 1441 1452 If VarPtr(imageAttributes) <> 0 Then 1442 nativeImageAttr = image. nativeImageAttr1453 nativeImageAttr = image.NativeImageAttr 1443 1454 Else 1444 1455 nativeImageAttr = 0 … … 1466 1477 Dim nativeImage As /*Const*/ *GpMetafile 1467 1478 If VarPtr(metafile) <> 0 Then 1468 nativeImage = metafile. nativeImage1479 nativeImage = metafile.NativeImage 1469 1480 Else 1470 1481 nativeImage = 0 … … 1472 1483 Dim nativeImageAttr As *GpImageAttributes 1473 1484 If VarPtr(imageAttributes) <> 0 Then 1474 nativeImageAttr = image. nativeImageAttr1485 nativeImageAttr = image.NativeImageAttr 1475 1486 Else 1476 1487 nativeImageAttr = 0 … … 1498 1509 Dim nativeImage As /*Const*/ *GpMetafile 1499 1510 If VarPtr(metafile) <> 0 Then 1500 nativeImage = metafile. nativeImage1511 nativeImage = metafile.NativeImage 1501 1512 Else 1502 1513 nativeImage = 0 … … 1504 1515 Dim nativeImageAttr As *GpImageAttributes 1505 1516 If VarPtr(imageAttributes) <> 0 Then 1506 nativeImageAttr = image. nativeImageAttr1517 nativeImageAttr = image.NativeImageAttr 1507 1518 Else 1508 1519 nativeImageAttr = 0 … … 1530 1541 Dim nativeImage As /*Const*/ *GpMetafile 1531 1542 If VarPtr(metafile) <> 0 Then 1532 nativeImage = metafile. nativeImage1543 nativeImage = metafile.NativeImage 1533 1544 Else 1534 1545 nativeImage = 0 … … 1536 1547 Dim nativeImageAttr As *GpImageAttributes 1537 1548 If VarPtr(imageAttributes) <> 0 Then 1538 nativeImageAttr = image. nativeImageAttr1549 nativeImageAttr = image.NativeImageAttr 1539 1550 Else 1540 1551 nativeImageAttr = 0 … … 1562 1573 Dim nativeImage As /*Const*/ *GpMetafile 1563 1574 If VarPtr(metafile) <> 0 Then 1564 nativeImage = metafile. nativeImage1575 nativeImage = metafile.NativeImage 1565 1576 Else 1566 1577 nativeImage = 0 … … 1568 1579 Dim nativeImageAttr As *GpImageAttributes 1569 1580 If VarPtr(imageAttributes) <> 0 Then 1570 nativeImageAttr = image. nativeImageAttr1581 nativeImageAttr = image.NativeImageAttr 1571 1582 Else 1572 1583 nativeImageAttr = 0 … … 1597 1608 Dim nativeImage As /*Const*/ *GpMetafile 1598 1609 If VarPtr(metafile) <> 0 Then 1599 nativeImage = metafile. nativeImage1610 nativeImage = metafile.NativeImage 1600 1611 Else 1601 1612 nativeImage = 0 … … 1603 1614 Dim nativeImageAttr As *GpImageAttributes 1604 1615 If VarPtr(imageAttributes) <> 0 Then 1605 nativeImageAttr = image. nativeImageAttr1616 nativeImageAttr = image.NativeImageAttr 1606 1617 Else 1607 1618 nativeImageAttr = 0 1608 1619 End If 1609 1620 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, _ 1616 1627 callback As EnumerateMetafileProc) As Status 1617 1628 … … 1619 1630 End Function 1620 1631 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, _ 1623 1634 callback As EnumerateMetafileProc, callbackData As VoidPtr) As Status 1624 1635 … … 1626 1637 End Function 1627 1638 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, _ 1630 1641 callback As EnumerateMetafileProc, callbackData As VoidPtr, ByRef imageAttributes As /*Const*/ ImageAttributes) As Status 1631 1642 1632 1643 Dim nativeImage As /*Const*/ *GpMetafile 1633 1644 If VarPtr(metafile) <> 0 Then 1634 nativeImage = metafile. nativeImage1645 nativeImage = metafile.NativeImage 1635 1646 Else 1636 1647 nativeImage = 0 … … 1638 1649 Dim nativeImageAttr As *GpImageAttributes 1639 1650 If VarPtr(imageAttributes) <> 0 Then 1640 nativeImageAttr = image. nativeImageAttr1651 nativeImageAttr = image.NativeImageAttr 1641 1652 Else 1642 1653 nativeImageAttr = 0 1643 1654 End If 1644 1655 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, _ 1651 1662 callback As EnumerateMetafileProc) As Status 1652 1663 … … 1654 1665 End Function 1655 1666 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, _ 1658 1669 callback As EnumerateMetafileProc, callbackData As VoidPtr) As Status 1659 1670 … … 1661 1672 End Function 1662 1673 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, _ 1665 1676 callback As EnumerateMetafileProc, callbackData As VoidPtr, ByRef imageAttributes As /*Const*/ ImageAttributes) As Status 1666 1677 1667 1678 Dim nativeImage As /*Const*/ *GpMetafile 1668 1679 If VarPtr(metafile) <> 0 Then 1669 nativeImage = metafile. nativeImage1680 nativeImage = metafile.NativeImage 1670 1681 Else 1671 1682 nativeImage = 0 … … 1673 1684 Dim nativeImageAttr As *GpImageAttributes 1674 1685 If VarPtr(imageAttributes) <> 0 Then 1675 nativeImageAttr = image. nativeImageAttr1686 nativeImageAttr = image.NativeImageAttr 1676 1687 Else 1677 1688 nativeImageAttr = 0 1678 1689 End If 1679 1690 1680 Return SetStatus(GdipEnumerateMetafileSrcRectDestRect(nativeGraphics, 1691 Return SetStatus(GdipEnumerateMetafileSrcRectDestRect(nativeGraphics, _ 1681 1692 nativeImage, destRect, srcRect, srcUnit, callback, callbackData, nativeImageAttr)) 1682 1693 End Function 1683 1694 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, _ 1686 1697 callback As EnumerateMetafileProc) As Status 1687 1698 … … 1689 1700 End Function 1690 1701 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, _ 1693 1704 callback As EnumerateMetafileProc, callbackData As VoidPtr) As Status 1694 1705 … … 1696 1707 End Function 1697 1708 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, _ 1700 1711 callback As EnumerateMetafileProc, callbackData As VoidPtr, ByRef imageAttributes As /*Const*/ ImageAttributes) As Status 1701 1712 1702 1713 Dim nativeImage As /*Const*/ *GpMetafile 1703 1714 If VarPtr(metafile) <> 0 Then 1704 nativeImage = metafile. nativeImage1715 nativeImage = metafile.NativeImage 1705 1716 Else 1706 1717 nativeImage = 0 … … 1708 1719 Dim nativeImageAttr As *GpImageAttributes 1709 1720 If VarPtr(imageAttributes) <> 0 Then 1710 nativeImageAttr = image. nativeImageAttr1721 nativeImageAttr = image.NativeImageAttr 1711 1722 Else 1712 1723 nativeImageAttr = 0 1713 1724 End If 1714 1725 1715 Return SetStatus(GdipEnumerateMetafileSrcRectDestRectI(nativeGraphics, 1726 Return SetStatus(GdipEnumerateMetafileSrcRectDestRectI(nativeGraphics, _ 1716 1727 nativeImage, destRect, srcRect, srcUnit, callback, callbackData, nativeImageAttr)) 1717 1728 End Function 1718 1729 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, _ 1721 1732 callback As EnumerateMetafileProc) As Status 1722 1733 … … 1724 1735 End Function 1725 1736 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, _ 1728 1739 callback As EnumerateMetafileProc, callbackData As VoidPtr) As Status 1729 1740 … … 1731 1742 End Function 1732 1743 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, _ 1735 1746 callback As EnumerateMetafileProc, callbackData As VoidPtr, ByRef imageAttributes As /*Const*/ ImageAttributes) As Status 1736 1747 1737 1748 Dim nativeImage As /*Const*/ *GpMetafile 1738 1749 If VarPtr(metafile) <> 0 Then 1739 nativeImage = metafile. nativeImage1750 nativeImage = metafile.NativeImage 1740 1751 Else 1741 1752 nativeImage = 0 … … 1743 1754 Dim nativeImageAttr As *GpImageAttributes 1744 1755 If VarPtr(imageAttributes) <> 0 Then 1745 nativeImageAttr = image. nativeImageAttr1756 nativeImageAttr = image.NativeImageAttr 1746 1757 Else 1747 1758 nativeImageAttr = 0 1748 1759 End If 1749 1760 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, _ 1756 1767 callback As EnumerateMetafileProc) As Status 1757 1768 … … 1759 1770 End Function 1760 1771 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, _ 1763 1774 callback As EnumerateMetafileProc, callbackData As VoidPtr) As Status 1764 1775 … … 1766 1777 End Function 1767 1778 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, _ 1770 1781 callback As EnumerateMetafileProc, callbackData As VoidPtr, ByRef imageAttributes As /*Const*/ ImageAttributes) As Status 1771 1782 1772 1783 Dim nativeImage As /*Const*/ *GpMetafile 1773 1784 If VarPtr(metafile) <> 0 Then 1774 nativeImage = metafile. nativeImage1785 nativeImage = metafile.NativeImage 1775 1786 Else 1776 1787 nativeImage = 0 … … 1778 1789 Dim nativeImageAttr As *GpImageAttributes 1779 1790 If VarPtr(imageAttributes) <> 0 Then 1780 nativeImageAttr = image. nativeImageAttr1791 nativeImageAttr = image.NativeImageAttr 1781 1792 Else 1782 1793 nativeImageAttr = 0 1783 1794 End If 1784 1795 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)) 1787 1798 End Function 1788 1799 … … 1980 1991 1981 1992 Private 1982 Sub Graphics(ByRef gr As Graphics)1983 Debug1984 End Sub1993 ' Sub Graphics(ByRef gr As Graphics) 1994 ' Debug 1995 ' End Sub 1985 1996 Sub Operator =(ByRef gr As Graphics) 1986 1997 Debug … … 1989 2000 Protected 1990 2001 Sub Graphics(graphics As *GpGraphics) 1991 lastResult = Ok2002 lastResult = Status.Ok 1992 2003 SetNativeGraphics(graphics) 1993 2004 End Sub … … 2008 2019 End Function 2009 2020 2010 Function GetNativePen( const Pen* pen) As *GpPen2021 Function GetNativePen(pen As /*Const*/ *Pen) As *GpPen 2011 2022 Return pen->nativePen 2012 2023 End Function -
Include/Classes/System/Drawing/Point.ab
r29 r104 51 51 End Sub 52 52 53 Function IsEmpty() As B OOL53 Function IsEmpty() As Boolean 54 54 If x = 0 And y = 0 Then 55 55 Return _System_TRUE … … 80 80 End Function 81 81 82 Function Operator == (sz As Point) As B OOL82 Function Operator == (sz As Point) As Boolean 83 83 Return Equals(sz) 84 84 End Function 85 85 86 Function Operator <> (sz As Point) As B OOL86 Function Operator <> (sz As Point) As Boolean 87 87 Return Not Equals(sz) 88 88 End Function … … 118 118 End Function 119 119 120 Function Equals(pt As Point) As B OOL120 Function Equals(pt As Point) As Boolean 121 121 If x = pt.x And y = pt.y Then 122 122 Equals = _System_TRUE -
Include/Classes/System/Drawing/PointF.ab
r77 r104 45 45 End Sub 46 46 47 Function IsEmpty() As B OOL47 Function IsEmpty() As Boolean 48 48 If x = 0 And y = 0 Then 49 49 Return _System_TRUE … … 87 87 End Function 88 88 89 Function Operator == (sz As PointF) As B OOL89 Function Operator == (sz As PointF) As Boolean 90 90 Return Equals(sz) 91 91 End Function 92 92 93 Function Operator <> (sz As PointF) As B OOL93 Function Operator <> (sz As PointF) As Boolean 94 94 Return Not Equals(sz) 95 95 End Function … … 125 125 End Function 126 126 127 Function Equals(pt As PointF) As B OOL127 Function Equals(pt As PointF) As Boolean 128 128 If x = pt.x And y = pt.y Then 129 129 Equals = _System_TRUE -
Include/Classes/System/Drawing/Rectangle.ab
r77 r104 110 110 End Function 111 111 112 Function IsEmpty() As B OOL112 Function IsEmpty() As Boolean 113 113 If Width <= 0 Or Height <= 0 Then 114 114 IsEmpty = _System_TRUE … … 140 140 End Function 141 141 142 Function Equals(ByRef rc As Rectangle) As B OOL142 Function Equals(ByRef rc As Rectangle) As Boolean 143 143 If X = rc.X And Y = rc.Y And Width = rc.Width And Height = rc.Height Then 144 144 Equals = _System_TRUE … … 153 153 End Function 154 154 155 Function Contains(x As Long, y As Long) As B OOL155 Function Contains(x As Long, y As Long) As Boolean 156 156 If x >= X And x < X + Width And y >= Y And y < Y + Height Then 157 157 Contains = _System_TRUE … … 161 161 End Function 162 162 163 Function Contains(ByRef pt As Point) As B OOL163 Function Contains(ByRef pt As Point) As Boolean 164 164 ContainsPTF = Contains(pt.X, pt.Y) 165 165 End Function 166 166 167 Function Contains(ByRef rc As Rectangle) As B OOL167 Function Contains(ByRef rc As Rectangle) As Boolean 168 168 If X <= rc.X And rc.Right <= Right And Y <= rc.Y And rc.Bottom <= Bottom Then 169 169 ContainsRCF = _System_TRUE … … 202 202 End Function 203 203 204 Function IntersectsWith(ByRef rc As Rectangle) As B OOL204 Function IntersectsWith(ByRef rc As Rectangle) As Boolean 205 205 If Left < rc.Right And _ 206 206 Top < rc.Bottom And _ -
Include/Classes/System/Drawing/RectangleF.ab
r32 r104 105 105 End Function 106 106 107 Function IsEmpty() As B OOL107 Function IsEmpty() As Boolean 108 108 If Width <= 0 Or Height <= 0 Then 109 109 IsEmpty = _System_TRUE … … 130 130 End Function 131 131 132 Function Equals(ByRef rc As RectangleF) As B OOL132 Function Equals(ByRef rc As RectangleF) As Boolean 133 133 If X = rc.X And Y = rc.Y And Width = rc.Width And Height = rc.Height Then 134 134 Equals = _System_TRUE … … 143 143 End Function 144 144 145 Function Contains(x As Single, y As Single) As B OOL145 Function Contains(x As Single, y As Single) As Boolean 146 146 If x >= X And x < X + Width And y >= Y And y < Y + Height Then 147 147 Contains = _System_TRUE … … 151 151 End Function 152 152 153 Function Contains(ByRef pt As PointF) As B OOL153 Function Contains(ByRef pt As PointF) As Boolean 154 154 ContainsPTF = Contains(pt.X, pt.Y) 155 155 End Function 156 156 157 Function Contains(ByRef rc As RectangleF) As B OOL157 Function Contains(ByRef rc As RectangleF) As Boolean 158 158 If X <= rc.X And rc.Right <= Right And Y <= rc.Y And rc.Bottom <= Bottom Then 159 159 ContainsRCF = _System_TRUE … … 192 192 End Function 193 193 194 Function IntersectsWith(ByRef rc As RectangleF) As B OOL194 Function IntersectsWith(ByRef rc As RectangleF) As Boolean 195 195 If Left < rc.Right And _ 196 196 Top < rc.Bottom And _ -
Include/Classes/System/Drawing/Size.ab
r1 r104 55 55 End Function 56 56 57 Function Operator == (sz As Size) As B OOL57 Function Operator == (sz As Size) As Boolean 58 58 Return Equals(sz) 59 59 End Function 60 60 61 Function Operator <> (sz As Size) As B OOL61 Function Operator <> (sz As Size) As Boolean 62 62 Return Not Equals(sz) 63 63 End Function … … 68 68 End Sub 69 69 70 Function Equals(sz As Size) As B OOL70 Function Equals(sz As Size) As Boolean 71 71 If width = sz.width And height = sz.height Then 72 72 Equals = _System_TRUE … … 76 76 End Function 77 77 78 Function IsEmpty() As B OOL78 Function IsEmpty() As Boolean 79 79 If width = 0 And height = 0 Then 80 80 Empty = _System_TRUE -
Include/Classes/System/Drawing/SizeF.ab
r1 r104 50 50 End Function 51 51 52 Function Operator == (sz As SizeF) As B OOL52 Function Operator == (sz As SizeF) As Boolean 53 53 Return Equals(sz) 54 54 End Function 55 55 56 Function Operator <> (sz As SizeF) As B OOL56 Function Operator <> (sz As SizeF) As Boolean 57 57 Return Not Equals(sz) 58 58 End Function … … 63 63 End Sub 64 64 65 Function Equals(sz As SizeF) As B OOL65 Function Equals(sz As SizeF) As Boolean 66 66 If width = sz.width And height = sz.height Then 67 67 Equals = _System_TRUE … … 71 71 End Function 72 72 73 Function IsEmpty() As B OOL73 Function IsEmpty() As Boolean 74 74 If width = 0 And height = 0 Then 75 75 Empty = _System_TRUE -
Include/Classes/System/Drawing/misc.ab
r33 r104 26 26 End Enum 27 27 28 ConstEnum GraphicsUnit28 Enum GraphicsUnit 29 29 World ' 0 30 30 Display ' 1
Note:
See TracChangeset
for help on using the changeset viewer.