From 91ffa2618f337ff73c0580545e567a0f89be036f Mon Sep 17 00:00:00 2001 From: Gonzalo Paniagua Javier Date: Tue, 4 Oct 2005 20:44:10 +0000 Subject: [PATCH] svn path=/branches/mono-1-1-9/mcs/; revision=51204 --- .../System.Drawing/Assembly/AssemblyInfo.cs | 74 - mcs/class/System.Drawing/Assembly/ChangeLog | 16 - mcs/class/System.Drawing/ChangeLog | 269 - .../ResolutionConfiguration.cs | 76 - .../ResolutionConfigurationCollection.cs | 93 - .../ResolutionConfigurationHandler.cs | 140 - mcs/class/System.Drawing/Makefile | 14 - mcs/class/System.Drawing/README | 40 - mcs/class/System.Drawing/SD.csproj | 974 --- mcs/class/System.Drawing/Samples/ChangeLog | 22 - .../System.Drawing/Samples/General/ChangeLog | 10 - .../System.Drawing/Samples/General/hering.cs | 80 - .../System.Drawing.Drawing2D/ChangeLog | 4 - .../Samples/System.Drawing.Imaging/ChangeLog | 13 - .../System.Drawing.Imaging/ColorMatrix.cs | 259 - .../System.Drawing.Imaging/ImageAttributes.cs | 124 - .../System.Drawing.Imaging/ImageCodecs.cs | 74 - .../Samples/System.Drawing.Printing/ChangeLog | 4 - .../Samples/System.Drawing.Text/ChangeLog | 4 - .../Samples/System.Drawing/BmpPaint.cs | 91 - .../Samples/System.Drawing/ChangeLog | 65 - .../Samples/System.Drawing/FontDrawing.cs | 148 - .../Samples/System.Drawing/FontDrawingAdv.cs | 359 -- .../Samples/System.Drawing/ImageRotateFlip.cs | 91 - .../Samples/System.Drawing/ImageStream.cs | 53 - .../System.Drawing/RegionsGraphicsPath.cs | 160 - .../System.Drawing/RegionsRectangle.cs | 428 -- .../System.Drawing/TextureWrapModes.cs | 121 - .../Samples/System.Drawing/bitmaps/ChangeLog | 5 - .../Samples/System.Drawing/bitmaps/horse.bmp | Bin 17526 -> 0 bytes .../Samples/System.Drawing/bmpsave.cs | 50 - .../Samples/System.Drawing/clip.cs | 52 - .../Samples/System.Drawing/clipping.cs | 103 - .../Samples/System.Drawing/drawimage.cs | 82 - .../Samples/System.Drawing/font.cs | 63 - .../Samples/System.Drawing/fontsizes.cs | 52 - .../Samples/System.Drawing/graphicsUi.cs | 134 - .../Samples/System.Drawing/imagecompose.cs | 68 - .../Samples/System.Drawing/pie.cs | 94 - .../Samples/System.Drawing/region.cs | 31 - .../System.Drawing/Samples/run-samples.sh | 148 - .../CategoryNameCollection.cs | 79 - .../System.Drawing.Design/ChangeLog | 84 - .../IPropertyValueUIService.cs | 54 - .../System.Drawing.Design/IToolboxService.cs | 103 - .../System.Drawing.Design/IToolboxUser.cs | 40 - .../PaintValueEventArgs.cs | 85 - .../PropertyValueItem.cs | 89 - .../PropertyValueUIHandler.cs | 42 - .../PropertyValueUIItemInvokeHandler.cs | 42 - .../ToolboxComponentsCreatedEventArgs.cs | 54 - .../ToolboxComponentsCreatedEventHandler.cs | 37 - .../ToolboxComponentsCreatingEventArgs.cs | 57 - .../ToolboxComponentsCreatingEventHandler.cs | 36 - .../System.Drawing.Design/ToolboxItem.cs | 282 - .../ToolboxItemCollection.cs | 73 - .../ToolboxItemCreatorCallback.cs | 38 - .../System.Drawing.Design/UITypeEditor.cs | 89 - .../UITypeEditorEditStyle.cs | 38 - .../AdjustableArrowCap.cs | 122 - .../AdjustableArrowCap.jvm.cs | 97 - .../System.Drawing.Drawing2D/Blend.cs | 78 - .../System.Drawing.Drawing2D/ChangeLog | 494 -- .../System.Drawing.Drawing2D/ColorBlend.cs | 75 - .../System.Drawing.Drawing2D/CombineMode.cs | 48 - .../CompostingMode.cs | 44 - .../CompostingQuality.cs | 48 - .../CoordinateSpace.cs | 45 - .../System.Drawing.Drawing2D/CustomLineCap.cs | 183 - .../CustomLineCap.jvm.cs | 122 - .../System.Drawing.Drawing2D/DashCap.cs | 45 - .../System.Drawing.Drawing2D/DashStyle.cs | 48 - .../ExtendedGeneralPath.jvm.cs | 664 -- .../System.Drawing.Drawing2D/FillMode.cs | 45 - .../FlushIntention.cs | 44 - .../GeneralPathIterator.jvm.cs | 105 - .../GraphicsContainer.cs | 59 - .../GraphicsContainer.jvm.cs | 54 - .../System.Drawing.Drawing2D/GraphicsPath.cs | 797 --- .../GraphicsPath.jvm.cs | 1057 --- .../GraphicsPathIterator.cs | 202 - .../GraphicsPathIterator.jvm.cs | 220 - .../System.Drawing.Drawing2D/GraphicsState.cs | 51 - .../GraphicsState.jvm.cs | 166 - .../System.Drawing.Drawing2D/HatchBrush.cs | 97 - .../HatchBrush.jvm.cs | 57 - .../System.Drawing.Drawing2D/HatchStyle.cs | 101 - .../InterpolationMode.cs | 51 - .../System.Drawing.Drawing2D/LineCap.cs | 53 - .../System.Drawing.Drawing2D/LineJoin.cs | 46 - .../LinearGradientBrush.cs | 348 - .../LinearGradientBrush.jvm.cs | 291 - .../LinearGradientMode.cs | 46 - .../System.Drawing.Drawing2D/Matrix.cs | 308 - .../System.Drawing.Drawing2D/Matrix.jvm.cs | 295 - .../System.Drawing.Drawing2D/MatrixOrder.cs | 44 - .../System.Drawing.Drawing2D/PathData.cs | 66 - .../PathGradientBrush.cs | 357 - .../PathGradientBrush.jvm.cs | 213 - .../System.Drawing.Drawing2D/PathPointType.cs | 50 - .../System.Drawing.Drawing2D/PenAlignment.cs | 45 - .../System.Drawing.Drawing2D/PenType.cs | 46 - .../PixelOffsetMode.cs | 49 - .../System.Drawing.Drawing2D/QualityMode.cs | 46 - .../System.Drawing.Drawing2D/RegionData.cs | 52 - .../System.Drawing.Drawing2D/SmoothingMode.cs | 48 - .../System.Drawing.Drawing2D/WarpMode.cs | 44 - .../System.Drawing.Drawing2D/WrapMode.cs | 49 - .../System.Drawing.Imaging/BitmapData.cs | 117 - .../System.Drawing.Imaging/ChangeLog | 362 -- .../System.Drawing.Imaging/ColorAdjustType.cs | 43 - .../ColorChannelFlag.cs | 41 - .../System.Drawing.Imaging/ColorMap.cs | 62 - .../System.Drawing.Imaging/ColorMapType.cs | 38 - .../System.Drawing.Imaging/ColorMatrix.cs | 367 -- .../System.Drawing.Imaging/ColorMatrixFlag.cs | 39 - .../System.Drawing.Imaging/ColorMode.cs | 38 - .../System.Drawing.Imaging/ColorPalette.cs | 116 - .../EmfPlusRecordType.cs | 289 - .../System.Drawing.Imaging/EmfType.cs | 39 - .../System.Drawing.Imaging/Encoder.cs | 79 - .../EncoderParameter.cs | 356 - .../EncoderParameter.jvm.cs | 173 - .../EncoderParameterValueType.cs | 44 - .../EncoderParameters.cs | 114 - .../System.Drawing.Imaging/EncoderValue.cs | 60 - .../System.Drawing.Imaging/FrameDimension.cs | 101 - .../System.Drawing.Imaging/ImageAttributes.cs | 432 -- .../ImageAttributes.jvm.cs | 303 - .../System.Drawing.Imaging/ImageCodec.jvm.cs | 642 -- .../System.Drawing.Imaging/ImageCodecFlags.cs | 46 - .../System.Drawing.Imaging/ImageCodecInfo.cs | 217 - .../ImageCodecInfo.jvm.cs | 193 - .../System.Drawing.Imaging/ImageFlags.cs | 51 - .../System.Drawing.Imaging/ImageFormat.cs | 180 - .../System.Drawing.Imaging/ImageLockMode.cs | 40 - .../System.Drawing.Imaging/MetaHeader.cs | 92 - .../System.Drawing.Imaging/Metafile.cs | 328 - .../System.Drawing.Imaging/Metafile.jvm.cs | 305 - .../MetafileFrameUnit.cs | 42 - .../System.Drawing.Imaging/MetafileHeader.cs | 139 - .../System.Drawing.Imaging/MetafileType.cs | 46 - .../System.Drawing.Imaging/PaletteFlags.cs | 39 - .../System.Drawing.Imaging/PixelFormat.cs | 63 - .../PlayRecordCallback.cs | 42 - .../System.Drawing.Imaging/PropertyItem.cs | 77 - .../WmfPlaceableFileHeader.cs | 101 - .../System.Drawing.Printing/ChangeLog | 14 - .../System.Drawing.Printing/Duplex.cs | 39 - .../InvalidPrinterException.cs | 64 - .../System.Drawing.Printing/Margins.cs | 148 - .../MarginsConverter.cs | 137 - .../System.Drawing.Printing/PageSettings.cs | 189 - .../System.Drawing.Printing/PaperKind.cs | 154 - .../System.Drawing.Printing/PaperSize.cs | 97 - .../System.Drawing.Printing/PaperSource.cs | 66 - .../PaperSourceKind.cs | 49 - .../PreviewPageInfo.cs | 57 - .../PreviewPrintController.cs | 81 - .../PrintController.cs | 64 - .../System.Drawing.Printing/PrintDocument.cs | 200 - .../System.Drawing.Printing/PrintEventArgs.cs | 45 - .../PrintEventHandler.cs | 40 - .../PrintPageEventArgs.cs | 97 - .../PrintPageEventHandler.cs | 40 - .../System.Drawing.Printing/PrintRange.cs | 38 - .../PrinterResolution.cs | 79 - .../PrinterResolutionKind.cs | 40 - .../PrinterSettings.cs | 373 -- .../System.Drawing.Printing/PrinterUnit.cs | 39 - .../PrinterUnitConvert.cs | 136 - .../PrintingPermission.cs | 259 - .../PrintingPermissionAttribute.cs | 69 - .../PrintingPermissionLevel.cs | 41 - .../QueryPageSettingsEventArgs.cs | 57 - .../QueryPageSettingsEventHandler.cs | 40 - .../StandardPrintController.cs | 93 - .../System.Drawing.Text/FontCollection.cs | 100 - .../System.Drawing.Text/FontCollection.jvm.cs | 83 - .../GenericFontFamilies.cs | 39 - .../System.Drawing.Text/HotkeyPrefix.cs | 39 - .../InstalledFontCollection.cs | 49 - .../InstalledFontCollection.jvm.cs | 62 - .../PrivateFontCollection.cs | 84 - .../PrivateFontCollection.jvm.cs | 60 - .../System.Drawing.Text/TextRenderingHint.cs | 42 - .../System.Drawing.Text/changelog | 73 - .../System.Drawing/System.Drawing.dll.sources | 180 - mcs/class/System.Drawing/System.Drawing.sln | 21 - .../System.Drawing/System.Drawing.vmwcsproj | 159 - .../System.Drawing/AdvancedStroke.jvm.cs | 537 -- .../System.Drawing/BasicShape.jvm.cs | 85 - .../System.Drawing/System.Drawing/Bitmap.cs | 319 - .../System.Drawing/Bitmap.jvm.cs | 377 -- .../System.Drawing/System.Drawing/Brush.cs | 101 - .../System.Drawing/Brush.jvm.cs | 92 - .../System.Drawing/System.Drawing/Brushes.cs | 1459 ----- .../System.Drawing/System.Drawing/ChangeLog | 2148 ------ .../System.Drawing/CharacterRange.cs | 64 - .../System.Drawing/System.Drawing/Color.cs | 1565 ----- .../System.Drawing/ColorConverter.cs | 237 - .../System.Drawing/ColorTranslator.cs | 200 - .../System.Drawing/ComIStreamMarshaler.cs | 681 -- .../System.Drawing/ComIStreamWrapper.cs | 210 - .../System.Drawing/ContentAlignment.cs | 49 - .../System.Drawing/System.Drawing/Font.cs | 603 -- .../System.Drawing/System.Drawing/Font.jvm.cs | 409 -- .../System.Drawing/FontConverter.cs | 297 - .../System.Drawing/FontFamily.cs | 310 - .../System.Drawing/FontFamily.jvm.cs | 194 - .../System.Drawing/FontStyle.cs | 44 - .../System.Drawing/System.Drawing/Graphics.cs | 1992 ------ .../System.Drawing/Graphics.jvm.cs | 2525 -------- .../System.Drawing/GraphicsUnit.cs | 42 - .../System.Drawing/System.Drawing/Icon.cs | 555 -- .../System.Drawing/System.Drawing/Icon.jvm.cs | 195 - .../System.Drawing/IconConverter.cs | 90 - .../System.Drawing/System.Drawing/Image.cs | 774 --- .../System.Drawing/Image.jvm.cs | 556 -- .../System.Drawing/ImageAnimator.cs | 218 - .../System.Drawing/ImageConverter.cs | 101 - .../System.Drawing/ImageFormatConverter.cs | 153 - .../System.Drawing/KnownColor.cs | 206 - .../System.Drawing/System.Drawing/Pen.cs | 518 -- .../System.Drawing/System.Drawing/Pen.jvm.cs | 557 -- .../System.Drawing/System.Drawing/Pens.cs | 1597 ----- .../System.Drawing/PlainImage.jvm.cs | 130 - .../PlainImageCollection.jvm.cs | 101 - .../System.Drawing/System.Drawing/Point.cs | 371 -- .../System.Drawing/PointConverter.cs | 144 - .../System.Drawing/System.Drawing/PointF.cs | 234 - .../System.Drawing/Rectangle.cs | 638 -- .../System.Drawing/RectangleConverter.cs | 164 - .../System.Drawing/RectangleF.cs | 580 -- .../System.Drawing/System.Drawing/Region.cs | 567 -- .../System.Drawing/Region.jvm.cs | 386 -- .../System.Drawing/RotateFlipType.cs | 53 - .../System.Drawing/SRDescriptionAttribute.cs | 58 - .../System.Drawing/System.Drawing/Size.cs | 341 - .../System.Drawing/SizeConverter.cs | 148 - .../System.Drawing/System.Drawing/SizeF.cs | 295 - .../System.Drawing/SolidBrush.cs | 98 - .../System.Drawing/SolidBrush.jvm.cs | 77 - .../System.Drawing/StringAligment.cs | 41 - .../System.Drawing/StringDigitSubstitute.cs | 42 - .../System.Drawing/StringFormat.cs | 291 - .../System.Drawing/StringFormat.jvm.cs | 234 - .../System.Drawing/StringFormatFlags.cs | 48 - .../System.Drawing/StringTrimming.cs | 44 - .../System.Drawing/StringUnit.cs | 46 - .../System.Drawing/StrokeFactory.jvm.cs | 63 - .../System.Drawing/SystemBrushes.cs | 314 - .../System.Drawing/SystemColors.cs | 228 - .../System.Drawing/SystemColors.jvm.cs | 296 - .../System.Drawing/SystemIcons.cs | 61 - .../System.Drawing/SystemIcons.jvm.cs | 106 - .../System.Drawing/SystemPens.cs | 236 - .../System.Drawing/TextureBrush.cs | 214 - .../System.Drawing/TextureBrush.jvm.cs | 195 - .../System.Drawing/ToolboxBitmapAttribute.cs | 139 - .../System.Drawing/carbonFunctions.cs | 149 - .../System.Drawing/gdipEnums.cs | 87 - .../System.Drawing/gdipFunctions.cs | 1759 ----- .../System.Drawing/gdipStructs.cs | 181 - .../System.Drawing_test.dll.sources | 47 - mcs/class/System.Drawing/Test/ChangeLog | 28 - .../System.Drawing/Test/DrawingTest/ChangeLog | 20 - .../DrawingTestHelper/AssemblyInfo.cs | 58 - .../DrawingTest/DrawingTestHelper/ChangeLog | 29 - .../DrawingTestHelper/DrawingTest.cs | 652 -- .../DrawingTestHelper.csproj | 117 - .../DrawingTestHelper_java.vmwcsproj | 29 - .../DrawingTest/DrawingTestHelper/Makefile | 10 - .../DrawingTestHelper/PDComparer.cs | 109 - .../Test/DrawingTest/Exocortex.DSP/Makefile | 10 - .../Exocortex.DSP/doc/Exocortex.DSP.xml | 1124 ---- .../Exocortex.DSP/src/AssemblyInfo.cs | 58 - .../DrawingTest/Exocortex.DSP/src/Complex.cs | 527 -- .../Exocortex.DSP/src/ComplexArray.cs | 682 -- .../DrawingTest/Exocortex.DSP/src/ComplexF.cs | 520 -- .../Exocortex.DSP/src/ComplexMath.cs | 158 - .../Exocortex.DSP/src/ComplexStats.cs | 306 - .../src/Exocortex.DSP.v1.J2EE.vmwcsproj | 31 - .../Exocortex.DSP/src/Exocortex.DSP.v1.csproj | 135 - .../DrawingTest/Exocortex.DSP/src/Fourier.cs | 1346 ---- .../Exocortex.DSP/src/FourierDirection.cs | 55 - .../System.Drawing.Test.dotnet.sln | 51 - .../Test/DrawingTest/System.Drawing.Test.sln | 44 - .../Test/DrawingTest/Test/AssemblyInfo.cs | 58 - .../Test/DrawingTest/Test/Bitmap.cs | 53 - .../Test/DrawingTest/Test/Bitmap1.bmp | Bin 12342 -> 0 bytes .../Test/DrawingTest/Test/Bitmap1.png | Bin 397 -> 0 bytes .../Test/DrawingTest/Test/Brush.cs | 31 - .../Test/DrawingTest/Test/Brushes.cs | 367 -- .../Test/DrawingTest/Test/ChangeLog | 66 - .../Test/DrawingTest/Test/Colors.cs | 361 -- .../Test/DrawingTest/Test/Enums.cs | 454 -- .../Test/DrawingTest/Test/Graphics.cs | 2505 ------- .../Test/DrawingTest/Test/GraphicsPath.cs | 5729 ----------------- .../DrawingTest/Test/GraphicsPathIterator.cs | 749 --- .../Test/DrawingTest/Test/Image.cs | 293 - .../Test/DrawingTest/Test/Makefile | 17 - .../Test/DrawingTest/Test/Pen.cs | 892 --- .../Test/DrawingTest/Test/Pens.cs | 350 - .../Test/DrawingTest/Test/Region.cs | 238 - .../Test/DrawingTest/Test/SampIcon.ico | Bin 1406 -> 0 bytes .../Test/DrawingTest/Test/bitmap25.png | Bin 34088 -> 0 bytes .../Test/DrawingTest/Test/bitmap50.png | Bin 433 -> 0 bytes .../Test/DrawingTest/Test/bitmap_gh.png | Bin 23443 -> 0 bytes .../Test/DrawingTest/Test/bitmap_net.png | Bin 27876 -> 0 bytes .../CategoryNameCollectionCas.cs | 83 - .../Test/System.Drawing.Design/ChangeLog | 18 - .../PaintValueEventArgsCas.cs | 85 - .../PropertyValueUIItemCas.cs | 89 - .../ToolboxComponentsCreatedEventArgsCas.cs | 83 - .../ToolboxComponentsCreatingEventArgsCas.cs | 83 - .../System.Drawing.Design/ToolboxItemCas.cs | 82 - .../ToolboxItemCollectionCas.cs | 83 - .../System.Drawing.Design/UITypeEditorCas.cs | 82 - .../Test/System.Drawing.Drawing2D/ChangeLog | 38 - .../System.Drawing.Drawing2D/TestBlend.cs | 83 - .../TestColorBlend.cs | 83 - .../TestHatchBrush.cs | 621 -- .../System.Drawing.Drawing2D/TestMatrix.cs | 308 - .../Test/System.Drawing.Imaging/ChangeLog | 40 - .../System.Drawing.Imaging/TestBmpCodec.cs | 159 - .../System.Drawing.Imaging/TestColorMatrix.cs | 172 - .../TestImageAttributes.cs | 103 - .../TestImageCodecInfo.cs | 183 - .../System.Drawing.Imaging/TestJpegCodec.cs | 133 - .../Test/System.Drawing.Imaging/tests-ms.sh | 28 - .../Test/System.Drawing.Imaging/tests.sh | 29 - .../Test/System.Drawing.Printing/ChangeLog | 24 - .../PrintingPermissionAttributeTest.cs | 142 - .../PrintingPermissionTest.cs | 482 -- .../Test/System.Drawing.Text/ChangeLog | 3 - .../Test/System.Drawing/BitmapCas.cs | 133 - .../Test/System.Drawing/ChangeLog | 311 - .../Test/System.Drawing/ColorConverter.cs | 382 -- .../Test/System.Drawing/ColorTranslator.cs | 128 - .../Test/System.Drawing/GraphicsCas.cs | 150 - .../System.Drawing/Test/System.Drawing/README | 12 - .../Test/System.Drawing/TestBitmap.cs | 345 - .../Test/System.Drawing/TestBrushes.cs | 1074 --- .../Test/System.Drawing/TestColor.cs | 1161 ---- .../Test/System.Drawing/TestFont.cs | 77 - .../Test/System.Drawing/TestGraphics.cs | 310 - .../Test/System.Drawing/TestIcon.cs | 112 - .../Test/System.Drawing/TestIconConverter.cs | 424 -- .../Test/System.Drawing/TestImage.cs | 55 - .../Test/System.Drawing/TestImageConverter.cs | 459 -- .../TestImageFormatConverter.cs | 305 - .../Test/System.Drawing/TestPens.cs | 2197 ------- .../Test/System.Drawing/TestPoint.cs | 201 - .../Test/System.Drawing/TestPointConverter.cs | 455 -- .../Test/System.Drawing/TestPointF.cs | 182 - .../Test/System.Drawing/TestRectangle.cs | 212 - .../System.Drawing/TestRectangleConverter.cs | 533 -- .../Test/System.Drawing/TestRectangleF.cs | 190 - .../Test/System.Drawing/TestRegion.cs | 1043 --- .../Test/System.Drawing/TestSize.cs | 201 - .../Test/System.Drawing/TestSizeConverter.cs | 462 -- .../Test/System.Drawing/TestSizeF.cs | 212 - .../Test/System.Drawing/TestStringFormat.cs | 116 - .../Test/System.Drawing/TestSystemBrushes.cs | 718 --- .../Test/System.Drawing/TestSystemPens.cs | 364 -- .../Test/System.Drawing/bitmaps/VisualPng.ico | Bin 766 -> 0 bytes .../System.Drawing/bitmaps/VisualPng1.ico | Bin 766 -> 0 bytes .../System.Drawing/bitmaps/almogaver-os2.bmp | Bin 95186 -> 0 bytes .../System.Drawing/bitmaps/almogaver1bit.bmp | Bin 16222 -> 0 bytes .../bitmaps/almogaver24bits.bmp | Bin 95214 -> 0 bytes .../bitmaps/almogaver24bits1.bmp | Bin 95214 -> 0 bytes .../bitmaps/almogaver32bits.bmp | Bin 126690 -> 0 bytes .../System.Drawing/bitmaps/almogaver8bits.bmp | Bin 33286 -> 0 bytes .../bitmaps/maketransparent.bmp | Bin 24534 -> 0 bytes .../System.Drawing/bitmaps/nature24bits.gif | Bin 10292 -> 0 bytes .../System.Drawing/bitmaps/nature24bits.jpg | Bin 2372 -> 0 bytes .../Test/System.Drawing/bitmaps/smiley.ico | Bin 2734 -> 0 bytes .../Test/System.Drawing/tests-ms.sh | 28 - .../Test/System.Drawing/tests.sh | 29 - .../System.Drawing/Test/Test.dotnet.csproj | 543 -- mcs/class/System.Drawing/Test/Test.vmwcsproj | 70 - .../System.Drawing/Test/resources/indexed.png | Bin 238 -> 0 bytes .../cdeclRedirector/cdeclCallback.dll | Bin 3072 -> 0 bytes .../cdeclRedirector/cdeclCallback.il | 204 - 385 files changed, 87662 deletions(-) delete mode 100644 mcs/class/System.Drawing/Assembly/AssemblyInfo.cs delete mode 100644 mcs/class/System.Drawing/Assembly/ChangeLog delete mode 100644 mcs/class/System.Drawing/ChangeLog delete mode 100644 mcs/class/System.Drawing/Mainsoft.Drawing.Configuration.jvm/ResolutionConfiguration.cs delete mode 100644 mcs/class/System.Drawing/Mainsoft.Drawing.Configuration.jvm/ResolutionConfigurationCollection.cs delete mode 100644 mcs/class/System.Drawing/Mainsoft.Drawing.Configuration.jvm/ResolutionConfigurationHandler.cs delete mode 100644 mcs/class/System.Drawing/Makefile delete mode 100644 mcs/class/System.Drawing/README delete mode 100644 mcs/class/System.Drawing/SD.csproj delete mode 100644 mcs/class/System.Drawing/Samples/ChangeLog delete mode 100644 mcs/class/System.Drawing/Samples/General/ChangeLog delete mode 100644 mcs/class/System.Drawing/Samples/General/hering.cs delete mode 100644 mcs/class/System.Drawing/Samples/System.Drawing.Drawing2D/ChangeLog delete mode 100644 mcs/class/System.Drawing/Samples/System.Drawing.Imaging/ChangeLog delete mode 100644 mcs/class/System.Drawing/Samples/System.Drawing.Imaging/ColorMatrix.cs delete mode 100644 mcs/class/System.Drawing/Samples/System.Drawing.Imaging/ImageAttributes.cs delete mode 100644 mcs/class/System.Drawing/Samples/System.Drawing.Imaging/ImageCodecs.cs delete mode 100644 mcs/class/System.Drawing/Samples/System.Drawing.Printing/ChangeLog delete mode 100644 mcs/class/System.Drawing/Samples/System.Drawing.Text/ChangeLog delete mode 100644 mcs/class/System.Drawing/Samples/System.Drawing/BmpPaint.cs delete mode 100644 mcs/class/System.Drawing/Samples/System.Drawing/ChangeLog delete mode 100644 mcs/class/System.Drawing/Samples/System.Drawing/FontDrawing.cs delete mode 100644 mcs/class/System.Drawing/Samples/System.Drawing/FontDrawingAdv.cs delete mode 100644 mcs/class/System.Drawing/Samples/System.Drawing/ImageRotateFlip.cs delete mode 100644 mcs/class/System.Drawing/Samples/System.Drawing/ImageStream.cs delete mode 100644 mcs/class/System.Drawing/Samples/System.Drawing/RegionsGraphicsPath.cs delete mode 100644 mcs/class/System.Drawing/Samples/System.Drawing/RegionsRectangle.cs delete mode 100644 mcs/class/System.Drawing/Samples/System.Drawing/TextureWrapModes.cs delete mode 100644 mcs/class/System.Drawing/Samples/System.Drawing/bitmaps/ChangeLog delete mode 100644 mcs/class/System.Drawing/Samples/System.Drawing/bitmaps/horse.bmp delete mode 100644 mcs/class/System.Drawing/Samples/System.Drawing/bmpsave.cs delete mode 100644 mcs/class/System.Drawing/Samples/System.Drawing/clip.cs delete mode 100644 mcs/class/System.Drawing/Samples/System.Drawing/clipping.cs delete mode 100644 mcs/class/System.Drawing/Samples/System.Drawing/drawimage.cs delete mode 100644 mcs/class/System.Drawing/Samples/System.Drawing/font.cs delete mode 100644 mcs/class/System.Drawing/Samples/System.Drawing/fontsizes.cs delete mode 100644 mcs/class/System.Drawing/Samples/System.Drawing/graphicsUi.cs delete mode 100644 mcs/class/System.Drawing/Samples/System.Drawing/imagecompose.cs delete mode 100644 mcs/class/System.Drawing/Samples/System.Drawing/pie.cs delete mode 100644 mcs/class/System.Drawing/Samples/System.Drawing/region.cs delete mode 100755 mcs/class/System.Drawing/Samples/run-samples.sh delete mode 100644 mcs/class/System.Drawing/System.Drawing.Design/CategoryNameCollection.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Design/ChangeLog delete mode 100644 mcs/class/System.Drawing/System.Drawing.Design/IPropertyValueUIService.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Design/IToolboxService.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Design/IToolboxUser.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Design/PaintValueEventArgs.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Design/PropertyValueItem.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Design/PropertyValueUIHandler.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Design/PropertyValueUIItemInvokeHandler.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Design/ToolboxComponentsCreatedEventArgs.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Design/ToolboxComponentsCreatedEventHandler.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Design/ToolboxComponentsCreatingEventArgs.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Design/ToolboxComponentsCreatingEventHandler.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Design/ToolboxItem.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Design/ToolboxItemCollection.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Design/ToolboxItemCreatorCallback.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Design/UITypeEditor.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Design/UITypeEditorEditStyle.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Drawing2D/AdjustableArrowCap.cs delete mode 100755 mcs/class/System.Drawing/System.Drawing.Drawing2D/AdjustableArrowCap.jvm.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Drawing2D/Blend.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Drawing2D/ChangeLog delete mode 100644 mcs/class/System.Drawing/System.Drawing.Drawing2D/ColorBlend.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Drawing2D/CombineMode.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Drawing2D/CompostingMode.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Drawing2D/CompostingQuality.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Drawing2D/CoordinateSpace.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Drawing2D/CustomLineCap.cs delete mode 100755 mcs/class/System.Drawing/System.Drawing.Drawing2D/CustomLineCap.jvm.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Drawing2D/DashCap.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Drawing2D/DashStyle.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Drawing2D/ExtendedGeneralPath.jvm.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Drawing2D/FillMode.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Drawing2D/FlushIntention.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Drawing2D/GeneralPathIterator.jvm.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Drawing2D/GraphicsContainer.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Drawing2D/GraphicsContainer.jvm.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Drawing2D/GraphicsPath.cs delete mode 100755 mcs/class/System.Drawing/System.Drawing.Drawing2D/GraphicsPath.jvm.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Drawing2D/GraphicsPathIterator.cs delete mode 100755 mcs/class/System.Drawing/System.Drawing.Drawing2D/GraphicsPathIterator.jvm.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Drawing2D/GraphicsState.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Drawing2D/GraphicsState.jvm.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Drawing2D/HatchBrush.cs delete mode 100755 mcs/class/System.Drawing/System.Drawing.Drawing2D/HatchBrush.jvm.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Drawing2D/HatchStyle.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Drawing2D/InterpolationMode.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Drawing2D/LineCap.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Drawing2D/LineJoin.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Drawing2D/LinearGradientBrush.cs delete mode 100755 mcs/class/System.Drawing/System.Drawing.Drawing2D/LinearGradientBrush.jvm.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Drawing2D/LinearGradientMode.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Drawing2D/Matrix.cs delete mode 100755 mcs/class/System.Drawing/System.Drawing.Drawing2D/Matrix.jvm.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Drawing2D/MatrixOrder.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Drawing2D/PathData.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Drawing2D/PathGradientBrush.cs delete mode 100755 mcs/class/System.Drawing/System.Drawing.Drawing2D/PathGradientBrush.jvm.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Drawing2D/PathPointType.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Drawing2D/PenAlignment.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Drawing2D/PenType.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Drawing2D/PixelOffsetMode.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Drawing2D/QualityMode.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Drawing2D/RegionData.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Drawing2D/SmoothingMode.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Drawing2D/WarpMode.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Drawing2D/WrapMode.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Imaging/BitmapData.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Imaging/ChangeLog delete mode 100644 mcs/class/System.Drawing/System.Drawing.Imaging/ColorAdjustType.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Imaging/ColorChannelFlag.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Imaging/ColorMap.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Imaging/ColorMapType.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Imaging/ColorMatrix.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Imaging/ColorMatrixFlag.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Imaging/ColorMode.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Imaging/ColorPalette.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Imaging/EmfPlusRecordType.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Imaging/EmfType.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Imaging/Encoder.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Imaging/EncoderParameter.cs delete mode 100755 mcs/class/System.Drawing/System.Drawing.Imaging/EncoderParameter.jvm.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Imaging/EncoderParameterValueType.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Imaging/EncoderParameters.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Imaging/EncoderValue.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Imaging/FrameDimension.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Imaging/ImageAttributes.cs delete mode 100755 mcs/class/System.Drawing/System.Drawing.Imaging/ImageAttributes.jvm.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Imaging/ImageCodec.jvm.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Imaging/ImageCodecFlags.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Imaging/ImageCodecInfo.cs delete mode 100755 mcs/class/System.Drawing/System.Drawing.Imaging/ImageCodecInfo.jvm.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Imaging/ImageFlags.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Imaging/ImageFormat.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Imaging/ImageLockMode.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Imaging/MetaHeader.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Imaging/Metafile.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Imaging/Metafile.jvm.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Imaging/MetafileFrameUnit.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Imaging/MetafileHeader.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Imaging/MetafileType.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Imaging/PaletteFlags.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Imaging/PixelFormat.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Imaging/PlayRecordCallback.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Imaging/PropertyItem.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Imaging/WmfPlaceableFileHeader.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Printing/ChangeLog delete mode 100644 mcs/class/System.Drawing/System.Drawing.Printing/Duplex.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Printing/InvalidPrinterException.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Printing/Margins.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Printing/MarginsConverter.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Printing/PageSettings.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Printing/PaperKind.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Printing/PaperSize.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Printing/PaperSource.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Printing/PaperSourceKind.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Printing/PreviewPageInfo.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Printing/PreviewPrintController.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Printing/PrintController.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Printing/PrintDocument.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Printing/PrintEventArgs.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Printing/PrintEventHandler.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Printing/PrintPageEventArgs.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Printing/PrintPageEventHandler.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Printing/PrintRange.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Printing/PrinterResolution.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Printing/PrinterResolutionKind.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Printing/PrinterSettings.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Printing/PrinterUnit.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Printing/PrinterUnitConvert.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Printing/PrintingPermission.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Printing/PrintingPermissionAttribute.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Printing/PrintingPermissionLevel.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Printing/QueryPageSettingsEventArgs.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Printing/QueryPageSettingsEventHandler.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Printing/StandardPrintController.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Text/FontCollection.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Text/FontCollection.jvm.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Text/GenericFontFamilies.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Text/HotkeyPrefix.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Text/InstalledFontCollection.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Text/InstalledFontCollection.jvm.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Text/PrivateFontCollection.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Text/PrivateFontCollection.jvm.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Text/TextRenderingHint.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing.Text/changelog delete mode 100755 mcs/class/System.Drawing/System.Drawing.dll.sources delete mode 100644 mcs/class/System.Drawing/System.Drawing.sln delete mode 100644 mcs/class/System.Drawing/System.Drawing.vmwcsproj delete mode 100755 mcs/class/System.Drawing/System.Drawing/AdvancedStroke.jvm.cs delete mode 100755 mcs/class/System.Drawing/System.Drawing/BasicShape.jvm.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing/Bitmap.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing/Bitmap.jvm.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing/Brush.cs delete mode 100755 mcs/class/System.Drawing/System.Drawing/Brush.jvm.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing/Brushes.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing/ChangeLog delete mode 100644 mcs/class/System.Drawing/System.Drawing/CharacterRange.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing/Color.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing/ColorConverter.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing/ColorTranslator.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing/ComIStreamMarshaler.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing/ComIStreamWrapper.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing/ContentAlignment.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing/Font.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing/Font.jvm.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing/FontConverter.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing/FontFamily.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing/FontFamily.jvm.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing/FontStyle.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing/Graphics.cs delete mode 100755 mcs/class/System.Drawing/System.Drawing/Graphics.jvm.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing/GraphicsUnit.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing/Icon.cs delete mode 100755 mcs/class/System.Drawing/System.Drawing/Icon.jvm.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing/IconConverter.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing/Image.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing/Image.jvm.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing/ImageAnimator.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing/ImageConverter.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing/ImageFormatConverter.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing/KnownColor.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing/Pen.cs delete mode 100755 mcs/class/System.Drawing/System.Drawing/Pen.jvm.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing/Pens.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing/PlainImage.jvm.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing/PlainImageCollection.jvm.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing/Point.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing/PointConverter.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing/PointF.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing/Rectangle.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing/RectangleConverter.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing/RectangleF.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing/Region.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing/Region.jvm.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing/RotateFlipType.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing/SRDescriptionAttribute.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing/Size.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing/SizeConverter.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing/SizeF.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing/SolidBrush.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing/SolidBrush.jvm.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing/StringAligment.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing/StringDigitSubstitute.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing/StringFormat.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing/StringFormat.jvm.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing/StringFormatFlags.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing/StringTrimming.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing/StringUnit.cs delete mode 100755 mcs/class/System.Drawing/System.Drawing/StrokeFactory.jvm.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing/SystemBrushes.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing/SystemColors.cs delete mode 100755 mcs/class/System.Drawing/System.Drawing/SystemColors.jvm.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing/SystemIcons.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing/SystemIcons.jvm.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing/SystemPens.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing/TextureBrush.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing/TextureBrush.jvm.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing/ToolboxBitmapAttribute.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing/carbonFunctions.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing/gdipEnums.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing/gdipFunctions.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing/gdipStructs.cs delete mode 100644 mcs/class/System.Drawing/System.Drawing_test.dll.sources delete mode 100644 mcs/class/System.Drawing/Test/ChangeLog delete mode 100644 mcs/class/System.Drawing/Test/DrawingTest/ChangeLog delete mode 100644 mcs/class/System.Drawing/Test/DrawingTest/DrawingTestHelper/AssemblyInfo.cs delete mode 100644 mcs/class/System.Drawing/Test/DrawingTest/DrawingTestHelper/ChangeLog delete mode 100644 mcs/class/System.Drawing/Test/DrawingTest/DrawingTestHelper/DrawingTest.cs delete mode 100644 mcs/class/System.Drawing/Test/DrawingTest/DrawingTestHelper/DrawingTestHelper.csproj delete mode 100644 mcs/class/System.Drawing/Test/DrawingTest/DrawingTestHelper/DrawingTestHelper_java.vmwcsproj delete mode 100644 mcs/class/System.Drawing/Test/DrawingTest/DrawingTestHelper/Makefile delete mode 100644 mcs/class/System.Drawing/Test/DrawingTest/DrawingTestHelper/PDComparer.cs delete mode 100644 mcs/class/System.Drawing/Test/DrawingTest/Exocortex.DSP/Makefile delete mode 100644 mcs/class/System.Drawing/Test/DrawingTest/Exocortex.DSP/doc/Exocortex.DSP.xml delete mode 100644 mcs/class/System.Drawing/Test/DrawingTest/Exocortex.DSP/src/AssemblyInfo.cs delete mode 100644 mcs/class/System.Drawing/Test/DrawingTest/Exocortex.DSP/src/Complex.cs delete mode 100644 mcs/class/System.Drawing/Test/DrawingTest/Exocortex.DSP/src/ComplexArray.cs delete mode 100644 mcs/class/System.Drawing/Test/DrawingTest/Exocortex.DSP/src/ComplexF.cs delete mode 100644 mcs/class/System.Drawing/Test/DrawingTest/Exocortex.DSP/src/ComplexMath.cs delete mode 100644 mcs/class/System.Drawing/Test/DrawingTest/Exocortex.DSP/src/ComplexStats.cs delete mode 100644 mcs/class/System.Drawing/Test/DrawingTest/Exocortex.DSP/src/Exocortex.DSP.v1.J2EE.vmwcsproj delete mode 100644 mcs/class/System.Drawing/Test/DrawingTest/Exocortex.DSP/src/Exocortex.DSP.v1.csproj delete mode 100644 mcs/class/System.Drawing/Test/DrawingTest/Exocortex.DSP/src/Fourier.cs delete mode 100644 mcs/class/System.Drawing/Test/DrawingTest/Exocortex.DSP/src/FourierDirection.cs delete mode 100644 mcs/class/System.Drawing/Test/DrawingTest/System.Drawing.Test.dotnet.sln delete mode 100644 mcs/class/System.Drawing/Test/DrawingTest/System.Drawing.Test.sln delete mode 100644 mcs/class/System.Drawing/Test/DrawingTest/Test/AssemblyInfo.cs delete mode 100644 mcs/class/System.Drawing/Test/DrawingTest/Test/Bitmap.cs delete mode 100644 mcs/class/System.Drawing/Test/DrawingTest/Test/Bitmap1.bmp delete mode 100644 mcs/class/System.Drawing/Test/DrawingTest/Test/Bitmap1.png delete mode 100644 mcs/class/System.Drawing/Test/DrawingTest/Test/Brush.cs delete mode 100644 mcs/class/System.Drawing/Test/DrawingTest/Test/Brushes.cs delete mode 100644 mcs/class/System.Drawing/Test/DrawingTest/Test/ChangeLog delete mode 100644 mcs/class/System.Drawing/Test/DrawingTest/Test/Colors.cs delete mode 100644 mcs/class/System.Drawing/Test/DrawingTest/Test/Enums.cs delete mode 100644 mcs/class/System.Drawing/Test/DrawingTest/Test/Graphics.cs delete mode 100644 mcs/class/System.Drawing/Test/DrawingTest/Test/GraphicsPath.cs delete mode 100644 mcs/class/System.Drawing/Test/DrawingTest/Test/GraphicsPathIterator.cs delete mode 100644 mcs/class/System.Drawing/Test/DrawingTest/Test/Image.cs delete mode 100644 mcs/class/System.Drawing/Test/DrawingTest/Test/Makefile delete mode 100644 mcs/class/System.Drawing/Test/DrawingTest/Test/Pen.cs delete mode 100644 mcs/class/System.Drawing/Test/DrawingTest/Test/Pens.cs delete mode 100644 mcs/class/System.Drawing/Test/DrawingTest/Test/Region.cs delete mode 100644 mcs/class/System.Drawing/Test/DrawingTest/Test/SampIcon.ico delete mode 100644 mcs/class/System.Drawing/Test/DrawingTest/Test/bitmap25.png delete mode 100644 mcs/class/System.Drawing/Test/DrawingTest/Test/bitmap50.png delete mode 100644 mcs/class/System.Drawing/Test/DrawingTest/Test/bitmap_gh.png delete mode 100644 mcs/class/System.Drawing/Test/DrawingTest/Test/bitmap_net.png delete mode 100644 mcs/class/System.Drawing/Test/System.Drawing.Design/CategoryNameCollectionCas.cs delete mode 100644 mcs/class/System.Drawing/Test/System.Drawing.Design/ChangeLog delete mode 100644 mcs/class/System.Drawing/Test/System.Drawing.Design/PaintValueEventArgsCas.cs delete mode 100644 mcs/class/System.Drawing/Test/System.Drawing.Design/PropertyValueUIItemCas.cs delete mode 100644 mcs/class/System.Drawing/Test/System.Drawing.Design/ToolboxComponentsCreatedEventArgsCas.cs delete mode 100644 mcs/class/System.Drawing/Test/System.Drawing.Design/ToolboxComponentsCreatingEventArgsCas.cs delete mode 100644 mcs/class/System.Drawing/Test/System.Drawing.Design/ToolboxItemCas.cs delete mode 100644 mcs/class/System.Drawing/Test/System.Drawing.Design/ToolboxItemCollectionCas.cs delete mode 100644 mcs/class/System.Drawing/Test/System.Drawing.Design/UITypeEditorCas.cs delete mode 100644 mcs/class/System.Drawing/Test/System.Drawing.Drawing2D/ChangeLog delete mode 100644 mcs/class/System.Drawing/Test/System.Drawing.Drawing2D/TestBlend.cs delete mode 100644 mcs/class/System.Drawing/Test/System.Drawing.Drawing2D/TestColorBlend.cs delete mode 100644 mcs/class/System.Drawing/Test/System.Drawing.Drawing2D/TestHatchBrush.cs delete mode 100644 mcs/class/System.Drawing/Test/System.Drawing.Drawing2D/TestMatrix.cs delete mode 100644 mcs/class/System.Drawing/Test/System.Drawing.Imaging/ChangeLog delete mode 100644 mcs/class/System.Drawing/Test/System.Drawing.Imaging/TestBmpCodec.cs delete mode 100644 mcs/class/System.Drawing/Test/System.Drawing.Imaging/TestColorMatrix.cs delete mode 100644 mcs/class/System.Drawing/Test/System.Drawing.Imaging/TestImageAttributes.cs delete mode 100644 mcs/class/System.Drawing/Test/System.Drawing.Imaging/TestImageCodecInfo.cs delete mode 100644 mcs/class/System.Drawing/Test/System.Drawing.Imaging/TestJpegCodec.cs delete mode 100755 mcs/class/System.Drawing/Test/System.Drawing.Imaging/tests-ms.sh delete mode 100755 mcs/class/System.Drawing/Test/System.Drawing.Imaging/tests.sh delete mode 100644 mcs/class/System.Drawing/Test/System.Drawing.Printing/ChangeLog delete mode 100644 mcs/class/System.Drawing/Test/System.Drawing.Printing/PrintingPermissionAttributeTest.cs delete mode 100644 mcs/class/System.Drawing/Test/System.Drawing.Printing/PrintingPermissionTest.cs delete mode 100644 mcs/class/System.Drawing/Test/System.Drawing.Text/ChangeLog delete mode 100644 mcs/class/System.Drawing/Test/System.Drawing/BitmapCas.cs delete mode 100644 mcs/class/System.Drawing/Test/System.Drawing/ChangeLog delete mode 100644 mcs/class/System.Drawing/Test/System.Drawing/ColorConverter.cs delete mode 100644 mcs/class/System.Drawing/Test/System.Drawing/ColorTranslator.cs delete mode 100644 mcs/class/System.Drawing/Test/System.Drawing/GraphicsCas.cs delete mode 100644 mcs/class/System.Drawing/Test/System.Drawing/README delete mode 100644 mcs/class/System.Drawing/Test/System.Drawing/TestBitmap.cs delete mode 100644 mcs/class/System.Drawing/Test/System.Drawing/TestBrushes.cs delete mode 100644 mcs/class/System.Drawing/Test/System.Drawing/TestColor.cs delete mode 100644 mcs/class/System.Drawing/Test/System.Drawing/TestFont.cs delete mode 100644 mcs/class/System.Drawing/Test/System.Drawing/TestGraphics.cs delete mode 100644 mcs/class/System.Drawing/Test/System.Drawing/TestIcon.cs delete mode 100644 mcs/class/System.Drawing/Test/System.Drawing/TestIconConverter.cs delete mode 100644 mcs/class/System.Drawing/Test/System.Drawing/TestImage.cs delete mode 100644 mcs/class/System.Drawing/Test/System.Drawing/TestImageConverter.cs delete mode 100644 mcs/class/System.Drawing/Test/System.Drawing/TestImageFormatConverter.cs delete mode 100644 mcs/class/System.Drawing/Test/System.Drawing/TestPens.cs delete mode 100644 mcs/class/System.Drawing/Test/System.Drawing/TestPoint.cs delete mode 100644 mcs/class/System.Drawing/Test/System.Drawing/TestPointConverter.cs delete mode 100644 mcs/class/System.Drawing/Test/System.Drawing/TestPointF.cs delete mode 100644 mcs/class/System.Drawing/Test/System.Drawing/TestRectangle.cs delete mode 100644 mcs/class/System.Drawing/Test/System.Drawing/TestRectangleConverter.cs delete mode 100644 mcs/class/System.Drawing/Test/System.Drawing/TestRectangleF.cs delete mode 100644 mcs/class/System.Drawing/Test/System.Drawing/TestRegion.cs delete mode 100644 mcs/class/System.Drawing/Test/System.Drawing/TestSize.cs delete mode 100644 mcs/class/System.Drawing/Test/System.Drawing/TestSizeConverter.cs delete mode 100644 mcs/class/System.Drawing/Test/System.Drawing/TestSizeF.cs delete mode 100644 mcs/class/System.Drawing/Test/System.Drawing/TestStringFormat.cs delete mode 100644 mcs/class/System.Drawing/Test/System.Drawing/TestSystemBrushes.cs delete mode 100644 mcs/class/System.Drawing/Test/System.Drawing/TestSystemPens.cs delete mode 100644 mcs/class/System.Drawing/Test/System.Drawing/bitmaps/VisualPng.ico delete mode 100644 mcs/class/System.Drawing/Test/System.Drawing/bitmaps/VisualPng1.ico delete mode 100644 mcs/class/System.Drawing/Test/System.Drawing/bitmaps/almogaver-os2.bmp delete mode 100644 mcs/class/System.Drawing/Test/System.Drawing/bitmaps/almogaver1bit.bmp delete mode 100644 mcs/class/System.Drawing/Test/System.Drawing/bitmaps/almogaver24bits.bmp delete mode 100644 mcs/class/System.Drawing/Test/System.Drawing/bitmaps/almogaver24bits1.bmp delete mode 100644 mcs/class/System.Drawing/Test/System.Drawing/bitmaps/almogaver32bits.bmp delete mode 100644 mcs/class/System.Drawing/Test/System.Drawing/bitmaps/almogaver8bits.bmp delete mode 100644 mcs/class/System.Drawing/Test/System.Drawing/bitmaps/maketransparent.bmp delete mode 100644 mcs/class/System.Drawing/Test/System.Drawing/bitmaps/nature24bits.gif delete mode 100644 mcs/class/System.Drawing/Test/System.Drawing/bitmaps/nature24bits.jpg delete mode 100644 mcs/class/System.Drawing/Test/System.Drawing/bitmaps/smiley.ico delete mode 100755 mcs/class/System.Drawing/Test/System.Drawing/tests-ms.sh delete mode 100755 mcs/class/System.Drawing/Test/System.Drawing/tests.sh delete mode 100644 mcs/class/System.Drawing/Test/Test.dotnet.csproj delete mode 100644 mcs/class/System.Drawing/Test/Test.vmwcsproj delete mode 100644 mcs/class/System.Drawing/Test/resources/indexed.png delete mode 100644 mcs/class/System.Drawing/cdeclRedirector/cdeclCallback.dll delete mode 100644 mcs/class/System.Drawing/cdeclRedirector/cdeclCallback.il diff --git a/mcs/class/System.Drawing/Assembly/AssemblyInfo.cs b/mcs/class/System.Drawing/Assembly/AssemblyInfo.cs deleted file mode 100644 index 77b0cbf04ed..00000000000 --- a/mcs/class/System.Drawing/Assembly/AssemblyInfo.cs +++ /dev/null @@ -1,74 +0,0 @@ -// -// AssemblyInfo.cs -// -// Author: -// Andreas Nahr (ClassDevelopment@A-SoftTech.com) -// -// (C) 2003 Ximian, Inc. http://www.ximian.com -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; -using System.Reflection; -using System.Resources; -using System.Security; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about the system assembly - -[assembly: AssemblyVersion (Consts.FxVersion)] -[assembly: SatelliteContractVersion (Consts.FxVersion)] - -#if (ONLY_1_1) -[assembly: ComCompatibleVersion (1, 0, 3300, 0)] -[assembly: TypeLibVersion (1, 10)] -#endif - -[assembly: AssemblyTitle("System.Drawing.dll")] -[assembly: AssemblyDescription("System.Drawing.dll")] -[assembly: AssemblyConfiguration("Development version")] -[assembly: AssemblyCompany("MONO development team")] -[assembly: AssemblyProduct("MONO CLI")] -[assembly: AssemblyCopyright("(c) 2003 Various Authors")] -[assembly: AssemblyTrademark("")] - -#if !TARGET_JVM -[assembly: CLSCompliant(true)] -#endif -[assembly: AssemblyDefaultAlias("System.Drawing.dll")] -[assembly: AssemblyInformationalVersion("0.0.0.1")] -[assembly: NeutralResourcesLanguage("en-US")] - -[assembly: ComVisible(false)] -[assembly: AllowPartiallyTrustedCallers] - -#if TARGET_JVM -[assembly: AssemblyDelaySign(false)] -#else -[assembly: AssemblyDelaySign(true)] -[assembly: AssemblyKeyFile("../msfinal.pub")] -#endif - diff --git a/mcs/class/System.Drawing/Assembly/ChangeLog b/mcs/class/System.Drawing/Assembly/ChangeLog deleted file mode 100644 index d4031860441..00000000000 --- a/mcs/class/System.Drawing/Assembly/ChangeLog +++ /dev/null @@ -1,16 +0,0 @@ -2005-08-03 Andrew Skiba - - * AssemblyInfo.cs: add TARGET_JVM mode - -2004-02-07 Andreas Nahr - - * Locale.cs: Added - -2003-11-13 Andreas Nahr - - * Consts.cs: Added - -2003-07-17 Andreas Nahr - - * AssemblyInfo.cs: Added - * ChangeLog: Added diff --git a/mcs/class/System.Drawing/ChangeLog b/mcs/class/System.Drawing/ChangeLog deleted file mode 100644 index ad67805aec1..00000000000 --- a/mcs/class/System.Drawing/ChangeLog +++ /dev/null @@ -1,269 +0,0 @@ -2005-09-19 Miguel de Icaza - - * Makefile (EXTRA_DISTFILES): Distribute indexed.png, add resource - to build. - -2005-09-14 Vladimir Krasnov - - * System.Drawing.vmwcsproj: Added PlainImage.jvm.cs, PlainImageCollection.jvm.cs - -2005-09-07 Vladimir Krasnov - - * System.Drawing.vmwcsproj: ImageCodec.jvm.cs - Added Mainsoft.Drawing.Configuration.jvm folder with - ResolutionConfiguration.cs, ResolutionConfigurationCollection.cs, - ResolutionConfigurationHandler.cs - -2005-08-28 Vladimir Krasnov - - * System.Drawing.vmwcsproj: Added GraphicsContainer.jvm.cs, GraphicsState.jvm.cs - Excluded: GraphicsContainer.cs, GraphicsState.cs - Fixed: const.cs.in - -2005-08-25 Atsushi Enomoto - - * Makefile: build fix for some utf8-defaulted environment. - -2005-08-24 Marek Safar - - * SD.csproj: Updated. - -2005-08-23 Eyal Alalyf - * System.Drawing.vmwcsproj: Change it to be developer edition project file - -2005-08-23 Boris Kirzner - * System.Drawing.vmwcsproj: Changed reference to Consts.cs. - -2005-08-16 Andrew Skiba - - * System.Drawing.vmwcsproj: use ImageFormat.cs instead of jvm.cs - -2005-08-14 Gert Driesen - - * System.Drawing.dll.sources: Removed TestColorConverter again, as - there was already a test class for ColorConverter. - -2005-08-14 Gert Driesen - - * System.Drawing.dll.sources: Added TestColorConverter.cs. - -2005-08-14 Vladimir Krasnov - - * System.Drawing.vmwcsproj: Added SystemIcons.jvm.cs, excluded SystemIcons.cs - -2005-08-11 Konstantin Triger - - * System.Drawing.vmwcsproj: changing JAVA to TARGET_JVM in release builds - -2005-08-10 Boris Kirzner - * System.Drawing.vmwcsproj: Added ExtendedGeneralPath.jvm.cs and GeneralPathIterator.jvm.cs. - -2005-08-09 Konstantin Triger - - * System.Drawing.vmwcsproj: Added AdvancedStoke.jvm.cs and StrokeFactory.jvm.cs - -2005-08-09 Andrew Skiba - - * System.Drawing_test.dll.sources: add ColorConverter.cs and ColorTranslator.cs - -2005-08-07 Konstantin Triger - - * System.Drawing.vmwcsproj: removed source control dependency - -2005-08-03 Andrew Skiba - - * System.Drawing.vmwcsproj, System.Drawing.sln: add a project file and solution for building System.Drawing for Grasshopper - -2004-12-09 Geoff Norton - - * System.Drawing.dll.sources: Add System.Drawing/carbonFunctions.cs to the build - -2004-11-22 Ravindra - - * SD.csproj: Removed a wrong entry from files list. - -2004-09-16 Ravindra - - * SD.csproj: Added a VS.NET project file. It can be used to build - System.Drawing library on MS. - -2004-09-09 Sebastien Pouliot - - * System.Drawing_test.dll.sources: Added unit tests for - PrintingPermission and it's attribute class. - -2004-06-10 Ravindra - - * Makefile: Suppress compiler warning cs:618 for test dll. - -2004-06-03 Ravindra - - * Makefile: Updated. We don't need to define the flag - DECLARE_CDECL_DELEGATES anymore. As we have moved all the - codecs to libgdiplus. - -2004-05-26 Ravindra - - * System.Drawing_test.dll.sources: Added TestColor.cs to the test sources list. - -2004-05-20 Sanjay Gupta - - * System.Drawing_test.dll.sources: Added TestIcon.cs to the test sources list. - -2004-05-18 Ravindra - - * System.Drawing_test.dll.sources: Added TestHatchBrush.cs to the - test sources list. - * README: Added some guidelines for writing tests/samples. - -2004-05-17 Sanjay Gupta - - * System.Drawing_test.dll.sources: Added TestIconConverter.cs to the test sources list. - -2004-05-14 Sanjay Gupta - - * System.Drawing_test.dll.sources: Added TestImageConverter.cs and - TestImageFormatConverter.cs to the test sources list. - -2004-04-22 Ravindra - - * System.Drawing_test.dll.sources: Added TestPointConverter.cs, - TestRectangleConverter.cs and TestSizeConverter.cs to the test - sources list. - -2004-04-21 Ravindra - - * System.Drawing_test.dll.sources: Added TestPens.cs and - TestBrushes.cs to the test sources list. - -2004-04-16 Ravindra - - * System.Drawing_test.dll.sources: Added TestSystemPens.cs - to the test sources list. - -2004-04-12 Ravindra - - * System.Drawing_test.dll.sources: Added TestSystemBrushes.cs - to the test sources list. - -2004-03-18 Ravindra - * System.Drawing_test.dll.sources: Added TestBitmap.cs, - TestBlend.cs and TestColorBlend.cs to test sources list. - -2004-03-17 Ravindra - * Samples: Created directory for samples. - * README: Created README that tells about the directory - structure for samples and tests. - -2004-02-11 Ravindra - * System.Drawing.dll.sources: Added EncoderParameter.cs - and EncoderParameters.cs. - -2004-02-07 Andreas Nahr - - * System.Drawing.dll.sources: - SRDescriptionAttribute.cs, Locale.cs added - -2004-01-26 Ravindra - * System.Drawing.dll.sources: Added TextureBrush.cs. - -2004-01-26 Ravindra - * System.Drawing_test.dll.sources: Added to create - System.Drawing_test.dll. - -2004-01-23 Ravindra - * System.Drawing.dll.sources: Removed TextureBrush.cs. - Was added by mistake during last check-in. - -2004-01-19 Ravindra - * System.Drawing.dll.sources: Added Encoder.cs. - -2003-11-13 Andreas Nahr - * System.Drawing.dll.sources: MetafileHeader added (was missing), Consts.cs added - -2003-10-14 Bernie Solomon - * Makefile do not build gdiplus on Windows - -2003-10-12 Alexandre Pigolkine - * Makefile gdiplus added to subdirs - -2003-10-12 Alexandre Pigolkine - * System.Drawing.dll.sources: Remove cairo,win32,gtk implementations - Add gdi+ implementation - -2003-09-21 Miguel de Icaza - * System.Drawing.dll.sources: Remove xr implementation. - -2003-09-21 Alexandre Pigolkine - * System.Drawing.dll.sources removed 2 files from Printing namespace - -2003-08-31 Jerome Laban - * Graphics.cs: - * win32functions.cs: Added Win32 Ellipse implementation. - -2003-08-24 Duncan Mak - - * System.Drawing.dll.sources: Add Cairo implementation. - -2003-07-23 Peter Williams - - * System.Drawing.dll.sources: Add Pens.cs - -2003-07-17 Andreas Nahr - - * System.Drawing.dll.sources: - * list.unix: AssemblyInfo.cs added - -2003-06-27 Alexandre Pigolkine - * list.unix - new file added - -2003-06-22 Alexandre Pigolkine - * list.unix - reordered by folder names - few new files added - System.Drawing.Design/IDesignerHost.cs removed - -2003-06-18 Alexandre Pigolkine - * list.unix changed - -2003-06-15 Alexandre Pigolkine - * list.unix files added - * makefile.gnu --unsafe flag, cdecl delegates - -2003-06-06 Alexandre Pigolkine - * list.unix changed - -2003-04-26 Alexandre Pigolkine - * list.unix changed - -2003-03-31 Martin Willemoes Hansen - - * System.Drawing.Printing/PrinterUnitConvert.cs stubed - -2003-03-31 Martin Willemoes Hansen - - * System.Drawing.Design/ToolboxItemCollection.cs stubed - -2003-03-31 Alan Tam - - * list.unix: Added UITypeEditor.cs. - -2003-02-08 Gonzalo Paniagua Javier - - * list.unix: added ImageAttributes.cs. - -2003-02-07 Alexandre Pigolkine - * list.unix changed - -2002-12-1 Alejandro Sánchez Acosta - - * list.unix: Changed - - -2002-06-20 Gonzalo Paniagua Javier - - * ChangeLog: new file. - - * System.Drawing.build: added System.dll dependency - diff --git a/mcs/class/System.Drawing/Mainsoft.Drawing.Configuration.jvm/ResolutionConfiguration.cs b/mcs/class/System.Drawing/Mainsoft.Drawing.Configuration.jvm/ResolutionConfiguration.cs deleted file mode 100644 index a62c270e935..00000000000 --- a/mcs/class/System.Drawing/Mainsoft.Drawing.Configuration.jvm/ResolutionConfiguration.cs +++ /dev/null @@ -1,76 +0,0 @@ -using System; -using System.Collections; - -namespace Mainsoft.Drawing.Configuration -{ - /// - /// Summary description for ResolutionConfiguration. - /// - public class ResolutionConfiguration : IComparable - { - string _imageFormat = ""; - - string _xResPath = ""; - string _yResPath = ""; - string _unitsTypePath = ""; - - string _xResDefault = ""; - string _yResDefault = ""; - string _unitsTypeDefault = ""; - - Hashtable _unitScale; - - public ResolutionConfiguration( - string imageFormat, - string xresPath, string yresPath, string unitsTypePath, - string xresDefault, string yresDefault, string unitsTypeDefault, - Hashtable unitScale) - { - _imageFormat = imageFormat; - - _xResPath = xresPath; - _yResPath = yresPath; - _unitsTypePath = unitsTypePath; - - _xResDefault = xresDefault; - _yResDefault = yresDefault; - _unitsTypeDefault = unitsTypeDefault; - - _unitScale = unitScale; - } - - public string XResPath { - get { return _xResPath; } - } - public string XResDefault { - get { return _xResDefault; } - } - public string YResPath { - get { return _yResPath; } - } - public string YResDefault { - get { return _yResDefault; } - } - public string UnitsTypePath { - get { return _unitsTypePath; } - } - public string UnitsTypeDefault { - get { return _unitsTypeDefault; } - } - public string ImageFormat { - get { return _imageFormat; } - } - public Hashtable UnitsScale { - get { return _unitScale; } - } - - #region IComparable Members - - public int CompareTo(object obj) { - return _imageFormat.CompareTo(((ResolutionConfiguration)obj).ImageFormat); - } - - #endregion - - } -} diff --git a/mcs/class/System.Drawing/Mainsoft.Drawing.Configuration.jvm/ResolutionConfigurationCollection.cs b/mcs/class/System.Drawing/Mainsoft.Drawing.Configuration.jvm/ResolutionConfigurationCollection.cs deleted file mode 100644 index 9dcbe40b8d3..00000000000 --- a/mcs/class/System.Drawing/Mainsoft.Drawing.Configuration.jvm/ResolutionConfigurationCollection.cs +++ /dev/null @@ -1,93 +0,0 @@ -using System; -using System.Collections; - -namespace Mainsoft.Drawing.Configuration { - /// - /// Summary description for MetadataConfigurationCollection. - /// - public class ResolutionConfigurationCollection : IEnumerable, ICollection { - - ArrayList _resolutionConfigurations; - - #region ctors - - internal ResolutionConfigurationCollection(ResolutionConfigurationCollection parent) { - _resolutionConfigurations = new ArrayList(); - - if (parent != null) - _resolutionConfigurations.AddRange(parent); - } - - #endregion - - #region methods - - internal void Add(ResolutionConfiguration value) { - _resolutionConfigurations.Add(value); - } - - internal void Sort() { - _resolutionConfigurations.Sort(); - } - - #endregion - - #region props - - public ResolutionConfiguration this[int index] { - get { - return (ResolutionConfiguration)_resolutionConfigurations[index]; - } - } - - public ResolutionConfiguration this[string ImageFormat] { - get { - for (int i=0; i < _resolutionConfigurations.Count; i++) - if ( ((ResolutionConfiguration)_resolutionConfigurations[i]).ImageFormat == ImageFormat ) - return (ResolutionConfiguration)_resolutionConfigurations[i]; - return null; - } - } - - #endregion - - #region IEnumerable Members - - public IEnumerator GetEnumerator() { - // TODO: Add ResolutionConfigurationCollection.GetEnumerator implementation - return _resolutionConfigurations.GetEnumerator(); - } - - #endregion - - #region ICollection Members - - public bool IsSynchronized { - get { - // TODO: Add ResolutionConfigurationCollection.IsSynchronized getter implementation - return _resolutionConfigurations.IsSynchronized; - } - } - - public int Count { - get { - // TODO: Add ResolutionConfigurationCollection.Count getter implementation - return _resolutionConfigurations.Count; - } - } - - public void CopyTo(Array array, int index) { - // TODO: Add ResolutionConfigurationCollection.CopyTo implementation - _resolutionConfigurations.CopyTo(array, index); - } - - public object SyncRoot { - get { - // TODO: Add ResolutionConfigurationCollection.SyncRoot getter implementation - return _resolutionConfigurations.SyncRoot; - } - } - - #endregion - } -} diff --git a/mcs/class/System.Drawing/Mainsoft.Drawing.Configuration.jvm/ResolutionConfigurationHandler.cs b/mcs/class/System.Drawing/Mainsoft.Drawing.Configuration.jvm/ResolutionConfigurationHandler.cs deleted file mode 100644 index 18698ffcb85..00000000000 --- a/mcs/class/System.Drawing/Mainsoft.Drawing.Configuration.jvm/ResolutionConfigurationHandler.cs +++ /dev/null @@ -1,140 +0,0 @@ -using System; -using System.Collections; -using System.Configuration; -using System.Xml; - - -namespace Mainsoft.Drawing.Configuration -{ - /// - /// Summary description for MetadataConfigurationHandler. - /// - public class ResolutionConfigurationHandler : IConfigurationSectionHandler - { - public ResolutionConfigurationHandler() - { - // - // TODO: Add constructor logic here - // - } - - public virtual object Create (object parent, object configContext, XmlNode section) { - - if (section.Attributes != null && section.Attributes.Count != 0) - HandlersUtil.ThrowException ("Unrecognized attribute", section); - - ResolutionConfigurationCollection col = - new ResolutionConfigurationCollection(parent as ResolutionConfigurationCollection); - - XmlNodeList imageFormats = section.ChildNodes; - foreach (XmlNode child in imageFormats) { - - XmlNodeType ntype = child.NodeType; - if (ntype == XmlNodeType.Whitespace || ntype == XmlNodeType.Comment) - continue; - - if (ntype != XmlNodeType.Element) - HandlersUtil.ThrowException ("Only elements allowed", child); - - string imageFormatName = HandlersUtil.ExtractAttributeValue ("name", child, false, false); - - string xResPath = HandlersUtil.ExtractNodeValue(child["xresolution"]); - string yResPath = HandlersUtil.ExtractNodeValue(child["yresolution"]); - string unitsType = HandlersUtil.ExtractNodeValue(child["unitstype"], false, true); - - string xResDefault = HandlersUtil.ExtractAttributeValue ("default", child["xresolution"]); - string yResDefault = HandlersUtil.ExtractAttributeValue ("default", child["yresolution"]); - string unitsTypeDefault = HandlersUtil.ExtractAttributeValue ("default", child["unitstype"], true); - - Hashtable unitScale = new Hashtable(3); - - XmlNodeList unitScaleNodes = child.SelectNodes("unitscale"); - foreach (XmlNode unitScaleNode in unitScaleNodes) { - unitScale.Add( - HandlersUtil.ExtractAttributeValue ("value", unitScaleNode), - HandlersUtil.ExtractNodeValue(unitScaleNode) ); - } - - ResolutionConfiguration resConf = new ResolutionConfiguration( - imageFormatName, - xResPath, yResPath, unitsType, - xResDefault, yResDefault, unitsTypeDefault, - unitScale); - - col.Add(resConf); - } - - col.Sort(); - return col; - } - } - - internal sealed class HandlersUtil { - private HandlersUtil () { - } - - static internal string ExtractNodeValue(XmlNode node, bool optional, bool allowEmpty) { - if (node == null) { - if (optional) - return null; - ThrowException ("Required node not found", node); - } - - string nodeValue = node.InnerText; - - if (!allowEmpty && nodeValue == String.Empty) { - string opt = optional ? "Optional" : "Required"; - ThrowException (opt + " node is empty", node); - } - - return nodeValue; - } - - static internal string ExtractNodeValue(XmlNode node, bool optional) { - return ExtractNodeValue(node, false, false); - } - - static internal string ExtractNodeValue(XmlNode node) { - return ExtractNodeValue(node, false); - } - - static internal string ExtractAttributeValue (string attKey, XmlNode node) { - return ExtractAttributeValue (attKey, node, false); - } - - static internal string ExtractAttributeValue (string attKey, XmlNode node, bool optional) { - return ExtractAttributeValue (attKey, node, optional, false); - } - - static internal string ExtractAttributeValue (string attKey, XmlNode node, bool optional, - bool allowEmpty) { - if (node.Attributes == null) { - if (optional) - return null; - - ThrowException ("Required attribute not found: " + attKey, node); - } - - XmlNode att = node.Attributes.RemoveNamedItem (attKey); - if (att == null) { - if (optional) - return null; - ThrowException ("Required attribute not found: " + attKey, node); - } - - string value = att.Value; - if (!allowEmpty && value == String.Empty) { - string opt = optional ? "Optional" : "Required"; - ThrowException (opt + " attribute is empty: " + attKey, node); - } - - return value; - } - - static internal void ThrowException (string msg, XmlNode node) { - if (node != null && node.Name != String.Empty) - msg = msg + " (node name: " + node.Name + ") "; - throw new ConfigurationException (msg, node); - } - } -} diff --git a/mcs/class/System.Drawing/Makefile b/mcs/class/System.Drawing/Makefile deleted file mode 100644 index 3631d2d001a..00000000000 --- a/mcs/class/System.Drawing/Makefile +++ /dev/null @@ -1,14 +0,0 @@ -thisdir = class/System.Drawing -include ../../build/rules.make -SUBDIRS = - -LIBRARY = System.Drawing.dll - -LIB_MCS_FLAGS = /unsafe /r:$(corlib) /r:System.dll /nowarn:649 /nowarn:169 /codepage:28591 - -TEST_MCS_FLAGS = $(LIB_MCS_FLAGS) -resource:Test/resources/indexed.png,indexed.png \ - /r:System.Drawing.dll -nowarn:0618 -nowarn:219 -nowarn:169 -nowarn:1595 - -include ../../build/library.make - -EXTRA_DISTFILES = Test/resources/indexed.png \ No newline at end of file diff --git a/mcs/class/System.Drawing/README b/mcs/class/System.Drawing/README deleted file mode 100644 index 8105c140e8b..00000000000 --- a/mcs/class/System.Drawing/README +++ /dev/null @@ -1,40 +0,0 @@ - - This README gives some details about Nunit tests and samples for - System.Drawing classes. - - Following is the directory structure for the tests and samples: - - Test/ (all the nunit test classes go here) - System.Drawing - System.Drawing.Drawing2D - System.Drawing.Imaging - System.Drawing.Printing - System.Drawing.Text - - Samples/ (all the samples go here) - General (samples that affect more than a single area of SD) - System.Drawing - System.Drawing.Drawing2D - System.Drawing.Imaging - System.Drawing.Printing - System.Drawing.Text - - Please note the directory structure given above is based on System.Drawing - namespaces. - - Advice for writing System.Drawing tests/samples - =============================================== - - Tests are Nunit test classes and follow general Nunit test guidelines. When - you write a new test class, you need to add it to System.Drawing_test.dll.sources - file. Please follow the alphabetical order while adding the name of your test - class. - - Samples are independent C# programs with a Main method. Samples are supposed - to solve two purposes. First, samples expose the bugs that are not captured - by Nunit tests. To achieve this, it is advisable not to repeat the code in a - test and a sample for any class until unless required. Second, samples help - System.Drawing users in understanding System.Drawing components as well as in - writing System.Drawing applications. Writing too trivial samples for well known - classes might not be really helpful for the users. It is better to write a sample - to solve a particular problem. diff --git a/mcs/class/System.Drawing/SD.csproj b/mcs/class/System.Drawing/SD.csproj deleted file mode 100644 index 4f9631adaaf..00000000000 --- a/mcs/class/System.Drawing/SD.csproj +++ /dev/null @@ -1,974 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/mcs/class/System.Drawing/Samples/ChangeLog b/mcs/class/System.Drawing/Samples/ChangeLog deleted file mode 100644 index 9bd8f76a772..00000000000 --- a/mcs/class/System.Drawing/Samples/ChangeLog +++ /dev/null @@ -1,22 +0,0 @@ -2004-07-16 Ravindra - - * run-samples.sh: Some minor changes, mostly cosmetic. - -2004-06-11 Ravindra - - * run-samples.sh: Added a script to run the samples. - Thanks to Harinath and Sachin for the help. - -2004-03-17 Ravindra - * General: Created repository for samples that cover more than one - namespace. - * System.Drawing.Drawing2D: Created repository for samples of this - namespace. - * System.Drawing.Imaging: Created repository for samples of this - namespace. - * System.Drawing.Printing: Created repository for samples of this - namespace. - * System.Drawing.Text: Created repository for samples of this - namespace. - * System.Drawing: Created repository for samples of this namespace. - * ChangeLog: Added. diff --git a/mcs/class/System.Drawing/Samples/General/ChangeLog b/mcs/class/System.Drawing/Samples/General/ChangeLog deleted file mode 100644 index a7e0c7d0609..00000000000 --- a/mcs/class/System.Drawing/Samples/General/ChangeLog +++ /dev/null @@ -1,10 +0,0 @@ -2004-06-17 Ravindra - - * hering.cs: Formatted and moved here from Test/System.Drawing - directory. - -2004-03-17 Ravindra - - * Created this repository for samples of SD that cover - more than one namespace. - * ChangeLog: Added. diff --git a/mcs/class/System.Drawing/Samples/General/hering.cs b/mcs/class/System.Drawing/Samples/General/hering.cs deleted file mode 100644 index 113ec5ae659..00000000000 --- a/mcs/class/System.Drawing/Samples/General/hering.cs +++ /dev/null @@ -1,80 +0,0 @@ -// -// hering.cs -// Creates image for Hering illusion. -// Converted to C# from Xr demo application. -// -// Author: -// Alexandre Pigolkine(pigolkine@gmx.de) -// -// -// Copyright (C) Ximian, Inc. http://www.ximian.com -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; -using System.Drawing; -using System.Drawing.Imaging; -using System.Drawing.Drawing2D; - -namespace MonoSamples.System.Drawing -{ - public class Hering - { - public static void Main (String[] args) { - - float width = 400.0F; - float height = 800.0F; - Bitmap bmp = new Bitmap ((int) width, (int) height); - Graphics gr = Graphics.FromImage (bmp); - gr.Clear (Color.White); - - int LINES = 32; - float MAX_THETA = (.80F * 90.0F); - float THETA = (2 * MAX_THETA / (LINES-1)); - - GraphicsState oldState = gr.Save (); - - Pen blackPen = new Pen (Color.Black, 2.0F); - gr.TranslateTransform (width / 2.0F, height / 2.0F); - gr.RotateTransform (MAX_THETA); - for ( int i = 0; i < LINES; i++) { - gr.DrawLine (blackPen, -2.0F * width, 0.0F, 2.0F * width, 0.0F); - gr.RotateTransform (-THETA); - } - - gr.Restore (oldState); - - Pen redPen = new Pen (Color.Red, 6F); - gr.DrawLine (redPen, width / 4F, 0F, width / 4F, height); - gr.DrawLine (redPen, 3F * width / 4F, 0F, 3F * width / 4F, height); - - /* save image in all the formats */ - bmp.Save ("hering.png", ImageFormat.Png); - Console.WriteLine ("output file hering.png"); - bmp.Save ("hering.jpg", ImageFormat.Jpeg); - Console.WriteLine ("output file hering.jpg"); - bmp.Save ("hering.bmp", ImageFormat.Bmp); - Console.WriteLine ("output file hering.bmp"); - } - } -} diff --git a/mcs/class/System.Drawing/Samples/System.Drawing.Drawing2D/ChangeLog b/mcs/class/System.Drawing/Samples/System.Drawing.Drawing2D/ChangeLog deleted file mode 100644 index d1d62e2f9f2..00000000000 --- a/mcs/class/System.Drawing/Samples/System.Drawing.Drawing2D/ChangeLog +++ /dev/null @@ -1,4 +0,0 @@ -2004-03-17 Ravindra - * Created this repository for samples for - System.Drawing.Drawing2D namespace. - * ChangeLog: Added. diff --git a/mcs/class/System.Drawing/Samples/System.Drawing.Imaging/ChangeLog b/mcs/class/System.Drawing/Samples/System.Drawing.Imaging/ChangeLog deleted file mode 100644 index ce4170136cc..00000000000 --- a/mcs/class/System.Drawing/Samples/System.Drawing.Imaging/ChangeLog +++ /dev/null @@ -1,13 +0,0 @@ -2004-05-25 Jordi Mas i Hernadez - * ImageAttributes.cs Added WrapMode examples - -2004-05-22 Jordi Mas i Hernadez - * ImageAttributes.cs Added - -2004-04-28 Jordi Mas i Hernadez - * ImageCodecs.cs Added - -2004-03-17 Ravindra - * Created this repository for samples for - System.Drawing.Imaging namespace. - * ChangeLog: Added. diff --git a/mcs/class/System.Drawing/Samples/System.Drawing.Imaging/ColorMatrix.cs b/mcs/class/System.Drawing/Samples/System.Drawing.Imaging/ColorMatrix.cs deleted file mode 100644 index 445393bcb9d..00000000000 --- a/mcs/class/System.Drawing/Samples/System.Drawing.Imaging/ColorMatrix.cs +++ /dev/null @@ -1,259 +0,0 @@ -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// Copyright (c) 2005 Novell, Inc. -// -// Author: -// -// Jordi Mas i Hernandez, jordi@ximian.com -// -// Tests color matrix processing -// - -using System; -using System.Drawing; -using System.Drawing.Drawing2D; -using System.Drawing.Imaging; - -// -public class SampleColorMatrix{ - - public static Color ProcessColorMatrix (Color color, ColorMatrix colorMatrix) - { - Bitmap bmp = new Bitmap (64, 64); - Graphics gr = Graphics.FromImage (bmp); - ImageAttributes imageAttr = new ImageAttributes (); - - bmp.SetPixel (0,0, color); - - imageAttr.SetColorMatrix (colorMatrix); - gr.DrawImage (bmp, new Rectangle (0, 0, 64,64), 0,0, 64,64, GraphicsUnit.Pixel, imageAttr); - - Console.WriteLine ("{0} - > {1}", color, bmp.GetPixel (0,0)); - return bmp.GetPixel (0,0); - - } - - public static void ProcessImageColorMatrix (string sin, string sout, ColorMatrix colorMatrix) - { - Bitmap bmp_in = new Bitmap (sin); - Bitmap bmp_out = new Bitmap (bmp_in.Width, bmp_in.Height, bmp_in.PixelFormat); - - Graphics gr = Graphics.FromImage (bmp_out); - ImageAttributes imageAttr = new ImageAttributes (); - - imageAttr.SetColorMatrix (colorMatrix); - - gr.DrawImage (bmp_in, new Rectangle (0, 0, bmp_out.Width, bmp_out.Height), - 0,0, bmp_out.Width, bmp_out.Height, GraphicsUnit.Pixel, imageAttr); - - imageAttr.Dispose (); - bmp_out.Save (sout); - bmp_in.Dispose (); - bmp_out.Dispose (); - Console.WriteLine ("Saving image file {0}", sout); - } - - public static void Main(string[] args) - { - Color clr_src, clr_rslt; - - Console.WriteLine ("Red"); - /* Red */ - { - ColorMatrix colorMatrix = new ColorMatrix (new float[][] { - new float[] {1, 0, 0, 0, 0}, - new float[] {0, 1, 0, 0, 0}, - new float[] {0, 0, 1, 0, 0}, - new float[] {0, 0, 0, 1, 0}, - new float[] {0, 0, 0, 0, 0}, - }); - - clr_src = Color.FromArgb (255, 100, 20, 50); - clr_rslt = ProcessColorMatrix (clr_src, colorMatrix); - } - - { - ColorMatrix colorMatrix = new ColorMatrix (new float[][] { - new float[] {2, 0, 0, 0, 0}, //R - new float[] {0, 1, 0, 0, 0}, //G - new float[] {0, 0, 1, 0, 0}, //B - new float[] {0, 0, 0, 1, 0}, //A - new float[] {0.2f, 0, 0, 0, 0}, //Translation - }); - - clr_src = Color.FromArgb (255, 100, 20, 50); - clr_rslt = ProcessColorMatrix (clr_src, colorMatrix); - } - - { - ColorMatrix colorMatrix = new ColorMatrix (new float[][] { - new float[] {0.5f, 0, 0, 0, 0}, //R - new float[] {0.5f, 1, 0, 0, 0}, //G - new float[] {0, 0, 1, 0, 0}, //B - new float[] {0, 0, 0, 1, 0}, //A - new float[] {0.2f, 0, 0, 0, 0}, //Translation - }); - - clr_src = Color.FromArgb (255, 100, 20, 50); - clr_rslt = ProcessColorMatrix (clr_src, colorMatrix); - } - - /* Green */ - Console.WriteLine ("Green"); - { - ColorMatrix colorMatrix = new ColorMatrix (new float[][] { - new float[] {1, 0, 0, 0, 0}, //R - new float[] {0, 2, 0, 0, 0}, //G - new float[] {0, 0, 1, 0, 0}, //B - new float[] {0, 0.5f, 0, 1, 0}, //A - new float[] {0, 0.1f, 0, 0, 0}, //Translation - }); - - clr_src = Color.FromArgb (255, 100, 20, 50); - clr_rslt = ProcessColorMatrix (clr_src, colorMatrix); - } - - { - ColorMatrix colorMatrix = new ColorMatrix (new float[][] { - new float[] {1, 0, 0, 0, 0}, //R - new float[] {0, 1, 0, 0, 0}, //G - new float[] {0, 0, 1, 0, 0}, //B - new float[] {0, 2, 0, 1, 0}, //A - new float[] {0, 0.5f, 0, 0, 0}, //Translation - }); - - clr_src = Color.FromArgb (255, 100, 20, 50); - clr_rslt = ProcessColorMatrix (clr_src, colorMatrix); - } - - { - ColorMatrix colorMatrix = new ColorMatrix (new float[][] { - new float[] {1, 0, 0, 0, 0}, //R - new float[] {0, 0, 0, 0, 0}, //G - new float[] {0, 0, 1, 0, 0}, //B - new float[] {0, 0.5f, 0, 1, 0}, //A - new float[] {0, 0f, 0, 0, 0}, //Translation - }); - - clr_src = Color.FromArgb (255, 100, 20, 50); - clr_rslt = ProcessColorMatrix (clr_src, colorMatrix); - } - - /* Blue */ - Console.WriteLine ("Blue"); - { - ColorMatrix colorMatrix = new ColorMatrix (new float[][] { - new float[] {1, 0, 0, 0, 0}, //R - new float[] {0, 1, 0, 0, 0}, //G - new float[] {0, 0, 1.5f, 0, 0}, //B - new float[] {0, 0, 0.5f, 1, 0}, //A - new float[] {0, 0, 0, 0, 0}, //Translation - }); - - clr_src = Color.FromArgb (255, 100, 40, 25); - clr_rslt = ProcessColorMatrix (clr_src, colorMatrix); - } - - { - ColorMatrix colorMatrix = new ColorMatrix (new float[][] { - new float[] {1, 0, 0, 0, 0}, //R - new float[] {0, 1, 1, 0, 0}, //G - new float[] {0, 0, 0, 0, 0}, //B - new float[] {0, 0, 0, 1, 0}, //A - new float[] {0, 0, 0, 0, 0}, //Translation - }); - - clr_src = Color.FromArgb (255, 100, 100, 25); - clr_rslt = ProcessColorMatrix (clr_src, colorMatrix); - } - - { - ColorMatrix colorMatrix = new ColorMatrix (new float[][] { - new float[] {1, 0, 0, 0, 0}, //R - new float[] {0, 0, 0, 0, 0}, //G - new float[] {0, 0, 1, 0, 0}, //B - new float[] {0, 0.5f, 0, 1, 0}, //A - new float[] {0, 0f, 0, 0, 0}, //Translation - }); - - clr_src = Color.FromArgb (255, 100, 20, 50); - clr_rslt = ProcessColorMatrix (clr_src, colorMatrix); - } - - /* Blue */ - Console.WriteLine ("All"); - { - ColorMatrix colorMatrix = new ColorMatrix (new float[][] { - new float[] {1, 0, 0, 0, 0}, //R - new float[] {0.5f, 1, 0, 0, 0}, //G - new float[] {0, 0.1f, 1.5f, 0, 0}, //B - new float[] {0.5f, 3, 0.5f, 1, 0}, //A - new float[] {0, 0, 0, 0, 0}, //Translation - }); - - clr_src = Color.FromArgb (255, 10, 20, 25); - clr_rslt = ProcessColorMatrix (clr_src, colorMatrix); - } - - { - ColorMatrix colorMatrix = new ColorMatrix (new float[][] { - new float[] {1, 0, 0, 0.5f, 0}, //R - new float[] {0, 1, 1, 0, 0}, //G - new float[] {0, 0, 0.8f, 0, 0}, //B - new float[] {0, 2, 0, 1, 0}, //A - new float[] {0, 0, 0, 0, 0}, //Translation - }); - - clr_src = Color.FromArgb (255, 100, 100, 25); - clr_rslt = ProcessColorMatrix (clr_src, colorMatrix); - } - - Console.WriteLine ("Images ---"); - - // Load an image and convert it to gray scale - ColorMatrix grayscale = new ColorMatrix(); - grayscale.Matrix00 = 1/3f; - grayscale.Matrix01 = 1/3f; - grayscale.Matrix02 = 1/3f; - grayscale.Matrix10 = 1/3f; - grayscale.Matrix11 = 1/3f; - grayscale.Matrix12 = 1/3f; - grayscale.Matrix20 = 1/3f; - grayscale.Matrix21 = 1/3f; - grayscale.Matrix22 = 1/3f; - ProcessImageColorMatrix ("../System.Drawing/bitmaps/horse.bmp", "greyscale.bmp", grayscale); - - // Load an image and convert it to sepia - - ColorMatrix sepia = new ColorMatrix (new float[][] { - new float[] {0.393f, 0.349f, 0.272f, 0, 0}, - new float[] {0.769f, 0.686f, 0.534f, 0, 0}, - new float[] {0.189f, 0.168f, 0.131f, 0, 0}, - new float[] { 0, 0, 0, 1, 0}, - new float[] { 0, 0, 0, 0, 1} - }); - - ProcessImageColorMatrix ("../System.Drawing/bitmaps/horse.bmp", "sepia.bmp", sepia); - - } - -} - - diff --git a/mcs/class/System.Drawing/Samples/System.Drawing.Imaging/ImageAttributes.cs b/mcs/class/System.Drawing/Samples/System.Drawing.Imaging/ImageAttributes.cs deleted file mode 100644 index 4d7d131a4a2..00000000000 --- a/mcs/class/System.Drawing/Samples/System.Drawing.Imaging/ImageAttributes.cs +++ /dev/null @@ -1,124 +0,0 @@ -// -// Sample application for ImageAttributes -// -// Author: -// Jordi Mas i Hernàndez, jordi@ximian.com -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; -using System.Drawing; -using System.Drawing.Drawing2D; -using System.Drawing.Imaging; - -// -public class SampleDrawingImage -{ - - /* DrawImageAbort callback method */ - static private bool DrawImageCallback(IntPtr callBackData) - { - Console.WriteLine("DrawImageCallback"); - return false; - } - - public static void Main(string[] args) - { - Graphics.DrawImageAbort imageCallback; - Bitmap outbmp = new Bitmap (600, 600); - Bitmap bmp = new Bitmap("../../Test/System.Drawing/bitmaps/almogaver32bits.bmp"); - Graphics dc = Graphics.FromImage (outbmp); - SolidBrush br = new SolidBrush(Color.White); - Bitmap img = bmp.Clone (new Rectangle (0,0, 60,60) , PixelFormat.Format32bppArgb); - - ImageAttributes imageAttr = new ImageAttributes(); - - Bitmap bmpred = new Bitmap (100,100, PixelFormat.Format32bppArgb); - Graphics gr = Graphics.FromImage (bmpred); - - /* Sample drawing*/ - Pen cyan = new Pen(Color.Cyan, 0); - Pen green = new Pen(Color.Green, 0); - Pen pink = new Pen(Color.Pink, 0); - Pen blue = new Pen(Color.Blue, 0); - gr.DrawLine(cyan, 10.0F, 10.0F, 90.0F, 90.0F); - gr.DrawLine(pink, 10.0F, 30.0F, 90.0F, 30.0F); - gr.DrawLine(green, 10.0F, 50.0F, 90.0F, 50.0F); - gr.DrawRectangle (blue, 10.0F, 10.0F, 80.0F, 80.0F); - - /* Draw image without any imageattributes*/ - dc.DrawImage (bmpred, 0,0); - dc.DrawString ("Sample drawing", new Font ("Arial", 8), br, 10, 100); - - /* Remmaping colours */ - ColorMap[] clr = new ColorMap[1]; - clr[0] = new ColorMap(); - clr[0].OldColor = Color.Blue; - clr[0].NewColor = Color.Yellow; - - imageAttr.SetRemapTable (clr, ColorAdjustType.Bitmap); - dc.DrawImage (bmpred, new Rectangle (100, 0, 100,100), 0,0, 100,100, GraphicsUnit.Pixel, imageAttr); - dc.DrawString ("Remapping colors", new Font ("Arial", 8), br, 110, 100); - - /* Gamma correction on*/ - imageAttr = new ImageAttributes(); - imageAttr.SetGamma (2); - dc.DrawImage (bmpred, new Rectangle (200, 0, 100,100), 0,0, - 100,100, GraphicsUnit.Pixel, imageAttr); - - dc.DrawString ("Gamma corrected", new Font ("Arial", 8), br, 210, 100); - - /* WrapMode: TitleX */ - imageAttr = new ImageAttributes(); - imageAttr.SetWrapMode (WrapMode.TileFlipX); - - dc.DrawImage (bmpred, new Rectangle (0, 120, 200, 200), 0,0, - 200, 200, GraphicsUnit.Pixel, imageAttr); - - dc.DrawString ("WrapMode.TileFlipX", new Font ("Arial", 8), br, 10, 320); - - /* WrapMode: TitleY */ - imageAttr.SetWrapMode (WrapMode.TileFlipY); - - dc.DrawImage (bmpred, new Rectangle (200, 120, 200, 200), 0,0, - 200, 200, GraphicsUnit.Pixel, imageAttr); - - dc.DrawString ("WrapMode.TileFlipY", new Font ("Arial", 8), br, 210, 320); - - /* WrapMode: TitleXY */ - imageAttr.SetWrapMode (WrapMode.TileFlipXY); - - dc.DrawImage (bmpred, new Rectangle (400, 120, 200, 200), 0,0, - 200, 200, GraphicsUnit.Pixel, imageAttr); - - dc.DrawString ("WrapMode.TileFlipXY", new Font ("Arial", 8), br, 410, 320); - - outbmp.Save("imageattributes.bmp", ImageFormat.Bmp); - - } - -} - - diff --git a/mcs/class/System.Drawing/Samples/System.Drawing.Imaging/ImageCodecs.cs b/mcs/class/System.Drawing/Samples/System.Drawing.Imaging/ImageCodecs.cs deleted file mode 100644 index e684cde85e1..00000000000 --- a/mcs/class/System.Drawing/Samples/System.Drawing.Imaging/ImageCodecs.cs +++ /dev/null @@ -1,74 +0,0 @@ -// -// Sample application for encoder/decoder -// -// Author: -// Jordi Mas i Hernàndez, jordi@ximian.com -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; -using System.Drawing; -using System.Drawing.Drawing2D; -using System.Drawing.Imaging; - -// -public class SampleImageCodecs -{ - public static void DumpCodeInfo (ImageCodecInfo codec) - { - Console.WriteLine ("Clsid:" + codec.Clsid); - Console.WriteLine ("FormatID:" + codec.FormatID); - Console.WriteLine ("Codec:" + codec.CodecName); - Console.WriteLine ("DllName:" + codec.DllName); - Console.WriteLine ("Extension:" + codec.FilenameExtension); - Console.WriteLine ("Format:" + codec.FormatDescription); - Console.WriteLine ("MimeType:" + codec.MimeType); - Console.WriteLine ("Flags:" + codec.Flags); - Console.WriteLine ("Version:" + codec.Version); - } - - public static void Main(string[] args) - { - ImageCodecInfo[] decoders = ImageCodecInfo.GetImageDecoders(); - ImageCodecInfo[] encoders = ImageCodecInfo.GetImageEncoders(); - - Console.WriteLine ("Encoders ********"); - - for (int i = 0; i < encoders.Length; i++) { - DumpCodeInfo (encoders[i]); - Console.WriteLine ("---"); - } - - Console.WriteLine ("Decoders ********"); - - for (int i = 0; i < decoders.Length; i++) { - DumpCodeInfo (decoders[i]); - Console.WriteLine ("---"); - } - } - -} - - diff --git a/mcs/class/System.Drawing/Samples/System.Drawing.Printing/ChangeLog b/mcs/class/System.Drawing/Samples/System.Drawing.Printing/ChangeLog deleted file mode 100644 index 19fbdba4934..00000000000 --- a/mcs/class/System.Drawing/Samples/System.Drawing.Printing/ChangeLog +++ /dev/null @@ -1,4 +0,0 @@ -2004-03-17 Ravindra - * Created this repository for samples for - System.Drawing.Printing namespace. - * ChangeLog: Added. diff --git a/mcs/class/System.Drawing/Samples/System.Drawing.Text/ChangeLog b/mcs/class/System.Drawing/Samples/System.Drawing.Text/ChangeLog deleted file mode 100644 index 927ceb18fc4..00000000000 --- a/mcs/class/System.Drawing/Samples/System.Drawing.Text/ChangeLog +++ /dev/null @@ -1,4 +0,0 @@ -2004-03-17 Ravindra - * Created this repository for samples for System.Drawing.Text - namespace. - * ChangeLog: Added. diff --git a/mcs/class/System.Drawing/Samples/System.Drawing/BmpPaint.cs b/mcs/class/System.Drawing/Samples/System.Drawing/BmpPaint.cs deleted file mode 100644 index 01b204173ca..00000000000 --- a/mcs/class/System.Drawing/Samples/System.Drawing/BmpPaint.cs +++ /dev/null @@ -1,91 +0,0 @@ -// -// BmpPaint.cs sample application -// -// Author: -// Alexandre Pigolkine(pigolkine@gmx.de) -// -// -// (C) Ximian, Inc. http://www.ximian.com -// -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; -using System.Drawing; -using System.Drawing.Imaging; - -namespace MonoSamples.System.Drawing -{ - public class BmpPaint - { - static public void CreateBitmap (string filename, ImageFormat imgFmt) { - Bitmap bmp = new Bitmap (100, 100, PixelFormat.Format24bppRgb); - Console.WriteLine ("Bitmap created OK {0}", bmp != null); - if ( bmp != null) { - Console.WriteLine ("Bitmap Pixelformat {0}", bmp.PixelFormat); - } - - Graphics gr = Graphics.FromImage (bmp); - Console.WriteLine ("Graphics created OK {0}", gr != null); - if (gr != null) { - Pen p = new Pen (Color.Red, 2); - gr.DrawLine (p, 10.0F, 10.0F, 90.0F, 90.0F); - gr.DrawRectangle (p, 10.0F, 10.0F, 80.0F, 80.0F); - p.Dispose (); - } - bmp.Save (filename, imgFmt); - gr.Dispose (); - bmp.Dispose (); - Console.WriteLine ("Bitmap stored to " + filename); - } - - static public void PaintOnBitmap (string filename, string newname, ImageFormat imgFmt) { - Bitmap bmp = new Bitmap (filename); - Console.WriteLine ("Bitmap read OK {0}", bmp != null); - if (bmp != null) { - Console.WriteLine ("Bitmap Pixelformat {0}", bmp.PixelFormat); - } - Graphics gr = Graphics.FromImage (bmp); - Console.WriteLine ("Graphics created OK {0}", gr != null); - if (gr != null) { - Pen p = new Pen (Color.Blue, 2); - gr.DrawLine (p, 20.0F, 20.0F, 80.0F, 80.0F); - gr.DrawRectangle (p, 20.0F, 20.0F, 60.0F, 60.0F); - p.Dispose (); - } - bmp.Save (newname, imgFmt); - gr.Dispose (); - bmp.Dispose (); - Console.WriteLine ("Modified Bitmap stored to " + newname); - } - - static public void Main (string[] args) { - CreateBitmap ("BmpPaint.bmp", ImageFormat.Bmp); - PaintOnBitmap ("BmpPaint.bmp", "Bmp-Painted.bmp", ImageFormat.Bmp); - CreateBitmap ("BmpPaint.jpg", ImageFormat.Jpeg); - PaintOnBitmap ("BmpPaint.jpg", "Bmp-Painted.jpg", ImageFormat.Jpeg); - CreateBitmap ("BmpPaint.png", ImageFormat.Png); - PaintOnBitmap ("BmpPaint.png", "Bmp-Painted.png", ImageFormat.Png); - } - } -} diff --git a/mcs/class/System.Drawing/Samples/System.Drawing/ChangeLog b/mcs/class/System.Drawing/Samples/System.Drawing/ChangeLog deleted file mode 100644 index 51087633428..00000000000 --- a/mcs/class/System.Drawing/Samples/System.Drawing/ChangeLog +++ /dev/null @@ -1,65 +0,0 @@ -2005-09-06 Jordi Mas - - * clipping: Sample to test clipping - -2004-06-17 Ravindra - - * BmpPaint.cs: Fixed, formatted and moved here from - Test/System.Drawing directory. - * font.cs: Formatted and moved here from Test/System.Drawing - directory. - * bmpsave.cs: Formatted and moved here from Test/System.Drawing - directory. - * graphicsUi.cs: Formatted and moved here from - Test/System.Drawing directory. - -2004-05-31 Ravindra - - * pie.cs: Made the output image little organized and added a - case where DrawPie and FillPie were crashing the system. It - was happening with zero degree sweep angle. - -2004-05-04 Ravindra - - * ImageRotateFlip.cs: Changed text color from white to - black and set the white background. - -2004-05-04 Jordi Mas - * ImageRotateFlip.cs: Added ImageRotateFlip.cs example. - -2004-04-24 Ravindra - - * pie.cs: Added a case to clear the graphics surface - and fill it with a background color. Fixing - Graphics.Clear(color) method. - -2004-04-07 Ravindra - * TextureWrapModes.cs: Use PNG, instead of BMP. - -2004-04-07 Duncan Mak - - * pie.cs: Added a case where the sweep angle is greater than 360 - degrees. - -2004-04-06 Duncan Mak - - * pie.cs: Save to PNG, instead of BMP. - -2004-03-26 Ravindra - * TextureWrapModes.cs: Changed the file format dos2unix and - adjusted the generated image size. - -2004-03-25 Ravindra - * bitmaps: Added a repository for the bitmaps required by some of - the samples of this repository. - * TextureWrapModes.cs: Added a sample for texture brush wrapmodes. - -2004-03-24 Jordi - * Added drawimage.cs example - -2004-03-22 Jordi - * Added pie.cs example - -2004-03-17 Ravindra - * Created this repository for samples for System.Drawing namespace. - * ChangeLog: Added. diff --git a/mcs/class/System.Drawing/Samples/System.Drawing/FontDrawing.cs b/mcs/class/System.Drawing/Samples/System.Drawing/FontDrawing.cs deleted file mode 100644 index 811d2615d52..00000000000 --- a/mcs/class/System.Drawing/Samples/System.Drawing/FontDrawing.cs +++ /dev/null @@ -1,148 +0,0 @@ -// -// -// Simple font handeling -// -// Author: -// Jordi Mas i Hernandez -// -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -using System; -using System.Drawing; -using System.Drawing.Text; -using System.Drawing.Imaging; - -namespace Font1Sample { - public class FontDrawing { - - public static void listFonts() - { - FontCollection ifc = new InstalledFontCollection(); - foreach( FontFamily ffm in ifc.Families) { - try - { - Font f = new Font(ffm.Name,12); - Console.WriteLine("Family Name:" + ffm.Name + "," + f.Name); - } - catch (Exception ex) {} - } - } - - public static void checkFontProperties() - { - Font f = new Font("Arial",12); - Console.WriteLine("Font:" + f.Name + " size:" + f.Size); - - f = new Font("Verdana", 12); - Console.WriteLine("Font:" + f.Name + " size:" + f.Size); - - f = new Font("Courier New", 12); - Console.WriteLine("Font:" + f.Name + " size:" + f.Size); - - } - - public static void Main( ) - { - Console.WriteLine("Fonts--------------------"); - listFonts(); - - Console.WriteLine("Propierties--------------------"); - checkFontProperties(); - - Console.WriteLine("Draw--------------------"); - float width = 800.0F; - float height = 650.0F; - string str = ""; - - Font f1 = new Font("Arial",12); - Font f2 = new Font("Verdana", 12, FontStyle.Bold); - Font f3 = new Font("Courier New", 12, FontStyle.Italic); - - Font f4 = new Font(FontFamily.GenericSansSerif, 19, FontStyle.Regular, GraphicsUnit.Millimeter); - Console.WriteLine("Font:" + f4.Name + " size:" + f4.Size + "Points: " + f4.SizeInPoints); - - Font f5 = new Font(FontFamily.GenericSerif, 15, FontStyle.Regular, GraphicsUnit.Point); - Console.WriteLine("Font:" + f5.Name + " size:" + f5.Size + "Points: " + f5.SizeInPoints); - - Font f6 = new Font("Arial", 40, FontStyle.Regular, GraphicsUnit.Pixel); - Console.WriteLine("Font:" + f6.Name + " size:" + f6.Size + "Points: " + f6.SizeInPoints); - - Font f7 = new Font("Courier New", 19, FontStyle.Regular, GraphicsUnit.World); - Console.WriteLine("Font:" + f7.Name + " size:" + f7.Size + "Points: " + f7.SizeInPoints); - - Font f8 = new Font("Courier New", 19, FontStyle.Bold | FontStyle.Underline, GraphicsUnit.World); - Console.WriteLine("Font:" + f8.Name + " size:" + f8.Size + "Points: " + f8.SizeInPoints); - - Font f9 = new Font("Courier New", 19, FontStyle.Bold | FontStyle.Underline| FontStyle.Italic, GraphicsUnit.World); - Console.WriteLine("Font:" + f9.Name + " size:" + f9.Size + "Points: " + f9.SizeInPoints); - - Font f10 = new Font(FontFamily.GenericSansSerif, 14, FontStyle.Strikeout, GraphicsUnit.Millimeter); - Console.WriteLine("Font:" + f10.Name + " size:" + f10.Size + "Points: " + f10.SizeInPoints); - - - Bitmap bmp = new Bitmap((int)width, (int)height); - Graphics gr = Graphics.FromImage(bmp); - SolidBrush br = new SolidBrush(Color.White); - SolidBrush colorRed = new SolidBrush(Color.Red); - - gr.FillRectangle(br, 0.0F, 0.0F, width, height); - - br = new SolidBrush(Color.Black); - - str = "This an " + f1.Name + " test string size: "+ f1.Height; - gr.DrawString (str, f1, br, 10, 10); - - str = "This a " + f2.Name + " bold test string size: "+ f2.Height; - gr.DrawString( str, f2, colorRed, 10, 50); - - str = "This a " + f3.Name + " italic test string size: "+ f3.Height; - gr.DrawString( str, f3, br, 10, 100); - - str = "This an " + f4.Name + " test string size: "+ f4.Height; - gr.DrawString (str, f4, br, 10, 150); - - str = "This a " + f5.Name + " test string size: "+ f5.Height; - gr.DrawString( str, f5, colorRed, 10, 250); - - str = "This a " + f6.Name + " test string size: "+ f6.Height; - gr.DrawString( str, f6, br, new Rectangle(10,300,0,0)); - - str = "This a " + f7.Name + " test string size: "+ f7.Height; - gr.DrawString( str, f7, br, 10,350); - - str = "This a " + f8.Name + " test (Underline/Bold) string size: "+ f8.Height; - gr.DrawString( str, f8, br, 10,400); - - str = "This a " + f9.Name + " test (Underline/Bold/Italic) string size: "+ f9.Height; - gr.DrawString( str, f9, br, 10,450); - - str = "This a " + f10.Name + " test (Strikeout) string size: "+ f10.Height; - gr.DrawString( str, f10, br, 10,500); - - - bmp.Save("FontDrawing.bmp", ImageFormat.Bmp); - } - } -} diff --git a/mcs/class/System.Drawing/Samples/System.Drawing/FontDrawingAdv.cs b/mcs/class/System.Drawing/Samples/System.Drawing/FontDrawingAdv.cs deleted file mode 100644 index 05e3e7e489b..00000000000 --- a/mcs/class/System.Drawing/Samples/System.Drawing/FontDrawingAdv.cs +++ /dev/null @@ -1,359 +0,0 @@ -// -// -// Advanced text drawing and formatting sample -// -// Author: -// Jordi Mas i Hernandez -// -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -using System; -using System.Drawing; -using System.Drawing.Text; -using System.Drawing.Imaging; - -namespace Font1Sample { - public class FontDrawing { - - static string flagProcessing(StringFormat format) - { - string str = ""; - - switch (format.Alignment) { - case StringAlignment.Far: - str = "halign: Far - "; - break; - case StringAlignment.Near: - str = "halign: Near - "; - break; - case StringAlignment.Center: - str = "halign: Center - "; - break; - default: - break; - } - - switch (format.LineAlignment) { - case StringAlignment.Far: - str += "valign: Far - "; - break; - case StringAlignment.Near: - str += "valign: Near - "; - break; - case StringAlignment.Center: - str += "valign: Center - "; - break; - default: - break; - } - - switch (format.Trimming) { - case StringTrimming.Character: - str += "trimm: Char - "; - break; - case StringTrimming.EllipsisCharacter: - str += "trimm: EllipsisChar - "; - break; - case StringTrimming.EllipsisPath: - str += "trimm: EllipsisPath - "; - break; - case StringTrimming.EllipsisWord: - str += "trimm: EllipsisWord - "; - break; - case StringTrimming.None: - str += "trimm: None - "; - break; - case StringTrimming.Word: - str += "trimm: Word - "; - break; - default: - break; - } - - switch (format.FormatFlags) { - case StringFormatFlags.NoWrap: - str+="fmt: NoWrap"; - break; - case StringFormatFlags.DirectionVertical: - str+="fmt: DirVer "; - break; - case StringFormatFlags.DirectionRightToLeft: - str+="fmt: rtl "; - break; - - default: - break; - } - - return str; - } - - static Rectangle calcRect(Rectangle rect) - { - return new Rectangle (rect.X, rect.Y+rect.Height+10, rect.Width,200); - } - - public static void Main( ) - { - float width = 750.0F; - float height = 1000.0F; - string str; - int chars = 0; - int lines = 0; - SizeF sz; - - Font f1 = new Font("Arial",12); - Font f2 = new Font("Verdana", 8); - Font f3 = new Font("Courier New", 14); - Font f4 = new Font(FontFamily.GenericSansSerif, 14); - Font f5 = new Font(FontFamily.GenericMonospace, 14); - Font f6 = new Font(FontFamily.GenericSerif, 16); - Font fonttxt= new Font("Verdana", 8); - SolidBrush brushtxt = new SolidBrush(Color.Pink); - - StringFormat strfmt1 = new StringFormat(); - StringFormat strfmt2 = new StringFormat(); - StringFormat strfmt3 = new StringFormat(); - StringFormat strfmt4 = new StringFormat(); - StringFormat strfmt5 = new StringFormat(); - StringFormat strfmt6 = new StringFormat(); - StringFormat strfmttxt = new StringFormat(); - - Bitmap bmp = new Bitmap((int)width, (int)height); - Graphics gr = Graphics.FromImage(bmp); - SolidBrush br = new SolidBrush(Color.White); - SolidBrush colorRed = new SolidBrush(Color.Red); - - strfmttxt.Alignment = StringAlignment.Near; - strfmttxt.LineAlignment = StringAlignment.Near; - strfmttxt.Trimming = StringTrimming.Character; - - strfmt1.Alignment = StringAlignment.Center; - strfmt1.LineAlignment = StringAlignment.Near; - strfmt1.Trimming = StringTrimming.Character; - strfmt1.HotkeyPrefix = HotkeyPrefix.Show; - - strfmt2.Alignment = StringAlignment.Far; - strfmt2.LineAlignment = StringAlignment.Center; - strfmt2.Trimming = StringTrimming.Character; - - strfmt3.Alignment = StringAlignment.Far; - strfmt3.LineAlignment = StringAlignment.Near; - strfmt3.Trimming = StringTrimming.None; - - strfmt4.Alignment = StringAlignment.Far; - strfmt4.LineAlignment = StringAlignment.Far; - strfmt4.Trimming = StringTrimming.EllipsisCharacter; - - strfmt5.Alignment = StringAlignment.Far; - strfmt5.LineAlignment = StringAlignment.Near; - strfmt5.Trimming = StringTrimming.None; - strfmt5.FormatFlags = StringFormatFlags.DirectionVertical; - - strfmt6.Alignment = StringAlignment.Far; - strfmt6.LineAlignment = StringAlignment.Far; - strfmt6.Trimming = StringTrimming.EllipsisCharacter; - strfmt6.FormatFlags = StringFormatFlags.NoWrap; - - Rectangle rect1 = new Rectangle (10,50,100,150); - Rectangle rect2 = new Rectangle (10,300,150,150); - - Rectangle rect3 = new Rectangle (200,50,175,175); - Rectangle rect4 = new Rectangle (200,300,150,150); - - Rectangle rect5 = new Rectangle (400,50,175,175); - Rectangle rect6 = new Rectangle (400,300,150,150); - Rectangle rect7 = new Rectangle (550,300, 140,120); - - gr.DrawRectangle( new Pen(Color.Yellow), rect3); - gr.DrawRectangle( new Pen(Color.Blue), rect4); - - gr.DrawRectangle( new Pen(Color.Yellow), rect5); - gr.DrawRectangle( new Pen(Color.Blue), rect6); - - SolidBrush solid = new SolidBrush(Color.Blue); - - gr.DrawString("Samples of text with different fonts and formatting", - new Font("Verdana",16), new SolidBrush(Color.White), new Rectangle (5,5,600,100), strfmttxt); - - - gr.FillEllipse(solid, rect1); - - gr.DrawRectangle( new Pen(Color.Green), rect2); - gr.DrawRectangle( new Pen(Color.Green), rect7); - - str = "Ara que tinc &vint anys, ara que encara tinc força,que no tinc l'ànima morta, i em sento bullir la sang. (" + f1.Name + ")"; - gr.DrawString( str, f1, new SolidBrush(Color.White), rect1, strfmt1); - gr.DrawString(flagProcessing(strfmt1), fonttxt, brushtxt, calcRect(rect1), strfmttxt); - sz = gr.MeasureString (str, f1, new SizeF (rect1.Width, rect1.Height), strfmt1, out chars, out lines); - Console.WriteLine("MeasureString str1 [" + str + "] " + sz + ";chars:" + chars + " lines:" + lines); - - str = "Ara que em sento capaç de cantar si un altre canta. Avui que encara tinc veu i encara puc creure en déus (" + f2.Name + ")"; - gr.DrawString(str, f2, new SolidBrush(Color.Red),rect2, strfmt2); - gr.DrawString(flagProcessing(strfmt2), fonttxt, brushtxt, calcRect(rect2), strfmttxt); - sz = gr.MeasureString (str, f2, new SizeF (rect2.Width, rect2.Height), strfmt2, out chars, out lines); - Console.WriteLine("MeasureString str2 [" + str + "] " + sz + ";chars:" + chars + " lines:" + lines); - - str = "Vull cantar a les pedres, la terra, l'aigua, al blat i al camí, que vaig trepitjant. (" + f3.Name + ")"; - gr.DrawString(str,f3, new SolidBrush(Color.White), rect3, strfmt3); - gr.DrawString(flagProcessing(strfmt3), fonttxt, brushtxt, calcRect(rect3), strfmttxt); - sz = gr.MeasureString (str, f3, new SizeF (rect3.Width, rect3.Height), strfmt3, out chars, out lines); - Console.WriteLine("MeasureString str3 [" + str + "] " + sz + ";chars:" + chars + " lines:" + lines); - - str = "A la nit, al cel i a aquet mar tan nostre i al vent que al matí ve a besar-me el rostre (" + f4.Name + ")"; - gr.DrawString(str, f4, new SolidBrush(Color.Red),rect4, strfmt4); - gr.DrawString(flagProcessing(strfmt4), fonttxt, brushtxt, calcRect(rect4), strfmttxt); - sz = gr.MeasureString (str, f4, new SizeF (rect4.Width, rect4.Height), strfmt4, out chars, out lines); - Console.WriteLine("MeasureString str4 [" + str + "] " + sz + ";chars:" + chars + " lines:" + lines); - - str = "Vull cantar a les pedres, la terra, l'aigua, al blat i al camí, que vaig trepitjant. (" + f5.Name + ")"; - gr.DrawString(str, f5, new SolidBrush(Color.White), rect5, strfmt5); - gr.DrawString(flagProcessing(strfmt5), fonttxt, brushtxt, calcRect(rect5), strfmttxt); - sz = gr.MeasureString (str, f5, new SizeF (rect5.Width, rect5.Height), strfmt5, out chars, out lines); - Console.WriteLine("MeasureString str4 [" + str + "] " + sz + ";chars:" + chars + " lines:" + lines); - - str = "Ve a besar-me el rostre (" + f6.Name + ")"; - gr.DrawString(str, f6, new SolidBrush(Color.Red),rect6, strfmt6); - gr.DrawString(flagProcessing(strfmt6), fonttxt, brushtxt, calcRect(rect6), strfmttxt); - sz = gr.MeasureString (str, f6, new SizeF (rect6.Width, rect6.Height), strfmt6, out chars, out lines); - Console.WriteLine("MeasureString str6 [" + str + "] " + sz + ";chars:" + chars + " lines:" + lines); - - str = "Vull plorar amb aquells que es troben tots sols, sense cap amor van passant pel món.. (" + f5.Name + ")"; - gr.DrawString(str, f5, new SolidBrush(Color.White), rect7, strfmt4); - gr.DrawString(flagProcessing(strfmt4), fonttxt, brushtxt, calcRect(rect7), strfmttxt); - sz = gr.MeasureString (str, f5, new SizeF (rect7.Width, rect7.Height), strfmt5, out chars, out lines); - Console.WriteLine("MeasureString str7 [" + str + "] " + sz + ";chars:" + chars + " lines:" + lines); - - /* 3rd row */ - - Font f8 = new Font("Verdana", 10); - Font f9 = new Font("Verdana", 6); - Font f10 = new Font("Verdana", 12); - Font f11 = new Font("Verdana", 14); - - Rectangle rect8 = new Rectangle (10, 550,100,100); - Rectangle rect9 = new Rectangle (150,550, 100,100); - Rectangle rect10 = new Rectangle (300,550, 100,100); - Rectangle rect11 = new Rectangle (420,550, 100,100); - Rectangle rect12 = new Rectangle (530,550, 200,100); - Rectangle rect13 = new Rectangle (530,600, 200,100); - Rectangle rect14 = new Rectangle (530,650, 200,100); - - gr.DrawRectangle( new Pen(Color.Yellow), rect8); - gr.DrawRectangle( new Pen(Color.Yellow), rect9); - gr.DrawRectangle( new Pen(Color.Yellow), rect10); - - StringFormat strfmt8 = new StringFormat(); - strfmt8.Alignment = StringAlignment.Center; - strfmt8.LineAlignment = StringAlignment.Near; - strfmt8.Trimming = StringTrimming.EllipsisCharacter; - strfmt8.HotkeyPrefix = HotkeyPrefix.Show; - - StringFormat strfmt9 = new StringFormat(); - strfmt9.Alignment = StringAlignment.Center; - strfmt9.LineAlignment = StringAlignment.Center; - strfmt9.Trimming = StringTrimming.EllipsisCharacter; - strfmt9.HotkeyPrefix = HotkeyPrefix.None; - - StringFormat strfmt10 = new StringFormat(); - strfmt10.Alignment = StringAlignment.Center; - strfmt10.LineAlignment = StringAlignment.Near; - strfmt10.Trimming = StringTrimming.Word; - strfmt10.HotkeyPrefix = HotkeyPrefix.Show; - - StringFormat strfmt11 = new StringFormat(); - strfmt11.Alignment = StringAlignment.Center; - strfmt11.LineAlignment = StringAlignment.Near; - strfmt11.Trimming = StringTrimming.Word; - strfmt11.HotkeyPrefix = HotkeyPrefix.Show; - strfmt11.FormatFlags = StringFormatFlags.DirectionRightToLeft; - - StringFormat strfmt12 = new StringFormat(); - float[] tabs = {10, 20, 30}; - strfmt12.Alignment = StringAlignment.Center; - strfmt12.LineAlignment = StringAlignment.Near; - strfmt12.Trimming = StringTrimming.Word; - strfmt12.HotkeyPrefix = HotkeyPrefix.Show; - strfmt12.SetTabStops(20, tabs); - - StringFormat strfmt13 = new StringFormat(); - float[] tabs2 = {5, 50, 60}; - strfmt13.Alignment = StringAlignment.Center; - strfmt13.LineAlignment = StringAlignment.Near; - strfmt13.Trimming = StringTrimming.Word; - strfmt13.HotkeyPrefix = HotkeyPrefix.Show; - strfmt13.SetTabStops(0, tabs2); - - StringFormat strfmt14 = new StringFormat(); - strfmt14.Alignment = StringAlignment.Center; - strfmt14.LineAlignment = StringAlignment.Near; - strfmt14.Trimming = StringTrimming.Word; - strfmt14.HotkeyPrefix = HotkeyPrefix.Show; - strfmt14.FormatFlags = StringFormatFlags.DirectionRightToLeft; - - str = "Vull alçar la veu,per cantar als homes que han nascut dempeus (" + f8.Name + ")"; - gr.DrawString(str, f8, new SolidBrush(Color.White), rect8, strfmt8); - gr.DrawString(flagProcessing(strfmt8), fonttxt, brushtxt, calcRect(rect8), strfmttxt); - sz = gr.MeasureString (str, f8, new SizeF (rect8.Width, rect8.Height), strfmt8, out chars, out lines); - gr.DrawRectangle(new Pen(Color.Red), new Rectangle (rect8.X, rect8.Y, (int)sz.Width, (int)sz.Height)); - - str = "I no tinc l'ànima morta i em sento bollir la sang (" + f9.Name + ")"; - gr.DrawString(str, f9, new SolidBrush(Color.White), rect9, strfmt9); - gr.DrawString(flagProcessing(strfmt9), fonttxt, brushtxt, calcRect(rect9), strfmttxt); - sz = gr.MeasureString (str, f9, new SizeF (rect9.Width, rect9.Height), strfmt9, out chars, out lines); - gr.DrawRectangle(new Pen(Color.Red), new Rectangle (rect9.X, rect9.Y, (int)sz.Width, (int)sz.Height)); - - str = "I no tinc l'ànima morta i em sento bollir la sang (" + f10.Name + ")"; - gr.DrawString(str, f10, new SolidBrush(Color.White), rect10, strfmt10); - gr.DrawString(flagProcessing(strfmt10), fonttxt, brushtxt, calcRect(rect10), strfmttxt); - sz = gr.MeasureString (str, f10, new SizeF (rect10.Width, rect10.Height), strfmt10, out chars, out lines); - gr.DrawRectangle(new Pen(Color.Red), new Rectangle (rect10.X, rect10.Y, (int)sz.Width, (int)sz.Height)); - - str = "I no tinc l'ànima morta i em sento bollir la sang (" + f11.Name + ")"; - gr.DrawString(str, f11, new SolidBrush(Color.White), rect11, strfmt11); - gr.DrawString(flagProcessing(strfmt11), fonttxt, brushtxt, calcRect(rect11), strfmttxt); - sz = gr.MeasureString (str, f11, new SizeF (rect11.Width, rect11.Height), strfmt11, out chars, out lines); - gr.DrawRectangle(new Pen(Color.Red), new Rectangle (rect11.X, rect11.Y, (int)sz.Width, (int)sz.Height)); - - str = "Tab1\tTab2\tTab3"; - gr.DrawString(str, f8, new SolidBrush(Color.White), rect12, strfmt12); - sz = gr.MeasureString (str, f8, new SizeF (rect12.Width, rect12.Height), strfmt12, out chars, out lines); - gr.DrawRectangle(new Pen(Color.Red), new Rectangle (rect12.X, rect12.Y, (int)sz.Width, (int)sz.Height)); - - str = "Nom\tCognom\tAdreça"; - gr.DrawString(str, f8, new SolidBrush(Color.White), rect13, strfmt13); - sz = gr.MeasureString (str, f8, new SizeF (rect13.Width, rect13.Height), strfmt13, out chars, out lines); - gr.DrawRectangle(new Pen(Color.Red), new Rectangle (rect13.X, rect13.Y, (int)sz.Width, (int)sz.Height)); - - str = "Nom Cognom Adreça"; - gr.DrawString(str, f8, new SolidBrush(Color.White), rect14, strfmt14); - sz = gr.MeasureString (str, f8, new SizeF (rect14.Width, rect13.Height), strfmt14, out chars, out lines); - gr.DrawRectangle(new Pen(Color.Red), new Rectangle (rect14.X, rect14.Y, (int)sz.Width, (int)sz.Height)); - - bmp.Save("fontDrawingAdv.bmp", ImageFormat.Bmp); - - } - } -} diff --git a/mcs/class/System.Drawing/Samples/System.Drawing/ImageRotateFlip.cs b/mcs/class/System.Drawing/Samples/System.Drawing/ImageRotateFlip.cs deleted file mode 100644 index 3a42ef41146..00000000000 --- a/mcs/class/System.Drawing/Samples/System.Drawing/ImageRotateFlip.cs +++ /dev/null @@ -1,91 +0,0 @@ -// -// Image rotation / flip -// -// Author: -// Jordi Mas i Hernandez (jordi@ximian.com) -// -// (C) 2004 Ximian, Inc -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; -using System.Drawing; -using System.Drawing.Imaging; - -public class ImageRotateSample -{ - static Pen p = new Pen(Color.Red, 2); - static SolidBrush br = new SolidBrush(Color.Black); - - public static void CreateImage (RotateFlipType rotate, int movex, int movey, string text, Bitmap dest, Graphics grdest) - { - Color clr; - Bitmap bmp = new Bitmap (80, 80, PixelFormat.Format32bppArgb); - Graphics gr = Graphics.FromImage (bmp); - gr.Clear (Color.White); - - gr.DrawLine (p, 10.0F, 10.0F, 70.0F, 70.0F); - gr.DrawLine (p, 10.0F, 15.0F, 70.0F, 15.0F); - gr.DrawRectangle (p, 10.0F, 10.0F, 60.0F, 60.0F); - bmp.RotateFlip (rotate); - - for (int y = 0; y < 80; y++) { - for (int x = 0; x < 80; x++) { - clr = bmp.GetPixel (x,y); - dest.SetPixel (x+movex, y+movey, clr); - } - } - - grdest.DrawString (text, new Font ("Arial", 8), br, movex+5, movey+85); - } - - public static void Main(string[] argv) - { - - string filename = "output.bmp"; - Bitmap bmp = new Bitmap(800,800, PixelFormat.Format32bppArgb); - Console.WriteLine("Bitmap created OK {0}", bmp != null); - - Graphics gr = Graphics.FromImage(bmp); - gr.Clear (Color.White); - - CreateImage (RotateFlipType.RotateNoneFlipNone, 0, 0, "RotateNoneFlipNone", bmp, gr); - CreateImage (RotateFlipType.Rotate90FlipNone, 150, 0, "Rotate90FlipNone", bmp, gr); - CreateImage (RotateFlipType.Rotate180FlipNone, 300, 0, "Rotate180FlipNone", bmp, gr); - CreateImage (RotateFlipType.Rotate270FlipNone, 450, 0, "Rotate270FlipNone", bmp, gr); - - CreateImage (RotateFlipType.RotateNoneFlipX, 0, 120, "RotateNoneFlipX", bmp, gr); - CreateImage (RotateFlipType.Rotate90FlipX, 150, 120, "Rotate90FlipX", bmp, gr); - CreateImage (RotateFlipType.Rotate180FlipX, 300, 120, "Rotate180FlipX", bmp, gr); - CreateImage (RotateFlipType.Rotate270FlipX, 450, 120, "Rotate270FlipX", bmp, gr); - - bmp.Save(filename, ImageFormat.Bmp); - - Console.WriteLine("Bitmap stored to " + filename); - } -} - - - diff --git a/mcs/class/System.Drawing/Samples/System.Drawing/ImageStream.cs b/mcs/class/System.Drawing/Samples/System.Drawing/ImageStream.cs deleted file mode 100644 index 724c75d0acf..00000000000 --- a/mcs/class/System.Drawing/Samples/System.Drawing/ImageStream.cs +++ /dev/null @@ -1,53 +0,0 @@ -// -// Copyright (C) 2005 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// Jordi's simple test for streams (work on Win32 and Linux) -// - -using System; -using System.IO; -using System.Drawing; -using System.Drawing.Drawing2D; -using System.Drawing.Imaging; - -// -public class SampleDrawingImage -{ - - public static void Main (string[] args) - { - Stream stout, stin; - - stin = File.OpenRead ("bitmaps/horse.bmp"); - Bitmap bmp = new Bitmap (stin); - - // Draw a red rectangle - Graphics gr = Graphics.FromImage (bmp); - gr.DrawRectangle (new Pen (Color.Red, 2), 10.0F, 10.0F, 40.0F, 40.0F); - - stout = File.Open ("horse.jpg", FileMode.Create); - bmp.Save (stout, ImageFormat.Jpeg); - } - -} - - diff --git a/mcs/class/System.Drawing/Samples/System.Drawing/RegionsGraphicsPath.cs b/mcs/class/System.Drawing/Samples/System.Drawing/RegionsGraphicsPath.cs deleted file mode 100644 index 5c1d36a535f..00000000000 --- a/mcs/class/System.Drawing/Samples/System.Drawing/RegionsGraphicsPath.cs +++ /dev/null @@ -1,160 +0,0 @@ -// -// Sample application for region graphics functions using GraphicsPaths implementation -// -// Author: -// Jordi Mas i Hernandez, jordi@ximian.com -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; -using System.Drawing.Imaging; -using System.Drawing; -using System.Drawing.Drawing2D; - -// -public class Regions -{ - - public static void Main () - { - - Bitmap bmp = new Bitmap (600, 300); - Graphics dc = Graphics.FromImage (bmp); - Font fnt = new Font ("Arial", 8); - Font fnttitle = new Font ("Arial", 8, FontStyle.Underline); - Matrix matrix = new Matrix (); - GraphicsPath patha = new GraphicsPath (); - GraphicsPath pathb = new GraphicsPath (); - Pen redPen = new Pen (Color.Red, 2); - Region rgn1; - Region rgn2; - int x = 0; - - SolidBrush whiteBrush = new SolidBrush (Color.White); - - dc.DrawString ("Region samples using GraphicsPath", fnttitle, whiteBrush, 5, 5); - - /* First*/ - patha.AddLine (60, 40, 90, 90); - patha.AddLine (90, 90, 10, 90); - patha.AddLine (10, 90, 60, 40); - dc.DrawPath (redPen, patha); - - pathb.AddEllipse(30, 55, 60, 60); - dc.DrawPath(redPen, pathb); - - rgn1 = new Region (patha); - rgn2 = new Region (pathb); - rgn1.Complement (rgn2); - dc.FillRegion (Brushes.Blue, rgn1); - dc.DrawString ("Complement (" + rgn1.GetRegionScans (matrix).Length +")", fnt, whiteBrush, 10, 140); - dc.DrawRectangles (Pens.Yellow, rgn1.GetRegionScans (matrix)); - x += 110; - - /* Second*/ - patha.Reset (); - pathb.Reset (); - patha.AddLine (60+x, 40, 90+x, 90); - patha.AddLine (90+x, 90, 10+x, 90); - patha.AddLine (10+x, 90, 60+x, 40); - - dc.DrawPath (redPen, patha); - - pathb.AddEllipse (30+x, 55, 60, 60); - dc.DrawPath(redPen, pathb); - - rgn1 = new Region (patha); - rgn2 = new Region (pathb); - rgn1.Exclude (rgn2); - dc.FillRegion (Brushes.Blue, rgn1); - dc.DrawString ("Exclude (" + rgn1.GetRegionScans (matrix).Length +")", fnt, whiteBrush, 140, 140); - dc.DrawRectangles (Pens.Yellow, rgn1.GetRegionScans (matrix)); - x += 110; - - /* Third*/ - patha.Reset (); - pathb.Reset (); - patha.AddLine (60+x, 40, 90+x, 90); - patha.AddLine (90+x, 90, 10+x, 90); - patha.AddLine (10+x, 90, 60+x, 40); - - dc.DrawPath (redPen, patha); - - pathb.AddEllipse (30+x, 55, 60, 60); - dc.DrawPath (redPen, pathb); - - rgn1 = new Region (patha); - rgn2 = new Region (pathb); - rgn1.Intersect (rgn2); - dc.FillRegion (Brushes.Blue, rgn1); - dc.DrawString ("Intersect (" + rgn1.GetRegionScans (matrix).Length +")", fnt, whiteBrush, 270, 140); - dc.DrawRectangles (Pens.Yellow, rgn1.GetRegionScans (matrix)); - x += 110; - - /* Four*/ - patha.Reset (); - pathb.Reset (); - patha.AddLine (60+x, 40, 90+x, 90); - patha.AddLine (90+x, 90, 10+x, 90); - patha.AddLine (10+x, 90, 60+x, 40); - - dc.DrawPath (redPen, patha); - - pathb.AddEllipse (30+x, 55, 60, 60); - dc.DrawPath (redPen, pathb); - - rgn1 = new Region (patha); - rgn2 = new Region (pathb); - rgn1.Xor (rgn2); - dc.FillRegion(Brushes.Blue, rgn1); - dc.DrawString ("Xor (" + rgn1.GetRegionScans (matrix).Length +")", fnt, whiteBrush, 380, 140); - dc.DrawRectangles (Pens.Yellow, rgn1.GetRegionScans (matrix)); - x += 110; - - /* Fifth */ - patha.Reset (); - pathb.Reset (); - patha.AddLine (60+x, 40, 90+x, 90); - patha.AddLine (90+x, 90, 10+x, 90); - patha.AddLine (10+x, 90, 60+x, 40); - - dc.DrawPath (redPen, patha); - - pathb.AddEllipse (30+x, 55, 60, 60); - dc.DrawPath (redPen, pathb); - - rgn1 = new Region (patha); - rgn2 = new Region (pathb); - rgn1.Union (rgn2); - dc.FillRegion(Brushes.Blue, rgn1); - dc.DrawRectangles (Pens.Yellow, rgn1.GetRegionScans (matrix)); - dc.DrawString ("Union (" + rgn1.GetRegionScans (matrix).Length +")", fnt, whiteBrush, 490, 140); - - bmp.Save("regionsgp.bmp", ImageFormat.Bmp); - } - -} - - diff --git a/mcs/class/System.Drawing/Samples/System.Drawing/RegionsRectangle.cs b/mcs/class/System.Drawing/Samples/System.Drawing/RegionsRectangle.cs deleted file mode 100644 index 8998f74d4e3..00000000000 --- a/mcs/class/System.Drawing/Samples/System.Drawing/RegionsRectangle.cs +++ /dev/null @@ -1,428 +0,0 @@ -// -// Sample application for region graphics functions using Rects implementation -// -// Author: -// Jordi Mas, jordi@ximian.com -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; -using System.Drawing.Imaging; -using System.Drawing; -using System.Drawing.Drawing2D; - -// -public class Regions -{ - public static void DumpRegion (Region rgn) - { - Matrix matrix = new Matrix (); - RectangleF [] rects = rgn.GetRegionScans (matrix); - - for (int i = 0; i < rects.Length; i++) - Console.WriteLine ( rects[i]); - } - - public static void Main () - { - Bitmap bmp = new Bitmap (600, 800); - Graphics dc = Graphics.FromImage (bmp); - Font fnt = new Font ("Arial", 8); - Font fnttitle = new Font("Arial", 8, FontStyle.Underline); - Matrix matrix = new Matrix (); - int x = 0; - Rectangle rect1, rect2, rect3, rect4; - Region rgn1, rgn2, rgn3, rgn4; - - bool complement = true, exclude = true, union = true, xor = true, intersect = true; - - SolidBrush whiteBrush = new SolidBrush (Color.White); - - dc.DrawString ("Region samples using two Rectangle classes", fnttitle, whiteBrush, 5, 5); - - /* First */ - if (complement) { - rect1 = new Rectangle (20, 30, 60, 80); - rect2 = new Rectangle (50, 40, 60, 80); - rgn1 = new Region (rect1); - rgn2 = new Region (rect2); - dc.DrawRectangle (Pens.Green, rect1); - dc.DrawRectangle (Pens.Red, rect2); - rgn1.Complement (rgn2); - dc.FillRegion (Brushes.Blue, rgn1); - dc.DrawString ("Complement (" + rgn1.GetRegionScans (matrix).Length +")", fnt, whiteBrush, 10, 130); - dc.DrawRectangles (Pens.Yellow, rgn1.GetRegionScans (matrix)); - DumpRegion (rgn1); - } - - /* Second */ - if (exclude) { - rect3 = new Rectangle (130, 30, 60, 80); - rect4 = new Rectangle (170, 40, 60, 80); - rgn3 = new Region (rect3); - rgn4 = new Region (rect4); - dc.DrawRectangle (Pens.Green, rect3); - dc.DrawRectangle (Pens.Red, rect4); - rgn3.Exclude (rgn4); - dc.FillRegion (Brushes.Blue, rgn3); - dc.DrawString ("Exclude (" + rgn3.GetRegionScans (matrix).Length +")", fnt, whiteBrush, 130, 130); - dc.DrawRectangles (Pens.Yellow, rgn3.GetRegionScans (matrix)); - DumpRegion (rgn3); - } - - /* Third */ - if (intersect) { - - Rectangle rect5 = new Rectangle (260, 30, 60, 80); - Rectangle rect6 = new Rectangle (290, 40, 60, 80); - Region rgn5 = new Region (rect5); - Region rgn6 = new Region (rect6); - dc.DrawRectangle (Pens.Green, rect5); - dc.DrawRectangle (Pens.Red, rect6); - rgn5.Intersect (rgn6); - dc.FillRegion (Brushes.Blue, rgn5); - dc.DrawString ("Intersect (" + rgn5.GetRegionScans (matrix).Length +")", fnt, whiteBrush, 270, 130); - dc.DrawRectangles (Pens.Yellow, rgn5.GetRegionScans (matrix)); - DumpRegion (rgn5); - } - - /* Four */ - if (xor) { - Rectangle rect7 = new Rectangle (380, 30, 60, 80); - Rectangle rect8 = new Rectangle (410, 40, 60, 80); - Region rgn7 = new Region (rect7); - Region rgn8 = new Region (rect8); - dc.DrawRectangle (Pens.Green, rect7); - dc.DrawRectangle (Pens.Red, rect8); - rgn7.Xor (rgn8); - dc.FillRegion (Brushes.Blue, rgn7); - dc.DrawString ("Xor (" + rgn7.GetRegionScans (matrix).Length +")", fnt, whiteBrush, 400, 130); - dc.DrawRectangles (Pens.Yellow, rgn7.GetRegionScans (matrix)); - DumpRegion (rgn7); - } - - /* Fifht */ - if (union) { - Rectangle rect9 = new Rectangle (500, 30, 60, 80); - Rectangle rect10 = new Rectangle (520, 40, 60, 80); - Region rgn9 = new Region(rect9); - Region rgn10 = new Region(rect10); - dc.DrawRectangle (Pens.Green, rect9); - dc.DrawRectangle (Pens.Red, rect10); - rgn9.Union(rgn10); - dc.FillRegion (Brushes.Blue, rgn9); - dc.DrawString ("Union (" + rgn9.GetRegionScans (matrix).Length +")", fnt, whiteBrush, 530, 130); - dc.DrawRectangles (Pens.Yellow, rgn9.GetRegionScans (matrix)); - DumpRegion (rgn9); - } - - dc.DrawString ("Region samples using three Rectangle class", fnttitle, whiteBrush, 5, 155); - - /* First */ - x = 0; - - if (complement) { - rect1 = new Rectangle (20+x, 180, 40, 50); - rect2 = new Rectangle (50+x, 190, 40, 50); - rect3 = new Rectangle (70+x, 210, 30, 50); - rgn1 = new Region (rect1); - rgn2 = new Region (rect2); - rgn3 = new Region (rect3); - - dc.DrawRectangle (Pens.Green, rect1); - dc.DrawRectangle (Pens.Red, rect2); - dc.DrawEllipse (Pens.Red, rect3); - - rgn1.Complement (rgn2); - rgn1.Complement (rgn3); - dc.FillRegion (Brushes.Blue, rgn1); - dc.DrawString ("Complement (" + rgn1.GetRegionScans (matrix).Length +")", fnt, whiteBrush, 10, 275); - dc.DrawRectangles (Pens.Yellow, rgn1.GetRegionScans (matrix)); - DumpRegion (rgn1); - } - x += 110; - - /* Second */ - if (exclude) { - rect1 = new Rectangle (20+x, 180, 40, 50); - rect2 = new Rectangle (50+x, 190, 40, 50); - rect3 = new Rectangle (70+x, 210, 30, 50); - rgn1 = new Region (rect1); - rgn2 = new Region (rect2); - rgn3 = new Region (rect3); - - dc.DrawRectangle (Pens.Green, rect1); - dc.DrawRectangle (Pens.Red, rect2); - dc.DrawEllipse (Pens.Red, rect3); - - rgn1.Exclude (rgn2); - rgn1.Exclude (rgn3); - dc.FillRegion (Brushes.Blue, rgn1); - dc.DrawRectangles (Pens.Yellow, rgn1.GetRegionScans (matrix)); - dc.DrawString ("Exclude (" + rgn1.GetRegionScans (matrix).Length +")", fnt, whiteBrush, 130, 275); - DumpRegion (rgn1); - } - x += 110; - - /* Third */ - if (intersect) { - - rect1 = new Rectangle (20+x, 180, 40, 50); - rect2 = new Rectangle (50+x, 190, 40, 50); - rect3 = new Rectangle (70+x, 210, 30, 50); - rgn1 = new Region (rect1); - rgn2 = new Region (rect2); - rgn3 = new Region (rect3); - - dc.DrawRectangle (Pens.Green, rect1); - dc.DrawRectangle (Pens.Red, rect2); - dc.DrawEllipse (Pens.Red, rect3); - - rgn1.Union (rgn2); - rgn1.Intersect (rgn3); - dc.FillRegion (Brushes.Blue, rgn1); - dc.DrawRectangles (Pens.Yellow, rgn1.GetRegionScans (matrix)); - dc.DrawString ("Intersect (" + rgn1.GetRegionScans (matrix).Length +")", fnt, whiteBrush, 270, 275); - DumpRegion (rgn1); - - } - x += 110; - - /* Fourth */ - if (xor) { - rect1 = new Rectangle (20+x, 180, 40, 50); - rect2 = new Rectangle (50+x, 190, 40, 50); - rect3 = new Rectangle (70+x, 210, 30, 50); - rgn1 = new Region (rect1); - rgn2 = new Region (rect2); - rgn3 = new Region (rect3); - - dc.DrawRectangle (Pens.Green, rect1); - dc.DrawRectangle (Pens.Red, rect2); - dc.DrawEllipse (Pens.Red, rect3); - - rgn1.Union (rgn2); - rgn1.Xor (rgn3); - dc.FillRegion (Brushes.Blue, rgn1); - dc.DrawRectangles (Pens.Yellow, rgn1.GetRegionScans (matrix)); - dc.DrawString ("Xor (" + rgn1.GetRegionScans (matrix).Length +")", fnt, whiteBrush, 380, 275); - DumpRegion (rgn1); - } - x += 110; - - /* Fifth */ - if (union) { - rect1 = new Rectangle (20+x, 180, 40, 50); - rect2 = new Rectangle (50+x, 190, 40, 50); - rect3 = new Rectangle (70+x, 210, 30, 50); - rgn1 = new Region (rect1); - rgn2 = new Region (rect2); - rgn3 = new Region (rect3); - - dc.DrawRectangle (Pens.Green, rect1); - dc.DrawRectangle (Pens.Red, rect2); - dc.DrawEllipse (Pens.Red, rect3); - - rgn1.Union (rgn2); - rgn1.Union (rgn3); - dc.FillRegion (Brushes.Blue, rgn1); - dc.DrawString ("Union (" + rgn1.GetRegionScans (matrix).Length +")", fnt, whiteBrush, 500, 275); - dc.DrawRectangles (Pens.Yellow, rgn1.GetRegionScans (matrix)); - DumpRegion (rgn1); - } - x += 110; - - dc.DrawString ("Region samples using four Rectangle class", fnttitle, whiteBrush, 5, 300); - - /* First */ - x = 0; - - if (complement) { - rect1 = new Rectangle (20+x, 330, 40, 50); - rect2 = new Rectangle (50+x, 340, 40, 50); - rect3 = new Rectangle (70+x, 360, 30, 50); - rect4 = new Rectangle (80+x, 400, 30, 10); - rgn1 = new Region (rect1); - rgn2 = new Region (rect2); - rgn3 = new Region (rect3); - rgn4 = new Region (rect4); - - dc.DrawRectangle (Pens.Green, rect1); - dc.DrawRectangle (Pens.Red, rect2); - dc.DrawEllipse (Pens.Red, rect3); - dc.DrawRectangle (Pens.Red, rect4); - - rgn1.Complement (rgn2); - rgn1.Complement (rgn3); - rgn1.Complement (rgn4); - dc.FillRegion (Brushes.Blue, rgn1); - dc.DrawString ("Complement (" + rgn1.GetRegionScans (matrix).Length +")", fnt, whiteBrush, 10, 430); - dc.DrawRectangles (Pens.Yellow, rgn1.GetRegionScans (matrix)); - DumpRegion (rgn1); - } - x += 110; - - /* Second */ - if (exclude) { - rect1 = new Rectangle (20+x, 330, 40, 50); - rect2 = new Rectangle (50+x, 340, 40, 50); - rect3 = new Rectangle (70+x, 360, 30, 50); - rect4 = new Rectangle (80+x, 400, 30, 10); - rgn1 = new Region (rect1); - rgn2 = new Region (rect2); - rgn3 = new Region (rect3); - rgn4 = new Region (rect4); - - dc.DrawRectangle (Pens.Green, rect1); - dc.DrawRectangle (Pens.Red, rect2); - dc.DrawEllipse (Pens.Red, rect3); - dc.DrawRectangle (Pens.Red, rect4); - - rgn1.Union (rgn2); - rgn1.Union (rgn3); - rgn1.Exclude (rgn4); - dc.FillRegion (Brushes.Blue, rgn1); - dc.DrawRectangles (Pens.Yellow, rgn1.GetRegionScans (matrix)); - dc.DrawString ("Exclude (" + rgn1.GetRegionScans (matrix).Length +")", fnt, whiteBrush, 130, 430); - } - x += 110; - - /* Third */ - if (intersect) { - - rect1 = new Rectangle (20+x, 330, 40, 50); - rect2 = new Rectangle (50+x, 340, 40, 50); - rect3 = new Rectangle (70+x, 360, 30, 50); - rect4 = new Rectangle (80+x, 400, 30, 10); - rgn1 = new Region (rect1); - rgn2 = new Region (rect2); - rgn3 = new Region (rect3); - rgn4 = new Region (rect4); - - dc.DrawRectangle (Pens.Green, rect1); - dc.DrawRectangle (Pens.Red, rect2); - dc.DrawEllipse (Pens.Red, rect3); - dc.DrawRectangle (Pens.Red, rect4); - - rgn1.Union (rgn2); - rgn1.Union (rgn3); - rgn1.Intersect (rgn4); - dc.FillRegion (Brushes.Blue, rgn1); - dc.DrawRectangles (Pens.Yellow, rgn1.GetRegionScans (matrix)); - dc.DrawString ("Intersect (" + rgn1.GetRegionScans (matrix).Length +")", fnt, whiteBrush, 250, 430); - DumpRegion (rgn1); - } - x += 110; - - /* Fourth */ - if (xor) { - rect1 = new Rectangle (20+x, 330, 40, 50); - rect2 = new Rectangle (50+x, 340, 40, 50); - rect3 = new Rectangle (70+x, 360, 30, 50); - rect4 = new Rectangle (80+x, 400, 30, 10); - rgn1 = new Region (rect1); - rgn2 = new Region (rect2); - rgn3 = new Region (rect3); - rgn4 = new Region (rect4); - - dc.DrawRectangle (Pens.Green, rect1); - dc.DrawRectangle (Pens.Red, rect2); - dc.DrawEllipse (Pens.Red, rect3); - dc.DrawRectangle (Pens.Red, rect4); - - rgn1.Union (rgn2); - rgn3.Union (rgn4); - rgn1.Xor (rgn3); - - dc.FillRegion(Brushes.Blue, rgn1); - dc.DrawRectangles (Pens.Yellow, rgn1.GetRegionScans (matrix)); - dc.DrawString ("Xor (" + rgn1.GetRegionScans (matrix).Length +")", fnt, whiteBrush, 370, 430); - DumpRegion (rgn1); - } - x += 110; - - /* Fifth */ - if (union) { - rect1 = new Rectangle (20+x, 330, 40, 50); - rect2 = new Rectangle (50+x, 340, 40, 50); - rect3 = new Rectangle (70+x, 360, 30, 50); - rect4 = new Rectangle (80+x, 400, 30, 10); - rgn1 = new Region (rect1); - rgn2 = new Region (rect2); - rgn3 = new Region (rect3); - rgn4 = new Region (rect4); - - dc.DrawRectangle (Pens.Green, rect1); - dc.DrawRectangle (Pens.Red, rect2); - dc.DrawEllipse (Pens.Red, rect3); - dc.DrawRectangle (Pens.Red, rect4); - - rgn1.Union (rgn2); - rgn1.Union (rgn3); - rgn1.Union (rgn4); - dc.FillRegion (Brushes.Blue, rgn1); - dc.DrawString ("Union (" + rgn1.GetRegionScans (matrix).Length +")", fnt, whiteBrush, 490, 430); - dc.DrawRectangles (Pens.Yellow, rgn1.GetRegionScans (matrix)); - DumpRegion (rgn1); - } - x += 110; - - dc.DrawString ("Region samples using Regions with two Rectangles", fnttitle, whiteBrush, 5, 455); - - x = 0; - - if (complement) { - rect1 = new Rectangle (20+x, 330+150, 40, 50); - rect2 = new Rectangle (50+x, 340+150, 40, 50); - rect3 = new Rectangle (70+x, 360+150, 30, 50); - rect4 = new Rectangle (80+x, 400+150, 30, 10); - rgn1 = new Region (rect1); - rgn1.Union (rect2); - rgn2 = new Region (rect3); - rgn2.Union (rect4); - - dc.DrawRectangle (Pens.Red, rect1); - dc.DrawRectangle (Pens.Red, rect2); - dc.DrawRectangle (Pens.Green, rect3); - dc.DrawRectangle (Pens.Green, rect4); - - rgn1.Complement (rgn2); - dc.FillRegion (Brushes.Blue, rgn1); - dc.DrawString ("Complement (" + rgn1.GetRegionScans (matrix).Length +")", fnt, whiteBrush, 10, 430+150); - dc.DrawRectangles (Pens.Yellow, rgn1.GetRegionScans (matrix)); - DumpRegion (rgn1); - } - x += 110; - - rect1 = new Rectangle (1, 1, 4, 1); - dc.DrawRectangle (Pens.Pink, rect1); - - - bmp.Save("regionsrc.bmp", ImageFormat.Bmp); - } - -} - - diff --git a/mcs/class/System.Drawing/Samples/System.Drawing/TextureWrapModes.cs b/mcs/class/System.Drawing/Samples/System.Drawing/TextureWrapModes.cs deleted file mode 100644 index 8cb0bfa7271..00000000000 --- a/mcs/class/System.Drawing/Samples/System.Drawing/TextureWrapModes.cs +++ /dev/null @@ -1,121 +0,0 @@ -// -// Sample application for drawing figures using TextureBrush -// with different WrapModes -// -// Author: -// Ravindra (rkumar@novell.com) -// - -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; -using System.Drawing; -using System.Drawing.Drawing2D; -using System.Drawing.Imaging; - -namespace MonoSamples.System.Drawing -{ - public class TextureWrapModes - { - Image img; // To be used by brush - Graphics gr; // To be used for creating a new bitmap - Bitmap bmp; - int currentTop; - int spacing; - int left = 100; - int width = 450; - int height = 250; - - public TextureWrapModes (string imgName, int wd, int ht, int top, int sp) - { - currentTop = top; - spacing = sp; - bmp = new Bitmap (wd,ht); - gr = Graphics.FromImage (bmp); - img = Image.FromFile ("./bitmaps/" + imgName); - } - - public void DrawWrapModes () - { - int top = currentTop; - top += spacing; - TextureBrush tbr = new TextureBrush (img); - - // #1: Clamp - tbr.WrapMode = WrapMode.Clamp; - gr.FillRectangle (tbr, 0, 0, width, height); - top = top + height + spacing; - - tbr = new TextureBrush (img); - - // #2: Default - gr.FillRectangle (tbr, left, top, width, height); - top = top + height + spacing; - - // #3: Tile - tbr.WrapMode = WrapMode.Tile; - gr.FillRectangle (tbr, left, top, width, height); - top = top + height + spacing; - - // #4: TileFlipX - tbr.WrapMode = WrapMode.TileFlipX; - gr.FillRectangle (tbr, left, top, width, height); - top = top + height + spacing; - - // #5: TileFlipY - tbr.WrapMode = WrapMode.TileFlipY; - gr.FillRectangle (tbr, left, top, width, height); - top = top + height + spacing; - - // #6: TileFlipXY - tbr.WrapMode = WrapMode.TileFlipXY; - gr.FillRectangle (tbr, left, top, width, height); - top = top + height + spacing; - - currentTop = top; - } - - public void SaveDrawing () - { - // save the bmp - bmp.Save ("TextureWrapModes.png", ImageFormat.Png); - } - - // Main to draw the things - public static void Main () - { - // Make sure that the image dimensions are - // sufficient to hold all the test results. - // TextureWrapModes (imgName, width, height, top, spacing) - - TextureWrapModes twm = new TextureWrapModes ("horse.png", 650, - 1850, 0, 50); - - // Draw different wrapmodes - twm.DrawWrapModes (); - - // Save the drawing when done - twm.SaveDrawing (); - } - } -} diff --git a/mcs/class/System.Drawing/Samples/System.Drawing/bitmaps/ChangeLog b/mcs/class/System.Drawing/Samples/System.Drawing/bitmaps/ChangeLog deleted file mode 100644 index 239045ecb7d..00000000000 --- a/mcs/class/System.Drawing/Samples/System.Drawing/bitmaps/ChangeLog +++ /dev/null @@ -1,5 +0,0 @@ -2004-03-25 Ravindra - * Created this repository for input images for samples for - System.Drawing namespace. - * ChangeLog: Added. - * horse.bmp: Added for TextureWrapModes.cs sample. diff --git a/mcs/class/System.Drawing/Samples/System.Drawing/bitmaps/horse.bmp b/mcs/class/System.Drawing/Samples/System.Drawing/bitmaps/horse.bmp deleted file mode 100644 index 95f35d32b306af9b698337c5380ba8fbaf5fb22c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 17526 zcmXWCWsqf8lIPj;d2K%I*v>S}PS;kc3smA{4(7+q%>3dpGcz*;Gc!jdM52-zq|8*N zxT=)mQmORzMs=t8yLQ7eEaK;W{J8&*-y4l!b@M;{N z`ltH;`u~4?@n4rN`tLhPuXoblfb!l&$qu4aN3i;1Xxp(y{p-z+w;+iVu=ELRt{$6h zM5j71X$U;p2@17CBVb4v3<`F^V^DGdPskt%2`D)RXC=_=7={%<(mXJd6+|+()2&Th zPbkue%3?4rT@}Gc4nn0n(c7J1Mq_sWR((G^Qh;%?= zAZWM)5$Pf(5X>Zom&Ed7ScVTybs=eP1k2sQ3wCm&Ad;^c<)|b3TWHQxQ285eg5QJW z`#U6uz~aL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i<4f9k7bUK zZk3aJpP7lPp^~(zimjiDuAY^-sGh~In!>4*yr7c2os+(uoXMzm5{uZiLr=) psD6H?e0rsNe5rnSrg(Iyd3djYez%H)zLJZ?osrF@lhC99000Dkf(ift diff --git a/mcs/class/System.Drawing/Samples/System.Drawing/bmpsave.cs b/mcs/class/System.Drawing/Samples/System.Drawing/bmpsave.cs deleted file mode 100644 index 122167cfc22..00000000000 --- a/mcs/class/System.Drawing/Samples/System.Drawing/bmpsave.cs +++ /dev/null @@ -1,50 +0,0 @@ -// -// bmpsave.cs sample -// -// Author: -// Alexandre Pigolkine(pigolkine@gmx.de) -// -// Copyright (C) Ximian, Inc. http://www.ximian.com -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; -using System.Drawing; -using System.Drawing.Imaging; - -namespace MonoSamples.System.Drawing -{ - public class BmpSave - { - public static void Main (string[] argv) { - if (argv.Length == 1) { - Bitmap bmp = new Bitmap (argv[0]); - Console.WriteLine ("Output file bmpsave.bmp"); - bmp.Save ("bmpsave.bmp", ImageFormat.Bmp); - } - else { - Console.WriteLine ("usage: bmpsave.exe "); - } - } - } -} diff --git a/mcs/class/System.Drawing/Samples/System.Drawing/clip.cs b/mcs/class/System.Drawing/Samples/System.Drawing/clip.cs deleted file mode 100644 index 3dc94e0c673..00000000000 --- a/mcs/class/System.Drawing/Samples/System.Drawing/clip.cs +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// Autor Jordi Mas -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; -using System.Drawing.Imaging; -using System.Drawing; -using System.Drawing.Drawing2D; - -// -public class ClipSample -{ - public static void Main () - { - Bitmap bmp = new Bitmap (600, 500); - Graphics dc = Graphics.FromImage (bmp); - RectangleF[] rects = dc.Clip.GetRegionScans (new Matrix()); - - for (int i = 0; i < rects.GetLength(0); i++) - Console.WriteLine ("clip: " + rects[i].ToString()); - - Console.WriteLine ("VisibleClipBounds: " + dc.VisibleClipBounds); - Console.WriteLine ("IsVisible Point 650, 650: " + dc.IsVisible (650,650)); - Console.WriteLine ("IsVisible Point 0, 0: " + dc.IsVisible (0.0f, 0.0f)); - - Console.WriteLine ("IsVisible Rectangle (20,20,100,100): " + dc.IsVisible (new Rectangle (20,20,100,100))); - Console.WriteLine ("IsVisible Rectangle (1000, 1000,100,100): " + dc.IsVisible (new RectangleF (1000, 1000,100,100))); - - } - -} - - diff --git a/mcs/class/System.Drawing/Samples/System.Drawing/clipping.cs b/mcs/class/System.Drawing/Samples/System.Drawing/clipping.cs deleted file mode 100644 index e7541cceda8..00000000000 --- a/mcs/class/System.Drawing/Samples/System.Drawing/clipping.cs +++ /dev/null @@ -1,103 +0,0 @@ -// -// Author: -// Jordi Mas i Hernandez -// -// Sample to test clipping. Requires SWF. -// -// Copyright (C) 2005 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System.Windows.Forms; -using System.Drawing; -using System; - -namespace MyFormProject -{ - - - class MainForm : System.Windows.Forms.Form - { - class ourLabelTwoAreas : Label - { - public ourLabelTwoAreas () - { - - } - protected override void OnPaint (PaintEventArgs pevent) - { - Console.WriteLine ("ourLabelTwoAreas pevents {0}, pos {1} - size {2}", pevent.ClipRectangle, - Location, Size); - - Region reg = new Region (new Rectangle (20, 20, 10, 10)); - reg.Union (new Rectangle (5, 5, 10, 10)); - pevent.Graphics.Clip = reg; - pevent.Graphics.FillRectangle (Brushes.Red, pevent.ClipRectangle); - } - } - - class ourLabelOverflows : Label - { - public ourLabelOverflows () - { - - } - protected override void OnPaint (PaintEventArgs pevent) - { - Console.WriteLine ("ourLabelOverflows pevents {0}, pos {1} - size {2}", pevent.ClipRectangle, - Location, Size); - - pevent.Graphics.FillRectangle (Brushes.Yellow, - new Rectangle (0,0, 1000, 1000)); - } - } - - protected override void OnPaint (PaintEventArgs pevent) - { - pevent.Graphics.FillRectangle (Brushes.Green, pevent.ClipRectangle); - } - - static private ourLabelTwoAreas label = new ourLabelTwoAreas (); - static private ourLabelOverflows label2 = new ourLabelOverflows (); - - public MainForm () - { - label.Location = new Point (20, 20); - label.Size = new Size (50, 80); - label.Text = "Hola"; - Controls.Add (label); - - label2.Location = new Point (100, 100); - label2.Size = new Size (50, 80); - label2.Text = "Hola"; - Controls.Add (label2); - - ClientSize = new Size (400, 400); - } - - public static void Main(string[] args) - { - Application.Run (new MainForm ()); - } - } - -} - diff --git a/mcs/class/System.Drawing/Samples/System.Drawing/drawimage.cs b/mcs/class/System.Drawing/Samples/System.Drawing/drawimage.cs deleted file mode 100644 index e5fee691777..00000000000 --- a/mcs/class/System.Drawing/Samples/System.Drawing/drawimage.cs +++ /dev/null @@ -1,82 +0,0 @@ -// -// Sample application for drawing image implementation -// -// Author: -// Jordi Mas i Hernàndez, jordi@ximian.com -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; -using System.Drawing; -using System.Drawing.Drawing2D; -using System.Drawing.Imaging; - -// -public class SampleDrawingImage -{ - - /* DrawImageAbort callback method */ - static private bool DrawImageCallback(IntPtr callBackData) - { - Console.WriteLine("DrawImageCallback"); - return false; - } - - public static void Main(string[] args) - { - Graphics.DrawImageAbort imageCallback; - Bitmap outbmp = new Bitmap (300, 300); - Bitmap bmp = new Bitmap("../../Test/System.Drawing/bitmaps/almogaver24bits.bmp"); - Graphics dc = Graphics.FromImage (outbmp); - - ImageAttributes imageAttr = new ImageAttributes(); - - /* Simple image drawing */ - dc.DrawImage(bmp, 0,0); - - /* Drawing using points */ - PointF ulCorner = new PointF(150.0F, 0.0F); - PointF urCorner = new PointF(350.0F, 0.0F); - PointF llCorner = new PointF(200.0F, 150.0F); - RectangleF srcRect = new Rectangle (0,0,100,100); - PointF[] destPara = {ulCorner, urCorner, llCorner}; - imageCallback = new Graphics.DrawImageAbort(DrawImageCallback); - dc.DrawImage (bmp, destPara, srcRect, GraphicsUnit.Pixel, imageAttr, imageCallback); - - /* Using rectangles */ - RectangleF destRect = new Rectangle (10,200,100,100); - RectangleF srcRect2 = new Rectangle (50,50,100,100); - dc.DrawImage (bmp, destRect, srcRect2, GraphicsUnit.Pixel); - - /* Simple image drawing with with scaling*/ - dc.DrawImage(bmp, 200,200, 75, 75); - - outbmp.Save("drawimage.bmp", ImageFormat.Bmp); - - } - -} - - diff --git a/mcs/class/System.Drawing/Samples/System.Drawing/font.cs b/mcs/class/System.Drawing/Samples/System.Drawing/font.cs deleted file mode 100644 index b9c96e8f628..00000000000 --- a/mcs/class/System.Drawing/Samples/System.Drawing/font.cs +++ /dev/null @@ -1,63 +0,0 @@ -// -// font.cs -// font/text operations -// -// Author: -// Alexandre Pigolkine(pigolkine@gmx.de) -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; -using System.Drawing; -using System.Drawing.Text; -using System.Drawing.Imaging; - -namespace MonoSamples.System.Drawing -{ - public class FontSample - { - public static void Main () { - - float width = 400.0F; - float height = 800.0F; - - FontCollection ifc = new InstalledFontCollection (); - foreach (FontFamily ffm in ifc.Families) { - Console.WriteLine (ffm.Name); - } - - Font f = new Font ("Arial",12); - Console.WriteLine ("Height: {0}", f.Height); - - Bitmap bmp = new Bitmap ((int) width, (int) height); - Graphics gr = Graphics.FromImage (bmp); - gr.Clear (Color.White); - - Brush br = new SolidBrush (Color.Black); - gr.DrawString ("The test string", f, br, 10, 10); - - bmp.Save ("font.png", ImageFormat.Png); - Console.WriteLine ("output file font.png"); - } - } -} diff --git a/mcs/class/System.Drawing/Samples/System.Drawing/fontsizes.cs b/mcs/class/System.Drawing/Samples/System.Drawing/fontsizes.cs deleted file mode 100644 index 5013885c84f..00000000000 --- a/mcs/class/System.Drawing/Samples/System.Drawing/fontsizes.cs +++ /dev/null @@ -1,52 +0,0 @@ -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// (c) 2005 Jordi Mas i Hernandez, -// - -using System; -using System.Drawing; -using System.Drawing.Text; -using System.Drawing.Imaging; - -namespace MonoSamples.System.Drawing -{ - public class FontSizes - { - public static void PrintFontInfo (Font f) - { - Console.WriteLine ("Font: {0} size in pixels: {1}", f, f.Height); - } - - public static void Main () - { - Console.WriteLine (";----------------------------------------------------"); - PrintFontInfo (new Font ("Arial", 12)); - PrintFontInfo (new Font ("Arial", 14)); - PrintFontInfo (new Font ("Arial", 16)); - PrintFontInfo (new Font ("Arial", 22)); - PrintFontInfo (new Font ("Verdana", 44)); - PrintFontInfo (new Font ("Verdana", 8)); - - } - } -} diff --git a/mcs/class/System.Drawing/Samples/System.Drawing/graphicsUi.cs b/mcs/class/System.Drawing/Samples/System.Drawing/graphicsUi.cs deleted file mode 100644 index 10c87ec7eba..00000000000 --- a/mcs/class/System.Drawing/Samples/System.Drawing/graphicsUi.cs +++ /dev/null @@ -1,134 +0,0 @@ -// -// A sample application for some graphics.cs functions implementation -// -// Author: -// Jordi Mas i Hernàndez, jordi@ximian.com -// -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; -using System.Drawing.Imaging; -using System.Drawing; -using System.Drawing.Drawing2D; - -namespace MonoSamples.System.Drawing -{ - public class graphicsUI - { - public static void Main () { - - Bitmap bmp = new Bitmap (500, 250); - Graphics dc = Graphics.FromImage (bmp); - - Pen BluePen = new Pen (Color.Blue, 3); - Pen GreenPen = new Pen (Color.Green, 3); - Pen RedPen = new Pen (Color.Red, 3); - SolidBrush redBrush = new SolidBrush (Color.Red); - SolidBrush blueBrush = new SolidBrush (Color.Blue); - - int x = 0; - int y = 0; - - /* First Row */ - dc.DrawRectangle (BluePen, x, y, 50, 50); - x += 50; - dc.DrawEllipse (RedPen, x, y, 70, 50); - dc.DrawArc (BluePen, x, y, 50, 40, (float) 0, (float) 120); - x += 70; - - dc.DrawBezier (GreenPen, new Point (x, y + 5), - new Point (x + 50, y + 5), - new Point (x + 20, y + 20), - new Point (x + 50, y + 50)); - x += 50; - - PointF point1 = new PointF (10.0F + x, 10.0F); - PointF point2 = new PointF (10.0F + x, 5.0F); - PointF point3 = new PointF (40.0F + x, 5.0F); - PointF point4 = new PointF (50.0F + x, 10.0F); - PointF point5 = new PointF (60.0F + x, 20.0F); - PointF point6 = new PointF (70.0F + x, 40.0F); - PointF point7 = new PointF (50.0F + x, 50.0F); - PointF[] curvePoints = {point1, point2, point3, point4, - point5, point6, point7}; - dc.DrawLines (RedPen, curvePoints); - float tension = 1.0F; - FillMode aFillMode = FillMode.Alternate; - dc.DrawClosedCurve (GreenPen, curvePoints, tension, aFillMode); - - x += 80; - - // FillClosedCurve - PointF point10 = new PointF (x, y + 15.0F); - PointF point20 = new PointF (x + 40.0F, y + 10.0F); - PointF point30 = new PointF (x + 50.0F, y + 40.0F); - PointF point40 = new PointF (x + 10.0F, y + 30.0F); - PointF[] points = {point10, point20, point30, point40}; - FillMode newFillMode = FillMode.Winding; - dc.FillClosedCurve (redBrush, points, newFillMode, tension); - - // Fill pie to screen. - dc.FillPie (blueBrush, x, 0, 200.0F, 100.0f, 300.0F, 45.0F); - - /* second row */ - y += 80; - x = 0; - - // Clipping and Graphics container test - dc.SetClip (new Rectangle (5 + x, 5 + y, 75, 75)); - - // Begin a graphics container. - GraphicsContainer container = dc.BeginContainer (); - - // Set an additional clipping region for the container. - dc.SetClip (new Rectangle (50 + x, 25 + y, 50, 37)); - - // Fill a red rectangle in the container. - dc.FillRectangle (redBrush, 0, 0, 200, 200); - - dc.EndContainer (container); - SolidBrush blueBrushLight = new SolidBrush ( - Color.FromArgb (128, 0, 0, 255)); - dc.FillRectangle (blueBrushLight, 0, 0, 200, 200); - - dc.ResetClip (); - Pen blackPen = new Pen (Color.FromArgb (255, 0, 0, 0), 2.0f); - dc.DrawRectangle (blackPen, 5 + x, 5 + y, 75, 75); - dc.DrawRectangle (blackPen, 50 + x, 25 + y, 50, 37); - - x = 100; - y += 10; - - Point[] ptstrans = {new Point(x, y), new Point (50 + x, 25 + y)}; - dc.DrawLine (BluePen, ptstrans [0], ptstrans [1]); - dc.TranslateTransform (40.0F, 30.0F); - dc.TransformPoints (CoordinateSpace.Page, CoordinateSpace.World, - ptstrans); - dc.ResetTransform (); - dc.DrawLine (RedPen, ptstrans [0], ptstrans [1]); - - bmp.Save ("graphicsui.bmp", ImageFormat.Bmp); - } - } -} diff --git a/mcs/class/System.Drawing/Samples/System.Drawing/imagecompose.cs b/mcs/class/System.Drawing/Samples/System.Drawing/imagecompose.cs deleted file mode 100644 index 0e17a8b9923..00000000000 --- a/mcs/class/System.Drawing/Samples/System.Drawing/imagecompose.cs +++ /dev/null @@ -1,68 +0,0 @@ -// -// Sample application for adding two images into a single TIFF file -// -// Author: -// Jordi Mas i Hernàndez, jordi@ximian.com -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; -using System.Drawing; -using System.Drawing.Drawing2D; -using System.Drawing.Imaging; - -// -public class SampleComposeImages -{ - - public static void Main(string[] args) - { - //get the codec for tiff files - ImageCodecInfo info = null; - Bitmap pages = null; - - foreach(ImageCodecInfo ice in ImageCodecInfo.GetImageEncoders()) - if(ice.MimeType=="image/tiff") - info = ice; - - //use the save encoder - Encoder enc = Encoder.SaveFlag; - EncoderParameters ep=new EncoderParameters(1); - ep.Param[0] = new EncoderParameter (enc,(long)EncoderValue.MultiFrame); - - pages = (Bitmap) Image.FromFile ("../../Test/System.Drawing/bitmaps/almogaver32bits.bmp"); - pages.Save ("out.tiff", info, ep); - - //save second frame - ep.Param[0] = new EncoderParameter (enc,(long)EncoderValue.FrameDimensionPage); - Bitmap bm=(Bitmap)Image.FromFile ("../../Test/System.Drawing/bitmaps/nature24bits.jpg"); - pages.SaveAdd (bm,ep); - - ep.Param[0] = new EncoderParameter (enc,(long)EncoderValue.Flush); - pages.SaveAdd (ep); - } -} - - diff --git a/mcs/class/System.Drawing/Samples/System.Drawing/pie.cs b/mcs/class/System.Drawing/Samples/System.Drawing/pie.cs deleted file mode 100644 index 4d00a1d3a4d..00000000000 --- a/mcs/class/System.Drawing/Samples/System.Drawing/pie.cs +++ /dev/null @@ -1,94 +0,0 @@ -// -// Test application for pie graphics functions implementation -// -// Author: -// Jordi Mas, jordi@ximian.com -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; -using System.Drawing.Imaging; -using System.Drawing; -using System.Drawing.Drawing2D; - -// -public class graphicsUI -{ - - public static void Main () - { - - Bitmap bmp = new Bitmap (400, 600); - Graphics dc = Graphics.FromImage (bmp); - - // Clears and set the background color to red - dc.Clear (Color.Red); - - SolidBrush blueBrush = new SolidBrush (Color.Blue); - SolidBrush redBrush = new SolidBrush (Color.Red); - SolidBrush yellowBrush = new SolidBrush (Color.Yellow); - SolidBrush whiteBrush = new SolidBrush (Color.White); - Pen bluePen = new Pen (Color.Blue); - - // We have a column starting at x=50 for Draw operations - // and another column starting at x=200 for Fill operations. - // Both the columns grow downwards. - - // Column 1 - Rectangle rect11 = new Rectangle (50, 0, 75, 75); - dc.DrawPie (bluePen, rect11, 10, 60); - - Rectangle rect12 = new Rectangle (50,100, 75, 75); - dc.DrawPie (bluePen, rect12, 100, 75); - - Rectangle rect13 = new Rectangle (50, 200, 75, 75); - dc.DrawPie (bluePen, rect13, 100, 400); - - Rectangle rect14 = new Rectangle (50, 300, 75, 75); - dc.DrawPie (bluePen, rect14, 0, 0); - - // Column 2 - Rectangle rect21 = new Rectangle (200, 0, 75, 75); - dc.FillPie (yellowBrush, rect21, 0, 300); - - Rectangle rect22 = new Rectangle (200, 100, 75, 75); - dc.FillPie (whiteBrush, rect22, 200, 30); - - Rectangle rect23 = new Rectangle (200, 200, 75, 75); - dc.FillPie (whiteBrush, rect23, 200, 400); - - Rectangle rect24 = new Rectangle (200, 300, 75, 75); - dc.FillPie (yellowBrush, rect24, 190, 300); - - Rectangle rect25 = new Rectangle (200, 400, 75, 75); - dc.FillPie (whiteBrush, rect25, 200, 20); - - Rectangle rect26 = new Rectangle (200, 500, 75, 75); - dc.FillPie (yellowBrush, rect26, 50, 0); - - bmp.Save("fillpie.png", ImageFormat.Png); - } - -} diff --git a/mcs/class/System.Drawing/Samples/System.Drawing/region.cs b/mcs/class/System.Drawing/Samples/System.Drawing/region.cs deleted file mode 100644 index 61194092898..00000000000 --- a/mcs/class/System.Drawing/Samples/System.Drawing/region.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System; -using System.Drawing; -using System.Drawing.Drawing2D; - - -// -// Dumps an empty region -// - -namespace MyFormProject -{ - - class MainForm - { - public MainForm() - { - - } - - public static void Main(string[] args) - { - Region region = new Region (); - - RectangleF[] rects = region.GetRegionScans (new Matrix ()); - - for (int i = 0; i < rects.Length; i++) - Console.WriteLine ("{0}", rects [i]); - } - } - -} diff --git a/mcs/class/System.Drawing/Samples/run-samples.sh b/mcs/class/System.Drawing/Samples/run-samples.sh deleted file mode 100755 index 3f8af55f0ce..00000000000 --- a/mcs/class/System.Drawing/Samples/run-samples.sh +++ /dev/null @@ -1,148 +0,0 @@ -#!/bin/sh -################## System.Drawing: run-samples.sh ####################### -# # -# This script compiles and runs samples from each directory in # -# System.Drawing.Samples directory. Compiled exes and output # -# images, if any, are saved to respective directories. # -# Compile time logs are saved to compile-log.txt and runtime logs are # -# saved to runtime-log.txt. Both log files are saved at the same # -# location where this script is run. # -# # -# Following are the two ways to run this script, # -# $ run-samples.sh # -# OR # -# $ run-samples.sh [option] # -# # -# NOTE: Possible options are (m)ake, (c)lean, (r)un, (a)ll # -# --run is default option, when no option is specified. # -# Only one option can be specified at a time. # -# -m, --make - compiles all the samples # -# -c, --clean - deletes all the exes generated # -# -r, --run - compiles and runs all the samples. [Default] # -# -a, --all - runs all the samples and also cleans # -# # -# **** This script would hang, if any sample hangs!!! # -# # -# Authors: # -# Sachin # -# Ravindra # -# # -# Copyright (C) 2004, Novell, Inc. http://www.novell.com # -# # -######################################################################### - -# Prints the script usage -print_usage () -{ - echo "Usage: run-samples [option]" - echo "Only one option is processed at a time." - echo "Possible options are: (m)ake, (c)lean, (r)un, (a)ll" - echo " -m, --make: Just compiles all the samples." - echo " -c, --clean: Just removes all the exes." - echo " -r, --run: makes and runs all the samples. [Default]" - echo " -a, --all: same as run and clean combined." - echo " --run option is assumed, if no option is specified." - exit 1 -} - -# Compiles all the samples -compile () -{ - echo === Compiling samples in $dir === - - for src in *.cs - do - echo " $src" - echo -n " $src:: " >> $CLOG - $MCS $COMPILE_OPS $src >> $CLOG 2>&1 - done -} - -# Deletes all the exes -clean () -{ - echo === Cleaning $dir === - rm *.exe -} - -# Compiles and runs all the samples -run () -{ - compile - echo === Running samples in $dir === - for exe in *.exe - do - echo " $exe" - echo >> $RLOG - echo "$dir: $exe :: " >> $RLOG - echo >> $RLOG - $MONO $RUN_OPS $exe >> $RLOG 2>&1 - done -} - -# Compliles, runs and deletes all the exes -all () -{ - run - clean -} - -# Environment setup - -ROOT=$PWD -CLOG=$ROOT/compile-log.txt -RLOG=$ROOT/runtime-log.txt -MCS=mcs -MONO=mono -LIB=System.Drawing -COMPILE_OPS="-g -r:$LIB" -RUN_OPS=--debug - -# Uncomment the following line, if you are running this script on MS -#MSNet=yes - -# We don't process more than one command line arguments -if [ $# -gt 1 ]; then - print_usage -fi - -# Default option is run, if no command line argument is present -if [ -z $1 ]; then - arg=--run -else - arg=$1 -fi - -# Creates the log files -echo '*** LOG FILE for compile-time messages for System.Drawing Samples ***' > $CLOG -echo '*** LOG FILE for run-time output messages for System.Drawing Samples ***' > $RLOG - -# All directories are processed under Samples. -for dir in `ls -d System.Drawing*` - do - echo >> $CLOG - echo ===== $dir ===== >> $CLOG - - echo >> $RLOG - echo ===== $dir ===== >> $RLOG - - # Change dir if it exists - if [ -d $ROOT/$dir ]; then - cd $ROOT/$dir - case $arg in - "-m") compile ;; - "--make") compile ;; - "-r") run ;; - "--run") run ;; - "-a") all ;; - "--all") all ;; - "-c") clean ;; - "--clean") clean ;; - *) print_usage ;; - esac - cd .. - else - echo "$dir not found." >> $CLOG - echo "$dir not found." >> $RLOG - fi -done diff --git a/mcs/class/System.Drawing/System.Drawing.Design/CategoryNameCollection.cs b/mcs/class/System.Drawing/System.Drawing.Design/CategoryNameCollection.cs deleted file mode 100644 index a2754641c76..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Design/CategoryNameCollection.cs +++ /dev/null @@ -1,79 +0,0 @@ -// -// System.Drawing.Design.CategoryNameCollection.cs -// -// Authors: -// Alejandro Sánchez Acosta -// Andreas Nahr (ClassDevelopment@A-SoftTech.com) -// -// (C) Alejandro Sánchez Acosta -// (C) 2003 Andreas Nahr -// - -// -// Copyright (C) 2004-2005 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System.Collections; -using System.Security.Permissions; - -namespace System.Drawing.Design -{ - [PermissionSet (SecurityAction.LinkDemand, Unrestricted = true)] - public sealed class CategoryNameCollection : ReadOnlyCollectionBase - { - - public CategoryNameCollection (CategoryNameCollection value) - { - if (value == null) - throw new ArgumentNullException ("value"); - InnerList.AddRange (value); - } - - public CategoryNameCollection (string[] value) - { - if (value == null) - throw new ArgumentNullException ("value"); - InnerList.AddRange (value); - } - - public string this[int index] { - get { - return (string) InnerList[index]; - } - } - - public bool Contains (string value) - { - return InnerList.Contains (value); - } - - public void CopyTo (string[] array, int index) - { - InnerList.CopyTo (array, index); - } - - public int IndexOf (string value) - { - return InnerList.IndexOf (value); - } - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Design/ChangeLog b/mcs/class/System.Drawing/System.Drawing.Design/ChangeLog deleted file mode 100644 index 50b47ac4ba0..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Design/ChangeLog +++ /dev/null @@ -1,84 +0,0 @@ -2005-09-16 Sebastien Pouliot - - * CategoryNameCollection.cs: Added LinkDemand for Unrestricted - permissions. Added null checks in constructors. - * PaintValueEventArgs.cs: Added LinkDemand and InheritanceDemand for - Unrestricted permissions. Added null checks in constructor. - * PropertyValueItem.cs: Added LinkDemand and InheritanceDemand for - Unrestricted permissions. Added null checks in constructor. - * ToolboxComponentsCreatedEventArgs.cs: Added LinkDemand and - InheritanceDemand for Unrestricted permissions. - * ToolboxComponentsCreatingEventArgs.cs: Added LinkDemand and - InheritanceDemand for Unrestricted permissions. - * ToolboxItem.cs: Added LinkDemand and InheritanceDemand for - Unrestricted permissions. - * ToolboxItemCollection.cs: Added LinkDemand for Unrestricted - permissions. - * UITypeEditor.cs: Added LinkDemand and InheritanceDemand for - Unrestricted permissions. - -2005-08-24 Michael Hutchinson - - * ToolboxItem.cs: Implemented retrieving item's bitmap - -2005-08-09 Michael Hutchinson - - * ToolboxItemCollection.cs: Call base constructor - * ToolboxItem: Implemented CreateComponentsCore, GetType, Initialize - -2005-08-03 Andrew Skiba - - * UITypeEditor.cs: Added TARGET_JVM support - -2003-06-30 Andreas Nahr - - * ToolboxItem.cs: Added serialization/deserialization support - -2003-06-18 Andreas Nahr - - * CategoryNameCollection.cs - * ToolboxItemCollection.cs: Implemented - - * PropertyValueItem.cs: Implemented - * IDesignerHost.cs: Deleted (not defined in this namespace) - - * IToolboxService.cs: Fixed missing imports, added missing interface declarations - * ToolboxComponentsCreatingEventArgs.cs: Fixed missing imports - - * ToolboxItem.cs: Fixed missing imports, Partially implemented - - * UITypeEditor.cs: Implemented - - * UITypeEditorEditStyle.cs: Fixed incorrect values - -2003-03-31 Alan Tam - - * UITypeEditor.cs: Added - * PaintValueEventArgs.cs: Fixed typo in namespace - -2002-12-01 Alejandro Sánchez Acosta - - * PaintValueEventArgs.cs, - ToolboxComponentsCreatingEventArgs.cs, - PropertyValueItem.cs, - ToolboxComponentsCreatingEventHandler.cs - IDesignerHost.cs, - ToolboxItemCreatorCallback.cs, - ToolboxItem.cs, - ToolboxComponentsCreatedEventArgs.cs - UITypeEditorEditStyle.cs, - IToolboxUser.cs - ToolboxComponentsCreatedEventHandler.cs - CategoryNameCollection.cs : Added - -2002-11-20 Alejandro Sánchez Acosta - - * IPropertyValueUIService.cs: Added - - * PropertyValueItem.cs: Added - - * PropertyValueUIHandler.cs: Added - - * PropertyValueUIItemInvokeHandler.cs: Added - - * ChangeLog: new file. diff --git a/mcs/class/System.Drawing/System.Drawing.Design/IPropertyValueUIService.cs b/mcs/class/System.Drawing/System.Drawing.Design/IPropertyValueUIService.cs deleted file mode 100644 index 9cb50b8548d..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Design/IPropertyValueUIService.cs +++ /dev/null @@ -1,54 +0,0 @@ -// System.Drawing.Design.IPropertyValueUIService.cs -// -// Author: -// Alejandro Sánchez Acosta -// -// (C) Alejandro Sánchez Acosta -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System.Drawing; -using System.ComponentModel; - -namespace System.Drawing.Design -{ - public interface IPropertyValueUIService - { - - #region Methods - void AddPropertyValueUIHandler (PropertyValueUIHandler newHandler); - PropertyValueUIItem[] GetPropertyUIValueItems (ITypeDescriptorContext context, PropertyDescriptor propDesc); - - void NotifyPropertyValueUIItemsChanged (); - - void RemovePropertyValueUIHandler (PropertyValueUIHandler newHandler); - #endregion Methods - - #region Events - event EventHandler PropertyUIValueItemsChanged; - #endregion Events - } -} - diff --git a/mcs/class/System.Drawing/System.Drawing.Design/IToolboxService.cs b/mcs/class/System.Drawing/System.Drawing.Design/IToolboxService.cs deleted file mode 100644 index ba20fc7f0a7..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Design/IToolboxService.cs +++ /dev/null @@ -1,103 +0,0 @@ -// -// System.Drawing.Design.IToolboxService.cs -// -// Authors: -// Alejandro Sánchez Acosta -// Andreas Nahr (ClassDevelopment@A-SoftTech.com) -// -// (C) Alejandro Sánchez Acosta -// (C) 2003 Andreas Nahr -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System.Collections; -using System.ComponentModel.Design; -using System.Runtime.InteropServices; - -namespace System.Drawing.Design -{ - [Guid("4BACD258-DE64-4048-BC4E-FEDBEF9ACB76"), - InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - public interface IToolboxService - { - CategoryNameCollection CategoryNames {get;} - - string SelectedCategory {get; set;} - - void AddCreator (ToolboxItemCreatorCallback creator, string format); - - void AddCreator (ToolboxItemCreatorCallback creator, string format, IDesignerHost host); - - void AddLinkedToolboxItem (ToolboxItem toolboxItem, IDesignerHost host); - - void AddLinkedToolboxItem (ToolboxItem toolboxItem, string category, IDesignerHost host); - - void AddToolboxItem (ToolboxItem toolboxItem, String category); - - void AddToolboxItem (ToolboxItem toolboxItem); - - ToolboxItem DeserializeToolboxItem (object serializedObject); - - ToolboxItem DeserializeToolboxItem (object serializedObject, IDesignerHost host); - - ToolboxItem GetSelectedToolboxItem (); - - ToolboxItem GetSelectedToolboxItem (IDesignerHost host); - - ToolboxItemCollection GetToolboxItems (); - - ToolboxItemCollection GetToolboxItems (IDesignerHost host); - - ToolboxItemCollection GetToolboxItems (String category); - - ToolboxItemCollection GetToolboxItems (String category, IDesignerHost host); - - bool IsSupported (object serializedObject, ICollection filterAttributes); - - bool IsSupported (object serializedObject, IDesignerHost host); - - bool IsToolboxItem (object serializedObject); - - bool IsToolboxItem (object serializedObject, IDesignerHost host); - - void Refresh(); - - void RemoveCreator (string format); - - void RemoveCreator (string format, IDesignerHost host); - - void RemoveToolboxItem (ToolboxItem toolboxItem); - - void RemoveToolboxItem (ToolboxItem toolboxItem, string category); - - void SelectedToolboxItemUsed (); - - object SerializeToolboxItem (ToolboxItem toolboxItem); - - bool SetCursor (); - - void SetSelectedToolboxItem (ToolboxItem toolboxItem); - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Design/IToolboxUser.cs b/mcs/class/System.Drawing/System.Drawing.Design/IToolboxUser.cs deleted file mode 100644 index 267cdf478b1..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Design/IToolboxUser.cs +++ /dev/null @@ -1,40 +0,0 @@ -// System.Drawing.Design.IToolboxUser.cs -// -// Author: -// Alejandro Sánchez Acosta -// -// (C) Alejandro Sánchez Acosta -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -namespace System.Drawing.Design -{ - public interface IToolboxUser - { - bool GetToolSupported (ToolboxItem tool); - - void ToolPicked (ToolboxItem tool); - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Design/PaintValueEventArgs.cs b/mcs/class/System.Drawing/System.Drawing.Design/PaintValueEventArgs.cs deleted file mode 100644 index 9c3ba7dd8d6..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Design/PaintValueEventArgs.cs +++ /dev/null @@ -1,85 +0,0 @@ -// System.Drawing.Design.PaintvalueEventArgs.cs -// -// Author: -// Alejandro Sánchez Acosta -// -// (C) Alejandro Sánchez Acosta -// - -// -// Copyright (C) 2004-2005 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System.ComponentModel; -using System.Security.Permissions; - -namespace System.Drawing.Design -{ - [PermissionSet (SecurityAction.LinkDemand, Unrestricted = true)] - [PermissionSet (SecurityAction.InheritanceDemand, Unrestricted = true)] - public class PaintValueEventArgs : EventArgs - { - private ITypeDescriptorContext context; - private object value; - private Graphics graphics; - private Rectangle bounds; - - public PaintValueEventArgs(ITypeDescriptorContext context, object value, Graphics graphics, Rectangle bounds) - { - if (graphics == null) - throw new ArgumentNullException ("graphics"); - this.context = context; - this.value = value; - this.graphics = graphics; - this.bounds = bounds; - } - - public Rectangle Bounds - { - get { - return bounds; - } - } - - public ITypeDescriptorContext Context - { - get { - return context; - } - } - - public Graphics Graphics - { - get { - return graphics; - } - } - - public object Value - { - get { - return value; - } - } - } -} - diff --git a/mcs/class/System.Drawing/System.Drawing.Design/PropertyValueItem.cs b/mcs/class/System.Drawing/System.Drawing.Design/PropertyValueItem.cs deleted file mode 100644 index b9eaaf6fe0d..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Design/PropertyValueItem.cs +++ /dev/null @@ -1,89 +0,0 @@ -// -// System.Drawing.Design.PropertyValueItem.cs -// -// Authors: -// Alejandro Sánchez Acosta -// Andreas Nahr (ClassDevelopment@A-SoftTech.com) -// -// (C) Alejandro Sánchez Acosta -// (C) 2003 Andreas Nahr -// - -// -// Copyright (C) 2004-2005 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System.Security.Permissions; - -namespace System.Drawing.Design -{ - [PermissionSet (SecurityAction.LinkDemand, Unrestricted = true)] - [PermissionSet (SecurityAction.InheritanceDemand, Unrestricted = true)] - public class PropertyValueUIItem - { - - private Image uiItemImage; - private PropertyValueUIItemInvokeHandler handler; - private string tooltip; - - public PropertyValueUIItem (Image uiItemImage, - PropertyValueUIItemInvokeHandler handler, string tooltip) - { - if (uiItemImage == null) - throw new ArgumentNullException ("uiItemImage"); - if (handler == null) - throw new ArgumentNullException ("handler"); - this.uiItemImage = uiItemImage; - this.handler = handler; - this.tooltip = tooltip; - } - - public virtual Image Image - { - get - { - return uiItemImage; - } - } - - public virtual PropertyValueUIItemInvokeHandler InvokeHandler - { - get - { - return handler; - } - } - - public virtual string ToolTip - { - get - { - return tooltip; - } - } - - public virtual void Reset() - { - // To be overriden in child classes - } - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Design/PropertyValueUIHandler.cs b/mcs/class/System.Drawing/System.Drawing.Design/PropertyValueUIHandler.cs deleted file mode 100644 index 38f37db43b3..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Design/PropertyValueUIHandler.cs +++ /dev/null @@ -1,42 +0,0 @@ -// System.Drawing.Design.PropertyValueUIHandler.cs -// -// Author: -// Alejandro Sánchez Acosta -// -// (C) Alejandro Sánchez Acosta -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System.Collections; -using System.ComponentModel; -using System.Drawing; - -namespace System.Drawing.Design -{ - - [Serializable] - public delegate void PropertyValueUIHandler (ITypeDescriptorContext context, PropertyDescriptor propDesc, ArrayList valueUIItemList); - -} diff --git a/mcs/class/System.Drawing/System.Drawing.Design/PropertyValueUIItemInvokeHandler.cs b/mcs/class/System.Drawing/System.Drawing.Design/PropertyValueUIItemInvokeHandler.cs deleted file mode 100644 index 7b73cc2394e..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Design/PropertyValueUIItemInvokeHandler.cs +++ /dev/null @@ -1,42 +0,0 @@ -// System.Drawing.Design.PropertyValueUIItemInvokeHandler.cs -// -// Author: -// Alejandro Sánchez Acosta -// -// (C) Alejandro Sánchez Acosta -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System.Drawing; -using System.ComponentModel; - -namespace System.Drawing.Design -{ - [Serializable] - public delegate void PropertyValueUIItemInvokeHandler ( - ITypeDescriptorContext context, - PropertyDescriptor descriptor, - PropertyValueUIItem invokedItem); -} diff --git a/mcs/class/System.Drawing/System.Drawing.Design/ToolboxComponentsCreatedEventArgs.cs b/mcs/class/System.Drawing/System.Drawing.Design/ToolboxComponentsCreatedEventArgs.cs deleted file mode 100644 index 65790a10768..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Design/ToolboxComponentsCreatedEventArgs.cs +++ /dev/null @@ -1,54 +0,0 @@ -// System.Drawing.Design.ToolboxComponentsCreatedEventArgs.cs -// -// Author: -// Alejandro Sánchez Acosta -// -// (C) Alejandro Sánchez Acosta -// -// - -// -// Copyright (C) 2004-2005 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System.ComponentModel; -using System.Security.Permissions; - -namespace System.Drawing.Design -{ - [PermissionSet (SecurityAction.LinkDemand, Unrestricted = true)] - [PermissionSet (SecurityAction.InheritanceDemand, Unrestricted = true)] - public class ToolboxComponentsCreatedEventArgs : EventArgs - { - private IComponent[] components; - - public ToolboxComponentsCreatedEventArgs (IComponent[] components) { - this.components = components; - } - - public IComponent[] Components { - get { - return components; - } - } - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Design/ToolboxComponentsCreatedEventHandler.cs b/mcs/class/System.Drawing/System.Drawing.Design/ToolboxComponentsCreatedEventHandler.cs deleted file mode 100644 index 83ff75efaa1..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Design/ToolboxComponentsCreatedEventHandler.cs +++ /dev/null @@ -1,37 +0,0 @@ -// System.Drawing.Design.IDesignerHost.cs -// -// Author: -// Alejandro Sánchez Acosta -// -// (C) Alejandro Sánchez Acosta -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -namespace System.Drawing.Design -{ - [Serializable] - public delegate void ToolboxComponentsCreatedEventHandler (object sender, ToolboxComponentsCreatedEventArgs e); -} - diff --git a/mcs/class/System.Drawing/System.Drawing.Design/ToolboxComponentsCreatingEventArgs.cs b/mcs/class/System.Drawing/System.Drawing.Design/ToolboxComponentsCreatingEventArgs.cs deleted file mode 100644 index cd7c35346de..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Design/ToolboxComponentsCreatingEventArgs.cs +++ /dev/null @@ -1,57 +0,0 @@ -// -// System.Drawing.Design.ToolboxComponentsCreatingEventArgs.cs -// -// Author: -// Alejandro Sánchez Acosta -// -// (C) Alejandro Sánchez Acosta -// - -// -// Copyright (C) 2004-2005 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System.ComponentModel.Design; -using System.Security.Permissions; - -namespace System.Drawing.Design -{ - [PermissionSet (SecurityAction.LinkDemand, Unrestricted = true)] - [PermissionSet (SecurityAction.InheritanceDemand, Unrestricted = true)] - public class ToolboxComponentsCreatingEventArgs : EventArgs - { - private IDesignerHost host; - - public ToolboxComponentsCreatingEventArgs (IDesignerHost host) - { - this.host = host; - } - - public IDesignerHost DesignerHost { - get { - return host; - } - } - } -} - - diff --git a/mcs/class/System.Drawing/System.Drawing.Design/ToolboxComponentsCreatingEventHandler.cs b/mcs/class/System.Drawing/System.Drawing.Design/ToolboxComponentsCreatingEventHandler.cs deleted file mode 100644 index 11761f8861c..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Design/ToolboxComponentsCreatingEventHandler.cs +++ /dev/null @@ -1,36 +0,0 @@ -// System.Drawing.Design.ToolboxComponentsCreatingEventHandler.cs -// -// Author: -// Alejandro Sánchez Acosta -// -// (C) Alejandro Sánchez Acosta -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -namespace System.Drawing.Design -{ - [Serializable] - public delegate void ToolboxComponentsCreatingEventHandler (object sender, ToolboxComponentsCreatingEventArgs e); -} diff --git a/mcs/class/System.Drawing/System.Drawing.Design/ToolboxItem.cs b/mcs/class/System.Drawing/System.Drawing.Design/ToolboxItem.cs deleted file mode 100644 index 1487a027ad1..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Design/ToolboxItem.cs +++ /dev/null @@ -1,282 +0,0 @@ -// -// System.Drawing.Design.ToolboxItem.cs -// -// Authors: -// Alejandro Sánchez Acosta -// Andreas Nahr (ClassDevelopment@A-SoftTech.com) -// -// (C) Alejandro Sánchez Acosta -// (C) 2003 Andreas Nahr -// - -// -// Copyright (C) 2004-2005 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System.Collections; -using System.ComponentModel; -using System.ComponentModel.Design; -using System.Reflection; -using System.Runtime.Serialization; -using System.Security.Permissions; - -namespace System.Drawing.Design -{ - [Serializable] - [PermissionSet (SecurityAction.LinkDemand, Unrestricted = true)] - [PermissionSet (SecurityAction.InheritanceDemand, Unrestricted = true)] - public class ToolboxItem : ISerializable - { - - private AssemblyName assembly; - private Bitmap bitmap = null; - private ICollection filter = new ToolboxItemFilterAttribute[0]; - private string displayname = string.Empty; - private bool locked = false; - private string name = string.Empty; - - public ToolboxItem() { - } - - public ToolboxItem (Type toolType) { - Initialize (toolType); - } - - public AssemblyName AssemblyName { - get { - return assembly; - } - - set { - CheckUnlocked (); - assembly = value; - } - } - - public Bitmap Bitmap { - get { - return bitmap; - } - - set { - CheckUnlocked (); - bitmap = value; - } - } - - public string DisplayName { - get { - return displayname; - } - - set { - CheckUnlocked (); - displayname = value; - } - } - - public ICollection Filter { - get { - return filter; - } - - set { - CheckUnlocked (); - filter = value; - } - } - - protected bool Locked { - get { - return locked; - } - } - - public string TypeName { - get { - return name; - } - - set { - CheckUnlocked (); - name = value; - } - } - - protected void CheckUnlocked () - { - if (locked) - throw new InvalidOperationException ("The ToolboxItem is locked"); - } - - public IComponent[] CreateComponents () - { - return CreateComponents (null); - } - - public IComponent[] CreateComponents (IDesignerHost host) - { - OnComponentsCreating (new ToolboxComponentsCreatingEventArgs (host)); - IComponent[] Comp = CreateComponentsCore (host); - OnComponentsCreated ( new ToolboxComponentsCreatedEventArgs (Comp)); - return Comp; - } - - [MonoTODO ("get error handling logic correct")] - protected virtual IComponent[] CreateComponentsCore (IDesignerHost host) - { - if (host == null) - throw new ArgumentNullException("host"); - - OnComponentsCreating(new ToolboxComponentsCreatingEventArgs(host)); - - IComponent[] components; - Type type = GetType(host, assembly, name, true); - if (type == null) - components = new IComponent[] { }; - else - components = new IComponent[] { host.CreateComponent(type) }; - - OnComponentsCreated(new ToolboxComponentsCreatedEventArgs(components)); - return components; - } - - protected virtual void Deserialize (SerializationInfo info, StreamingContext context) - { - assembly = (AssemblyName)info.GetValue ("AssemblyName", typeof (AssemblyName)); - bitmap = (Bitmap)info.GetValue ("Bitmap", typeof (Bitmap)); - filter = (ICollection)info.GetValue ("Filter", typeof (ICollection)); - displayname = info.GetString ("DisplayName"); - locked = info.GetBoolean ("Locked"); - name = info.GetString ("TypeName"); - } - - public override bool Equals (object obj) - { - // FIXME: too harsh?? - if (!(obj is ToolboxItem)) - return false; - if (obj == this) - return true; - return ((ToolboxItem) obj).AssemblyName.Equals (assembly) && - ((ToolboxItem) obj).Locked.Equals (locked) && - ((ToolboxItem) obj).TypeName.Equals (name) && - ((ToolboxItem) obj).DisplayName.Equals (displayname) && - ((ToolboxItem) obj).Bitmap.Equals (bitmap); - } - - public override int GetHashCode () - { - // FIXME: other algorithm? - return string.Concat (name, displayname).GetHashCode (); - } - - [MonoTODO] - protected virtual Type GetType (IDesignerHost host, AssemblyName assemblyName, string typeName, bool reference) - { - if (host == null) - throw new ArgumentNullException("host"); - - //get ITypeResolutionService from host, as we have no other IServiceProvider here - ITypeResolutionService typeRes = host.GetService(typeof(ITypeResolutionService)) as ITypeResolutionService; - if (typeRes == null) - throw new Exception("Host does not provide an ITypeResolutionService"); - - //TODO: Using Assembly loader to throw errors. Silent fail and return null? - Assembly assembly = typeRes.GetAssembly(assemblyName, true); - if (reference) - typeRes.ReferenceAssembly(assemblyName); - return typeRes.GetType(typeName, true); - } - - [MonoTODO ("Should we be returning empty bitmap, or null?")] - public virtual void Initialize (Type type) - { - assembly = type.Assembly.GetName(); - displayname = type.Name; - name = type.FullName; - - // seems to be a right place to create the bitmap - System.Drawing.Image image = null; - foreach (object attribute in type.GetCustomAttributes(true)) { - ToolboxBitmapAttribute tba = attribute as ToolboxBitmapAttribute; - if (tba != null) { - image = tba.GetImage (type); - break; - } - } - //fallback: check for image even if not attribute - if (image == null) - image = ToolboxBitmapAttribute.GetImageFromResource (type, null, false); - - if (image != null) { - if (image is Bitmap) - bitmap = (Bitmap) image; - else - bitmap = new Bitmap (image); - } - - filter = type.GetCustomAttributes (typeof (ToolboxItemFilterAttribute), true); - } - - void ISerializable.GetObjectData (SerializationInfo info, StreamingContext context) - { - Serialize (info, context); - } - - public void Lock () - { - locked = true; - } - - protected virtual void OnComponentsCreated (ToolboxComponentsCreatedEventArgs args) - { - if (ComponentsCreated != null) - this.ComponentsCreated (this, args); - } - - protected virtual void OnComponentsCreating (ToolboxComponentsCreatingEventArgs args) - { - if (ComponentsCreated != null) - this.ComponentsCreating (this, args); - } - - protected virtual void Serialize (SerializationInfo info, StreamingContext context) - { - info.AddValue ("AssemblyName", assembly); - info.AddValue ("Bitmap", bitmap); - info.AddValue ("Filter", filter); - info.AddValue ("DisplayName", displayname); - info.AddValue ("Locked", locked); - info.AddValue ("TypeName", name); - } - - public override string ToString() - { - return displayname; - } - - public event ToolboxComponentsCreatedEventHandler ComponentsCreated; - - public event ToolboxComponentsCreatingEventHandler ComponentsCreating; - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Design/ToolboxItemCollection.cs b/mcs/class/System.Drawing/System.Drawing.Design/ToolboxItemCollection.cs deleted file mode 100644 index dc76d7a48e2..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Design/ToolboxItemCollection.cs +++ /dev/null @@ -1,73 +0,0 @@ -// -// System.Drawing.Design.ToolboxItemCollection.cs -// -// Authors: -// Martin Willemoes Hansen (mwh@sysrq.dk) -// Andreas Nahr (ClassDevelopment@A-SoftTech.com) -// -// (C) 2003 Martin Willemoes Hansen -// (C) 2003 Andreas Nahr -// - -// -// Copyright (C) 2004-2005 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System.Collections; -using System.Security.Permissions; - -namespace System.Drawing.Design -{ - [PermissionSet (SecurityAction.LinkDemand, Unrestricted = true)] - public sealed class ToolboxItemCollection : ReadOnlyCollectionBase - { - - public ToolboxItemCollection (ToolboxItem[] value) : base() - { - InnerList.AddRange (value); - } - - public ToolboxItemCollection (ToolboxItemCollection value) : base() - { - InnerList.AddRange (value); - } - - public ToolboxItem this [int index] { - get { return (ToolboxItem) InnerList[index]; } - } - - public bool Contains (ToolboxItem value) - { - return InnerList.Contains (value); - } - - public void CopyTo (ToolboxItem[] array, int index) - { - InnerList.CopyTo (array, index); - } - - public int IndexOf (ToolboxItem value) - { - return InnerList.IndexOf (value); - } - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Design/ToolboxItemCreatorCallback.cs b/mcs/class/System.Drawing/System.Drawing.Design/ToolboxItemCreatorCallback.cs deleted file mode 100644 index a814f643fe0..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Design/ToolboxItemCreatorCallback.cs +++ /dev/null @@ -1,38 +0,0 @@ -// System.Drawing.Design.ToolboxItemCreatorCallback.cs -// -// Author: -// Alejandro Sánchez Acosta -// -// (C) Alejandro Sánchez Acosta -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -namespace System.Drawing.Design -{ - [Serializable] - public delegate ToolboxItem ToolboxItemCreatorCallback( - object serializedObject, - string format); -} diff --git a/mcs/class/System.Drawing/System.Drawing.Design/UITypeEditor.cs b/mcs/class/System.Drawing/System.Drawing.Design/UITypeEditor.cs deleted file mode 100644 index 8c5ada85a07..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Design/UITypeEditor.cs +++ /dev/null @@ -1,89 +0,0 @@ -// -// System.Drawing.Design.UITypeEditor.cs -// -// Authors: -// Alan Tam Siu Lung -// Andreas Nahr (ClassDevelopment@A-SoftTech.com) -// -// (C) 2003 Alan Tam Siu Lung -// (C) 2003 Andreas Nahr -// - -// -// Copyright (C) 2004-2005 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System.ComponentModel; -using System.Security.Permissions; - -namespace System.Drawing.Design -{ - [PermissionSet (SecurityAction.LinkDemand, Unrestricted = true)] - [PermissionSet (SecurityAction.InheritanceDemand, Unrestricted = true)] - public class UITypeEditor - { - - public UITypeEditor() - { - } - - public virtual object EditValue (ITypeDescriptorContext context, - IServiceProvider provider, object value) - { - // We already stated that we can't edit ;) - return value; - } - public object EditValue(IServiceProvider provider, object value) - { - return EditValue (null, provider, value); - } - public virtual UITypeEditorEditStyle GetEditStyle (ITypeDescriptorContext context) - { - return UITypeEditorEditStyle.None; - } - public UITypeEditorEditStyle GetEditStyle () - { - return GetEditStyle (null); - } - public bool GetPaintValueSupported () - { - return GetPaintValueSupported (null); - } - public virtual bool GetPaintValueSupported (ITypeDescriptorContext context) - { - return false; - } -#if !TARGET_JVM - public void PaintValue (object value, Graphics canvas, Rectangle rectangle) - { - PaintValue (new PaintValueEventArgs (null, value, canvas, rectangle)); - } - public virtual void PaintValue (PaintValueEventArgs e) - { - // LAMESPEC: Did not find info in the docs if this should do something here. - // Usually you would expect, that this class gets inherited and this overridden, - // but on the other hand the class is not abstract. Could never observe it did paint anything - return; - } -#endif - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Design/UITypeEditorEditStyle.cs b/mcs/class/System.Drawing/System.Drawing.Design/UITypeEditorEditStyle.cs deleted file mode 100644 index 97c4807e8bb..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Design/UITypeEditorEditStyle.cs +++ /dev/null @@ -1,38 +0,0 @@ -// -// System.Drawing.Design.UITypeEditorEditStyle.cs -// -// (C) 2001 Ximian, Inc. http://www.ximian.com -// Author: Dennis Hayes (dennish@raytek.com) -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -using System; -namespace System.Drawing.Design -{ - public enum UITypeEditorEditStyle{ - DropDown=3, - Modal=2, - None=1 - } -} \ No newline at end of file diff --git a/mcs/class/System.Drawing/System.Drawing.Drawing2D/AdjustableArrowCap.cs b/mcs/class/System.Drawing/System.Drawing.Drawing2D/AdjustableArrowCap.cs deleted file mode 100644 index 497b578e5b4..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Drawing2D/AdjustableArrowCap.cs +++ /dev/null @@ -1,122 +0,0 @@ -// -// System.Drawing.Drawing2D.AdjustableArrowCap.cs -// -// Authors: -// Dennis Hayes (dennish@Raytek.com) -// Ravindra (rkumar@novell.com) -// -// Copyright (C) 2002/3 Ximian, Inc. http://www.ximian.com -// Copyright (C) 2004 Novell, Inc. http://www.novell.com -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; - -namespace System.Drawing.Drawing2D -{ - /// - /// Summary description for AdjustableArrowCap. - /// - public sealed class AdjustableArrowCap : CustomLineCap - { - // Constructors - - internal AdjustableArrowCap (IntPtr ptr) : base (ptr) - { - } - - public AdjustableArrowCap (float width, float height) : this (width, height, true) - { - } - - public AdjustableArrowCap (float width, float height, bool isFilled) - { - Status status = GDIPlus.GdipCreateAdjustableArrowCap (height, width, isFilled, out nativeObject); - GDIPlus.CheckStatus (status); - } - - // Public Properities - - public bool Filled { - get { - bool isFilled; - Status status = GDIPlus.GdipGetAdjustableArrowCapFillState (nativeObject, out isFilled); - GDIPlus.CheckStatus (status); - - return isFilled; - } - - set { - Status status = GDIPlus.GdipSetAdjustableArrowCapFillState (nativeObject, value); - GDIPlus.CheckStatus (status); - } - } - - public float Width { - get { - float width; - Status status = GDIPlus.GdipGetAdjustableArrowCapWidth (nativeObject, out width); - GDIPlus.CheckStatus (status); - - return width; - } - - set { - Status status = GDIPlus.GdipSetAdjustableArrowCapWidth (nativeObject, value); - GDIPlus.CheckStatus (status); - } - } - - public float Height { - get { - float height; - Status status = GDIPlus.GdipGetAdjustableArrowCapHeight (nativeObject, out height); - GDIPlus.CheckStatus (status); - - return height; - } - - set { - Status status = GDIPlus.GdipSetAdjustableArrowCapHeight (nativeObject, value); - GDIPlus.CheckStatus (status); - } - } - - public float MiddleInset { - get { - float middleInset; - Status status = GDIPlus.GdipGetAdjustableArrowCapMiddleInset (nativeObject, out middleInset); - GDIPlus.CheckStatus (status); - - return middleInset; - } - - set { - Status status = GDIPlus.GdipSetAdjustableArrowCapMiddleInset (nativeObject, value); - GDIPlus.CheckStatus (status); - } - } - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Drawing2D/AdjustableArrowCap.jvm.cs b/mcs/class/System.Drawing/System.Drawing.Drawing2D/AdjustableArrowCap.jvm.cs deleted file mode 100755 index 7783c316ddd..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Drawing2D/AdjustableArrowCap.jvm.cs +++ /dev/null @@ -1,97 +0,0 @@ -// -// System.Drawing.Drawing2D.AdjustableArrowCap.cs -// -// Authors: -// Dennis Hayes (dennish@Raytek.com) -// Ravindra (rkumar@novell.com) -// -// Copyright (C) 2002/3 Ximian, Inc. http://www.ximian.com -// Copyright (C) 2004 Novell, Inc. http://www.novell.com -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; - -namespace System.Drawing.Drawing2D -{ - /// - /// Summary description for AdjustableArrowCap. - /// - public sealed class AdjustableArrowCap : CustomLineCap - { - // Constructors - - public AdjustableArrowCap (float width, float height) : this (width, height, true) - { - } - - public AdjustableArrowCap (float width, float height, bool isFilled) - { - throw new NotImplementedException(); - } - - // Public Properities - - public bool Filled { - get { - throw new NotImplementedException(); - } - - set { - throw new NotImplementedException(); - } - } - - public float Width { - get { - throw new NotImplementedException(); - } - - set { - throw new NotImplementedException(); - } - } - - public float Height { - get { - throw new NotImplementedException(); - } - - set { - throw new NotImplementedException(); - } - } - - public float MiddleInset { - get { - throw new NotImplementedException(); - } - - set { - throw new NotImplementedException(); - } - } - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Drawing2D/Blend.cs b/mcs/class/System.Drawing/System.Drawing.Drawing2D/Blend.cs deleted file mode 100644 index 7629ddc4eee..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Drawing2D/Blend.cs +++ /dev/null @@ -1,78 +0,0 @@ -// -// System.Drawing.Drawing2D.Blend.cs -// -// Authors: -// Dennis Hayes (dennish@Raytek.com) -// Ravindra (rkumar@novell.com) -// -// (C) 2002/3 Ximian, Inc. http://www.ximian.com -// (C) 2004 Novell, Inc. http://www.novell.com -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -using System; - -namespace System.Drawing.Drawing2D -{ - /// - /// Summary description for Blend. - /// - public sealed class Blend - { - private float [] positions; - private float [] factors; - - public Blend () - { - positions = new float [1]; - factors = new float [1]; - } - - public Blend (int count) - { - positions = new float [count]; - factors = new float [count]; - } - - public float [] Factors { - get { - return factors; - } - - set { - factors = value; - } - } - - public float [] Positions { - get { - return positions; - } - - set { - positions = value; - } - } - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Drawing2D/ChangeLog b/mcs/class/System.Drawing/System.Drawing.Drawing2D/ChangeLog deleted file mode 100644 index 127ca1d988a..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Drawing2D/ChangeLog +++ /dev/null @@ -1,494 +0,0 @@ -2005-09-14 Konstantin Triger - - * GraphicsPath.jvm.cs: fix drawing arcs for angles >= 360 - -2005-09-14 Konstantin Triger - - * GraphicsState.jvm.cs: container - -2005-09-11 Konstantin Triger - - * GraphicsState.jvm.cs: fixing visible window for containers - -2005-09-07 Konstantin Triger - - * GraphicsPath.jvm.cs: correct angle to compute the quarter - -2005-09-07 Konstantin Triger - - * Matrix.jvm.cs: Fix copy order in CopyTo - -2005-09-07 Boris Kirzner - - * ExtendedGeneralPath.jvm.cs: Cache PathData and GeneralPath. - * PathData.cs: always return cloned points and types. Use internals - without clone for internal processing. - -2005-09-07 Vladimir Krasnov - - * LinearGradientBrush.jvm.cs: FIxed transform methods - * Matrix.jvm.cs: Added CopyTo(), fixed Invert() - -2005-09-06 Boris Kirzner - - * ExtendedGeneralPath.jvm.cs: Imported functionality from GraphicsPAth. - Added copyright. - * GeneralPathIterator.jvm.cs: Added copyright. - * GraphicsPath.jvm.cs: Implemented methods. Some functionality moved - to ExtendedGeneralPath. Added copyright. - * GraphicsPathIterator.jvm.cs: Implemented. - -2005-09-06 Konstantin Triger - - * Matrix.jvm.cs: fix scale, added static IdentityMatrix - * GraphicsState.jvm.cs, GraphicsContainer.jvm.cs: fix - containers implementation - -2005-08-30 Boris Kirzner - - * Matrix.jvm.cs: Bug fix - -2005-08-30 Vladimir Krasnov - - * LinearGradientBrush.jvm.cs: Refactoring, bug fix - * GraphicsState.jvm.cs: fixed SaveState, ResetState - -2005-08-30 Konstantin Triger - - * GraphicsPath.jvm.cs: use correct object in Widen - -2005-08-28 Vladimir Krasnov - - * Added: GraphicsContainer.jvm.cs - * Added: GraphicsState.jvm.cs - -2005-08-14 Vladimir Krasnov - - * Matrix.jvm.cs: Refactoring - -2005-08-10 Konstantin Triger - - * GraphicsPath.jvm.cs: Implemented DrawClosedCurve. - * ExtendedGeneralPath.jvm.cs: cleanup. - -2005-08-10 Boris Kirzner - * ExtendedGeneralPath.jvm.cs: Added new class. Extends java GeneralPath - functionality. - * GeneralPathIterator.jvm.cs: Added new class. Implements java PathIterator. - * GraphicsPath.jvm.cs: - - Redefined JPI enums so their values are defined in the single place. - - NativeObject is now of type ExtendedGeneralPath. - - Implemented missing constructors. - - Implemented PathData and PointCount. - - Decision about connecting to previous figure is now handled in - ExtendedGeneralPath. - - Reimplemented AddRectangle to obtain right number of points. - - Reimplemented GetLastPoint using ExtendedGeneralPath. - - CloseAllFigures must close path at the end. - - Fixed StartFigure. - -2005-08-10 Konstantin Triger - - * GraphicsPath.jvm.cs: implemented GraphicsPath.Widen - -2005-08-10 Konstantin Triger - - * GraphicsPath.jvm.cs: fix default curve tension. - -2005-08-0 9Konstantin Triger - - * GraphicsPath.jvm.cs, DashStyle.cs: refactoring - -2005-08-08 Konstantin Triger - - * GraphicsPath.cs: Implemented AddBeziers - -2005-08-08 Vladimir Krasnov - - * GraphicsPath.jvm.cs: Fixed AddPolygon methods - -2005-08-08 Konstantin Triger - - * GraphicsPath.cs: Fix AddLines - -2005-08-08 Konstantin Triger - - * GraphicsPath.cs: Fix AddArc/AddPie - -2005-08-08 Vladimir Krasnov - - * GraphicsPath.jvm.cs: Fixed AddLines methods - -2005-08-07 Konstantin Triger - - * GraphicsPath.cs: Fix AddCurve implementation and cosmetic changes. - -2005-08-07 Andrew Skiba - - * GraphicsPath.cs: BasicShape as a base class and cosmetic changes - -2005-08-03 Andrew Skiba - - * DashStyle.cs: TARGET_JVM - add internal dash attribs arrays - * AdjustableArrowCap.jvm.cs, CustomLineCap.jvm.cs, GraphicsPath.jvm.cs, - GraphicsPathIterator.jvm.cs, HatchBrush.jvm.cs, LinearGradientBrush.jvm.cs, - Matrix.jvm.cs, PathGradientBrush.jvm.cs: added TARGET_JVM implementation of - these classes. - -2005-03-15 Jordi Mas i Hernandez - - * GraphicsState.cs: should only contain the nativeState cookie - * Matrix.cs: Fixes Dispose method to allow to be called multiple times - -2005-01-02 Geoff Norton - - * GraphicsPath.cs: Fixed the AddPoints methods. Fixes bug #70916 - -2004-07-21 Ravindra - - * GraphicsPath.cs: Implemented Dispose method and added error - checking in constructors. - * GraphicsPathIterator.cs: Fixed CopyData and Enumerate methods. - -2004-07-16 Ravindra - - * GraphicsPathIterator.cs: New implementation using GDI+ APIs. - This change makes this class fit into the rest of the design well - and also it takes care of a scenario when path gets modified. Old - implementation was not taking care of this. - -2004-07-15 Ravindra - - * GraphicsPath.cs: Implemented PathData property and some formatting. - -2004-07-15 Ravindra - - * CombineMode.cs, CompositingMode.cs, CompositingQuality.cs, - GraphicsPath.cs, CoordinateSpace.cs, DashCap.cs, DashStyle.cs, - FillMode.cs, FlushIntention.cs, GraphicsPath.cs, GraphicsState.cs, - InterpolationMode.cs, LineCap.cs, LineJoin.cs, LinearGradientMode.cs, - Matrix.cs, MatrixOrder.cs, PathPointType.cs, PenAlignment.cs, - PenType.cs, PixelOffsetMode.cs, QualityMode.cs, SmoothingMode.cs, - WarpMode.cs, WrapMode.cs: Changed format dos2unix. - - * GraphicsContainer.cs, GraphicsPathIterator.cs, PathData.cs, - RegionData.cs: Changed format dos2unix and changed instance variables' - access default/internal to private. - -2004-07-13 Ravindra - - * PathGradientBrush.cs: Removed all the private variables. - Now, we get/set everything from libgdiplus. This is cleaner. - -2004-05-18 Ravindra - - * LinearGradientBrush.cs: Added checks for the values of - focus and scale parameters in SetBlendTriangularShape and - SetSigmaBellShape methods. - * PathGradientBrush.cs: Same as above. - -2004-06-13 Gert Driesen - - * DashCap.cs: fixed mismatches in enum field values - * HatchStyle.cs: fixes mismatches in enum field values - -2004-05-18 Ravindra - - * CustomLineCap.cs: Added null checks and corrected Dispose method. - -2004-05-17 Duncan Mak - - * GraphicsPathIterator.cs: Untabify and fixed coding style. - (GraphicsPathIterator): Store the path count, path points and path - type arrays instead of calling unmanaged functions in GDI+ each - time to get to get the path data. - (CopyData, Enumerate, HasCurve, Rewind, SubpathCount): - Implemented. - -2004-05-16 Gert Driesen - - * GraphicsPath.cs: renamed SetMarker to SetMarkers, to fix - public API to match MS.NET - -2004-05-15 Duncan Mak - - * GraphicsPath.cs: Instead of casting null to an IntPtr, use - IntPtr.Zero instead. Thanks to Nick Drochak for spotting this. - -2004-05-14 Nick Drochak - - * GraphicsPath.cs: fix build with csc. No implicit conversion from - null to IntPtr. Bug in mcs? - -2004-05-14 Duncan Mak - - * GraphicsPath.cs (ConvertPoints): Removed, we'll do the - conversion in C. - (GraphicsPath): Use GdipCreatePath2I instead. - (SetMarker, ClearMarkers): - (Flatten, GetBounds, IsOutlineVisible, IsVisible): - (StartFigure, CloseFigure, CloseFigures): - (Warp, Widen): Implemented. I left the MonoTODO attribute on for - the methods where the equivalent C function has not yet been - implemented. - - * GraphicsPathIterator.cs (Count): Implemented. - -2004-05-13 Sanjay Gupta - - * GraphicsState.cs: Added internal constructor. - -2004-05-13 Sanjay Gupta - - * GraphicsPath.cs: Added stub for missing method CloseFigure(). - -2004-05-11 Ravindra - - * AdjustableArrowCap.cs: Implemented. - * CustomLineCap.cs: Implemented. - -2004-05-04 Ravindra - - * LinearGradientBrush.cs: Fixed Transform property. - -2004-04-30 Ravindra - - * LinearGradientBrush.cs: Fixed some errors. - -2004-04-06 Duncan Mak - - * GraphicsPath.cs (GraphicsPath): Filled out the missing - constructors. - (ConvertPoints): New helper function. Converts a Point array to a - PointF array. - -2004-04-05 Jordi Mas i Hernandez - * GraphicsPath.cs: added missing methods - -2004-04-01 Duncan Mak - * GraphicsPath.cs (AddCurve, AddClosedCurve): Added all overloads. - -2004-03-26 Ravindra - * WrapMode.cs: Corrected the TileFlipXY and TileFlipY values. - -2004-03-23 Ravindra - * LinearGradientBrush.cs: Implemented public methods. - -2004-03-22 Ravindra - * LinearGradientBrush.cs: Implemented constructors and properties. - * PathGradientBrush.cs: Fixed a constructor and few coding - style fixes. - -2004-03-18 Ravindra - * HatchBrush.cs: Fixed Clone method. - * PathGradientBrush.cs: Fixed Clone method and few minor - fixes. - -2004-03-17 Ravindra - * Blend.cs: Fixed. - * ColorBlend.cs: Fixed. - -2004-03-06 Ravindra - * PathGradientBrush.cs: Implemented methods. - -2004-03-06 Ravindra - * PathGradientBrush.cs: Implemented constructors and properties. - -2004-03-04 Duncan Mak - - * GraphicsPath.cs (PathCount): Corrected. The name should be PointCount. - (AddPath): Implemented. - -2004-02-27 Ravindra - - * WrapMode.cs: Corrected enum values. Tile should be zero - and Clamp should be four. - -2004-02-11 Ravindra - - * Matrix.cs: Added status checks using - GDIPlus.CheckStatus(Status) method. - -2004-02-07 Andreas Nahr - - * GraphicsPathIterator.cs: Fixed signature, added TODOs - * Matrix.cs: Removed additional method - -2004-02-06 Ravindra - - * HatchBrush.cs: Using CheckStatus method instead of - GetException. - -2004-02-05 Ravindra - - * HatchBrush.cs: Implemented. - * HatchStyle.cs: Corrected enum values. Changed file format - from DOS to UNIX. - -2004-01-30 Duncan Mak - - * GraphicsPath.cs (AddPie): Corrected arguments sent to - P/Invoke. This fixes the strange NaNs we were getting when we - tried to draw Paths with a Pie figure. - -2004-01-24 Duncan Mak - - * GraphicsPath.cs (AddEllipse): Added. - -2004-01-19 Duncan Mak - - * GraphicsPath.cs: Implemented. Still needs testing, though. - Particular the PathPoints property, I ran into a P/Invoke problem, - I need to first fix that before I can go on with the rest of the testing. - -2004-01-13 Ravindra - - * Matrix.cs: Made the Matrix(IntPtr) constructor internal. - Because default access is private, that makes it unusable - by other classes. - -2004-01-11 Duncan Mak - - * Matrix.cs (Matrix): Removed reference to GpRect/GpRectF. - -2004-01-10 Ravindra - - * All Enums: Made serializable. - - * GraphicsPathIterator.cs: Implements IDisposable. - - * GraphicsState.cs: Inherits MarshalByRefObject. - -2003-12-25 Duncan Mak - - * Matrix.cs (ToString): Cache the elements inside a local variable - to avoid calling the Elements property repeatedly. - -2003-12-04 Gonzalo Paniagua Javier - - * Blend.cs: fix array sizes in the constructors. Closes bug #51564. - System.Web moves in mysterious ways. - -2003-11-22 Duncan Mak - - * Matrix.cs: Rewrote to use GDI+ implementation, doing all the - math in unmanaged code instead of doing it in C#. - -2003-11-04 Miguel de Icaza - - * GraphicsPathIterator.cs: Do not make this protected. - -2003-11-13 Andreas Nahr - - * QualityMode.cs: Fixed typo - * InterpolationMode.cs: Fixed typo - * RegionData.cs: Fixed signatures, partially implemented - * PathGradientBrush.cs: Fixed signatures - * PathData.cs: Fixed signature, implemented - * LinearGradientBrush.cs: Added missing MonoTODOs, fixed typo - * GraphicsContainer.cs: Added private constructor - * CustomLineCap.cs: Fixed typos, fixed inheritance, removed unneeded member - -2003-11-11 Ben Maurer - - * ColorBlend.cs (Positions): another one. - -2003-11-11 Ben Maurer - - * Blend.cs (Positions): recursion in prop. - -2003-10-24 Miguel de Icaza - - * GraphicsPath.cs: Stub some more. - -2003-10-12 Alexandre Pigolkine - * GraphicsState.cs internal member added - -2003-06-26 Alexandre Pigolkine - * GraphicsState.cs internal member added - -2003-04-26 Alexandre Pigolkine - * LinearGradientBrush.cs some implementation added - -2003-3-15 DennisHayes - * Stubbed and somewhat implmented - - * CustomLineCap.cs - * GraphicsContainer.cs - * GraphicsPath.cs - * GraphicsPathIterator.cs - * GraphicsState.cs - * HatchBrush.cs - * LinearGradientBrush.cs - -2003-3-5 DennisHayes - * Added values for enums - * Stubbed and somewhat implmented Blend, ColorBlend, CustomLineCap - - -2003-3-2 DennisHayes - - * Created changelog - * updated copyrights to 2002/3 - * changed namespace from System.Drawing, System.Drawing.Drawing2d to System.Drawing.Drawing2D - * cosmetic improvments - -2002-10-13 DennisHayes - * Changed namespace from *2d to *2D - * Changed comment header from system.Drawing to System.Drawing.Drawing2D - -2002-9-2 DennisHayes - - * AdjustableArrowCap.cs - * Blend.cs - * ColorBlend.cs - * CombineMode.cs - * CompostingMode.cs - * CompostingQuality.cs - * CoordinateSpace.cs - * CustomLineCap.cs - * DashCap.cs - * DashStyle.cs - * FillMode.cs - * FlushIntention.cs - * GraphicsContainer.cs - * GraphicsPathIterator.cs - * GraphicsState.cs - * HatchBrush.cs - * HatchStyle.cs - * InterpolationMode.cs - * LinearGradientBrush.cs - * LinearGradientMode.cs - * LineCap.cs - * LineJoin.cs - * MatrixOrder.cs - * PathData.cs - * PathGradientBrush.cs - * PathPointType.cs - * PenAligment.cs - * PenType.cs - * PixelOffsetMode.cs - * QualityMode.cs - * RegionData.cs - * SmoothingMode.cs - * WarpMode.cs - * WrapMode.cs - * Added null classes for most/all classes, Many stubs, and some implmentation - -2002-9-2 DennisHayes - - * Matrix.cs - * Added stubs, implmentation - -2002-9-2 DennisHayes - - * GraphicsPath.cs - * added stub needed for system.windows.forms - -2002-01-06 Ravi Pratap - - * ChangeLog : Add. - - * Matrix.cs : MonoTODO everywhere. - - * TODOAttribute.cs : Add here too. diff --git a/mcs/class/System.Drawing/System.Drawing.Drawing2D/ColorBlend.cs b/mcs/class/System.Drawing/System.Drawing.Drawing2D/ColorBlend.cs deleted file mode 100644 index fa3707b1cf6..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Drawing2D/ColorBlend.cs +++ /dev/null @@ -1,75 +0,0 @@ -// -// System.Drawing.Drawing2D.ColorBlend.cs -// -// Authors: -// Dennis Hayes (dennish@Raytek.com) -// Ravindra (rkumar@novell.com) -// -// (C) 2002/3 Ximian, Inc. http://www.ximian.com -// (C) 2004 Novell, Inc. http://www.novell.com -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -using System; - -namespace System.Drawing.Drawing2D -{ - public sealed class ColorBlend - { - private float [] positions; - private Color [] colors; - - public ColorBlend () - { - positions = new float [1]; - colors = new Color [1]; - } - - public ColorBlend (int count) - { - positions = new float [count]; - colors = new Color [count]; - } - - public Color [] Colors { - get { - return colors; - } - - set { - colors = value; - } - } - - public float [] Positions { - get { - return positions; - } - - set { - positions = value; - } - } - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Drawing2D/CombineMode.cs b/mcs/class/System.Drawing/System.Drawing.Drawing2D/CombineMode.cs deleted file mode 100644 index b459c5cae8a..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Drawing2D/CombineMode.cs +++ /dev/null @@ -1,48 +0,0 @@ -// -// System.Drawing.Drawing2D.CombineMode.cs -// -// Author: -// Stefan Maierhofer -// Dennis Hayes (dennish@Raytek.com) -// -// (C) 2002/3 Ximian, Inc -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -using System; - -namespace System.Drawing.Drawing2D { - /// - /// Summary description for CombineMode. - /// - [Serializable] - public enum CombineMode { - Complement = 5, - Exclude = 4, - Intersect = 1, - Replace = 0, - Union = 2, - Xor = 3 - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Drawing2D/CompostingMode.cs b/mcs/class/System.Drawing/System.Drawing.Drawing2D/CompostingMode.cs deleted file mode 100644 index 4f7b3b31ab5..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Drawing2D/CompostingMode.cs +++ /dev/null @@ -1,44 +0,0 @@ -// -// System.Drawing.Drawing2D.CompostingMode.cs -// -// Author: -// Stefan Maierhofer -// Dennis Hayes (dennish@Raytek.com) -// -// (C) 2002/3 Ximian, Inc -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -using System; - -namespace System.Drawing.Drawing2D { - /// - /// Summary description for CompostingMode. - /// - [Serializable] - public enum CompositingMode { - SourceCopy = 1, - SourceOver = 0 - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Drawing2D/CompostingQuality.cs b/mcs/class/System.Drawing/System.Drawing.Drawing2D/CompostingQuality.cs deleted file mode 100644 index cbb0de05fe6..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Drawing2D/CompostingQuality.cs +++ /dev/null @@ -1,48 +0,0 @@ -// -// System.Drawing.Drawing2D.CompostingQuality.cs -// -// Author: -// Stefan Maierhofer -// Dennis Hayes (dennish@Raytek.com) -// -// (C) 2002/3 Ximian, Inc -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -using System; - -namespace System.Drawing.Drawing2D { - /// - /// Summary description for CompostingQuality. - /// - [Serializable] - public enum CompositingQuality { - AssumeLinear = 4, - Default = 0, - GammaCorrected = 3, - HighQuality = 2, - HighSpeed = 1, - Invalid = -1 - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Drawing2D/CoordinateSpace.cs b/mcs/class/System.Drawing/System.Drawing.Drawing2D/CoordinateSpace.cs deleted file mode 100644 index 982351f2485..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Drawing2D/CoordinateSpace.cs +++ /dev/null @@ -1,45 +0,0 @@ -// -// System.Drawing.Drawing2D.CoordinateSpace.cs -// -// Author: -// Stefan Maierhofer -// Dennis Hayes (dennish@Raytek.com) -// -// (C) 2002/3 Ximian, Inc -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -using System; - -namespace System.Drawing.Drawing2D { - /// - /// Summary description for CoordinateSpace. - /// - [Serializable] - public enum CoordinateSpace { - Device = 2, - Page = 1, - World = 0 - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Drawing2D/CustomLineCap.cs b/mcs/class/System.Drawing/System.Drawing.Drawing2D/CustomLineCap.cs deleted file mode 100644 index a01ee407c70..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Drawing2D/CustomLineCap.cs +++ /dev/null @@ -1,183 +0,0 @@ -// -// System.Drawing.Drawing2D.CustomLineCap.cs -// -// Authors: -// Dennis Hayes (dennish@Raytek.com) -// Andreas Nahr (ClassDevelopment@A-SoftTech.com) -// Ravindra (rkumar@novell.com) -// -// Copyright (C) 2002/3 Ximian, Inc. http://www.ximian.com -// Copyright (C) 2004 Novell, Inc. http://www.novell.com -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; - -namespace System.Drawing.Drawing2D -{ - /// - /// Summary description for CustomLineCap. - /// - public class CustomLineCap : MarshalByRefObject, ICloneable, IDisposable - { - private bool disposed; - internal IntPtr nativeObject; - - // Constructors - - internal CustomLineCap () { } - - internal CustomLineCap (IntPtr ptr) - { - nativeObject = ptr; - } - - public CustomLineCap (GraphicsPath fillPath, GraphicsPath strokePath) : this (fillPath, strokePath, LineCap.Flat, 0) - { - } - - public CustomLineCap (GraphicsPath fillPath, GraphicsPath strokePath, LineCap baseCap) : this (fillPath, strokePath, baseCap, 0) - { - } - - public CustomLineCap(GraphicsPath fillPath, GraphicsPath strokePath, LineCap baseCap, float baseInset) - { - IntPtr fill = IntPtr.Zero; - IntPtr stroke = IntPtr.Zero; - - if (fillPath != null) - fill = fillPath.nativePath; - if (strokePath != null) - stroke = strokePath.nativePath; - - Status status = GDIPlus.GdipCreateCustomLineCap (fill, stroke, baseCap, baseInset, out nativeObject); - GDIPlus.CheckStatus (status); - } - - public LineCap BaseCap { - get { - LineCap baseCap; - Status status = GDIPlus.GdipGetCustomLineCapBaseCap (nativeObject, out baseCap); - GDIPlus.CheckStatus (status); - - return baseCap; - } - - set { - Status status = GDIPlus.GdipSetCustomLineCapBaseCap (nativeObject, value); - GDIPlus.CheckStatus (status); - } - } - - public LineJoin StrokeJoin { - get { - LineJoin strokeJoin; - Status status = GDIPlus.GdipGetCustomLineCapStrokeJoin (nativeObject, out strokeJoin); - GDIPlus.CheckStatus (status); - - return strokeJoin; - } - - set { - Status status = GDIPlus.GdipSetCustomLineCapStrokeJoin (nativeObject, value); - GDIPlus.CheckStatus (status); - } - } - - public float BaseInset { - get { - float baseInset; - Status status = GDIPlus.GdipGetCustomLineCapBaseInset (nativeObject, out baseInset); - GDIPlus.CheckStatus (status); - - return baseInset; - } - - set { - Status status = GDIPlus.GdipSetCustomLineCapBaseInset (nativeObject, value); - GDIPlus.CheckStatus (status); - } - } - - public float WidthScale { - get { - float widthScale; - Status status = GDIPlus.GdipGetCustomLineCapWidthScale (nativeObject, out widthScale); - GDIPlus.CheckStatus (status); - - return widthScale; - } - - set { - Status status = GDIPlus.GdipSetCustomLineCapWidthScale (nativeObject, value); - GDIPlus.CheckStatus (status); - } - } - - // Public Methods - - public virtual object Clone () - { - IntPtr clonePtr; - Status status = GDIPlus.GdipCloneCustomLineCap (nativeObject, out clonePtr); - GDIPlus.CheckStatus (status); - - return new CustomLineCap (clonePtr); - } - - public virtual void Dispose () - { - Dispose (true); - System.GC.SuppressFinalize (this); - } - - protected virtual void Dispose (bool disposing) - { - if (! disposed) { - Status status = GDIPlus.GdipDeleteCustomLineCap (nativeObject); - GDIPlus.CheckStatus (status); - disposed = true; - nativeObject = IntPtr.Zero; - } - } - - ~CustomLineCap () - { - Dispose (false); - } - - public void GetStrokeCaps (out LineCap startCap, out LineCap endCap) - { - Status status = GDIPlus.GdipGetCustomLineCapStrokeCaps (nativeObject, out startCap, out endCap); - GDIPlus.CheckStatus (status); - } - - public void SetStrokeCaps(LineCap startCap, LineCap endCap) - { - Status status = GDIPlus.GdipSetCustomLineCapStrokeCaps (nativeObject, startCap, endCap); - GDIPlus.CheckStatus (status); - } - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Drawing2D/CustomLineCap.jvm.cs b/mcs/class/System.Drawing/System.Drawing.Drawing2D/CustomLineCap.jvm.cs deleted file mode 100755 index fa57bfeb453..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Drawing2D/CustomLineCap.jvm.cs +++ /dev/null @@ -1,122 +0,0 @@ -// -// System.Drawing.Drawing2D.CustomLineCap.cs -// -// Authors: -// Dennis Hayes (dennish@Raytek.com) -// Andreas Nahr (ClassDevelopment@A-SoftTech.com) -// Ravindra (rkumar@novell.com) -// -// Copyright (C) 2002/3 Ximian, Inc. http://www.ximian.com -// Copyright (C) 2004 Novell, Inc. http://www.novell.com -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; - -namespace System.Drawing.Drawing2D -{ - /// - /// Summary description for CustomLineCap. - /// - public class CustomLineCap : MarshalByRefObject, ICloneable - { - private bool disposed; - - // Constructors - - internal CustomLineCap () { } - - public CustomLineCap (GraphicsPath fillPath, GraphicsPath strokePath) : this (fillPath, strokePath, LineCap.Flat, 0) - { - } - - public CustomLineCap (GraphicsPath fillPath, GraphicsPath strokePath, LineCap baseCap) : this (fillPath, strokePath, baseCap, 0) - { - } - - public CustomLineCap(GraphicsPath fillPath, GraphicsPath strokePath, LineCap baseCap, float baseInset) - { - throw new NotImplementedException(); - } - - public LineCap BaseCap { - get { - throw new NotImplementedException(); - } - - set { - throw new NotImplementedException(); - } - } - - public LineJoin StrokeJoin { - get { - throw new NotImplementedException(); - } - - set { - throw new NotImplementedException(); - } - } - - public float BaseInset { - get { - throw new NotImplementedException(); - } - - set { - throw new NotImplementedException(); - } - } - - public float WidthScale { - get { - throw new NotImplementedException(); - } - - set { - throw new NotImplementedException(); - } - } - - // Public Methods - - public virtual object Clone () - { - throw new NotImplementedException(); - } - - - public void GetStrokeCaps (out LineCap startCap, out LineCap endCap) - { - throw new NotImplementedException(); - } - - public void SetStrokeCaps(LineCap startCap, LineCap endCap) - { - throw new NotImplementedException(); - } - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Drawing2D/DashCap.cs b/mcs/class/System.Drawing/System.Drawing.Drawing2D/DashCap.cs deleted file mode 100644 index 06fa7367222..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Drawing2D/DashCap.cs +++ /dev/null @@ -1,45 +0,0 @@ -// -// System.Drawing.Drawing2D.DashCap.cs -// -// Author: -// Stefan Maierhofer -// Dennis Hayes (dennish@Raytek.com) -// -// (C) 2002/3 Ximian, Inc -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -using System; - -namespace System.Drawing.Drawing2D { - /// - /// Summary description for DashCap. - /// - [Serializable] - public enum DashCap { - Flat, - Round = 2, - Triangle = 3 - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Drawing2D/DashStyle.cs b/mcs/class/System.Drawing/System.Drawing.Drawing2D/DashStyle.cs deleted file mode 100644 index 7ffff02174c..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Drawing2D/DashStyle.cs +++ /dev/null @@ -1,48 +0,0 @@ -// -// System.Drawing.Drawing2D.DashStyle.cs -// -// Author: -// Dennis Hayes (dennish@Raytek.com) -// -// (C) 2002/3 Ximian, Inc -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -using System; - -namespace System.Drawing.Drawing2D -{ - /// - /// Summary description for DashStyle. - /// - [Serializable] - public enum DashStyle { - Custom = 5, - Dash = 1, - DashDot = 3, - DashDotDot = 4, - Dot = 2, - Solid = 0 - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Drawing2D/ExtendedGeneralPath.jvm.cs b/mcs/class/System.Drawing/System.Drawing.Drawing2D/ExtendedGeneralPath.jvm.cs deleted file mode 100644 index 993857cf724..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Drawing2D/ExtendedGeneralPath.jvm.cs +++ /dev/null @@ -1,664 +0,0 @@ -// -// System.Drawing.Drawing2D.ExtendedGeneralPath.cs -// -// Author: -// Bors Kirzner -// -// Copyright (C) 2005 Mainsoft Corporation, (http://www.mainsoft.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; - -using java.awt; -using java.awt.geom; -using java.lang; - -namespace System.Drawing.Drawing2D -{ - internal class ExtendedGeneralPath : Shape, ICloneable - { - #region Fields - - public const int WIND_EVEN_ODD = 0; //PathIterator__Finals.WIND_EVEN_ODD; - public const int WIND_NON_ZERO = 1; //PathIterator__Finals.WIND_NON_ZERO; - - public const sbyte SEG_MOVETO = 0; //(byte) PathIterator__Finals.SEG_MOVETO; - public const sbyte SEG_LINETO = 1; //(byte) PathIterator__Finals.SEG_LINETO; - public const sbyte SEG_QUADTO = 2; //(byte) PathIterator__Finals.SEG_QUADTO; - public const sbyte SEG_CUBICTO = 3; //(byte) PathIterator__Finals.SEG_CUBICTO; - public const sbyte SEG_CLOSE = 4; //(byte) PathIterator__Finals.SEG_CLOSE; - - public const sbyte SEG_START = 16; // segment start - - public const sbyte SEG_MASK = SEG_MOVETO | SEG_LINETO | SEG_QUADTO | SEG_CUBICTO | SEG_CLOSE; // mask to eliminate SEG_CLOSE and SEG_MARKER - - private const sbyte SEG_MARKER = 32; // path marker - - - private sbyte [] _types; - private float [] _coords; - private int _typesCount; - private int _coordsCount; - private int _windingRule; - - private PathData _pathData; - private GeneralPath _generalPath; - - const int INIT_SIZE = 20; - const int EXPAND_MAX = 500; - - #endregion // Fileds - - #region Constructors - - public ExtendedGeneralPath() : this (WIND_NON_ZERO, INIT_SIZE, INIT_SIZE) - { - } - - public ExtendedGeneralPath(int rule) : this (rule, INIT_SIZE, INIT_SIZE) - { - } - - public ExtendedGeneralPath(int rule, int initialCapacity) : this (rule, initialCapacity, initialCapacity) - { - } - - public ExtendedGeneralPath(Shape s) : this(WIND_NON_ZERO, INIT_SIZE, INIT_SIZE) - { - PathIterator pi = s.getPathIterator (null); - setWindingRule (pi.getWindingRule ()); - append (pi, false); - } - - private ExtendedGeneralPath(int rule, int initialTypes, int initialCoords) - { - setWindingRule(rule); - Reset (initialTypes, initialCoords); - } - - #endregion // Constructors - - #region Properties - - private GeneralPath GeneralPath - { - get { - if (_generalPath == null) { - _generalPath = GetGeneralPath (); - } - return _generalPath; - } - } - - public sbyte [] Types - { - get { return _types; } - } - - public float [] Coords - { - get { return _coords; } - } - - public int TypesCount - { - get { return _typesCount; } - } - - public int CoordsCount - { - get { return _coordsCount; } - } - - public bool LastFigureClosed - { - get { - return ((TypesCount == 0) || - ((Types [TypesCount - 1] & ExtendedGeneralPath.SEG_CLOSE) != 0) || - ((Types [TypesCount - 1] & ExtendedGeneralPath.SEG_START) != 0)); - } - } - - public int PointCount - { - get { - return CoordsCount / 2; - } - } - - public PathData PathData - { - get - { - if (_pathData == null) - _pathData = GetPathData (); - - return _pathData; - } - } - - #endregion // Properties - - #region Methods - - #region CachedData - - private void ClearCache () - { - _pathData = null; - _generalPath = null; - } - - private GeneralPath GetGeneralPath () - { - PathIterator iter = getPathIterator (null); - GeneralPath path = new GeneralPath (); - path.append (iter, false); - return path; - } - - private PathData GetPathData () - { - PathData pathData = new PathData(); - pathData.Types = new byte [PointCount]; - pathData.Points = new PointF [PointCount]; - int tpos = 0; - int ppos = 0; - int cpos = 0; - byte marker; - bool start; - for (int i = 0; i < TypesCount; i++) { - sbyte segmentType = (sbyte)(Types [i] & SEG_MASK); - - // set the masks and the markers - marker = ((Types [i] & SEG_MARKER) != 0) ? (byte)PathPointType.PathMarker : (byte)0; - start = ((Types [i] & SEG_START) != 0); - - switch (segmentType) { - case SEG_CLOSE: - pathData.InternalTypes [tpos - 1] = (byte) (pathData.InternalTypes [tpos - 1] | (byte) PathPointType.CloseSubpath | marker); - break; - case SEG_MOVETO: - pathData.InternalTypes [tpos++] = (byte)((byte) PathPointType.Start | marker); - pathData.InternalPoints [ppos++] = new PointF (Coords [cpos++], Coords [cpos++]); - break; - case SEG_LINETO: - pathData.InternalTypes [tpos++] = (byte) ((byte) PathPointType.Line | marker); - pathData.InternalPoints [ppos++] = new PointF (Coords [cpos++], Coords [cpos++]); - break; - case SEG_QUADTO: - // FIXME : use 4 cp , two of which - pathData.InternalTypes [tpos++] = (byte)(byte) PathPointType.Bezier; - pathData.InternalPoints [ppos++] = new PointF (Coords [cpos++], Coords [cpos++]); - pathData.InternalTypes [tpos++] = (byte) ((byte)PathPointType.Bezier | marker); - pathData.InternalPoints [ppos++] = new PointF (Coords [cpos++], Coords [cpos++]); - break; - case SEG_CUBICTO: - pathData.InternalTypes [tpos++] = (byte)(byte) PathPointType.Bezier3; - pathData.InternalPoints [ppos++] = new PointF (Coords [cpos++], Coords [cpos++]); - pathData.InternalTypes [tpos++] = (byte) PathPointType.Bezier3; - pathData.InternalPoints [ppos++] = new PointF (Coords [cpos++], Coords [cpos++]); - pathData.InternalTypes [tpos++] = (byte) ((byte)PathPointType.Bezier3 | marker); - pathData.InternalPoints [ppos++] = new PointF (Coords [cpos++], Coords [cpos++]); - break; - } - } - return pathData; - } - - #endregion // CachedData - - public void append(Shape s) - { - append (s, !LastFigureClosed); - } - - #region GeneralPath - - public void append(PathIterator pi, bool connect) - { - ClearCache (); - float [] coords = new float [6]; - while (!pi.isDone ()) { - switch (pi.currentSegment (coords)) { - case SEG_MOVETO: - if (!connect || _typesCount < 1 || _coordsCount < 2) { - moveTo (coords [0], coords [1]); - break; - } - if (_types [_typesCount - 1] != SEG_CLOSE && - _coords [_coordsCount - 2] == coords [0] && - _coords [_coordsCount - 1] == coords [1]) - break; - goto case SEG_LINETO; - case SEG_LINETO: - lineTo (coords [0], coords [1]); - break; - case SEG_QUADTO: - quadTo (coords [0], coords [1], coords [2], coords [3]); - break; - case SEG_CUBICTO: - curveTo (coords [0], coords [1], coords [2], coords [3], coords [4], coords [5]); - break; - case SEG_CLOSE: - closePath (); - break; - } - pi.next (); - connect = false; - } - } - - public void append(Shape s, bool connect) - { - PathIterator pi = s.getPathIterator (null); - append (pi,connect); - } - - public object Clone() - { - ExtendedGeneralPath copy = (ExtendedGeneralPath)MemberwiseClone (); - copy._types = (sbyte []) _types.Clone (); - copy._coords = (float []) _coords.Clone (); - return copy; - } - - public void closePath() - { - ClearCache (); - if (_typesCount == 0 || _types[_typesCount - 1] != SEG_CLOSE) { - needRoom (1, 0, true); - _types [_typesCount++] = SEG_CLOSE; - } - } - - public bool contains(double x, double y) - { - return GeneralPath.contains (x, y); - } - - public bool contains(double x, double y, double w, double h) - { - return GeneralPath.contains (x, y, w, h); - } - - public bool contains(Point2D p) - { - return contains (p.getX (), p.getY ()); - } - - public bool contains(Rectangle2D r) - { - return contains (r.getX (), r.getY (), r.getWidth (), r.getHeight ()); - } - - public Shape createTransformedShape(AffineTransform at) - { - ExtendedGeneralPath gp = (ExtendedGeneralPath) Clone (); - if (at != null) { - gp.transform (at); - } - return gp; - } - - public void curveTo(float x1, float y1, float x2, float y2, float x3, float y3) - { - ClearCache (); - needRoom (1, 6, true); - _types [_typesCount++] = SEG_CUBICTO; - _coords [_coordsCount++] = x1; - _coords [_coordsCount++] = y1; - _coords [_coordsCount++] = x2; - _coords [_coordsCount++] = y2; - _coords [_coordsCount++] = x3; - _coords [_coordsCount++] = y3; - } - - public java.awt.Rectangle getBounds() - { - return getBounds2D ().getBounds (); - } - - public Rectangle2D getBounds2D() - { - float x1, y1, x2, y2; - int i = _coordsCount; - if (i > 0) { - y1 = y2 = _coords [--i]; - x1 = x2 = _coords [--i]; - while (i > 0) { - float y = _coords [--i]; - float x = _coords [--i]; - if (x < x1) x1 = x; - if (y < y1) y1 = y; - if (x > x2) x2 = x; - if (y > y2) y2 = y; - } - } - else { - x1 = y1 = x2 = y2 = 0f; - } - return new Rectangle2D.Float (x1, y1, x2 - x1, y2 - y1); - } - - public Point2D getCurrentPoint() - { - if (_typesCount < 1 || _coordsCount < 2) - return null; - - int index = _coordsCount; - if (_types [_typesCount - 1] == SEG_CLOSE) - for (int i = _typesCount - 2; i > 0; i--) { - switch (_types [i]) { - case SEG_MOVETO: - //break loop; - goto loopend; - case SEG_LINETO: - index -= 2; - break; - case SEG_QUADTO: - index -= 4; - break; - case SEG_CUBICTO: - index -= 6; - break; - case SEG_CLOSE: - break; - } - } - loopend: - - return new Point2D.Float (_coords [index - 2], _coords [index - 1]); - } - - public PathIterator getPathIterator(AffineTransform at) { - return new GeneralPathIterator (this, at); - } - - public PathIterator getPathIterator(AffineTransform at, double flatness) { - return new FlatteningPathIterator (getPathIterator (at), flatness); - } - - public int getWindingRule() - { - return _windingRule; - } - - public bool intersects(double x, double y, double w, double h) - { - return GeneralPath.intersects (x, y, w, h); - } - - public bool intersects(Rectangle2D r) - { - return intersects (r.getX (), r.getY (), r.getWidth (), r.getHeight ()); - } - - public void lineTo(float x, float y) - { - ClearCache (); - needRoom (1, 2, true); - _types [_typesCount++] = SEG_LINETO; - _coords [_coordsCount++] = x; - _coords [_coordsCount++] = y; - } - - public void moveTo(float x, float y) - { - ClearCache (); - if (_typesCount > 0 && _types [_typesCount - 1] == SEG_MOVETO) { - _coords [_coordsCount - 2] = x; - _coords [_coordsCount - 1] = y; - } - else { - needRoom (1, 2, false); - _types [_typesCount++] = SEG_MOVETO; - _coords [_coordsCount++] = x; - _coords [_coordsCount++] = y; - } - } - - public void quadTo(float x1, float y1, float x2, float y2) - { - ClearCache (); - needRoom (1, 4, true); - _types [_typesCount++] = SEG_QUADTO; - _coords [_coordsCount++] = x1; - _coords [_coordsCount++] = y1; - _coords [_coordsCount++] = x2; - _coords [_coordsCount++] = y2; - } - - public void reset() - { - ClearCache (); - _typesCount = 0; - _coordsCount = 0; - } - - public void setWindingRule(int rule) - { - if (rule != WIND_EVEN_ODD && rule != WIND_NON_ZERO) { - throw new IllegalArgumentException ("winding rule must be WIND_EVEN_ODD or WIND_NON_ZERO"); - } - _windingRule = rule; - } - - public void transform(AffineTransform at) - { - ClearCache (); - at.transform (_coords, 0, _coords, 0, _coordsCount/2); - } - - private void needRoom(int newTypes, int newCoords, bool needMove) - { - if (needMove && _typesCount == 0) - throw new IllegalPathStateException ("missing initial moveto in path definition"); - - int size = _coords.Length; - if (_coordsCount + newCoords > size) { - int grow = size; - if (grow > EXPAND_MAX * 2) - grow = EXPAND_MAX * 2; - - if (grow < newCoords) - grow = newCoords; - - float [] arr = new float [size + grow]; - Array.Copy (_coords, 0, arr, 0, _coordsCount); - _coords = arr; - } - size = _types.Length; - if (_typesCount + newTypes > size) { - int grow = size; - if (grow > EXPAND_MAX) - grow = EXPAND_MAX; - - if (grow < newTypes) - grow = newTypes; - - sbyte [] arr = new sbyte [size + grow]; - Array.Copy (_types, 0, arr, 0, _typesCount); - _types = arr; - } - } - - #endregion // GeneralPath - - public void SetMarkers() - { - ClearCache (); - if (TypesCount > 0) - Types [ TypesCount - 1] |= SEG_MARKER; - } - - public void ClearMarkers() - { - ClearCache (); - for (int i = 0; i < TypesCount; i++) - Types [i] &= ~SEG_MARKER; - } - - public void StartFigure () - { - ClearCache (); - if (TypesCount > 0) - Types [TypesCount - 1] |= ExtendedGeneralPath.SEG_START; - } - - private void Reset (int initialTypes, int initialCoords) - { - ClearCache (); - _types = new sbyte [initialTypes]; - _coords = new float [initialCoords * 2]; - _typesCount = 0; - _coordsCount = 0; - } - - internal void Clear () - { - Reset (INIT_SIZE, INIT_SIZE); - } - - internal void Reverse () - { - ClearCache (); - // revert coordinates - for (int i=0, max = CoordsCount / 2; i < max;) { - int ix = i++; - int iy = i++; - int rix = CoordsCount - i; - int riy = rix + 1; - float tmpx = Coords [ix]; - float tmpy = Coords [iy]; - Coords [ix] = Coords [rix]; - Coords [iy] = Coords [riy]; - Coords [rix] = tmpx; - Coords [riy] = tmpy; - } - - // revert types - sbyte [] newTypes = new sbyte [TypesCount]; - int oldIdx = 0; - int newIdx = TypesCount - 1; - int copyStart; - int copyEnd; - sbyte mask1 = 0; - sbyte mask2 = 0; - sbyte closeMask = 0; - bool closedFigure = false; - - while (oldIdx < TypesCount) { - // start copying after moveto - copyStart = ++oldIdx; - // continue to the next figure start - while ((Types [oldIdx] != SEG_MOVETO) && (oldIdx < TypesCount)) - oldIdx++; - - copyEnd = oldIdx - 1; - // check whenever current figure is closed - if ((Types [oldIdx - 1] & SEG_CLOSE) != 0) { - closedFigure = true; - // close figure - newTypes [newIdx--] = (sbyte)(SEG_CLOSE | mask1); - mask1 = 0; - mask2 = 0; - // end copy one cell earlier - copyEnd--; - closeMask = (sbyte)(Types [oldIdx - 1] & (sbyte)SEG_MARKER); - } - else { - mask2 = mask1; - mask1 = 0; - } - - // copy reverted "inner" types - for(int i = copyStart; i <= copyEnd; i++) { - newTypes [newIdx--] = (sbyte)((Types [i] & SEG_MASK) | mask2); - mask2 = mask1; - mask1 = (sbyte)(Types [i] & (sbyte)SEG_MARKER); - } - - // copy moveto - newTypes [newIdx--] = SEG_MOVETO; - - // pass close mask to the nex figure - if (closedFigure) { - mask1 = closeMask; - closedFigure = false; - } - } - - _types = newTypes; - } - - public PointF GetLastPoint () - { - if (CoordsCount == 0) - throw new System.ArgumentException ("Invalid parameter used."); - - return new PointF (Coords [CoordsCount - 2], Coords [CoordsCount - 1]); - } - - #endregion //Methods - - #region Private helpers - -#if DEBUG - private void Print() - { - Console.WriteLine ("\n\n"); - float [] fpoints = _coords; - int cpos = 0; - for (int i=0; i < _typesCount; i++) { - sbyte type = _types [i]; - string marker = String.Empty; - if ((type & SEG_MARKER) != 0) - marker = " | MARKER"; - - switch (type & SEG_MASK) { - case SEG_CLOSE: - Console.WriteLine ("CLOSE {0}",marker); - break; - case SEG_MOVETO: - Console.WriteLine("{0}{3} ({1},{2})","MOVETO", fpoints[cpos++], fpoints[cpos++], marker); - break; - case SEG_LINETO: - Console.WriteLine("{0}{3} ({1},{2})","LINETO", fpoints[cpos++], fpoints[cpos++], marker); - break; - case SEG_QUADTO: - Console.WriteLine("{0}{3} ({1},{2})","QUADTO", fpoints[cpos++], fpoints[cpos++], marker); - Console.WriteLine(" ({1},{2})","QUADTO", fpoints[cpos++], fpoints[cpos++]); - break; - case SEG_CUBICTO: - Console.WriteLine("{0}{3} ({1},{2})","CUBICTO", fpoints[cpos++], fpoints[cpos++], marker); - Console.WriteLine(" ({1},{2})","CUBICTO", fpoints[cpos++], fpoints[cpos++]); - Console.WriteLine(" ({1},{2})","CUBICTO", fpoints[cpos++], fpoints[cpos++]); - break; - } - } - } -#endif - #endregion // Private helpers - - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Drawing2D/FillMode.cs b/mcs/class/System.Drawing/System.Drawing.Drawing2D/FillMode.cs deleted file mode 100644 index f9b6f9e3f10..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Drawing2D/FillMode.cs +++ /dev/null @@ -1,45 +0,0 @@ -// -// System.Drawing.Drawing2D.FillMode.cs -// -// Author: -// Stefan Maierhofer -// Dennis Hayes (dennish@Raytek.com) -// -// (C) 2002/3 Ximian, Inc -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; - -namespace System.Drawing.Drawing2D { - /// - /// Summary description for FillMode. - /// - [Serializable] - public enum FillMode { - Alternate = 0, - Winding = 1 - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Drawing2D/FlushIntention.cs b/mcs/class/System.Drawing/System.Drawing.Drawing2D/FlushIntention.cs deleted file mode 100644 index c37c7d7b99b..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Drawing2D/FlushIntention.cs +++ /dev/null @@ -1,44 +0,0 @@ -// -// System.Drawing.Drawing2D.FlushIntention.cs -// -// Author: -// Stefan Maierhofer -// Dennis Hayes (dennish@Raytek.com) -// -// (C) 2002/3 Ximian, Inc -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -using System; - -namespace System.Drawing.Drawing2D { - /// - /// Summary description for FlushIntention. - /// - [Serializable] - public enum FlushIntention { - Flush = 0, - Sync = 1 - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Drawing2D/GeneralPathIterator.jvm.cs b/mcs/class/System.Drawing/System.Drawing.Drawing2D/GeneralPathIterator.jvm.cs deleted file mode 100644 index 1cfa230a4e8..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Drawing2D/GeneralPathIterator.jvm.cs +++ /dev/null @@ -1,105 +0,0 @@ -// -// System.Drawing.Drawing2D.GeneralPathIterator.cs -// -// Author: -// Bors Kirzner -// -// Copyright (C) 2005 Mainsoft Corporation, (http://www.mainsoft.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; - -using java.awt.geom; - -namespace System.Drawing.Drawing2D -{ - internal class GeneralPathIterator : PathIterator - { - #region Fields - - int typeIdx = 0; - int pointIdx = 0; - ExtendedGeneralPath _path; - AffineTransform _affine; - - private static readonly int [] curvesize = {2, 2, 4, 6, 0}; - - #endregion // Fileds - - #region Constructors - - public GeneralPathIterator(ExtendedGeneralPath _path) : this (_path, null) - { - } - - public GeneralPathIterator(ExtendedGeneralPath _path, AffineTransform at) - { - this._path = _path; - this._affine = at; - } - - #endregion // Constructors - - #region Methods - - public int getWindingRule() - { - return _path.getWindingRule (); - } - - public bool isDone() - { - return (typeIdx >= _path.TypesCount); - } - - public void next() - { - int type = _path.Types [typeIdx++] & ExtendedGeneralPath.SEG_MASK; - pointIdx += curvesize [type]; - } - - public int currentSegment(float [] coords) { - int type = _path.Types [typeIdx] & ExtendedGeneralPath.SEG_MASK; - int numCoords = curvesize [type]; - if (numCoords > 0 && _affine != null) - _affine.transform (_path.Coords, pointIdx, coords, 0, numCoords/2); - else - Array.Copy (_path.Coords, pointIdx, coords, 0, numCoords); - return type; - } - - public int currentSegment(double [] coords) - { - int type = _path.Types [typeIdx] & ExtendedGeneralPath.SEG_MASK; - int numCoords = curvesize [type]; - if (numCoords > 0 && _affine != null) - _affine.transform (_path.Coords, pointIdx, coords, 0, numCoords/2); - else - for (int i=0; i < numCoords; i++) - coords [i] = _path.Coords [pointIdx + i]; - - return type; - } - - #endregion // Methods - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Drawing2D/GraphicsContainer.cs b/mcs/class/System.Drawing/System.Drawing.Drawing2D/GraphicsContainer.cs deleted file mode 100644 index 9389c0a0a22..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Drawing2D/GraphicsContainer.cs +++ /dev/null @@ -1,59 +0,0 @@ -// -// System.Drawing.Drawing2D.GraphicsContainer.cs -// -// Authors: -// Dennis Hayes (dennish@Raytek.com) -// Andreas Nahr (ClassDevelopment@A-SoftTech.com) -// -// (C) 2002/3 Ximian, Inc -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -using System; - -namespace System.Drawing.Drawing2D { - /// - /// Summary description for GraphicsContainer. - /// - public sealed class GraphicsContainer : MarshalByRefObject { - - private int nativeState = 0; - - private GraphicsContainer () { } - - internal GraphicsContainer (int state) - { - nativeState = state; - } - - internal int NativeObject { - get { - return nativeState; - } - set { - nativeState = value; - } - } - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Drawing2D/GraphicsContainer.jvm.cs b/mcs/class/System.Drawing/System.Drawing.Drawing2D/GraphicsContainer.jvm.cs deleted file mode 100644 index 7981c0acd09..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Drawing2D/GraphicsContainer.jvm.cs +++ /dev/null @@ -1,54 +0,0 @@ -// -// System.Drawing.Drawing2D.GraphicsContainer.cs -// -// Authors: -// Dennis Hayes (dennish@Raytek.com) -// Andreas Nahr (ClassDevelopment@A-SoftTech.com) -// -// (C) 2002/3 Ximian, Inc -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -using System; - -namespace System.Drawing.Drawing2D -{ - /// - /// Summary description for GraphicsContainer. - /// - public sealed class GraphicsContainer : MarshalByRefObject - { - readonly GraphicsState _stateObject; - - internal GraphicsContainer (GraphicsState stateObject) - { - _stateObject = stateObject; - } - - internal GraphicsState StateObject - { - get {return _stateObject;} - } - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Drawing2D/GraphicsPath.cs b/mcs/class/System.Drawing/System.Drawing.Drawing2D/GraphicsPath.cs deleted file mode 100644 index 02bd41d9812..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Drawing2D/GraphicsPath.cs +++ /dev/null @@ -1,797 +0,0 @@ -// -// System.Drawing.Drawing2D.GraphicsPath.cs -// -// Authors: -// -// Miguel de Icaza (miguel@ximian.com) -// Duncan Mak (duncan@ximian.com) -// Jordi Mas i Hernandez (jordi@ximian.com) -// Ravindra (rkumar@novell.com) -// -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; -using System.Drawing; -using System.Runtime.InteropServices; - -namespace System.Drawing.Drawing2D -{ - public sealed class GraphicsPath : MarshalByRefObject, ICloneable, IDisposable - { - internal IntPtr nativePath = IntPtr.Zero; - - GraphicsPath (IntPtr ptr) - { - nativePath = ptr; - } - - public GraphicsPath () - { - Status status = GDIPlus.GdipCreatePath (FillMode.Alternate, out nativePath); - GDIPlus.CheckStatus (status); - } - - public GraphicsPath (FillMode fillMode) - { - Status status = GDIPlus.GdipCreatePath (fillMode, out nativePath); - GDIPlus.CheckStatus (status); - } - - public GraphicsPath (Point[] pts, byte[] types) - { - Status status; - if (pts.Length != types.Length) - throw new ArgumentException ("Invalid parameter passed. Number of points and types must be same."); - - status = GDIPlus.GdipCreatePath2I (pts, types, pts.Length, FillMode.Alternate, out nativePath); - GDIPlus.CheckStatus (status); - } - - public GraphicsPath (PointF[] pts, byte[] types) - { - Status status; - if (pts.Length != types.Length) - throw new ArgumentException ("Invalid parameter passed. Number of points and types must be same."); - - status = GDIPlus.GdipCreatePath2 (pts, types, pts.Length, FillMode.Alternate, out nativePath); - GDIPlus.CheckStatus (status); - } - - public GraphicsPath (Point[] pts, byte[] types, FillMode fillMode) - { - Status status; - if (pts.Length != types.Length) - throw new ArgumentException ("Invalid parameter passed. Number of points and types must be same."); - - status = GDIPlus.GdipCreatePath2I (pts, types, pts.Length, fillMode, out nativePath); - GDIPlus.CheckStatus (status); - } - - public GraphicsPath (PointF[] pts, byte[] types, FillMode fillMode) - { - Status status; - if (pts.Length != types.Length) - throw new ArgumentException ("Invalid parameter passed. Number of points and types must be same."); - - status = GDIPlus.GdipCreatePath2 (pts, types, pts.Length, fillMode, out nativePath); - GDIPlus.CheckStatus (status); - } - - public object Clone () - { - IntPtr clone; - - Status status = GDIPlus.GdipClonePath (nativePath, out clone); - GDIPlus.CheckStatus (status); - - return new GraphicsPath (clone); - } - - public void Dispose () - { - Dispose (true); - System.GC.SuppressFinalize (this); - } - - ~GraphicsPath () - { - Dispose (false); - } - - void Dispose (bool disposing) - { - Status status; - if (nativePath != IntPtr.Zero) { - status = GDIPlus.GdipDeletePath (nativePath); - GDIPlus.CheckStatus (status); - - nativePath = IntPtr.Zero; - } - } - - public FillMode FillMode { - get { - FillMode mode; - Status status = GDIPlus.GdipGetPathFillMode (nativePath, out mode); - GDIPlus.CheckStatus (status); - - return mode; - } - set { - Status status = GDIPlus.GdipSetPathFillMode (nativePath, value); - GDIPlus.CheckStatus (status); - } - } - - public PathData PathData { - get { - PathData pdata = new PathData (); - pdata.Points = PathPoints; - pdata.Types = PathTypes; - return pdata; - } - } - - public PointF [] PathPoints { - get { - int count; - Status status = GDIPlus.GdipGetPointCount (nativePath, out count); - GDIPlus.CheckStatus (status); - - PointF [] points = new PointF [count]; - status = GDIPlus.GdipGetPathPoints (nativePath, points, count); - GDIPlus.CheckStatus (status); - - return points; - } - } - - public byte [] PathTypes { - get { - int count; - Status status = GDIPlus.GdipGetPointCount (nativePath, out count); - GDIPlus.CheckStatus (status); - - byte [] types = new byte [count]; - status = GDIPlus.GdipGetPathTypes (nativePath, types, count); - GDIPlus.CheckStatus (status); - - return types; - } - } - - public int PointCount { - get { - int count; - Status status = GDIPlus.GdipGetPointCount (nativePath, out count); - GDIPlus.CheckStatus (status); - - return count; - } - } - - internal IntPtr NativeObject { - get { - return nativePath; - } - set { - nativePath = value; - } - } - - // - // AddArc - // - public void AddArc (Rectangle rect, float start_angle, float sweep_angle) - { - Status status = GDIPlus.GdipAddPathArcI (nativePath, rect.X, rect.Y, rect.Width, rect.Height, start_angle, sweep_angle); - GDIPlus.CheckStatus (status); - } - - public void AddArc (RectangleF rect, float start_angle, float sweep_angle) - { - Status status = GDIPlus.GdipAddPathArc (nativePath, rect.X, rect.Y, rect.Width, rect.Height, start_angle, sweep_angle); - GDIPlus.CheckStatus (status); - } - - public void AddArc (int x, int y, int width, int height, float start_angle, float sweep_angle) - { - Status status = GDIPlus.GdipAddPathArcI (nativePath, x, y, width, height, start_angle, sweep_angle); - GDIPlus.CheckStatus (status); - } - - public void AddArc (float x, float y, float width, float height, float start_angle, float sweep_angle) - { - Status status = GDIPlus.GdipAddPathArc (nativePath, x, y, width, height, start_angle, sweep_angle); - GDIPlus.CheckStatus (status); - } - - // - // AddBezier - // - public void AddBezier (Point pt1, Point pt2, Point pt3, Point pt4) - { - Status status = GDIPlus.GdipAddPathBezierI (nativePath, pt1.X, pt1.Y, - pt2.X, pt2.Y, pt3.X, pt3.Y, pt4.X, pt4.Y); - - GDIPlus.CheckStatus (status); - } - - public void AddBezier (PointF pt1, PointF pt2, PointF pt3, PointF pt4) - { - Status status = GDIPlus.GdipAddPathBezier (nativePath, pt1.X, pt1.Y, - pt2.X, pt2.Y, pt3.X, pt3.Y, pt4.X, pt4.Y); - - GDIPlus.CheckStatus (status); - } - - public void AddBezier (int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4) - { - Status status = GDIPlus.GdipAddPathBezierI (nativePath, x1, y1, x2, y2, x3, y3, x4, y4); - GDIPlus.CheckStatus (status); - } - - public void AddBezier (float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4) - { - Status status = GDIPlus.GdipAddPathBezier (nativePath, x1, y1, x2, y2, x3, y3, x4, y4); - GDIPlus.CheckStatus (status); - } - - // - // AddBeziers - // - public void AddBeziers (Point [] pts) - { - Status status = GDIPlus.GdipAddPathBeziersI (nativePath, pts, pts.Length); - GDIPlus.CheckStatus (status); - } - - public void AddBeziers (PointF [] pts) - { - Status status = GDIPlus.GdipAddPathBeziers (nativePath, pts, pts.Length); - GDIPlus.CheckStatus (status); - } - - // - // AddEllipse - // - public void AddEllipse (RectangleF r) - { - Status status = GDIPlus.GdipAddPathEllipse (nativePath, r.X, r.Y, r.Width, r.Height); - GDIPlus.CheckStatus (status); - } - - public void AddEllipse (float x, float y, float width, float height) - { - Status status = GDIPlus.GdipAddPathEllipse (nativePath, x, y, width, height); - GDIPlus.CheckStatus (status); - } - - public void AddEllipse (Rectangle r) - { - Status status = GDIPlus.GdipAddPathEllipseI (nativePath, r.X, r.Y, r.Width, r.Height); - GDIPlus.CheckStatus (status); - } - - public void AddEllipse (int x, int y, int width, int height) - { - Status status = GDIPlus.GdipAddPathEllipseI (nativePath, x, y, width, height); - GDIPlus.CheckStatus (status); - } - - - // - // AddLine - // - public void AddLine (Point a, Point b) - { - Status status = GDIPlus.GdipAddPathLineI (nativePath, a.X, a.Y, b.X, b.Y); - GDIPlus.CheckStatus (status); - } - - public void AddLine (PointF a, PointF b) - { - Status status = GDIPlus.GdipAddPathLine (nativePath, a.X, a.Y, b.X, - b.Y); - - GDIPlus.CheckStatus (status); - } - - public void AddLine (int x1, int y1, int x2, int y2) - { - Status status = GDIPlus.GdipAddPathLineI (nativePath, x1, y1, x2, y2); - GDIPlus.CheckStatus (status); - } - - public void AddLine (float x1, float y1, float x2, float y2) - { - Status status = GDIPlus.GdipAddPathLine (nativePath, x1, y1, x2, - y2); - - GDIPlus.CheckStatus (status); - } - - // - // AddLines - // - public void AddLines (Point [] points) - { - int length = points.Length; - - for (int i = 0; i < length - 1; i++) { - int j = i + 1; - Status status = GDIPlus.GdipAddPathLineI ( - nativePath, points [i].X, points [i].Y, points [j].X, points [j].Y); - GDIPlus.CheckStatus (status); - } - } - - public void AddLines (PointF [] points) - { - int length = points.Length; - - for (int i = 0; i < length - 1; i++) { - int j = i + 1; - Status status = GDIPlus.GdipAddPathLine ( - nativePath, points [i].X, points [i].Y, points [j].X, points [j].Y); - GDIPlus.CheckStatus (status); - } - } - - // - // AddPie - // - public void AddPie (Rectangle rect, float startAngle, float sweepAngle) - { - Status status = GDIPlus.GdipAddPathPie ( - nativePath, rect.X, rect.Y, rect.Width, rect.Height, startAngle, sweepAngle); - GDIPlus.CheckStatus (status); - } - - public void AddPie (int x, int y, int width, int height, float startAngle, float sweepAngle) - { - Status status = GDIPlus.GdipAddPathPieI (nativePath, x, y, width, height, startAngle, sweepAngle); - GDIPlus.CheckStatus (status); - } - - public void AddPie (float x, float y, float width, float height, float startAngle, float sweepAngle) - { - Status status = GDIPlus.GdipAddPathPie (nativePath, x, y, width, height, startAngle, sweepAngle); - GDIPlus.CheckStatus (status); - } - - // - // AddPolygon - // - public void AddPolygon (Point [] points) - { - Status status = GDIPlus.GdipAddPathPolygonI (nativePath, points, points.Length); - GDIPlus.CheckStatus (status); - } - - public void AddPolygon (PointF [] points) - { - Status status = GDIPlus.GdipAddPathPolygon (nativePath, points, points.Length); - GDIPlus.CheckStatus (status); - } - - // - // AddRectangle - // - public void AddRectangle (Rectangle rect) - { - Status status = GDIPlus.GdipAddPathRectangleI (nativePath, rect.X, rect.Y, rect.Width, rect.Height); - GDIPlus.CheckStatus (status); - } - - public void AddRectangle (RectangleF rect) - { - Status status = GDIPlus.GdipAddPathRectangle (nativePath, rect.X, rect.Y, rect.Width, rect.Height); - GDIPlus.CheckStatus (status); - } - - // - // AddRectangles - // - public void AddRectangles (Rectangle [] rects) - { - Status status = GDIPlus.GdipAddPathRectanglesI (nativePath, rects, rects.Length); - GDIPlus.CheckStatus (status); - } - - public void AddRectangles (RectangleF [] rects) - { - Status status = GDIPlus.GdipAddPathRectangles (nativePath, rects, rects.Length); - GDIPlus.CheckStatus (status); - } - - // - // AddPath - // - public void AddPath (GraphicsPath addingPath, bool connect) - { - Status status = GDIPlus.GdipAddPathPath (nativePath, addingPath.nativePath, connect); - GDIPlus.CheckStatus (status); - } - - public PointF GetLastPoint () - { - PointF pt; - Status status = GDIPlus.GdipGetPathLastPoint (nativePath, out pt); - GDIPlus.CheckStatus (status); - - return pt; - } - - // - // AddClosedCurve - // - public void AddClosedCurve (Point [] points) - { - Status status = GDIPlus.GdipAddPathClosedCurveI (nativePath, points, points.Length); - GDIPlus.CheckStatus (status); - } - - public void AddClosedCurve (PointF [] points) - { - Status status = GDIPlus.GdipAddPathClosedCurve (nativePath, points, points.Length); - GDIPlus.CheckStatus (status); - } - - public void AddClosedCurve (Point [] points, float tension) - { - Status status = GDIPlus.GdipAddPathClosedCurve2I (nativePath, points, points.Length, tension); - GDIPlus.CheckStatus (status); - } - - public void AddClosedCurve (PointF [] points, float tension) - { - Status status = GDIPlus.GdipAddPathClosedCurve2 (nativePath, points, points.Length, tension); - GDIPlus.CheckStatus (status); - } - - // - // AddCurve - // - public void AddCurve (Point [] points) - { - Status status = GDIPlus.GdipAddPathCurveI (nativePath, points, points.Length); - GDIPlus.CheckStatus (status); - } - - public void AddCurve (PointF [] points) - { - Status status = GDIPlus.GdipAddPathCurve (nativePath, points, points.Length); - GDIPlus.CheckStatus (status); - } - - public void AddCurve (Point [] points, float tension) - { - Status status = GDIPlus.GdipAddPathCurve2I (nativePath, points, points.Length, tension); - GDIPlus.CheckStatus (status); - } - - public void AddCurve (PointF [] points, float tension) - { - Status status = GDIPlus.GdipAddPathCurve2 (nativePath, points, points.Length, tension); - GDIPlus.CheckStatus (status); - } - - public void AddCurve (Point [] points, int offset, int numberOfSegments, float tension) - { - Status status = GDIPlus.GdipAddPathCurve3I (nativePath, points, points.Length, - offset, numberOfSegments, tension); - - GDIPlus.CheckStatus (status); - } - - public void AddCurve (PointF [] points, int offset, int numberOfSegments, float tension) - { - Status status = GDIPlus.GdipAddPathCurve3 (nativePath, points, points.Length, - offset, numberOfSegments, tension); - - GDIPlus.CheckStatus (status); - } - - public void Reset () - { - Status status = GDIPlus.GdipResetPath (nativePath); - GDIPlus.CheckStatus (status); - } - - public void Reverse () - { - Status status = GDIPlus.GdipReversePath (nativePath); - GDIPlus.CheckStatus (status); - } - - public void Transform (Matrix matrix) - { - Status status = GDIPlus.GdipTransformPath (nativePath, matrix.nativeMatrix); - GDIPlus.CheckStatus (status); - } - - [MonoTODO] - public void AddString (string s, FontFamily family, int style, float emSize, Point origin, StringFormat format) - { - throw new NotImplementedException (); - } - - [MonoTODO] - public void AddString (string s, FontFamily family, int style, float emSize, PointF origin, StringFormat format) - { - throw new NotImplementedException (); - } - - [MonoTODO] - public void AddString (string s, FontFamily family, int style, float emSize, Rectangle layoutRect, StringFormat format) - { - throw new NotImplementedException (); - } - - [MonoTODO] - public void AddString (string s, FontFamily family, int style, float emSize, RectangleF layoutRect, StringFormat format) - { - throw new NotImplementedException (); - } - - public void ClearMarkers() - { - Status s = GDIPlus.GdipClearPathMarkers (nativePath); - - GDIPlus.CheckStatus (s); - } - - public void CloseAllFigures() - { - Status s = GDIPlus.GdipClosePathFigures (nativePath); - - GDIPlus.CheckStatus (s); - } - - public void CloseFigure() - { - Status s = GDIPlus.GdipClosePathFigure (nativePath); - - GDIPlus.CheckStatus (s); - } - - public void Flatten () - { - // 1/4 is the FlatnessDefault as defined in GdiPlusEnums.h - Flatten (null, 1.0f / 4.0f); - } - - public void Flatten (Matrix matrix) - { - Flatten (matrix, 1.0f / 4.0f); - } - - public void Flatten (Matrix matrix, float flatness) - { - Status status = GDIPlus.GdipFlattenPath (nativePath, matrix.nativeMatrix, flatness); - - GDIPlus.CheckStatus (status); - } - - public RectangleF GetBounds () - { - return GetBounds (null, null); - } - - public RectangleF GetBounds (Matrix matrix) - { - return GetBounds (matrix, null); - } - - [MonoTODO] - public RectangleF GetBounds (Matrix matrix, Pen pen) - { - RectangleF retval; - IntPtr m = (matrix == null) ? IntPtr.Zero : matrix.nativeMatrix; - IntPtr p = (pen == null) ? IntPtr.Zero : pen.nativeObject; - - Status s = GDIPlus.GdipGetPathWorldBounds (nativePath, out retval, m, p); - - GDIPlus.CheckStatus (s); - - return retval; - } - - public bool IsOutlineVisible (Point point, Pen pen) - { - return IsOutlineVisible (point.X, point.Y, pen, null); - } - - public bool IsOutlineVisible (PointF point, Pen pen) - { - return IsOutlineVisible (point.X, point.Y, pen, null); - } - - public bool IsOutlineVisible (int x, int y, Pen pen) - { - return IsOutlineVisible (x, y, pen, null); - } - - public bool IsOutlineVisible (float x, float y, Pen pen) - { - return IsOutlineVisible (x, y, pen, null); - } - - public bool IsOutlineVisible (Point pt, Pen pen, Graphics graphics) - { - return IsOutlineVisible (pt.X, pt.Y, pen, graphics); - } - - public bool IsOutlineVisible (PointF pt, Pen pen, Graphics graphics) - { - return IsOutlineVisible (pt.X, pt.Y, pen, graphics); - } - - [MonoTODO] - public bool IsOutlineVisible (int x, int y, Pen pen, Graphics graphics) - { - bool result; - IntPtr g = (graphics == null) ? IntPtr.Zero : graphics.nativeObject; - - Status s = GDIPlus.GdipIsOutlineVisiblePathPointI (nativePath, x, y, g, out result); - GDIPlus.CheckStatus (s); - - return result; - } - - [MonoTODO] - public bool IsOutlineVisible (float x, float y, Pen pen, Graphics graphics) - { - bool result; - IntPtr g = (graphics == null) ? IntPtr.Zero : graphics.nativeObject; - - Status s = GDIPlus.GdipIsOutlineVisiblePathPoint (nativePath, x, y, g, out result); - GDIPlus.CheckStatus (s); - - return result; - } - - public bool IsVisible (Point point) - { - return IsVisible (point.X, point.Y, null); - } - - public bool IsVisible (PointF point) - { - return IsVisible (point.X, point.Y, null); - } - - public bool IsVisible (int x, int y) - { - return IsVisible (x, y, null); - } - - public bool IsVisible (float x, float y) - { - return IsVisible (x, y, null); - } - - public bool IsVisible (Point pt, Graphics graphics) - { - return IsVisible (pt.X, pt.Y, graphics); - } - - public bool IsVisible (PointF pt, Graphics graphics) - { - return IsVisible (pt.X, pt.Y, graphics); - } - - [MonoTODO] - public bool IsVisible (int x, int y, Graphics graphics) - { - bool retval; - - IntPtr g = (graphics == null) ? IntPtr.Zero : graphics.nativeObject; - - Status s = GDIPlus.GdipIsVisiblePathPointI (nativePath, x, y, g, out retval); - - GDIPlus.CheckStatus (s); - - return retval; - } - - [MonoTODO] - public bool IsVisible (float x, float y, Graphics graphics) - { - bool retval; - - IntPtr g = (graphics == null) ? IntPtr.Zero : graphics.nativeObject; - - Status s = GDIPlus.GdipIsVisiblePathPoint (nativePath, x, y, g, out retval); - - GDIPlus.CheckStatus (s); - - return retval; - } - - public void SetMarkers () - { - Status s = GDIPlus.GdipSetPathMarker (nativePath); - - GDIPlus.CheckStatus (s); - } - - public void StartFigure() - { - Status s = GDIPlus.GdipStartPathFigure (nativePath); - - GDIPlus.CheckStatus (s); - } - - public void Warp (PointF[] destPoints, RectangleF srcRect) - { - Warp (destPoints, srcRect, null, WarpMode.Perspective, 1.0f / 4.0f); - } - - public void Warp (PointF[] destPoints, RectangleF srcRect, Matrix matrix) - { - Warp (destPoints, srcRect, matrix, WarpMode.Perspective, 1.0f / 4.0f); - } - - public void Warp (PointF[] destPoints, RectangleF srcRect, Matrix matrix, WarpMode warpMode) - { - Warp (destPoints, srcRect, matrix, warpMode, 1.0f / 4.0f); - } - - [MonoTODO] - public void Warp (PointF[] destPoints, RectangleF srcRect, Matrix matrix, WarpMode warpMode, float flatness) - { - IntPtr m = (matrix == null) ? IntPtr.Zero : matrix.nativeMatrix; - - Status s = GDIPlus.GdipWarpPath (nativePath, m, destPoints, destPoints.Length, - srcRect.X, srcRect.Y, srcRect.Width, srcRect.Height, warpMode, flatness); - - GDIPlus.CheckStatus (s); - } - - public void Widen (Pen pen) - { - Widen (pen, null, 1.0f / 4.0f); - } - - public void Widen (Pen pen, Matrix matrix) - { - Widen (pen, matrix, 1.0f / 4.0f); - } - - [MonoTODO] - public void Widen (Pen pen, Matrix matrix, float flatness) - { - IntPtr p = (pen == null) ? IntPtr.Zero : pen.nativeObject; - IntPtr m = (matrix == null) ? IntPtr.Zero : matrix.nativeMatrix; - - Status s = GDIPlus.GdipWidenPath (nativePath, p, m, flatness); - - GDIPlus.CheckStatus (s); - } - } -} - - diff --git a/mcs/class/System.Drawing/System.Drawing.Drawing2D/GraphicsPath.jvm.cs b/mcs/class/System.Drawing/System.Drawing.Drawing2D/GraphicsPath.jvm.cs deleted file mode 100755 index bdbacec20dd..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Drawing2D/GraphicsPath.jvm.cs +++ /dev/null @@ -1,1057 +0,0 @@ -// -// System.Drawing.Drawing2D.GraphicsPath.cs -// -// Author: -// Konstantin Triger -// Bors Kirzner -// -// Copyright (C) 2005 Mainsoft Corporation, (http://www.mainsoft.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -using System; -using System.Drawing; -using System.Collections; -using java.awt.geom; -using java.awt; - -namespace System.Drawing.Drawing2D -{ - public sealed class GraphicsPath : BasicShape, ICloneable - { - internal enum JPI { - SEG_MOVETO = ExtendedGeneralPath.SEG_MOVETO, - SEG_LINETO = ExtendedGeneralPath.SEG_LINETO, - SEG_QUADTO = ExtendedGeneralPath.SEG_QUADTO, - SEG_CUBICTO = ExtendedGeneralPath.SEG_CUBICTO, - SEG_CLOSE = ExtendedGeneralPath.SEG_CLOSE - } - - #region Internal - - internal ExtendedGeneralPath NativeObject - { - get - { - return (ExtendedGeneralPath)Shape; - } - } - - GraphicsPath (ExtendedGeneralPath ptr) : base(ptr) - { - } - #endregion - - #region C-tors. - public GraphicsPath (): - this(FillMode.Alternate) - { - } - - public GraphicsPath (FillMode fillMode) : this(new ExtendedGeneralPath ()) - { - FillMode = fillMode; - } - - public GraphicsPath (Point[] pts, byte[] types) : this(pts, types, FillMode.Alternate) - { - } - - public GraphicsPath (PointF [] pts, byte [] types) : this(pts, types, FillMode.Alternate) - { - } - - public GraphicsPath (Point [] pts, byte [] types, FillMode fillMode) : this(new ExtendedGeneralPath ()) - { - FillMode = fillMode; - SetPath (pts, types); - } - - public GraphicsPath (PointF [] pts, byte [] types, FillMode fillMode) : this(new ExtendedGeneralPath ()) - { - FillMode = fillMode; - SetPath (pts, types); - } - - #endregion - - #region Clone - public object Clone () - { - return new GraphicsPath ((ExtendedGeneralPath) NativeObject.Clone ()); - } - #endregion - - #region Properties - public FillMode FillMode - { - get - { if(NativeObject.getWindingRule() == GeneralPath.WIND_NON_ZERO) - return FillMode.Alternate; - else - return FillMode.Winding; - } - - set - { - if (value == FillMode.Alternate) - NativeObject.setWindingRule (GeneralPath.WIND_NON_ZERO); - else - NativeObject.setWindingRule (GeneralPath.WIND_EVEN_ODD); - } - } - - public PathData PathData - { - get { return NativeObject.PathData; } - } - - public PointF [] PathPoints - { - get - { - return PathData.Points; - } - } - - public byte [] PathTypes - { - get - { - return PathData.Types; - } - } - #endregion - - #region PointCount - public int PointCount - { - get - { - return NativeObject.PointCount; - } - } - #endregion - - #region AddArc - public void AddArc (Rectangle rect, float startAngle, float sweepAngle) - { - AddArc(rect.X,rect.Y,rect.Width,rect.Height,startAngle,sweepAngle); - } - - public void AddArc (RectangleF rect, float startAngle, float sweepAngle) - { - AddArc(rect.X,rect.Y,rect.Width,rect.Height,startAngle,sweepAngle); - } - - public void AddArc (int x, int y, int width, int height, float startAngle, float sweepAngle) - { - AddArc((float)x,(float)y,(float)width,(float)height,startAngle,sweepAngle); - } - - public void AddArc (float x, float y, float width, float height, float startAngle, float sweepAngle) - { - Shape shape = null; - - if (sweepAngle >= 360) - shape = new Ellipse2D.Float(x, y, width, height); - else { - - double d1Tod2 = width/height; - double sqrd1Tod2 = d1Tod2*d1Tod2; - double start = ConvertArcAngle(sqrd1Tod2, startAngle); - double extent = ConvertArcAngle(sqrd1Tod2, startAngle+sweepAngle) - start; - - shape = new Arc2D.Double(x,y,width,height,-start,-extent,Arc2D.OPEN); - } - - NativeObject.append(shape); - } - - /// - /// .Net computes an angle by intersection of ellipse with a ray - /// java does the following: x1 = d1*cos(a), y1 = d2*sin(a) - /// where: d1 = width/2, d2 = height/2 - /// we need to find angle x, which satisfies: - /// x1 = m*cos(a) = d1*cos(x) - /// y1 = m*sin(a) = d2*sin(x) - /// (x1*x1)/(d1*d1) + (x2*x2)/(d2*d2) = 1 - /// - /// (d1/d2)*(d1/d2) - /// angle in degrees - /// converted angle in degrees - static double ConvertArcAngle(double sqrd1Tod2, double angle) { - double angleRad = java.lang.Math.toRadians(angle); - double tan = Math.Tan(angleRad); - double cosx = 1/Math.Sqrt( sqrd1Tod2 * (tan*tan) + 1); - double xRad = Math.Acos(cosx); - double x = java.lang.Math.toDegrees(xRad); - int q = ((int)angle)/90; - - switch (q&3) { - case 1: - x = 180-x; - break; - case 2: - x = 180+x; - break; - case 3: - x = 360-x; - break; - } - - if (angle < 0) - x = -x; - - x += (((int)angle)/360)*360; - - return x; - } - - #endregion - - #region AddBezier(s) - public void AddBezier (Point pt1, Point pt2, Point pt3, Point pt4) - { - AddBezier(pt1.X,pt1.Y,pt2.X,pt2.Y,pt3.X,pt3.Y,pt4.X,pt4.Y); - } - - public void AddBezier (PointF pt1, PointF pt2, PointF pt3, PointF pt4) - { - AddBezier(pt1.X,pt1.Y,pt2.X,pt2.Y,pt3.X,pt3.Y,pt4.X,pt4.Y); - } - - public void AddBezier (int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4) - { - AddBezier((float)x1,(float)y1,(float)x2,(float)y2,(float)x3,(float)y3,(float)x4,(float)y4); - } - - public void AddBezier (float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4) - { - CubicCurve2D cc = new CubicCurve2D.Float(x1,y1,x2,y2,x3,y3,x4,y4); - NativeObject.append(cc); - } - - public void AddBeziers (Point [] pts) - { - if (pts == null) - throw new ArgumentNullException("points"); - - AddBezier(pts [0].X,pts [0].Y, - pts [1].X,pts [1].Y, - pts [2].X,pts [2].Y, - pts [3].X,pts [3].Y); - - for (int i = 4; i < pts.Length; i += 3) { - NativeObject.curveTo( - pts [i].X,pts [i].Y, - pts [i+1].X,pts [i+1].Y, - pts [i+2].X,pts [i+2].Y); - } - } - - public void AddBeziers (PointF [] pts) - { - if (pts == null) - throw new ArgumentNullException("points"); - - AddBezier(pts [0].X,pts [0].Y, - pts [1].X,pts [1].Y, - pts [2].X,pts [2].Y, - pts [3].X,pts [3].Y); - - for (int i = 4; i < pts.Length; i += 3) { - NativeObject.curveTo( - pts [i].X,pts [i].Y, - pts [i+1].X,pts [i+1].Y, - pts [i+2].X,pts [i+2].Y); - } - } - #endregion - - #region AddEllipse - public void AddEllipse (float x, float y, float width, float height) - { - Ellipse2D e = new Ellipse2D.Float(x,y,width,height); - NativeObject.append(e,false); - } - - public void AddEllipse (RectangleF r) - { - AddEllipse(r.X,r.Y,r.Width,r.Height); - } - - public void AddEllipse (Rectangle r) - { - AddEllipse(r.X,r.Y,r.Width,r.Height); - } - - public void AddEllipse (int x, int y, int width, int height) - { - AddEllipse((float)x, (float)y, (float)width, (float)height); - } - #endregion - - #region AddLine - public void AddLine (float x1, float y1, float x2, float y2) - { - Line2D l = new Line2D.Float(x1,y1,x2,y2); - NativeObject.append(l); - } - - public void AddLine (Point a, Point b) - { - AddLine(a.X,a.Y,b.X,b.Y); - } - - public void AddLine (PointF a, PointF b) - { - AddLine(a.X,a.Y,b.X,b.Y); - } - - public void AddLine (int x1, int y1, int x2, int y2) - { - AddLine((float)x1,(float)y1,(float)x2,(float)y2); - } - - public void AddLines (Point [] points) - { - if (points == null) - throw new ArgumentNullException("points"); - - if (points.Length == 0) - return; - - if (NativeObject.LastFigureClosed) - NativeObject.moveTo(points[0].X, points[0].Y); - else - NativeObject.lineTo(points[0].X, points[0].Y); - - for (int i = 1; i < points.Length; i ++) - NativeObject.lineTo(points[i].X, points[i].Y); - } - - public void AddLines (PointF [] points) - { - if (points == null) - throw new ArgumentNullException("points"); - - if (points.Length == 0) - return; - - if (NativeObject.LastFigureClosed) - NativeObject.moveTo(points[0].X, points[0].Y); - else - NativeObject.lineTo(points[0].X, points[0].Y); - - for (int i = 1; i < points.Length; i ++) - NativeObject.lineTo(points[i].X, points[i].Y); - } - #endregion - - #region AddPie - public void AddPie (float x, float y, float width, float height, float startAngle, float sweepAngle) - { - Shape shape = null; - - if (sweepAngle >= 360) - shape = new Ellipse2D.Float(x, y, width, height); - else { - - double d1Tod2 = width/height; - double sqrd1Tod2 = d1Tod2*d1Tod2; - double start = ConvertArcAngle(sqrd1Tod2, startAngle); - double extent = ConvertArcAngle(sqrd1Tod2, startAngle+sweepAngle) - start; - - shape = new Arc2D.Double(x,y,width,height,-start,-extent,Arc2D.PIE); - } - - NativeObject.append(shape,false); - } - - public void AddPie (Rectangle rect, float startAngle, float sweepAngle) - { - AddPie((float)rect.X, (float)rect.Y,(float)rect.Width,(float)rect.Height,startAngle,sweepAngle); - } - - public void AddPie (int x, int y, int width, int height, float startAngle, float sweepAngle) - { - AddPie((float)x,(float)y,(float)width,(float)height,startAngle,sweepAngle); - } - #endregion - - #region AddPolygon - public void AddPolygon (Point [] points) - { - if (points == null) - throw new ArgumentNullException("points"); - - if (points.Length < 3) - throw new ArgumentException("Invalid parameter used."); - - NativeObject.moveTo((float)points[0].X,(float)points[0].Y); - for (int i = 1; i< points.Length; i++) - { - NativeObject.lineTo((float)points[i].X,(float)points[i].Y); - } - NativeObject.closePath(); - } - - public void AddPolygon (PointF [] points) - { - if (points == null) - throw new ArgumentNullException("points"); - - if (points.Length < 3) - throw new ArgumentException("Invalid parameter used."); - - NativeObject.moveTo(points[0].X,points[0].Y); - for (int i = 1; i < points.Length; i++) - { - NativeObject.lineTo(points[i].X,points[i].Y); - } - NativeObject.closePath(); - } - #endregion - - #region AddRectangle(s) - internal void AddRectangle(float x,float y, float w, float h) - { - NativeObject.moveTo(x, y); - NativeObject.lineTo (x + w, y); - NativeObject.lineTo (x + w, y + h); - NativeObject.lineTo (x, y + h); - NativeObject.closePath (); - } - public void AddRectangle (RectangleF rect) - { - AddRectangle(rect.X,rect.Y,rect.Width,rect.Height); - } - - public void AddRectangle (Rectangle rect) - { - AddRectangle(rect.X,rect.Y,rect.Width,rect.Height); - } - - public void AddRectangles (Rectangle [] rects) - { - foreach(Rectangle rect in rects) - AddRectangle(rect.X,rect.Y,rect.Width,rect.Height); - } - - public void AddRectangles (RectangleF [] rects) - { - foreach(RectangleF rect in rects) - AddRectangle(rect.X,rect.Y,rect.Width,rect.Height); - } - #endregion - - #region AddPath - public void AddPath (GraphicsPath addingPath, bool connect) - { - NativeObject.append(addingPath.NativeObject,connect); - } - #endregion - - #region GetLastPoint - public PointF GetLastPoint () - { - return NativeObject.GetLastPoint (); - } - #endregion - - #region Reset - public void Reset () - { - NativeObject.reset(); - } - #endregion - - #region GetBounds - public RectangleF GetBounds () - { - return GetBounds (null, null); - } - - public RectangleF GetBounds (Matrix matrix) - { - return GetBounds (matrix, null); - } - - public RectangleF GetBounds (Matrix matrix, Pen pen) - { - // FIXME : we do not know exacly how the bounding rectangle - // is calculated so this implementation obtains different bounds - // that still contains the path widened by oen and transformed by matrix - // the order of operations is similar to widening, as .Net does. - - // first get original shape bounds - //Shape shape = NativeObject.getBounds2D(); - Shape shape = NativeObject; - - // stroke bounds - if (pen != null) - shape = ((Stroke)pen).createStrokedShape (shape); - - Rectangle2D rect = shape.getBounds2D (); - - // transform bounds - if (matrix != null) - rect = matrix.NativeObject.createTransformedShape(rect).getBounds2D(); - - return new RectangleF (rect); - } - #endregion - - #region Transform - public void Transform (Matrix matrix) - { - if(matrix == null) - return; - - NativeObject.transform(matrix.NativeObject); - } - #endregion - - #region IsVisible - public bool IsVisible (Point point) - { - return IsVisible (point.X, point.Y, null); - } - - public bool IsVisible (PointF point) - { - return IsVisible (point.X, point.Y, null); - } - - public bool IsVisible (int x, int y) - { - return IsVisible (x, y, null); - } - - public bool IsVisible (float x, float y) - { - return IsVisible (x, y, null); - } - - public bool IsVisible (Point pt, Graphics graphics) - { - return IsVisible (pt.X, pt.Y, graphics); - } - - public bool IsVisible (PointF pt, Graphics graphics) - { - return IsVisible (pt.X, pt.Y, graphics); - } - - public bool IsVisible (int x, int y, Graphics graphics) - { - return IsVisible((float)x,(float)y,null); - } - - public bool IsVisible (float x, float y, Graphics graphics) - { - // LAMESPEC : .Net is currently ignorig Graphics object - //if (graphics != null && !graphics.IsVisible(x,y)) - // return false; - - return NativeObject.contains(x,y); - } - #endregion - - #region Reverse - public void Reverse () - { - NativeObject.Reverse (); - } - #endregion - - #region AddClosedCurve - public void AddClosedCurve (Point [] points) - { - AddClosedCurve(points, 0.5f); - } - - public void AddClosedCurve (PointF [] points) - { - AddClosedCurve(points, 0.5f); - } - - public void AddClosedCurve (Point [] points, float tension) - { - if (points == null) - throw new ArgumentNullException("points"); - - if (points.Length < 3) - throw new ArgumentException("Invalid parameter used."); - - int length = (points.Length + 3)*2; - - float[] pts = new float[length]; - pts[--length] = points[1].Y; - pts[--length] = points[1].X; - pts[--length] = points[0].Y; - pts[--length] = points[0].X; - - for (int i = points.Length-1; i >= 0; i--) { - pts[--length] = points[i].Y; - pts[--length] = points[i].X; - } - - pts[--length] = points[points.Length-1].Y; - pts[--length] = points[points.Length-1].X; - - AddCurve(pts, !NativeObject.LastFigureClosed, tension); - CloseFigure (); - } - - public void AddClosedCurve (PointF [] points, float tension) - { - if (points == null) - throw new ArgumentNullException("points"); - - if (points.Length < 3) - throw new ArgumentException("Invalid parameter used."); - - int length = (points.Length + 3)*2; - - float[] pts = new float[length]; - pts[--length] = points[1].Y; - pts[--length] = points[1].X; - pts[--length] = points[0].Y; - pts[--length] = points[0].X; - - for (int i = points.Length-1; i >= 0; i--) { - pts[--length] = points[i].Y; - pts[--length] = points[i].X; - } - - pts[--length] = points[points.Length-1].Y; - pts[--length] = points[points.Length-1].X; - - AddCurve(pts, !NativeObject.LastFigureClosed, tension); - CloseFigure (); - } - #endregion - - #region AddCurve - //we have now two approaches for drawing cardinal curves - //the first one is to convert cardinals into approximate beziers - //the second one - to draw curve ourself with all interpolation staff - //here. I preffer the first one because we could utilize java antialiasing and - //flattening features, otherwise curves will be more strict but less cool - public void AddCurve (Point [] points) - { - AddCurve(points,0.5F); - } - - public void AddCurve (PointF [] points) - { - AddCurve(points,0.5f); - } - - public void AddCurve (Point [] points, float tension) - { - AddCurve(points, 0, points.Length-1, tension); - } - - public void AddCurve (PointF [] points, float tension) - { - AddCurve(points, 0, points.Length-1, tension); - } - - public void AddCurve (Point [] points, int offset, int numberOfSegments, float tension) - { - int nPoints = numberOfSegments + 1; - int length = nPoints*2 + 4; - float[] pts = new float[length]; - - int lastP = offset + nPoints; - if (lastP == points.Length) { - lastP--; - pts[--length] = points[lastP].Y; - pts[--length] = points[lastP].X; - } - - for (; length > 0 && lastP >= 0; lastP--) { - pts[--length] = points[lastP].Y; - pts[--length] = points[lastP].X; - } - - if (length > 0) { - pts[1] = points[0].Y; - pts[0] = points[0].X; - } - - AddCurve(pts, !NativeObject.LastFigureClosed, tension); - } - - public void AddCurve (PointF [] points, int offset, int numberOfSegments, float tension) - { - int nPoints = numberOfSegments + 1; - int length = nPoints*2 + 4; - float[] pts = new float[length]; - - int lastP = offset + nPoints; - if (lastP == points.Length) { - lastP--; - pts[--length] = points[lastP].Y; - pts[--length] = points[lastP].X; - } - - for (; length > 0 && lastP >= 0; lastP--) { - pts[--length] = points[lastP].Y; - pts[--length] = points[lastP].X; - } - - if (length > 0) { - pts[1] = points[0].Y; - pts[0] = points[0].X; - } - - AddCurve(pts, !NativeObject.LastFigureClosed, tension); - } - - /// - /// Based on http://pubpages.unh.edu/~cs770/a5/cardinal.html - /// - /// point array (x1,y1,x2,y2 ...). - /// The first and last points considered only for calculations, but are not added. - void AddCurve(float[] pts, bool connect, float tension) { - tension /= 3f; //looks like a good pick - - if (connect) - NativeObject.lineTo(pts[2],pts[3]); - else - NativeObject.moveTo(pts[2],pts[3]); - - float dx = pts[4] - pts[0]; - float dy = pts[5] - pts[1]; - - float sx = pts[2] + tension*dx; - float sy = pts[3] + tension*dy; - - for (int offset = 2, total = pts.Length-4; offset < total; offset += 2) { - int cur_offset = offset; - int pX = cur_offset++; - int pY = cur_offset++; - int X = cur_offset++; - int Y = cur_offset++; - int nX = cur_offset++; - int nY = cur_offset++; - - dx = pts[nX] - pts[pX]; - dy = pts[nY] - pts[pY]; - - float rx = pts[X] - tension*dx; - float ry = pts[Y] - tension*dy; - - NativeObject.curveTo(sx, sy, rx, ry, pts[X], pts[Y]); - - sx = pts[X] + tension*dx; - sy = pts[Y] + tension*dy; - } - } - #endregion - - #region AddString - [MonoTODO] - public void AddString (string s, FontFamily family, int style, float emSize, Point origin, StringFormat format) - { - throw new NotImplementedException (); - } - - [MonoTODO] - public void AddString (string s, FontFamily family, int style, float emSize, PointF origin, StringFormat format) - { - throw new NotImplementedException (); - } - - [MonoTODO] - public void AddString (string s, FontFamily family, int style, float emSize, Rectangle layoutRect, StringFormat format) - { - throw new NotImplementedException (); - } - - [MonoTODO] - public void AddString (string s, FontFamily family, int style, float emSize, RectangleF layoutRect, StringFormat format) - { - throw new NotImplementedException (); - } - #endregion - - #region ClearMarkers - public void ClearMarkers() - { - NativeObject.ClearMarkers (); - } - #endregion - - #region Close - public void CloseAllFigures() - { - ExtendedGeneralPath p = new ExtendedGeneralPath(); - PathIterator pi = NativeObject.getPathIterator(null); - JPI lastSeg = JPI.SEG_CLOSE; - float [] points = new float[6]; - - p.setWindingRule(pi.getWindingRule()); - while(!pi.isDone()) - { - JPI curSeg = (JPI)pi.currentSegment(points); - switch(curSeg) - { - case JPI.SEG_CLOSE: - p.closePath(); - break; - case JPI.SEG_MOVETO: - if(lastSeg != JPI.SEG_CLOSE) - p.closePath(); - p.moveTo(points[0],points[1]); - break; - case JPI.SEG_LINETO: - p.lineTo(points[0],points[1]); - break; - case JPI.SEG_QUADTO: - p.quadTo(points[0],points[1],points[2],points[3]); - break; - case JPI.SEG_CUBICTO: - p.curveTo(points[0],points[1],points[2],points[3],points[4],points[5]); - break; - default: - break; - } - lastSeg = curSeg; - pi.next(); - } - - p.closePath(); - Shape = p; - } - - public void CloseFigure() - { - NativeObject.closePath(); - } - #endregion - - #region Flatten - public void Flatten () - { - // 1/4 is the FlatnessDefault as defined in GdiPlusEnums.h - Flatten (null, 1.0f / 4.0f); - } - - public void Flatten (Matrix matrix) - { - Flatten (matrix, 1.0f / 4.0f); - } - - public void Flatten (Matrix matrix, float flatness) - { - AffineTransform tr = null; - if(matrix != null) - tr = matrix.NativeObject; - - //FIXME : Review (perfomance reasons). - PathIterator pi = NativeObject.getPathIterator(tr,flatness); - ExtendedGeneralPath newPath = new ExtendedGeneralPath(); - newPath.append(pi,false); - Shape = newPath; - } - #endregion - - #region GetOutlineVisible - public bool IsOutlineVisible (Point point, Pen pen) - { - return IsOutlineVisible (point.X, point.Y, pen, null); - } - - public bool IsOutlineVisible (PointF point, Pen pen) - { - return IsOutlineVisible (point.X, point.Y, pen, null); - } - - public bool IsOutlineVisible (int x, int y, Pen pen) - { - return IsOutlineVisible (x, y, pen, null); - } - - public bool IsOutlineVisible (float x, float y, Pen pen) - { - return IsOutlineVisible (x, y, pen, null); - } - - public bool IsOutlineVisible (Point pt, Pen pen, Graphics graphics) - { - return IsOutlineVisible (pt.X, pt.Y, pen, graphics); - } - - public bool IsOutlineVisible (PointF pt, Pen pen, Graphics graphics) - { - return IsOutlineVisible (pt.X, pt.Y, pen, graphics); - } - - public bool IsOutlineVisible (int x, int y, Pen pen, Graphics graphics) - { - // LAMESPEC : .Net is currently ignorig Graphics object - //if (graphics != null) { - // if (!graphics.IsVisible (x, y)) - // return false; - //} - - return ((Stroke)pen).createStrokedShape (NativeObject).contains (x, y); - } - - public bool IsOutlineVisible (float x, float y, Pen pen, Graphics graphics) - { - return ((Stroke)pen).createStrokedShape (NativeObject).contains (x, y); - } - #endregion - - #region SetMarkers - public void SetMarkers () - { - NativeObject.SetMarkers (); - } - #endregion - - #region StartFigure - public void StartFigure() - { - NativeObject.StartFigure (); - } - #endregion - - #region Warp - [MonoTODO] - public void Warp (PointF[] destPoints, RectangleF srcRect) - { - Warp (destPoints, srcRect, null, WarpMode.Perspective, 1.0f / 4.0f); - } - - [MonoTODO] - public void Warp (PointF[] destPoints, RectangleF srcRect, Matrix matrix) - { - Warp (destPoints, srcRect, matrix, WarpMode.Perspective, 1.0f / 4.0f); - } - - [MonoTODO] - public void Warp (PointF[] destPoints, RectangleF srcRect, Matrix matrix, WarpMode warpMode) - { - Warp (destPoints, srcRect, matrix, warpMode, 1.0f / 4.0f); - } - - [MonoTODO] - public void Warp (PointF[] destPoints, RectangleF srcRect, Matrix matrix, WarpMode warpMode, float flatness) - { - throw new NotImplementedException(); - } - #endregion - - #region Widen - public void Widen (Pen pen) - { - Widen (pen, null); - } - - public void Widen (Pen pen, Matrix matrix) - { - Widen (pen, matrix, 2f/3f); - } - - public void Widen (Pen pen, Matrix matrix, float flatness) - { - if (pen == null) - throw new ArgumentNullException("pen"); - - Shape = new ExtendedGeneralPath(((Stroke)pen).createStrokedShape(this)); - Flatten(matrix, flatness); - } - #endregion - - private void SetPath (Point [] pts, byte [] types) - { - NativeObject.Clear (); - if (((PathPointType)types [0] & PathPointType.PathTypeMask) != PathPointType.Start) - NativeObject.moveTo (pts [0].X, pts [0].Y); - - for (int i=0; i < pts.Length; i++) { - switch (((PathPointType)types [i] & PathPointType.PathTypeMask)) { - case PathPointType.Start : - NativeObject.moveTo (pts [i].X, pts [i].Y); - break; - case PathPointType.Line : - NativeObject.lineTo (pts [i].X, pts [i].Y); - break; - case PathPointType.Bezier3 : - float x1 = pts [i].X; - float y1 = pts [i].Y; - i++; - float x2 = pts [i].X; - float y2 = pts [i].Y; - i++; - float x3 = pts [i].X; - float y3 = pts [i].Y; - NativeObject.curveTo (x1,y1, x2, y2, x3, y3); - break; - } - if (((PathPointType)types [i] & PathPointType.CloseSubpath) != 0) - NativeObject.closePath(); - - if (((PathPointType)types [i] & PathPointType.PathMarker) != 0) - NativeObject.SetMarkers (); - } - } - - internal void SetPath (PointF [] pts, byte [] types) - { - NativeObject.Clear (); - if (((PathPointType)types [0] & PathPointType.PathTypeMask) != PathPointType.Start) - NativeObject.moveTo (pts [0].X, pts [0].Y); - for (int i=0; i < pts.Length; i++) { - switch (((PathPointType)types [i] & PathPointType.PathTypeMask)) { - case PathPointType.Start : - NativeObject.moveTo (pts [i].X, pts [i].Y); - break; - case PathPointType.Line : - NativeObject.lineTo (pts [i].X, pts [i].Y); - break; - case PathPointType.Bezier3 : - float x1 = pts [i].X; - float y1 = pts [i].Y; - i++; - float x2 = pts [i].X; - float y2 = pts [i].Y; - i++; - float x3 = pts [i].X; - float y3 = pts [i].Y; - NativeObject.curveTo (x1,y1, x2, y2, x3, y3); - break; - } - if (((PathPointType)types [i] & PathPointType.CloseSubpath) != 0) - NativeObject.closePath(); - - if (((PathPointType)types [i] & PathPointType.PathMarker) != 0) - NativeObject.SetMarkers (); - } - } - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Drawing2D/GraphicsPathIterator.cs b/mcs/class/System.Drawing/System.Drawing.Drawing2D/GraphicsPathIterator.cs deleted file mode 100644 index dbd2f4341dc..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Drawing2D/GraphicsPathIterator.cs +++ /dev/null @@ -1,202 +0,0 @@ -// -// System.Drawing.Drawing2D.GraphicsPathIterator.cs -// -// Author: -// Dennis Hayes (dennish@Raytek.com) -// Duncan Mak (duncan@ximian.com) -// Ravindra (rkumar@novell.com) -// -// Copyright (C) 2002/3 Ximian, Inc (http://www.ximian.com) -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -using System; -using System.Drawing; - -namespace System.Drawing.Drawing2D -{ - public sealed class GraphicsPathIterator : MarshalByRefObject, IDisposable - { - private IntPtr nativeObject = IntPtr.Zero; - - // Constructors - internal GraphicsPathIterator (IntPtr native) - { - this.nativeObject = native; - } - - public GraphicsPathIterator (GraphicsPath path) - { - Status status = GDIPlus.GdipCreatePathIter (out nativeObject, path.NativeObject); - GDIPlus.CheckStatus (status); - } - - internal IntPtr NativeObject { - get { - return nativeObject; - } - set { - nativeObject = value; - } - } - - // Public Properites - - public int Count { - get { - int count; - Status status = GDIPlus.GdipPathIterGetCount (nativeObject, out count); - GDIPlus.CheckStatus (status); - - return count; - } - } - - public int SubpathCount { - get { - int count; - Status status = GDIPlus.GdipPathIterGetSubpathCount (nativeObject, out count); - GDIPlus.CheckStatus (status); - - return count; - } - } - - internal void Dispose (bool disposing) - { - Status status; - if (nativeObject != IntPtr.Zero) { - status = GDIPlus.GdipDeletePathIter (nativeObject); - GDIPlus.CheckStatus (status); - - nativeObject = IntPtr.Zero; - } - } - - // Public Methods. - - public int CopyData (ref PointF [] points, ref byte [] types, int startIndex, int endIndex) - { - Status status; - int resultCount; - - if (points.Length != types.Length) - throw new ArgumentException ("Invalid arguments passed. Both arrays should have the same length."); - - status = GDIPlus.GdipPathIterCopyData (nativeObject, out resultCount, points, types, startIndex, endIndex); - GDIPlus.CheckStatus (status); - - return resultCount; - } - - public void Dispose () - { - Dispose (true); - System.GC.SuppressFinalize (this); - } - - ~GraphicsPathIterator () - { - Dispose (false); - } - - public int Enumerate (ref PointF [] points, ref byte [] types) - { - Status status; - int resultCount; - int count = points.Length; - - if (count != types.Length) - throw new ArgumentException ("Invalid arguments passed. Both arrays should have the same length."); - - status = GDIPlus.GdipPathIterEnumerate (nativeObject, out resultCount, points, types, count); - GDIPlus.CheckStatus (status); - - return resultCount; - } - - public bool HasCurve () - { - bool curve; - Status status = GDIPlus.GdipPathIterHasCurve (nativeObject, out curve); - GDIPlus.CheckStatus (status); - - return curve; - } - - public int NextMarker (GraphicsPath path) - { - Status status; - int resultCount; - status = GDIPlus.GdipPathIterNextMarkerPath (nativeObject, out resultCount, path.NativeObject); - GDIPlus.CheckStatus (status); - - return resultCount; - } - - public int NextMarker (out int startIndex, out int endIndex) - { - Status status; - int resultCount; - status = GDIPlus.GdipPathIterNextMarker (nativeObject, out resultCount, out startIndex, out endIndex); - GDIPlus.CheckStatus (status); - - return resultCount; - } - - public int NextPathType (out byte pathType, out int startIndex, out int endIndex) - { - Status status; - int resultCount; - status = GDIPlus.GdipPathIterNextPathType (nativeObject, out resultCount, out pathType, out startIndex, out endIndex); - GDIPlus.CheckStatus (status); - - return resultCount; - } - - public int NextSubpath (GraphicsPath path, out bool isClosed) - { - Status status; - int resultCount; - status = GDIPlus.GdipPathIterNextSubpathPath (nativeObject, out resultCount, path.NativeObject, out isClosed); - GDIPlus.CheckStatus (status); - - return resultCount; - } - - public int NextSubpath (out int startIndex, out int endIndex, out bool isClosed) - { - Status status; - int resultCount; - status = GDIPlus.GdipPathIterNextSubpath (nativeObject, out resultCount, out startIndex, out endIndex, out isClosed); - GDIPlus.CheckStatus (status); - - return resultCount; - } - - public void Rewind () - { - Status status = GDIPlus.GdipPathIterRewind (nativeObject); - GDIPlus.CheckStatus (status); - } - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Drawing2D/GraphicsPathIterator.jvm.cs b/mcs/class/System.Drawing/System.Drawing.Drawing2D/GraphicsPathIterator.jvm.cs deleted file mode 100755 index f0ce626b88c..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Drawing2D/GraphicsPathIterator.jvm.cs +++ /dev/null @@ -1,220 +0,0 @@ -// -// System.Drawing.Drawing2D.GraphicsPathIterator.cs -// -// Author: -// Bors Kirzner -// -// Copyright (C) 2005 Mainsoft Corporation, (http://www.mainsoft.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -using System; -using System.Drawing; - -namespace System.Drawing.Drawing2D -{ - public sealed class GraphicsPathIterator : MarshalByRefObject, IDisposable - { - #region Fields - - private readonly GraphicsPath _path; - private int _marker = -1; - private int _subpath = -1; - - #endregion // Fields - - #region Constructors - - public GraphicsPathIterator (GraphicsPath path) - { - _path = path; - } - - #endregion // Constructors - - #region Properites - - public int Count - { - get { return _path.NativeObject.PointCount; } - } - - public int SubpathCount { - get { - int count = 0; - int start, end; - bool isClosed; - while (NextSubpath (out start, out end, out isClosed) != 0) - count++; - return count; - } - } - - #endregion // Properties - - #region Methods - - public int CopyData (ref PointF [] points, ref byte [] types, int startIndex, int endIndex) - { - int j = 0; - for (int i = startIndex; i <= endIndex && i < _path.PointCount; i++) { - points [j] = _path.PathPoints [i]; - types [j++] = _path.PathTypes [i]; - } - return j; - } - - public void Dispose () - { - } - - public int Enumerate (ref PointF [] points, ref byte [] types) - { - return CopyData (ref points, ref types, 0, _path.PointCount); - } - - public bool HasCurve () - { - byte [] types = _path.PathTypes; - for (int i=0; i < types.Length; i++) - if ((types [i] & (byte)PathPointType.PathTypeMask) == (byte)PathPointType.Bezier3) - return true; - return false; - } - - public int NextMarker (GraphicsPath path) - { - if (path == null) - return 0; - - int startIndex; - int endIndex; - int count = NextMarker (out startIndex, out endIndex); - - if (count != 0) - SetPath (_path, startIndex, count, path); - - return count; - } - - public int NextMarker (out int startIndex, out int endIndex) - { - if (_marker >= _path.PointCount) { - startIndex = 0; - endIndex = 0; - return 0; - } - - startIndex = ++_marker; - while ((_marker < _path.PointCount) && ((_path.PathTypes [_marker] & (byte)PathPointType.PathMarker) == 0)) - _marker++; - - endIndex = (_marker < _path.PointCount) ? _marker : _path.PointCount - 1; - return endIndex - startIndex + 1; - } - - public int NextPathType (out byte pathType, out int startIndex, out int endIndex) - { - if ((_subpath >= _path.PointCount - 1) | (_subpath < 0)) { - startIndex = 0; - endIndex = 0; - pathType = (_subpath < 0) ? (byte)PathPointType.Start : _path.PathTypes [_path.PointCount - 1]; - return 0; - } - - // .net acts different, but it seems to be a bug - if ((_path.PathTypes [_subpath + 1] & (byte)PathPointType.PathMarker) != 0) { - startIndex = 0; - endIndex = 0; - pathType = _path.PathTypes [_subpath]; - return 0; - } - - startIndex = _subpath++; - endIndex = startIndex; - pathType = (byte)(_path.PathTypes [startIndex + 1] & (byte)PathPointType.PathTypeMask); - - while (((_subpath) < _path.PointCount) && ((_path.PathTypes [_subpath] & (byte)PathPointType.PathTypeMask) == pathType)) - _subpath++; - - endIndex = (_subpath < _path.PointCount) ? --_subpath : _path.PointCount - 1; - return endIndex - startIndex + 1; - } - - public int NextSubpath (GraphicsPath path, out bool isClosed) - { - int startIndex; - int endIndex; - int count = NextSubpath (out startIndex, out endIndex, out isClosed); - - if ((count != 0) && (path != null)) - SetPath (_path, startIndex, count, path); - - return count; - } - - private void SetPath (GraphicsPath source, int start, int count, GraphicsPath target) - { - PointF [] points = new PointF [count]; - byte [] types = new byte [count]; - PointF [] pathPoints = _path.PathPoints; - byte [] pathTypes = _path.PathTypes; - - for (int i = 0; i < count; i++) { - points [i] = pathPoints [start + i]; - types [i] = pathTypes [start + i]; - } - - target.SetPath (points, types); - } - - public int NextSubpath (out int startIndex, out int endIndex, out bool isClosed) - { - _subpath++; - while (((_subpath) < _path.PointCount) && (_path.PathTypes [_subpath] != (byte)PathPointType.Start)) - _subpath++; - - - if (_subpath >= _path.PointCount - 1) { - startIndex = 0; - endIndex = 0; - isClosed = true; - return 0; - } - - startIndex = _subpath; - int offset = 1; - while (((_subpath + offset) < _path.PointCount) && (_path.PathTypes [_subpath + offset] != (byte)PathPointType.Start)) - offset++; - - endIndex = ((_subpath + offset) < _path.PointCount) ? _subpath + offset - 1 : _path.PointCount - 1; - isClosed = (_path.PathTypes [endIndex] & (byte)PathPointType.CloseSubpath) != 0; - return endIndex - startIndex + 1; - } - - public void Rewind () - { - _marker = -1; - _subpath = -1; - } - - #endregion // Methods - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Drawing2D/GraphicsState.cs b/mcs/class/System.Drawing/System.Drawing.Drawing2D/GraphicsState.cs deleted file mode 100644 index 266780b028d..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Drawing2D/GraphicsState.cs +++ /dev/null @@ -1,51 +0,0 @@ -// -// System.Drawing.Drawing2D.GraphicsState.cs -// -// Author: -// Dennis Hayes (dennish@Raytek.com) -// -// (C) 2002/3 Ximian, Inc -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -using System; - -namespace System.Drawing.Drawing2D { - /// - /// Summary description for GraphicsState. - /// - public sealed class GraphicsState : MarshalByRefObject - { - // All members inherited - internal uint nativeState; - - // Constructor - internal GraphicsState() - { - // Nothing to be done here - } - - - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Drawing2D/GraphicsState.jvm.cs b/mcs/class/System.Drawing/System.Drawing.Drawing2D/GraphicsState.jvm.cs deleted file mode 100644 index 9f6712e1a0b..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Drawing2D/GraphicsState.jvm.cs +++ /dev/null @@ -1,166 +0,0 @@ -// -// System.Drawing.Drawing2D.ExtendedGraphicsState.jvm.cs -// -// Author: -// Vladimir Krasnov (vladimirk@mainsoft.com) -// -// Copyright (C) 2005 Mainsoft Corporation (http://www.mainsoft.com) -// - -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -using System; -using System.Drawing.Text; -using geom = java.awt.geom; -using awt = java.awt; - -namespace System.Drawing.Drawing2D -{ - /// - /// Summary description for GraphicsState. - /// - public sealed class GraphicsState : MarshalByRefObject - { - readonly CompositingMode _compositingMode; - readonly CompositingQuality _compositingQuality; - readonly Region _clip; - readonly awt.Shape _baseClip; - readonly InterpolationMode _interpolationMode; - readonly float _pageScale; - readonly GraphicsUnit _pageUnit; - readonly PixelOffsetMode _pixelOffsetMode; - readonly Point _renderingOrigin; - readonly SmoothingMode _smoothingMode; - readonly int _textContrast; - readonly TextRenderingHint _textRenderingHint; - - // additional transform in case that new container has one - readonly Matrix _transform; - readonly Matrix _baseTransform; - - GraphicsState _next = null; - - awt.Shape _finalBaseClip = null; - - internal GraphicsState(Graphics graphics, bool resetState) - : this(graphics, Matrix.IdentityTransform, resetState) {} - - internal GraphicsState Next { - get { - return _next; - } - set { - _next = value; - } - } - - internal GraphicsState(Graphics graphics, Matrix matrix, bool resetState) - { - _compositingMode = graphics.CompositingMode; - _compositingQuality = graphics.CompositingQuality; - _clip = graphics.ScaledClip; - _baseClip = graphics.NativeObject.getClip(); - _interpolationMode = graphics.InterpolationMode; - _pageScale = graphics.PageScale; - _pageUnit = graphics.PageUnit; - _pixelOffsetMode = graphics.PixelOffsetMode; - - // FIXME: render orign is not implemented yet - //_renderingOrigin = new Point( g.RenderingOrigin.X, g.RenderingOrigin.Y ); - - _smoothingMode = graphics.SmoothingMode; - _transform = graphics.Transform; - _baseTransform = graphics.BaseTransform; - - _textContrast = graphics.TextContrast; - _textRenderingHint = graphics.TextRenderingHint; - - if (resetState) - ResetState(graphics, matrix); - } - - internal void RestoreState(Graphics graphics) - { - graphics.CompositingMode = _compositingMode; - graphics.CompositingQuality = _compositingQuality; - graphics.ScaledClip = _clip; - graphics.InterpolationMode = _interpolationMode; - graphics.PageScale = _pageScale; - graphics.PageUnit = _pageUnit; - graphics.PixelOffsetMode = _pixelOffsetMode; - - // FIXME: render orign is not implemented yet - //graphics.RenderingOrigin = new Point( _renderingOrigin.X, _renderingOrigin.Y ); - - graphics.SmoothingMode = _smoothingMode; - graphics.Transform = _transform; - graphics.BaseTransform = _baseTransform; - graphics.TextContrast = _textContrast; - graphics.TextRenderingHint = _textRenderingHint; - - // must be set after the base transform is restored - graphics.NativeObject.setClip(_baseClip); - } - - void ResetState(Graphics graphics, Matrix matrix) - { - //should be set before the base transform is changed - if (_baseClip == null) - graphics.IntersectScaledClipWithBase(graphics.VisibleShape); - graphics.IntersectScaledClipWithBase(_clip); - - graphics.CompositingMode = CompositingMode.SourceOver; - graphics.CompositingQuality = CompositingQuality.Default; - graphics.Clip = Region.InfiniteRegion; - graphics.InterpolationMode = InterpolationMode.Bilinear; - graphics.PageScale = 1.0f; - graphics.PageUnit = GraphicsUnit.Display; - graphics.PixelOffsetMode = PixelOffsetMode.Default; - - // FIXME: render orign is not implemented yet - //graphics.RenderingOrigin = new Point(0, 0); - - graphics.SmoothingMode = SmoothingMode.None; - graphics.ResetTransform(); - graphics.PrependBaseTransform(Graphics.GetFinalTransform(_transform.NativeObject, _pageUnit, _pageScale)); - graphics.PrependBaseTransform(matrix.NativeObject); - graphics.TextContrast = 4; - graphics.TextRenderingHint = TextRenderingHint.SystemDefault; - - geom.AffineTransform finalBaseTransform = graphics.NativeObject.getTransform(); - graphics.NativeObject.setTransform(Matrix.IdentityTransform.NativeObject); - _finalBaseClip = graphics.NativeObject.getClip(); - graphics.NativeObject.setTransform(finalBaseTransform); - } - - internal void RestoreBaseClip(Graphics graphics) { - if (_finalBaseClip == null) { - graphics.NativeObject.setClip(null); - return; - } - - geom.AffineTransform finalBaseTransform = graphics.NativeObject.getTransform(); - graphics.NativeObject.setTransform(Matrix.IdentityTransform.NativeObject); - graphics.NativeObject.setClip(_finalBaseClip); - graphics.NativeObject.setTransform(finalBaseTransform); - } - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Drawing2D/HatchBrush.cs b/mcs/class/System.Drawing/System.Drawing.Drawing2D/HatchBrush.cs deleted file mode 100644 index 024e0c2adde..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Drawing2D/HatchBrush.cs +++ /dev/null @@ -1,97 +0,0 @@ -// -// System.Drawing.Drawing2D.HatchBrush.cs -// -// Authors: -// Dennis Hayes (dennish@Raytek.com) -// Ravindra (rkumar@novell.com) -// -// (C) 2002/3 Ximian, Inc -// (C) 2004 Novell, Inc. -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -using System; - -namespace System.Drawing.Drawing2D -{ - /// - /// Summary description for HatchBrush. - /// - public sealed class HatchBrush : Brush - { - - internal HatchBrush (IntPtr ptr) : base (ptr) - { - } - - public HatchBrush (HatchStyle hatchStyle, Color foreColor) - : this (hatchStyle, foreColor, Color.Black) - { - } - - public HatchBrush(HatchStyle hatchStyle, Color foreColor, Color backColor) - { - Status status = GDIPlus.GdipCreateHatchBrush (hatchStyle, foreColor.ToArgb (), backColor.ToArgb (), out nativeObject); - GDIPlus.CheckStatus (status); - } - - public Color BackgroundColor { - get { - int argb; - Status status = GDIPlus.GdipGetHatchBackgroundColor (nativeObject, out argb); - GDIPlus.CheckStatus (status); - return Color.FromArgb (argb); - } - } - - public Color ForegroundColor { - get { - int argb; - Status status = GDIPlus.GdipGetHatchForegroundColor (nativeObject, out argb); - GDIPlus.CheckStatus (status); - return Color.FromArgb (argb); - } - } - - public HatchStyle HatchStyle { - get { - HatchStyle hatchStyle; - Status status = GDIPlus.GdipGetHatchStyle (nativeObject, out hatchStyle); - GDIPlus.CheckStatus (status); - return hatchStyle; - } - } - - public override object Clone () - { - IntPtr clonePtr; - Status status = GDIPlus.GdipCloneBrush (nativeObject, out clonePtr); - GDIPlus.CheckStatus (status); - - HatchBrush clone = new HatchBrush (clonePtr); - return clone; - } - - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Drawing2D/HatchBrush.jvm.cs b/mcs/class/System.Drawing/System.Drawing.Drawing2D/HatchBrush.jvm.cs deleted file mode 100755 index 36f2f8b41d8..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Drawing2D/HatchBrush.jvm.cs +++ /dev/null @@ -1,57 +0,0 @@ - -using System; -using java.awt; -namespace System.Drawing.Drawing2D -{ - /// - /// Summary description for HatchBrush. - /// - public sealed class HatchBrush : Brush - { - private HatchStyle _style; - private Color _foreColor; - private Color _backColor; - - public HatchBrush (HatchStyle hatchStyle, Color foreColor) - : this (hatchStyle, foreColor, Color.Black) - { - } - - public HatchBrush(HatchStyle hatchStyle, Color foreColor, Color backColor) - { - _style = hatchStyle; - _foreColor = foreColor; - _backColor = backColor; - } - - public Color BackgroundColor { - get { - return _backColor; - } - } - - public Color ForegroundColor { - get { - return _foreColor; - } - } - - public HatchStyle HatchStyle { - get { - return _style; - } - } - - public override object Clone () - { - return new HatchBrush (_style, _foreColor, _backColor); - } - - protected override Paint NativeObject { - get { - throw new NotImplementedException (); - } - } - - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Drawing2D/HatchStyle.cs b/mcs/class/System.Drawing/System.Drawing.Drawing2D/HatchStyle.cs deleted file mode 100644 index cdfe75df240..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Drawing2D/HatchStyle.cs +++ /dev/null @@ -1,101 +0,0 @@ -// -// System.Drawing.Drawing2D.HatchStyle.cs -// -// Authors: -// Stefan Maierhofer -// Dennis Hayes (dennish@Raytek.com) -// Ravindra (rkumar@novell.com) -// -// (C) 2002/3 Ximian, Inc. -// (C) 2004 Novell, Inc. -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; - -namespace System.Drawing.Drawing2D { - /// - /// Summary description for HatchStyle. - /// - [Serializable] - public enum HatchStyle { - BackwardDiagonal = 3, - Cross = LargeGrid, - DarkDownwardDiagonal = 20, - DarkHorizontal = 29, - DarkUpwardDiagonal = 21, - DarkVertical = 28, - DashedDownwardDiagonal = 30, - DashedHorizontal = 32, - DashedUpwardDiagonal = 31, - DashedVertical = 33, - DiagonalBrick = 38, - DiagonalCross = 5, - Divot = 42, - DottedDiamond = 44, - DottedGrid = 43, - ForwardDiagonal = 2, - Horizontal = 0, - HorizontalBrick = 39, - LargeCheckerBoard = 50, - LargeConfetti = 35, - LargeGrid = 4, - LightDownwardDiagonal = 18, - LightHorizontal = 25, - LightUpwardDiagonal = 19, - LightVertical = 24, - Max = 4, - Min = 0, - NarrowHorizontal = 27, - NarrowVertical = 26, - OutlinedDiamond = 51, - Percent05 = 6, - Percent10 = 7, - Percent20 = 8, - Percent25 = 9, - Percent30 = 10, - Percent40 = 11, - Percent50 = 12, - Percent60 = 13, - Percent70 = 14, - Percent75 = 15, - Percent80 = 16, - Percent90 = 17, - Plaid = 41, - Shingle = 45, - SmallCheckerBoard = 49, - SmallConfetti = 34, - SmallGrid = 48, - SolidDiamond = 52, - Sphere = 47, - Trellis = 46, - Vertical = 1, - Wave = 37, - Weave = 40, - WideDownwardDiagonal = 22, - WideUpwardDiagonal = 23, - ZigZag = 36 - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Drawing2D/InterpolationMode.cs b/mcs/class/System.Drawing/System.Drawing.Drawing2D/InterpolationMode.cs deleted file mode 100644 index 6e0d5b3931f..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Drawing2D/InterpolationMode.cs +++ /dev/null @@ -1,51 +0,0 @@ -// -// System.Drawing.Drawing2D.InterpolationMode.cs -// -// Author: -// Stefan Maierhofer -// Dennis Hayes (dennish@Raytek.com) -// -// (C) 2002/3 Ximian, Inc -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -using System; - -namespace System.Drawing.Drawing2D { - /// - /// Summary description for InterpolationMode. - /// - [Serializable] - public enum InterpolationMode { - Bicubic = 4, - Bilinear = 3, - Default = 0, - High = 2, - HighQualityBicubic = 7, - HighQualityBilinear = 6, - Invalid = -1, - Low = 1, - NearestNeighbor = 5 - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Drawing2D/LineCap.cs b/mcs/class/System.Drawing/System.Drawing.Drawing2D/LineCap.cs deleted file mode 100644 index 35f010efca2..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Drawing2D/LineCap.cs +++ /dev/null @@ -1,53 +0,0 @@ -// -// System.Drawing.Drawing2D.LineCap.cs -// -// Author: -// Stefan Maierhofer -// Dennis Hayes (dennish@Raytek.com) -// -// (C) 2002/3 Ximian, Inc -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -using System; - -namespace System.Drawing.Drawing2D { - /// - /// Summary description for LineCap. - /// - [Serializable] - public enum LineCap { - AnchorMask = 240, - ArrowAnchor = 20, - Custom = 255, - DiamondAnchor = 19, - Flat = 0, - NoAnchor = 16, - Round = 2, - RoundAnchor = 18, - Square = 1, - SquareAnchor = 17, - Triangle = 3 - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Drawing2D/LineJoin.cs b/mcs/class/System.Drawing/System.Drawing.Drawing2D/LineJoin.cs deleted file mode 100644 index 95eac817142..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Drawing2D/LineJoin.cs +++ /dev/null @@ -1,46 +0,0 @@ -// -// System.Drawing.Drawing2D.LineJoin.cs -// -// Author: -// Stefan Maierhofer -// Dennis Hayes (dennish@Raytek.com) -// -// (C) 2002/3 Ximian, Inc -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -using System; - -namespace System.Drawing.Drawing2D { - /// - /// Summary description for LineJoin. - /// - [Serializable] - public enum LineJoin { - Bevel = 1, - Miter = 0, - MiterClipped = 3, - Round = 2 - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Drawing2D/LinearGradientBrush.cs b/mcs/class/System.Drawing/System.Drawing.Drawing2D/LinearGradientBrush.cs deleted file mode 100644 index 88bfcc8744f..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Drawing2D/LinearGradientBrush.cs +++ /dev/null @@ -1,348 +0,0 @@ -// -// System.Drawing.Drawing2D.LinearGradientBrush.cs -// -// Authors: -// Dennis Hayes (dennish@Raytek.com) -// Ravindra (rkumar@novell.com) -// -// Copyright (C) 2002/3 Ximian, Inc. http://www.ximian.com -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System.Drawing; - -namespace System.Drawing.Drawing2D -{ - /// - /// Summary description for LinearGradientBrush. - /// - public sealed class LinearGradientBrush : Brush - { - RectangleF rectangle; - - internal LinearGradientBrush (IntPtr native) : base (native) - { - } - - public LinearGradientBrush (Point point1, Point point2, Color color1, Color color2) - { - Status status = GDIPlus.GdipCreateLineBrushI (ref point1, ref point2, color1.ToArgb (), color2.ToArgb (), WrapMode.Tile, out nativeObject); - GDIPlus.CheckStatus (status); - - Rectangle rect; - status = GDIPlus.GdipGetLineRectI (nativeObject, out rect); - GDIPlus.CheckStatus (status); - rectangle = (RectangleF) rect; - } - - public LinearGradientBrush (PointF point1, PointF point2, Color color1, Color color2) - { - Status status = GDIPlus.GdipCreateLineBrush (ref point1, ref point2, color1.ToArgb (), color2.ToArgb (), WrapMode.Tile, out nativeObject); - GDIPlus.CheckStatus (status); - - status = GDIPlus.GdipGetLineRect (nativeObject, out rectangle); - GDIPlus.CheckStatus (status); - } - - public LinearGradientBrush (Rectangle rect, Color color1, Color color2, LinearGradientMode linearGradientMode) - { - Status status = GDIPlus.GdipCreateLineBrushFromRectI (ref rect, color1.ToArgb (), color2.ToArgb (), linearGradientMode, WrapMode.Tile, out nativeObject); - GDIPlus.CheckStatus (status); - - rectangle = (RectangleF) rect; - } - - public LinearGradientBrush (Rectangle rect, Color color1, Color color2, float angle) : this (rect, color1, color2, angle, false) - { - } - - public LinearGradientBrush (RectangleF rect, Color color1, Color color2, LinearGradientMode linearGradientMode) - { - Status status = GDIPlus.GdipCreateLineBrushFromRect (ref rect, color1.ToArgb (), color2.ToArgb (), linearGradientMode, WrapMode.Tile, out nativeObject); - GDIPlus.CheckStatus (status); - - rectangle = rect; - } - - public LinearGradientBrush (RectangleF rect, Color color1, Color color2, float angle) : this (rect, color1, color2, angle, false) - { - } - - public LinearGradientBrush (Rectangle rect, Color color1, Color color2, float angle, bool isAngleScaleable) - { - Status status = GDIPlus.GdipCreateLineBrushFromRectWithAngleI (ref rect, color1.ToArgb (), color2.ToArgb (), angle, isAngleScaleable, WrapMode.Tile, out nativeObject); - GDIPlus.CheckStatus (status); - - rectangle = (RectangleF) rect; - } - - public LinearGradientBrush (RectangleF rect, Color color1, Color color2, float angle, bool isAngleScaleable) - { - Status status = GDIPlus.GdipCreateLineBrushFromRectWithAngle (ref rect, color1.ToArgb (), color2.ToArgb (), angle, isAngleScaleable, WrapMode.Tile, out nativeObject); - GDIPlus.CheckStatus (status); - - rectangle = rect; - } - - // Public Properties - - public Blend Blend { - get { - int count; - Status status = GDIPlus.GdipGetLineBlendCount (nativeObject, out count); - GDIPlus.CheckStatus (status); - float [] factors = new float [count]; - float [] positions = new float [count]; - status = GDIPlus.GdipGetLineBlend (nativeObject, factors, positions, count); - GDIPlus.CheckStatus (status); - - Blend blend = new Blend (); - blend.Factors = factors; - blend.Positions = positions; - - return blend; - } - set { - int count; - float [] factors = value.Factors; - float [] positions = value.Positions; - count = factors.Length; - - if (count == 0 || positions.Length == 0) - throw new ArgumentException ("Invalid Blend object. It should have at least 2 elements in each of the factors and positions arrays."); - - if (count != positions.Length) - throw new ArgumentException ("Invalid Blend object. It should contain the same number of factors and positions values."); - - if (positions [0] != 0.0F) - throw new ArgumentException ("Invalid Blend object. The positions array must have 0.0 as its first element."); - - if (positions [count - 1] != 1.0F) - throw new ArgumentException ("Invalid Blend object. The positions array must have 1.0 as its last element."); - - Status status = GDIPlus.GdipSetLineBlend (nativeObject, factors, positions, count); - GDIPlus.CheckStatus (status); - } - } - - public bool GammaCorrection { - get { - bool gammaCorrection; - Status status = GDIPlus.GdipGetLineGammaCorrection (nativeObject, out gammaCorrection); - GDIPlus.CheckStatus (status); - return gammaCorrection; - } - set { - Status status = GDIPlus.GdipSetLineGammaCorrection (nativeObject, value); - GDIPlus.CheckStatus (status); - } - } - - public ColorBlend InterpolationColors { - get { - int count; - Status status = GDIPlus.GdipGetLinePresetBlendCount (nativeObject, out count); - GDIPlus.CheckStatus (status); - int [] intcolors = new int [count]; - float [] positions = new float [count]; - status = GDIPlus.GdipGetLinePresetBlend (nativeObject, intcolors, positions, count); - GDIPlus.CheckStatus (status); - - ColorBlend interpolationColors = new ColorBlend (); - Color [] colors = new Color [count]; - for (int i = 0; i < count; i++) - colors [i] = Color.FromArgb (intcolors [i]); - interpolationColors.Colors = colors; - interpolationColors.Positions = positions; - - return interpolationColors; - } - set { - int count; - Color [] colors = value.Colors; - float [] positions = value.Positions; - count = colors.Length; - - if (count == 0 || positions.Length == 0) - throw new ArgumentException ("Invalid ColorBlend object. It should have at least 2 elements in each of the colors and positions arrays."); - - if (count != positions.Length) - throw new ArgumentException ("Invalid ColorBlend object. It should contain the same number of positions and color values."); - - if (positions [0] != 0.0F) - throw new ArgumentException ("Invalid ColorBlend object. The positions array must have 0.0 as its first element."); - - if (positions [count - 1] != 1.0F) - throw new ArgumentException ("Invalid ColorBlend object. The positions array must have 1.0 as its last element."); - - int [] blend = new int [colors.Length]; - for (int i = 0; i < colors.Length; i++) - blend [i] = colors [i].ToArgb (); - - Status status = GDIPlus.GdipSetLinePresetBlend (nativeObject, blend, positions, count); - GDIPlus.CheckStatus (status); - } - } - - public Color [] LinearColors { - get { - int [] colors = new int [2]; - Status status = GDIPlus.GdipGetLineColors (nativeObject, colors); - GDIPlus.CheckStatus (status); - Color [] linearColors = new Color [2]; - linearColors [0] = Color.FromArgb (colors [0]); - linearColors [1] = Color.FromArgb (colors [1]); - - return linearColors; - } - set { - Status status = GDIPlus.GdipSetLineColors (nativeObject, value [0].ToArgb (), value [1].ToArgb ()); - GDIPlus.CheckStatus (status); - } - } - - public RectangleF Rectangle { - get { - return rectangle; - } - } - - public Matrix Transform { - get { - Matrix matrix = new Matrix (); - Status status = GDIPlus.GdipGetLineTransform (nativeObject, matrix.nativeMatrix); - GDIPlus.CheckStatus (status); - - return matrix; - } - set { - Status status = GDIPlus.GdipSetLineTransform (nativeObject, value.nativeMatrix); - GDIPlus.CheckStatus (status); - } - } - - public WrapMode WrapMode { - get { - WrapMode wrapMode; - Status status = GDIPlus.GdipGetLineWrapMode (nativeObject, out wrapMode); - GDIPlus.CheckStatus (status); - - return wrapMode; - } - set { - Status status = GDIPlus.GdipSetLineWrapMode (nativeObject, value); - GDIPlus.CheckStatus (status); - } - } - - // Public Methods - - public void MultiplyTransform (Matrix matrix) - { - MultiplyTransform (matrix, MatrixOrder.Prepend); - } - - public void MultiplyTransform (Matrix matrix, MatrixOrder order) - { - Status status = GDIPlus.GdipMultiplyLineTransform (nativeObject, matrix.nativeMatrix, order); - GDIPlus.CheckStatus (status); - } - - public void ResetTransform () - { - Status status = GDIPlus.GdipResetLineTransform (nativeObject); - GDIPlus.CheckStatus (status); - } - - public void RotateTransform (float angle) - { - RotateTransform (angle, MatrixOrder.Prepend); - } - - public void RotateTransform (float angle, MatrixOrder order) - { - Status status = GDIPlus.GdipRotateLineTransform (nativeObject, angle, order); - GDIPlus.CheckStatus (status); - } - - public void ScaleTransform (float sx, float sy) - { - ScaleTransform (sx, sy, MatrixOrder.Prepend); - } - - public void ScaleTransform (float sx, float sy, MatrixOrder order) - { - Status status = GDIPlus.GdipScaleLineTransform (nativeObject, sx, sy, order); - GDIPlus.CheckStatus (status); - } - - public void SetBlendTriangularShape (float focus) - { - SetBlendTriangularShape (focus, 1.0F); - } - - public void SetBlendTriangularShape (float focus, float scale) - { - if (focus < 0 || focus > 1 || scale < 0 || scale > 1) - throw new ArgumentException ("Invalid parameter passed."); - - Status status = GDIPlus.GdipSetLineLinearBlend (nativeObject, focus, scale); - GDIPlus.CheckStatus (status); - } - - public void SetSigmaBellShape (float focus) - { - SetSigmaBellShape (focus, 1.0F); - } - - public void SetSigmaBellShape (float focus, float scale) - { - if (focus < 0 || focus > 1 || scale < 0 || scale > 1) - throw new ArgumentException ("Invalid parameter passed."); - - Status status = GDIPlus.GdipSetLineSigmaBlend (nativeObject, focus, scale); - GDIPlus.CheckStatus (status); - } - - public void TranslateTransform (float dx, float dy) - { - TranslateTransform (dx, dy, MatrixOrder.Prepend); - } - - public void TranslateTransform (float dx, float dy, MatrixOrder order) - { - Status status = GDIPlus.GdipTranslateLineTransform (nativeObject, dx, dy, order); - GDIPlus.CheckStatus (status); - } - - public override object Clone () - { - IntPtr clonePtr; - Status status = GDIPlus.GdipCloneBrush (nativeObject, out clonePtr); - GDIPlus.CheckStatus (status); - - LinearGradientBrush clone = new LinearGradientBrush (clonePtr); - return clone; - } - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Drawing2D/LinearGradientBrush.jvm.cs b/mcs/class/System.Drawing/System.Drawing.Drawing2D/LinearGradientBrush.jvm.cs deleted file mode 100755 index a74a65de01e..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Drawing2D/LinearGradientBrush.jvm.cs +++ /dev/null @@ -1,291 +0,0 @@ -using System; -using java.awt; -using geom = java.awt.geom; - -namespace System.Drawing.Drawing2D { - /// - /// Summary description for LinearGradientBrush. - /// - public sealed class LinearGradientBrush : Brush { - Blend _blend; - bool _gammaCorrection; - ColorBlend _interpolationColors; - WrapMode _wrapmode; - RectangleF _gradientRectangle; - - GradientPaint _nativeObject; - protected override Paint NativeObject { - get { - return _nativeObject; - } - } - - #region Initialization - - internal void Init(float x1, float y1, Color color1, float x2, float y2, Color color2, bool cyclic) { - _nativeObject = new GradientPaint( - x1, y1, - new java.awt.Color(color1.R,color1.G,color1.B,color1.A), - x2, y2, - new java.awt.Color(color2.R,color2.G,color2.B,color2.A), cyclic); - } - - internal void Init(float x1, float y1, Color color1, float x2, float y2, Color color2) { - Init(x1, y1, color1, x2, y2, color2, false); - } - - internal void Init(float x1, float y1, Color color1, float x2, float y2, Color color2, float angle) { - _gradientRectangle = new RectangleF(x1, y1, x2-x1, y2-y1); - PointF [] points = GetMedianeEnclosingRect(x1, y1, x2, y2, angle); - Init(points[0].X, points[0].Y, color1, points[1].X, points[1].Y, color2); - } - internal void Init(float x1,float y1, Color color1,float x2, float y2, Color color2, LinearGradientMode linearGradientMode) { - _gradientRectangle = new RectangleF(x1, y1, x2-x1, y2-y1); - - if (linearGradientMode == LinearGradientMode.Horizontal) { - Init(x1, y1, color1, x2, y1, color2); - } - if (linearGradientMode == LinearGradientMode.Vertical) { - Init(x1, y1, color1, x1, y2, color2); - } - if (linearGradientMode == LinearGradientMode.BackwardDiagonal) { - PointF [] points = GetMedianeEnclosingRect(x1, y1, x2, y2, false); - Init(points[0].X, points[0].Y, color2, points[1].X, points[1].Y, color1); - } - if (linearGradientMode == LinearGradientMode.ForwardDiagonal) { - PointF [] points = GetMedianeEnclosingRect(x1, y1, x2, y2, true); - Init(points[0].X, points[0].Y, color1, points[1].X, points[1].Y, color2); - } - } - - #endregion - - #region Constructors - - internal LinearGradientBrush (geom.Point2D p1, java.awt.Color color1, geom.Point2D p2, java.awt.Color color2, bool cyclic) { - _nativeObject = new GradientPaint(p1, color1, p2, color2, cyclic); - } - internal LinearGradientBrush (float x1,float y1, Color color1,float x2, float y2, Color color2, LinearGradientMode mode) { - Init(x1, y1, color1, x2, y2, color2, mode); - } - internal LinearGradientBrush (float x1, float y1, Color color1, float x2, float y2, Color color2) { - Init(x1, y2, color1, x1, y2, color2); - } - public LinearGradientBrush (Point point1, Point point2, Color color1, Color color2) { - _gradientRectangle = new RectangleF(point1.X, point1.Y, point2.X - point1.X, point2.Y - point2.Y); - Init(point1.X, point1.Y, color1, point2.X, point2.Y, color2); - } - public LinearGradientBrush (PointF point1, PointF point2, Color color1, Color color2) { - _gradientRectangle = new RectangleF(point1.X, point1.Y, point2.X - point1.X, point2.Y - point2.Y); - Init(point1.X, point1.Y, color1, point2.X, point2.Y, color2); - } - public LinearGradientBrush (Rectangle rect, Color color1, Color color2, LinearGradientMode linearGradientMode) { - Init(rect.X, rect.Y, color1, rect.X + rect.Width, rect.Y + rect.Height, color2, linearGradientMode); - } - public LinearGradientBrush (RectangleF rect, Color color1, Color color2, LinearGradientMode linearGradientMode) { - Init(rect.X, rect.Y, color1, rect.X + rect.Width, rect.Y + rect.Height, color2, linearGradientMode); - } - public LinearGradientBrush (Rectangle rect, Color color1, Color color2, float angle) { - Init(rect.X, rect.Y, color1, rect.X + rect.Width, rect.Y + rect.Height, color2, angle); - } - public LinearGradientBrush (RectangleF rect, Color color1, Color color2, float angle) { - Init(rect.X, rect.Y, color1, rect.X + rect.Width, rect.Y + rect.Height, color2, angle); - } - public LinearGradientBrush (Rectangle rect, Color color1, Color color2, float angle, bool isAngleScaleable): - this(rect, color1, color2, angle) { - } - public LinearGradientBrush (RectangleF rect, Color color1, Color color2, float angle, bool isAngleScaleable): - this(rect, color1, color2, angle) { - } - #endregion - - #region GetMedianeEnclosingRect - - internal PointF [] GetMedianeEnclosingRect(float x1, float y1, float x2, float y2, float rotateAngle) { - float width = x2 - x1; - float height = y2 - y1; - PointF rectCenter = new PointF(x1 + width/2, y1 + height/2); - float gradLen = width * ((float)Math.Cos(rotateAngle * Math.PI / 180)) + - height * ((float)Math.Sin(rotateAngle * Math.PI / 180)); - - PointF [] points = new PointF []{ new PointF(rectCenter.X - gradLen/2, rectCenter.Y), - new PointF(rectCenter.X + gradLen/2, rectCenter.Y) }; - - Matrix mx = new Matrix(); - mx.RotateAt((float)rotateAngle, rectCenter); - mx.TransformPoints(points); - return points; - } - internal PointF [] GetMedianeEnclosingRect(float x1, float y1, float x2, float y2, bool forwardDiagonal) { - float width = x2 - x1; - float height = y2 - y1; - PointF rectCenter = new PointF(x1 + width/2, y1 + height/2); - float rotateAngle = (float)Math.Atan2(width, height); - float gradLen = width * (float)Math.Cos(rotateAngle); - - if (!forwardDiagonal) - rotateAngle = -rotateAngle; - - PointF [] points = new PointF []{ new PointF(rectCenter.X - gradLen, rectCenter.Y), - new PointF(rectCenter.X + gradLen, rectCenter.Y) }; - - Matrix mx = new Matrix(); - mx.RotateAt((float)rotateAngle * (float)(180/Math.PI), rectCenter); - mx.TransformPoints(points); - return points; - } - - #endregion - - #region Public Properties - - // FALLBACK: no functionality implemented for this property - public Blend Blend { - get { - return _blend; - } - set { - _blend = value; - } - } - - // FALLBACK: no functionality implemented for this property - public bool GammaCorrection { - get { - return _gammaCorrection; - } - set { - _gammaCorrection = value; - } - } - - // FALLBACK: no functionality implemented for this property - public ColorBlend InterpolationColors { - get { - return _interpolationColors; - } - set { - _interpolationColors = value; - } - } - - public Color [] LinearColors { - get { - Color [] cl = new Color[2]; - java.awt.Color c1 = ((GradientPaint)NativeObject).getColor1(); - java.awt.Color c2 = ((GradientPaint)NativeObject).getColor2(); - cl[0] = Color.FromArgb(c1.getAlpha(),c1.getRed(),c1.getGreen(),c1.getBlue()); - cl[1] = Color.FromArgb(c2.getAlpha(),c2.getRed(),c2.getGreen(),c2.getBlue()); - return cl; - } - set { - if (value == null) - throw new ArgumentNullException("colors"); - - geom.Point2D p1 = ((GradientPaint)NativeObject).getPoint1(); - geom.Point2D p2 = ((GradientPaint)NativeObject).getPoint2(); - Init( - (float)p1.getX(), (float)p1.getY(), value[0], - (float)p2.getX(), (float)p2.getY(), value[1]); - } - } - - public RectangleF Rectangle { - get { - return _gradientRectangle; - } - } - - public Matrix Transform { - get { return BrushTransform; } - set { BrushTransform = value; } - } - - // FALLBACK: not functionality implemented for this property - public WrapMode WrapMode { - get { - return _wrapmode; - } - set { - _wrapmode = value; - } - } - #endregion - - #region Public Methods - - public void MultiplyTransform (Matrix matrix) { - BrushMultiplyTransform(matrix, MatrixOrder.Prepend); - } - - public void MultiplyTransform (Matrix matrix, MatrixOrder order) { - BrushMultiplyTransform(matrix, order); - } - - public void ResetTransform () { - BrushResetTransform(); - } - - public void RotateTransform (float angle) { - BrushRotateTransform(angle, MatrixOrder.Prepend); - } - - public void RotateTransform (float angle, MatrixOrder order) { - BrushRotateTransform(angle, order); - } - - public void ScaleTransform (float sx, float sy) { - BrushScaleTransform(sx, sy, MatrixOrder.Prepend); - } - - public void ScaleTransform (float sx, float sy, MatrixOrder order) { - BrushScaleTransform(sx, sy, order); - } - - public void SetBlendTriangularShape (float focus) { - SetBlendTriangularShape (focus, 1.0F); - } - - public void SetBlendTriangularShape (float focus, float scale) { - Color [] cl = LinearColors; - geom.Point2D p1 = ((GradientPaint)NativeObject).getPoint1(); - geom.Point2D p2 = ((GradientPaint)NativeObject).getPoint2(); - geom.Point2D.Double po = new geom.Point2D.Double( - (p2.getX() + p1.getX()) / 2, - (p2.getY() + p1.getY()) / 2); - Init( - (float)p1.getX(), (float)p1.getY(), cl[0], - (float)po.getX(), (float)po.getY(), cl[1], true); - } - - public void SetSigmaBellShape (float focus) { - SetSigmaBellShape (focus, 1.0F); - } - - public void SetSigmaBellShape (float focus, float scale) { - // FALLBACK: Triangle shape used - SetBlendTriangularShape (focus, scale); - } - - public void TranslateTransform (float dx, float dy) { - BrushTranslateTransform (dx, dy); - } - - public void TranslateTransform (float dx, float dy, MatrixOrder order) { - BrushTranslateTransform(dx, dy, order); - } - - public override object Clone () { - LinearGradientBrush b = new LinearGradientBrush( - ((GradientPaint)NativeObject).getPoint1(), - ((GradientPaint)NativeObject).getColor1(), - ((GradientPaint)NativeObject).getPoint2(), - ((GradientPaint)NativeObject).getColor2(), - ((GradientPaint)NativeObject).isCyclic()); - b.Transform = this.Transform; - b.Blend = this.Blend; - return b; - } - #endregion - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Drawing2D/LinearGradientMode.cs b/mcs/class/System.Drawing/System.Drawing.Drawing2D/LinearGradientMode.cs deleted file mode 100644 index 4e4472d2547..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Drawing2D/LinearGradientMode.cs +++ /dev/null @@ -1,46 +0,0 @@ -// -// System.Drawing.Drawing2D.LinearGradientMode.cs -// -// Author: -// Stefan Maierhofer -// Dennis Hayes (dennish@Raytek.com) -// -// (C) 2002/3 Ximian, Inc -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -using System; - -namespace System.Drawing.Drawing2D { - /// - /// Summary description for LinearGradientMode. - /// - [Serializable] - public enum LinearGradientMode { - BackwardDiagonal = 3, - ForwardDiagonal = 2, - Horizontal = 0, - Vertical = 1 - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Drawing2D/Matrix.cs b/mcs/class/System.Drawing/System.Drawing.Drawing2D/Matrix.cs deleted file mode 100644 index 0a0dc1b644c..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Drawing2D/Matrix.cs +++ /dev/null @@ -1,308 +0,0 @@ -// -// System.Drawing.Drawing2D.Matrix.cs -// -// Authors: -// Stefan Maierhofer -// Dennis Hayes (dennish@Raytek.com) -// Duncan Mak (duncan@ximian.com) -// Ravindra (rkumar@novell.com) -// -// (C) Ximian, Inc. http://www.ximian.com -// (C) Novell, Inc. http://www.novell.com -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; -using System.Drawing; -using System.Runtime.InteropServices; - -namespace System.Drawing.Drawing2D -{ - public sealed class Matrix : MarshalByRefObject, IDisposable - { - internal IntPtr nativeMatrix; - - // constructors - internal Matrix (IntPtr ptr) - { - nativeMatrix = ptr; - } - - public Matrix () - { - Status status = GDIPlus.GdipCreateMatrix (out nativeMatrix); - GDIPlus.CheckStatus (status); - } - - public Matrix (Rectangle rect , Point[] plgpts) - { - Status status = GDIPlus.GdipCreateMatrix3I (rect, plgpts, out nativeMatrix); - GDIPlus.CheckStatus (status); - } - - public Matrix (RectangleF rect , PointF[] pa) - { - Status status = GDIPlus.GdipCreateMatrix3 (rect, pa, out nativeMatrix); - GDIPlus.CheckStatus (status); - } - - public Matrix (float m11, float m12, float m21, float m22, float dx, float dy) - { - Status status = GDIPlus.GdipCreateMatrix2 (m11, m12, m21, m22, dx, dy, out nativeMatrix); - GDIPlus.CheckStatus (status); - } - - // properties - public float[] Elements { - get { - IntPtr tmp = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (float)) * 6); - float [] retval = new float [6]; - - Status status = GDIPlus.GdipGetMatrixElements (nativeMatrix, tmp); - GDIPlus.CheckStatus (status); - - Marshal.Copy (tmp, retval, 0, 6); - - Marshal.FreeHGlobal (tmp); - return retval; - } - } - - public bool IsIdentity { - get { - bool retval; - Status status = GDIPlus.GdipIsMatrixIdentity (nativeMatrix, out retval); - GDIPlus.CheckStatus (status); - return retval; - } - } - - public bool IsInvertible { - get { - bool retval; - Status status = GDIPlus.GdipIsMatrixInvertible (nativeMatrix, out retval); - GDIPlus.CheckStatus (status); - return retval; - } - } - - public float OffsetX { - get { - return this.Elements [4]; - } - } - - public float OffsetY { - get { - return this.Elements [5]; - } - } - - public Matrix Clone() - { - IntPtr retval; - Status status = GDIPlus.GdipCloneMatrix (nativeMatrix, out retval); - GDIPlus.CheckStatus (status); - return new Matrix (retval); - } - - - public void Dispose () - { - if (nativeMatrix != IntPtr.Zero) { - Status status = GDIPlus.GdipDeleteMatrix (nativeMatrix); - GDIPlus.CheckStatus (status); - nativeMatrix = IntPtr.Zero; - } - - GC.SuppressFinalize (true); - } - - public override bool Equals (object obj) - { - Matrix m = obj as Matrix; - - if (m != null) { - bool retval; - Status status = GDIPlus.GdipIsMatrixEqual (nativeMatrix, m.nativeMatrix, out retval); - GDIPlus.CheckStatus (status); - return retval; - - } else - return false; - } - - ~Matrix() - { - Dispose (); - } - - public override int GetHashCode () - { - return base.GetHashCode (); - } - - public void Invert () - { - Status status = GDIPlus.GdipInvertMatrix (nativeMatrix); - GDIPlus.CheckStatus (status); - } - - public void Multiply (Matrix matrix) - { - Multiply (matrix, MatrixOrder.Prepend); - } - - public void Multiply (Matrix matrix, MatrixOrder order) - { - Status status = GDIPlus.GdipMultiplyMatrix (nativeMatrix, matrix.nativeMatrix, order); - GDIPlus.CheckStatus (status); - } - - public void Reset() - { - Status status = GDIPlus.GdipSetMatrixElements (nativeMatrix, 1, 0, 0, 1, 0, 0); - GDIPlus.CheckStatus (status); - } - - public void Rotate (float angle) - { - Rotate (angle, MatrixOrder.Prepend); - } - - public void Rotate (float angle, MatrixOrder order) - { - Status status = GDIPlus.GdipRotateMatrix (nativeMatrix, angle, order); - GDIPlus.CheckStatus (status); - } - - public void RotateAt (float angle, PointF point) - { - RotateAt (angle, point, MatrixOrder.Prepend); - } - - public void RotateAt (float angle, PointF point, MatrixOrder order) - { - angle *= (float) (Math.PI / 180.0); // degrees to radians - float cos = (float) Math.Cos (angle); - float sin = (float) Math.Sin (angle); - float e4 = -point.X * cos + point.Y * sin + point.X; - float e5 = -point.X * sin - point.Y * cos + point.Y; - float[] m = this.Elements; - - Status status; - - if (order == MatrixOrder.Prepend) - status = GDIPlus.GdipSetMatrixElements (nativeMatrix, - cos * m[0] + sin * m[2], - cos * m[1] + sin * m[3], - -sin * m[0] + cos * m[2], - -sin * m[1] + cos * m[3], - e4 * m[0] + e5 * m[2] + m[4], - e4 * m[1] + e5 * m[3] + m[5]); - else - status = GDIPlus.GdipSetMatrixElements (nativeMatrix, - m[0] * cos + m[1] * -sin, - m[0] * sin + m[1] * cos, - m[2] * cos + m[3] * -sin, - m[2] * sin + m[3] * cos, - m[4] * cos + m[5] * -sin + e4, - m[4] * sin + m[5] * cos + e5); - GDIPlus.CheckStatus (status); - } - - public void Scale (float scaleX, float scaleY) - { - Scale (scaleX, scaleY, MatrixOrder.Prepend); - } - - public void Scale (float scaleX, float scaleY, MatrixOrder order) - { - Status status = GDIPlus.GdipScaleMatrix (nativeMatrix, scaleX, scaleY, order); - GDIPlus.CheckStatus (status); - } - - public void Shear (float shearX, float shearY) - { - Shear (shearX, shearY, MatrixOrder.Prepend); - } - - public void Shear (float shearX, float shearY, MatrixOrder order) - { - Status status = GDIPlus.GdipShearMatrix (nativeMatrix, shearX, shearY, order); - GDIPlus.CheckStatus (status); - } - - public void TransformPoints (Point[] pts) - { - Status status = GDIPlus.GdipTransformMatrixPointsI (nativeMatrix, pts, pts.Length); - GDIPlus.CheckStatus (status); - } - - public void TransformPoints (PointF[] pts) - { - Status status = GDIPlus.GdipTransformMatrixPoints (nativeMatrix, pts, pts.Length); - GDIPlus.CheckStatus (status); - } - - public void TransformVectors (Point[] pts) - { - Status status = GDIPlus.GdipVectorTransformMatrixPointsI (nativeMatrix, pts, pts.Length); - GDIPlus.CheckStatus (status); - } - - public void TransformVectors (PointF[] pts) - { - Status status = GDIPlus.GdipVectorTransformMatrixPoints (nativeMatrix, pts, pts.Length); - GDIPlus.CheckStatus (status); - } - - public void Translate (float offsetX, float offsetY) - { - Translate (offsetX, offsetY, MatrixOrder.Prepend); - } - - public void Translate (float offsetX, float offsetY, MatrixOrder order) - { - Status status = GDIPlus.GdipTranslateMatrix (nativeMatrix, offsetX, offsetY, order); - GDIPlus.CheckStatus (status); - } - - public void VectorTransformPoints (Point[] pts) - { - TransformVectors (pts); - } - - internal IntPtr NativeObject - { - get{ - return nativeMatrix; - } - set { - nativeMatrix = value; - } - } - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Drawing2D/Matrix.jvm.cs b/mcs/class/System.Drawing/System.Drawing.Drawing2D/Matrix.jvm.cs deleted file mode 100755 index ba4ea5cb71e..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Drawing2D/Matrix.jvm.cs +++ /dev/null @@ -1,295 +0,0 @@ -using System; -using System.Drawing; -using System.Runtime.InteropServices; -using geom = java.awt.geom; -using JMath = java.lang.Math; - -namespace System.Drawing.Drawing2D -{ - public sealed class Matrix : MarshalByRefObject, IDisposable - { - #region fields - - static internal readonly Matrix IdentityTransform = new Matrix(); - readonly geom.AffineTransform _nativeMatrix; - - #endregion - - #region ctors - - internal Matrix (geom.AffineTransform ptr) - { - _nativeMatrix = ptr; - } - - public Matrix () : this(new geom.AffineTransform()) - { - } - - public Matrix (Rectangle rect , Point[] plgpts) - { - double x1 = plgpts[1].X - plgpts[0].X; - double y1 = plgpts[1].Y - plgpts[0].Y; - - double x2 = plgpts[2].X - plgpts[0].X; - double y2 = plgpts[2].Y - plgpts[0].Y; - - _nativeMatrix = new geom.AffineTransform(x1/rect.Width, y1/rect.Width, x2/rect.Height, y2/rect.Height, plgpts[0].X, plgpts[0].Y); - _nativeMatrix.translate(-rect.X,-rect.Y); - } - - public Matrix (RectangleF rect , PointF[] plgpts) - { - double x1 = plgpts[1].X - plgpts[0].X; - double y1 = plgpts[1].Y - plgpts[0].Y; - - double x2 = plgpts[2].X - plgpts[0].X; - double y2 = plgpts[2].Y - plgpts[0].Y; - - _nativeMatrix = new geom.AffineTransform(x1/rect.Width, y1/rect.Width, x2/rect.Height, y2/rect.Height, plgpts[0].X, plgpts[0].Y); - _nativeMatrix.translate(-rect.X,-rect.Y); - } - - public Matrix (float m11, float m12, float m21, float m22, float dx, float dy) - : this(new geom.AffineTransform(m11,m12,m21,m22,dx,dy)) - { - } - - #endregion - - #region properties - - public float[] Elements - { - get - { - float [] elems = new float[] { - (float)NativeObject.getScaleX(), - (float)NativeObject.getShearY(), - (float)NativeObject.getShearX(), - (float)NativeObject.getScaleY(), - (float)NativeObject.getTranslateX(), - (float)NativeObject.getTranslateY()}; - return elems; - } - } - - public bool IsIdentity - { - get - { - return NativeObject.isIdentity(); - } - } - - public bool IsInvertible - { - get - { - try - { - return NativeObject.getDeterminant() != 0.0; - } - catch(geom.NoninvertibleTransformException) - { - return false; - } - } - } - - public float OffsetX - { - get - { - return (float)NativeObject.getTranslateX(); - } - } - - public float OffsetY - { - get - { - return (float)NativeObject.getTranslateY(); - } - } - - #endregion - - #region methods - - public Matrix Clone() - { - return new Matrix ((geom.AffineTransform)NativeObject.clone()); - } - - - public void Dispose () - { - } - - internal void CopyTo(Matrix matrix) { - matrix.NativeObject.setTransform(NativeObject); - } - - public override bool Equals (object obj) - { - Matrix m = obj as Matrix; - - - if (m == null) - return false; - - return NativeObject.equals(m.NativeObject); - } - - public override int GetHashCode () - { - return NativeObject.hashCode(); - } - - public void Invert () - { - try { - _nativeMatrix.setTransform( _nativeMatrix.createInverse() ); - } - catch(geom.NoninvertibleTransformException e) { - throw new ArgumentException(e.Message, e); - } - } - - public void Multiply (Matrix matrix) - { - Multiply (matrix, MatrixOrder.Prepend); - } - - public void Multiply (Matrix matrix, MatrixOrder order) - { - Multiply(matrix.NativeObject, order); - } - - public void Reset() - { - NativeObject.setToIdentity(); - } - - public void Rotate (float angle) - { - Rotate (angle, MatrixOrder.Prepend); - } - - public void Rotate (float angle, MatrixOrder order) - { - Multiply(geom.AffineTransform.getRotateInstance(JMath.toRadians(angle)), order); - } - - public void RotateAt (float angle, PointF point) - { - RotateAt (angle, point, MatrixOrder.Prepend); - } - - public void RotateAt (float angle, PointF point, MatrixOrder order) - { - Multiply(geom.AffineTransform.getRotateInstance(JMath.toRadians(angle),point.X, point.Y), order); - } - - public void Scale (float scaleX, float scaleY) - { - Scale (scaleX, scaleY, MatrixOrder.Prepend); - } - - public void Scale (float scaleX, float scaleY, MatrixOrder order) - { - Multiply(geom.AffineTransform.getScaleInstance(scaleX, scaleY), order); - } - - public void Shear (float shearX, float shearY) - { - Shear (shearX, shearY, MatrixOrder.Prepend); - } - - public void Shear (float shearX, float shearY, MatrixOrder order) - { - Multiply(geom.AffineTransform.getShearInstance (shearX, shearY), order); - } - - public void TransformPoints (Point[] pts) - { - geom.Point2D.Float pt = new geom.Point2D.Float(); - for(int i =0;i < pts.Length;i++) { - pt.setLocation(pts[i].X,pts[i].Y); - NativeObject.transform(pt,pt); - pts[i].X=(int)pt.getX(); - pts[i].Y=(int)pt.getY(); - } - } - - public void TransformPoints (PointF[] pts) - { - geom.Point2D.Float pt = new geom.Point2D.Float(); - for(int i =0;i < pts.Length;i++) { - pt.setLocation(pts[i].X,pts[i].Y); - NativeObject.transform(pt,pt); - pts[i].X=(float)pt.getX(); - pts[i].Y=(float)pt.getY(); - } - } - - public void TransformVectors (Point[] pts) - { - geom.Point2D.Float pt = new geom.Point2D.Float(); - for(int i =0;i < pts.Length;i++) { - pt.setLocation(pts[i].X,pts[i].Y); - NativeObject.deltaTransform(pt,pt); - pts[i].X=(int)pt.getX(); - pts[i].Y=(int)pt.getY(); - } - } - - public void TransformVectors (PointF[] pts) - { - geom.Point2D.Float pt = new geom.Point2D.Float(); - for(int i =0;i < pts.Length;i++) { - pt.setLocation(pts[i].X,pts[i].Y); - NativeObject.deltaTransform(pt,pt); - pts[i].X=(float)pt.getX(); - pts[i].Y=(float)pt.getY(); - } - } - - public void Translate (float offsetX, float offsetY) - { - Translate (offsetX, offsetY, MatrixOrder.Prepend); - } - - public void Translate (float offsetX, float offsetY, MatrixOrder order) - { - Multiply(geom.AffineTransform.getTranslateInstance(offsetX, offsetY), order); - } - - public void VectorTransformPoints (Point[] pts) - { - TransformVectors (pts); - } - - internal geom.AffineTransform NativeObject - { - get - { - return _nativeMatrix; - } - } - - void Multiply(geom.AffineTransform at, MatrixOrder order) { - Multiply(NativeObject, at, order); - } - - internal static void Multiply(geom.AffineTransform to, geom.AffineTransform add, MatrixOrder order) { - if(order == MatrixOrder.Prepend) - to.concatenate(add); - else - to.preConcatenate(add); - } - - #endregion - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Drawing2D/MatrixOrder.cs b/mcs/class/System.Drawing/System.Drawing.Drawing2D/MatrixOrder.cs deleted file mode 100644 index bd8149d7e97..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Drawing2D/MatrixOrder.cs +++ /dev/null @@ -1,44 +0,0 @@ -// -// System.Drawing.Drawing2D.MatrixOrder.cs -// -// Author: -// Stefan Maierhofer -// Dennis Hayes (dennish@Raytek.com) -// -// (C) 2002/3 Ximian, Inc -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -using System; - -namespace System.Drawing.Drawing2D { - /// - /// Summary description for MatrixOrder. - /// - [Serializable] - public enum MatrixOrder { - Append = 1, - Prepend = 0 - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Drawing2D/PathData.cs b/mcs/class/System.Drawing/System.Drawing.Drawing2D/PathData.cs deleted file mode 100644 index 55819e58314..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Drawing2D/PathData.cs +++ /dev/null @@ -1,66 +0,0 @@ -// -// System.Drawing.Drawing2D.PathData.cs -// -// Authors: -// Dennis Hayes (dennish@Raytek.com) -// Andreas Nahr (ClassDevelopment@A-SoftTech.com) -// -// (C) 2002/3 Ximian, Inc -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; - -namespace System.Drawing.Drawing2D -{ - /// - /// Summary description for PathData. - /// - public sealed class PathData - { - private PointF[] points = null; - private byte[] types = null; - - public PathData () { } - - public PointF[] Points { - get { return (PointF[]) points.Clone (); } - set { points = value; } - } - - public byte[] Types { - get { return (byte[]) types.Clone (); } - set { types = value; } - } - - public PointF[] InternalPoints { - get { return points; } - } - - public byte[] InternalTypes { - get { return types; } - } - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Drawing2D/PathGradientBrush.cs b/mcs/class/System.Drawing/System.Drawing.Drawing2D/PathGradientBrush.cs deleted file mode 100644 index 162baded814..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Drawing2D/PathGradientBrush.cs +++ /dev/null @@ -1,357 +0,0 @@ -// -// System.Drawing.Drawing2D.PathGradientBrush.cs -// -// Authors: -// Dennis Hayes (dennish@Raytek.com) -// Andreas Nahr (ClassDevelopment@A-SoftTech.com) -// Ravindra (rkumar@novell.com) -// -// Copyright (C) 2002/3 Ximian, Inc. http://www.ximian.com -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System.Drawing; - -namespace System.Drawing.Drawing2D -{ - /// - /// Summary description for PathGradientBrush. - /// - public sealed class PathGradientBrush : Brush - { - internal PathGradientBrush (IntPtr native) : base (native) - { - } - - public PathGradientBrush (GraphicsPath path) - { - Status status = GDIPlus.GdipCreatePathGradientFromPath (path.NativeObject, out nativeObject); - GDIPlus.CheckStatus (status); - } - - public PathGradientBrush (Point [] points) : this (points, WrapMode.Clamp) - { - } - - public PathGradientBrush (PointF [] points) : this (points, WrapMode.Clamp) - { - } - - public PathGradientBrush (Point [] points, WrapMode wrapMode) - { - Status status = GDIPlus.GdipCreatePathGradientI (points, points.Length, wrapMode, out nativeObject); - GDIPlus.CheckStatus (status); - } - - public PathGradientBrush (PointF [] points, WrapMode wrapMode) - { - Status status = GDIPlus.GdipCreatePathGradient (points, points.Length, wrapMode, out nativeObject); - GDIPlus.CheckStatus (status); - } - - // Properties - - public Blend Blend { - get { - int count; - Status status = GDIPlus.GdipGetPathGradientBlendCount (nativeObject, out count); - GDIPlus.CheckStatus (status); - float [] factors = new float [count]; - float [] positions = new float [count]; - status = GDIPlus.GdipGetPathGradientBlend (nativeObject, factors, positions, count); - GDIPlus.CheckStatus (status); - - Blend blend = new Blend (); - blend.Factors = factors; - blend.Positions = positions; - - return blend; - } - set { - int count; - float [] factors = value.Factors; - float [] positions = value.Positions; - count = factors.Length; - - if (count == 0 || positions.Length == 0) - throw new ArgumentException ("Invalid Blend object. It should have at least 2 elements in each of the factors and positions arrays."); - - if (count != positions.Length) - throw new ArgumentException ("Invalid Blend object. It should contain the same number of factors and positions values."); - - if (positions [0] != 0.0F) - throw new ArgumentException ("Invalid Blend object. The positions array must have 0.0 as its first element."); - - if (positions [count - 1] != 1.0F) - throw new ArgumentException ("Invalid Blend object. The positions array must have 1.0 as its last element."); - - Status status = GDIPlus.GdipSetPathGradientBlend (nativeObject, factors, positions, count); - GDIPlus.CheckStatus (status); - } - } - - public Color CenterColor { - get { - int centerColor; - Status status = GDIPlus.GdipGetPathGradientCenterColor (nativeObject, out centerColor); - GDIPlus.CheckStatus (status); - return Color.FromArgb (centerColor); - } - set { - Status status = GDIPlus.GdipSetPathGradientCenterColor (nativeObject, value.ToArgb ()); - GDIPlus.CheckStatus (status); - } - } - - public PointF CenterPoint { - get { - PointF center; - Status status = GDIPlus.GdipGetPathGradientCenterPoint (nativeObject, out center); - GDIPlus.CheckStatus (status); - - return center; - } - set { - PointF center = value; - Status status = GDIPlus.GdipSetPathGradientCenterPoint (nativeObject, ref center); - GDIPlus.CheckStatus (status); - } - } - - public PointF FocusScales { - get { - float xScale; - float yScale; - Status status = GDIPlus.GdipGetPathGradientFocusScales (nativeObject, out xScale, out yScale); - GDIPlus.CheckStatus (status); - - return new PointF (xScale, yScale); - } - set { - Status status = GDIPlus.GdipSetPathGradientFocusScales (nativeObject, value.X, value.Y); - GDIPlus.CheckStatus (status); - } - } - - public ColorBlend InterpolationColors { - get { - int count; - Status status = GDIPlus.GdipGetPathGradientPresetBlendCount (nativeObject, out count); - GDIPlus.CheckStatus (status); - int [] intcolors = new int [count]; - float [] positions = new float [count]; - status = GDIPlus.GdipGetPathGradientPresetBlend (nativeObject, intcolors, positions, count); - GDIPlus.CheckStatus (status); - - ColorBlend interpolationColors = new ColorBlend (); - Color [] colors = new Color [count]; - for (int i = 0; i < count; i++) - colors [i] = Color.FromArgb (intcolors [i]); - interpolationColors.Colors = colors; - interpolationColors.Positions = positions; - - return interpolationColors; - } - set { - int count; - Color [] colors = value.Colors; - float [] positions = value.Positions; - count = colors.Length; - - if (count == 0 || positions.Length == 0) - throw new ArgumentException ("Invalid ColorBlend object. It should have at least 2 elements in each of the colors and positions arrays."); - - if (count != positions.Length) - throw new ArgumentException ("Invalid ColorBlend object. It should contain the same number of positions and color values."); - - if (positions [0] != 0.0F) - throw new ArgumentException ("Invalid ColorBlend object. The positions array must have 0.0 as its first element."); - - if (positions [count - 1] != 1.0F) - throw new ArgumentException ("Invalid ColorBlend object. The positions array must have 1.0 as its last element."); - - int [] blend = new int [colors.Length]; - for (int i = 0; i < colors.Length; i++) - blend [i] = colors [i].ToArgb (); - - Status status = GDIPlus.GdipSetPathGradientPresetBlend (nativeObject, blend, positions, count); - GDIPlus.CheckStatus (status); - } - } - - public RectangleF Rectangle { - get { - RectangleF rect; - Status status = GDIPlus.GdipGetPathGradientRect (nativeObject, out rect); - GDIPlus.CheckStatus (status); - - return rect; - } - } - - public Color [] SurroundColors { - get { - int count; - Status status = GDIPlus.GdipGetPathGradientSurroundColorCount (nativeObject, out count); - GDIPlus.CheckStatus (status); - - int [] intcolors = new int [count]; - status = GDIPlus.GdipGetPathGradientSurroundColorsWithCount (nativeObject, intcolors, ref count); - GDIPlus.CheckStatus (status); - - Color [] colors = new Color [count]; - for (int i = 0; i < count; i++) - colors [i] = Color.FromArgb (intcolors [i]); - - return colors; - } - set { - int count = value.Length; - int [] colors = new int [count]; - for (int i = 0; i < count; i++) - colors [i] = value [i].ToArgb (); - - Status status = GDIPlus.GdipSetPathGradientSurroundColorsWithCount (nativeObject, colors, ref count); - GDIPlus.CheckStatus (status); - } - } - - public Matrix Transform { - get { - Matrix matrix = new Matrix (); - Status status = GDIPlus.GdipGetPathGradientTransform (nativeObject, matrix.nativeMatrix); - GDIPlus.CheckStatus (status); - - return matrix; - } - set { - Status status = GDIPlus.GdipSetPathGradientTransform (nativeObject, value.nativeMatrix); - GDIPlus.CheckStatus (status); - } - } - - public WrapMode WrapMode { - get { - WrapMode wrapMode; - Status status = GDIPlus.GdipGetPathGradientWrapMode (nativeObject, out wrapMode); - GDIPlus.CheckStatus (status); - - return wrapMode; - } - set { - Status status = GDIPlus.GdipSetPathGradientWrapMode (nativeObject, value); - GDIPlus.CheckStatus (status); - } - } - - // Methods - - public void MultiplyTransform (Matrix matrix) - { - MultiplyTransform (matrix, MatrixOrder.Prepend); - } - - public void MultiplyTransform (Matrix matrix, MatrixOrder order) - { - Status status = GDIPlus.GdipMultiplyPathGradientTransform (nativeObject, matrix.nativeMatrix, order); - GDIPlus.CheckStatus (status); - } - - public void ResetTransform () - { - Status status = GDIPlus.GdipResetPathGradientTransform (nativeObject); - GDIPlus.CheckStatus (status); - } - - public void RotateTransform (float angle) - { - RotateTransform (angle, MatrixOrder.Prepend); - } - - public void RotateTransform (float angle, MatrixOrder order) - { - Status status = GDIPlus.GdipRotatePathGradientTransform (nativeObject, angle, order); - GDIPlus.CheckStatus (status); - } - - public void ScaleTransform (float sx, float sy) - { - ScaleTransform (sx, sy, MatrixOrder.Prepend); - } - - public void ScaleTransform (float sx, float sy, MatrixOrder order) - { - Status status = GDIPlus.GdipScalePathGradientTransform (nativeObject, sx, sy, order); - GDIPlus.CheckStatus (status); - } - - public void SetBlendTriangularShape (float focus) - { - SetBlendTriangularShape (focus, 1.0F); - } - - public void SetBlendTriangularShape (float focus, float scale) - { - if (focus < 0 || focus > 1 || scale < 0 || scale > 1) - throw new ArgumentException ("Invalid parameter passed."); - - Status status = GDIPlus.GdipSetPathGradientLinearBlend (nativeObject, focus, scale); - GDIPlus.CheckStatus (status); - } - - public void SetSigmaBellShape (float focus) - { - SetSigmaBellShape (focus, 1.0F); - } - - public void SetSigmaBellShape (float focus, float scale) - { - if (focus < 0 || focus > 1 || scale < 0 || scale > 1) - throw new ArgumentException ("Invalid parameter passed."); - - Status status = GDIPlus.GdipSetPathGradientSigmaBlend (nativeObject, focus, scale); - GDIPlus.CheckStatus (status); - } - - public void TranslateTransform (float dx, float dy) - { - TranslateTransform (dx, dy, MatrixOrder.Prepend); - } - - public void TranslateTransform (float dx, float dy, MatrixOrder order) - { - Status status = GDIPlus.GdipTranslatePathGradientTransform (nativeObject, dx, dy, order); - GDIPlus.CheckStatus (status); - } - - public override object Clone () - { - IntPtr clonePtr; - Status status = GDIPlus.GdipCloneBrush (nativeObject, out clonePtr); - GDIPlus.CheckStatus (status); - - PathGradientBrush clone = new PathGradientBrush (clonePtr); - return clone; - } - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Drawing2D/PathGradientBrush.jvm.cs b/mcs/class/System.Drawing/System.Drawing.Drawing2D/PathGradientBrush.jvm.cs deleted file mode 100755 index 450018d1af2..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Drawing2D/PathGradientBrush.jvm.cs +++ /dev/null @@ -1,213 +0,0 @@ - - -using System; -using System.Drawing; -using System.Runtime.InteropServices; -using awt = java.awt; - -namespace System.Drawing.Drawing2D -{ - /// - /// Summary description for PathGradientBrush. - /// - public sealed class PathGradientBrush : Brush - { - awt.GradientPaint _nativeObject; - - Blend blend; - Color centerColor; - PointF center; - PointF focus; - RectangleF rectangle; - Color [] surroundColors; - ColorBlend interpolationColors; - Matrix transform; - WrapMode wrapMode; - - protected override java.awt.Paint NativeObject { - get { - return _nativeObject; - } - } - - PathGradientBrush (awt.GradientPaint native) - { - _nativeObject = native; - } - - public PathGradientBrush (GraphicsPath path) - { - throw new NotImplementedException(); - } - - public PathGradientBrush (Point [] points) : this (points, WrapMode.Clamp) - { - } - - public PathGradientBrush (PointF [] points) : this (points, WrapMode.Clamp) - { - } - - public PathGradientBrush (Point [] points, WrapMode wrapMode) - { - throw new NotImplementedException(); - } - - public PathGradientBrush (PointF [] points, WrapMode wrapMode) - { - throw new NotImplementedException(); - } - - // Properties - - public Blend Blend { - get { - return blend; - } - set { - throw new NotImplementedException(); - } - } - - public Color CenterColor { - get { - return centerColor; - } - set { - throw new NotImplementedException(); - } - } - - public PointF CenterPoint { - get { - return center; - } - set { - throw new NotImplementedException(); - } - } - - public PointF FocusScales { - get { - return focus; - } - set { - throw new NotImplementedException(); - } - } - - public ColorBlend InterpolationColors { - get { - return interpolationColors; - } - set { - throw new NotImplementedException(); - } - } - - public RectangleF Rectangle { - get { - return rectangle; - } - } - - public Color [] SurroundColors { - get { - return surroundColors; - } - set { - throw new NotImplementedException(); - } - } - - public Matrix Transform { - get { - return transform; - } - set { - throw new NotImplementedException(); - } - } - - public WrapMode WrapMode { - get { - return wrapMode; - } - set { - throw new NotImplementedException(); - } - } - - // Methods - - public void MultiplyTransform (Matrix matrix) - { - MultiplyTransform (matrix, MatrixOrder.Prepend); - } - - public void MultiplyTransform (Matrix matrix, MatrixOrder order) - { - throw new NotImplementedException(); - } - - public void ResetTransform () - { - throw new NotImplementedException(); - } - - public void RotateTransform (float angle) - { - RotateTransform (angle, MatrixOrder.Prepend); - } - - public void RotateTransform (float angle, MatrixOrder order) - { - throw new NotImplementedException(); - } - - public void ScaleTransform (float sx, float sy) - { - ScaleTransform (sx, sy, MatrixOrder.Prepend); - } - - public void ScaleTransform (float sx, float sy, MatrixOrder order) - { - throw new NotImplementedException(); - } - - public void SetBlendTriangularShape (float focus) - { - SetBlendTriangularShape (focus, 1.0F); - } - - public void SetBlendTriangularShape (float focus, float scale) - { - throw new NotImplementedException(); - } - - public void SetSigmaBellShape (float focus) - { - SetSigmaBellShape (focus, 1.0F); - } - - public void SetSigmaBellShape (float focus, float scale) - { - throw new NotImplementedException(); - } - - public void TranslateTransform (float dx, float dy) - { - TranslateTransform (dx, dy, MatrixOrder.Prepend); - } - - public void TranslateTransform (float dx, float dy, MatrixOrder order) - { - throw new NotImplementedException(); - } - - public override object Clone () - { - throw new NotImplementedException(); - } - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Drawing2D/PathPointType.cs b/mcs/class/System.Drawing/System.Drawing.Drawing2D/PathPointType.cs deleted file mode 100644 index eb67406f57f..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Drawing2D/PathPointType.cs +++ /dev/null @@ -1,50 +0,0 @@ -// -// System.Drawing.Drawing2D.PathPointType.cs -// -// Author: -// Stefan Maierhofer -// Dennis Hayes (dennish@Raytek.com) -// -// (C) 2002/3 Ximian, Inc -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -using System; - -namespace System.Drawing.Drawing2D { - /// - /// Summary description for PathPointType. - /// - [Serializable] - public enum PathPointType { - Bezier = 3, - Bezier3 = 3, - CloseSubpath = 128, - DashMode = 16, - Line = 1, - PathMarker = 32, - PathTypeMask = 7, - Start = 0 - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Drawing2D/PenAlignment.cs b/mcs/class/System.Drawing/System.Drawing.Drawing2D/PenAlignment.cs deleted file mode 100644 index b35e4f0a48c..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Drawing2D/PenAlignment.cs +++ /dev/null @@ -1,45 +0,0 @@ -// -// System.Drawing.Drawing2D.PenAlignment.cs -// -// Author: -// Miguel de Icaza (miguel@ximian.com) -// Dennis Hayes (dennish@Raytek.com) -// (C) 2002/3 Ximian, Inc http://www.ximian.com -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; - -namespace System.Drawing.Drawing2D { - - [Serializable] - public enum PenAlignment { - Center = 0, - Inset = 1, - Outset = 2, - Left = 3, - Right =4 - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Drawing2D/PenType.cs b/mcs/class/System.Drawing/System.Drawing.Drawing2D/PenType.cs deleted file mode 100644 index 892fc23e56d..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Drawing2D/PenType.cs +++ /dev/null @@ -1,46 +0,0 @@ -// -// System.Drawing.Drawing2D.PenType.cs -// -// Author: -// Dennis Hayes (dennish@Raytek.com) -// -// (C) 2002/3 Ximian, Inc -//using System; - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -namespace System.Drawing.Drawing2D -{ - /// - /// Summary description for PenType. - /// - [Serializable] - public enum PenType { - HatchFill = 1, - LinearGradient = 4, - PathGradient = 3, - SolidColor = 0, - TextureFill = 2 - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Drawing2D/PixelOffsetMode.cs b/mcs/class/System.Drawing/System.Drawing.Drawing2D/PixelOffsetMode.cs deleted file mode 100644 index 858f9ebe9ac..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Drawing2D/PixelOffsetMode.cs +++ /dev/null @@ -1,49 +0,0 @@ -// -// System.Drawing.Drawing2D.PixelOffsetMode.cs -// -// Author: -// Stefan Maierhofer -// Dennis Hayes (dennish@Raytek.com) -// -// (C) 2002/3 Ximian, Inc -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -using System; - -namespace System.Drawing.Drawing2D { - /// - /// Summary description for PixelOffsetMode. - /// - [Serializable] - public enum PixelOffsetMode { - Default = 0, - Half = 4, - HighQuality = 2, - HighSpeed = 1, - Invalid = -1, - None = 3 - } -} - diff --git a/mcs/class/System.Drawing/System.Drawing.Drawing2D/QualityMode.cs b/mcs/class/System.Drawing/System.Drawing.Drawing2D/QualityMode.cs deleted file mode 100644 index 23a8c2277a4..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Drawing2D/QualityMode.cs +++ /dev/null @@ -1,46 +0,0 @@ -// -// System.Drawing.Drawing2D.QualityMode.cs -// -// Author: -// Stefan Maierhofer -// Dennis Hayes (dennish@Raytek.com) -// -// (C) 2002/3 Ximian, Inc -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -using System; - -namespace System.Drawing.Drawing2D { - /// - /// Summary description for QualityMode. - /// - [Serializable] - public enum QualityMode { - Default = 0, - High = 2, - Invalid = -1, - Low = 1 - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Drawing2D/RegionData.cs b/mcs/class/System.Drawing/System.Drawing.Drawing2D/RegionData.cs deleted file mode 100644 index 8483f4b63a2..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Drawing2D/RegionData.cs +++ /dev/null @@ -1,52 +0,0 @@ -// -// System.Drawing.Drawing2D.RegionData.cs -// -// Authors: -// Dennis Hayes (dennish@Raytek.com) -// Andreas Nahr (ClassDevelopment@A-SoftTech.com) -// -// (C) 2002/3 Ximian, Inc -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; - -namespace System.Drawing.Drawing2D -{ - /// - /// Summary description for RegionData. - /// - public sealed class RegionData - { - private byte[] data; - - internal RegionData () { } - - public byte[] Data { - get {return data;} - set {data = value;} - } - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Drawing2D/SmoothingMode.cs b/mcs/class/System.Drawing/System.Drawing.Drawing2D/SmoothingMode.cs deleted file mode 100644 index 303e1d8c088..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Drawing2D/SmoothingMode.cs +++ /dev/null @@ -1,48 +0,0 @@ -// -// System.Drawing.Drawing2D.SmoothingMode.cs -// -// Author: -// Stefan Maierhofer -// Dennis Hayes (dennish@Raytek.com) -// -// (C) 2002/3 Ximian, Inc -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -using System; - -namespace System.Drawing.Drawing2D { - /// - /// Summary description for SmoothingMode. - /// - [Serializable] - public enum SmoothingMode { - AntiAlias = 4, - Default = 0, - HighQuality = 2, - HighSpeed = 1, - Invalid = -1, - None = 3 - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Drawing2D/WarpMode.cs b/mcs/class/System.Drawing/System.Drawing.Drawing2D/WarpMode.cs deleted file mode 100644 index f094fb12e65..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Drawing2D/WarpMode.cs +++ /dev/null @@ -1,44 +0,0 @@ -// -// System.Drawing.WarpMode.cs -// -// Author: -// Stefan Maierhofer -// Dennis Hayes (dennish@Raytek.com) -// -// (C) 2002 Ximian, Inc -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -using System; - -namespace System.Drawing.Drawing2D { - /// - /// Summary description for WarpMode. - /// - [Serializable] - public enum WarpMode { - Bilinear = 1, - Perspective = 0 - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Drawing2D/WrapMode.cs b/mcs/class/System.Drawing/System.Drawing.Drawing2D/WrapMode.cs deleted file mode 100644 index d1195710d3e..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Drawing2D/WrapMode.cs +++ /dev/null @@ -1,49 +0,0 @@ -// -// System.Drawing.Drawing2D.WrapMode.cs -// -// Authors: -// Stefan Maierhofer -// Dennis Hayes (dennish@Raytek.com) -// Ravindra (rkumar@novell.com) -// -// (C) 2002/3 Ximian, Inc. http://www.ximian.com -// (C) 2004 Novell, Inc. http://www.novell.com -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -using System; - -namespace System.Drawing.Drawing2D { - /// - /// Summary description for WrapMode. - /// - [Serializable] - public enum WrapMode { - Tile, - TileFlipX, - TileFlipY, - TileFlipXY, - Clamp - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Imaging/BitmapData.cs b/mcs/class/System.Drawing/System.Drawing.Imaging/BitmapData.cs deleted file mode 100644 index 502adf662d9..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Imaging/BitmapData.cs +++ /dev/null @@ -1,117 +0,0 @@ -// -// System.Drawing.Imaging.BitmapData.cs -// -// Author: -// Miguel de Icaza (miguel@ximian.com) -// Vladimir Vukicevic (vladimir@pobox.com) -// -// (C) 2002 Ximian, Inc. http://www.ximian.com -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; -using System.Runtime.InteropServices; -using System.IO; - -namespace System.Drawing.Imaging -{ - // MUST BE KEPT IN SYNC WITH gdip.h in libgdiplus! - [StructLayout(LayoutKind.Sequential)] - public sealed class BitmapData { - internal int width; - internal int height; - internal int stride; - internal PixelFormat pixel_format; // int - internal IntPtr address; - internal int reserved; - - // following added to keep track of frames - internal int top; - internal int left; - internal int byteCount; - internal IntPtr bytes; - - public int Height { - get { - return height; - } - - set { - height = value; - } - } - - public int Width { - get { - return width; - } - - set { - width = value; - } - } - - public PixelFormat PixelFormat { - get { - - return pixel_format; - } - - set { - pixel_format = value; - } - } - - public int Reserved { - get { - return reserved; - } - - set { - reserved = value; - } - } - - public IntPtr Scan0 { - get { - return address; - } - - set { - address = value; - } - } - - public int Stride { - get { - return stride; - } - - set { - stride = value; - } - } - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Imaging/ChangeLog b/mcs/class/System.Drawing/System.Drawing.Imaging/ChangeLog deleted file mode 100644 index edc6d92eb2d..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Imaging/ChangeLog +++ /dev/null @@ -1,362 +0,0 @@ -2005-09-21 Vladimir Krasnov - - * ImageCodec.jvm.cs: refactoring of read/write methods, members access levels - -2005-09-14 Vladimir Krasnov - - * ImageCodecInfo.jvm.cs: fixed ImageCodec namespace - * ImageCodec.jvm.cs: refactoring of read/write methods - -2005-09-07 Vladimir Krasnov - - * ImageCodecInfo.jvm.cs: fixed GetValueFromMetadata, SetResolution - -2005-09-07 Vladimir Krasnov - - * ImageCodecInfo.jvm.cs: Refactoring - * Added ImageCodec.jvm.cs - -2005-08-28 Vladimir Krasnov - - * ImageCodecInfo.jvm.cs: Fixed Iterate - -2005-08-03 Andrew Skiba - - * ImageCodecInfo.jvm.cs: implement via java imageio, add internal APIs for - fast read-only requests - * Methafile.jvm.cs: change in not implemented api to match image.jvm.cs - -2005-08-03 Andrew Skiba - - * Metafile.jvm.cs: add TARGET_JVM implementation - -2005-08-03 Andrew Skiba - - * ColorPalette.cs, FrameDimension.cs, EncoderParameters.cs: TARGET_JVM - exclude not supported internal methods - * EncoderParameter.jvm.cs, ImageAttributes.jvm.cs, ImageFormat.jvm.cs, - ImageCodecInfo.jvm.cs: added TARGET_JVM implementation of these classes - -2005-03-23 Jordi Mas i Hernandez - - * ColorPalette.cs: fixes ColorPalette marshaling - -2004-03-21 Jordi Mas i Hernadez - - * ColorMatrix.cs: fixes Matrix00 init - * ImageAttributes.cs: fixes dispose method and signature - -2004-02-25 Jordi Mas i Hernadez - - * ColorMatrix.cs: rewritten to be able to marshall it properly - -2004-12-27 Zoltan Varga - - * ImageCodecInfo.cs: Fix marshalling of arrays on amd64. - -2004-11-25 Marek Safar - - * ColorPalette.cs: Add CheckStatus to GetAdjustedPalette. - -2004-11-03 Miguel de Icaza - - * ColorPalette.cs: Add internal Clone method - -2004-10-08 Ravindra - - * BitmapData.cs: Synchronized the class with BitmapData struct - in libgdiplus. - -2004-06-13 Gert Driesen - - * EmfPlusRecordType.cs: fixed mismatches in enum field values - -2004-05-18 Jordi Mas i Hernadez - * ImageAttributes.cs: SetBrushRemapTable and SetRemapTable were - passing bad parameters to GDI+ causing them not to work - -2004-05-16 Gert Driesen (drieseng@users.sourceforge.net) - - * EncoderParameterValueType.cs: fix Windows build (CSC), - MCS bug #58571 - - * EncoderParameter.cs: removed ctors taking int value, - to fix public API - -2004-05-14 Vladimir Vukicevic - - * EncoderParameters.cs: Added ToNativePtr() method to marshal - struct correctly to a native struct. Resulting data should be - FreeHGlobal'd when finished. - - * EncoderParameter.cs: Changed data storage to correspond to - native code layout (so we can pass these structs directly to - native code). Also changed layout to match native layout. - - * EncoderParameterValueType.cs: force EncoderParameterValueType to - be Int32 - -2004-05-13 Jordi Mas i Hernadez - - * ColorMatrix.cs:Make private data private - * ColorPalette.cs: Make private data private - * Encoder.cs: Make private data private - * EncoderParameter.cs: Make private data private - * EncoderParameters.cs: Make private data private - * MetaHeader.cs: Make private data private - * PropertyItem.cs: Make private data private - -2004-05-04 Vladimir Vukicevic - - * BitmapData.cs: re-synchronized with libgdiplus; also - removed memory deallocs here (as the data is always owned - by libgdiplus) - -2004-04-28 Sanjay Gupta - - Modified files from dos2unix format. - -2004-04-27 Ravindra - - * ImageAttributes.cs: Implemented SetWrapMode(WrapMode) method. - -2004-04-27 Jordi Mas i Hernadez - - * ImageFormat.cs: completed missimg members - * ImageCodecInfo.cs: Use GDI+ calls instead of native C# - -2004-04-27 Sanjay Gupta - * ImageFormat.cs: Implemented Equals() method. - -2004-04-27 Sanjay Gupta - * ImageFormat.cs: Implemented ToString() method. - -2004-04-06 Vladimir Vukicevic - - * BitmapData.cs: synced up data structure with libgdiplus - - * BmpCodec.cs, JPEGCodec.cs, PNGCodec.cs: Removed codec impls, - left just codecinfo getters; the codecs are in libgdiplus - - * ImageCodecInfo.cs: removed encode/decode delegates - -2004-03-31 Jordi Mas i Hernadez - * FrameDimension.cs: added missing members - -2004-03-26 Jordi Mas i Hernadez - * ImageAttributes.cs: added missing members and complete the wrapper - -2004-03-04 Jordi Mas i Hernadez - * BmpCodec.cs: fixes DPI in BMP - * Image.cs: gets DPI using GDI+ api - -2004-03-04 Jordi Mas i Hernadez - * BmpCodec.cs - Added support for diffent formats - Fixed bugs in import and export - Support for OS/2 and palettes - * Image.cs - Palettes - -2004-03-04 Sanjay Gupta - * Metafile.cs: Added constructor with correct signature. - -2004-03-04 Nick Drochak - - * Metafile.cs: Fix build, remove duplicate member. - -2004-03-03 Sanjay Gupta - *ImageAttributes.cs: Added few missing functions - *Metafile.cs: Added stubs for missing constructors and functions - -2004-03-03 Nick Drochak - - * BmpCodec.cs: Remove unsed variable. - -2004-02-17 Ravindra - * EncoderParameter.cs: Did few bug fixes and changed the file - format to unix. - -2004-02-13 Sanjay Gupta - * FrameDimension.cs: Implemented missing functionalities - -2004-02-12 Ravindra - * EncoderParameters.cs: Implemented. - * EncoderParameter.cs: Implemented. - -2004-01-21 Jordi Mas i Hernàdez - * BmpBitmap.cs: fixed encoding and decoding problems - * ImageAttributes.cs: implemented - -2004-01-19 Ravindra - - * Encoder.cs: Implemented. - -2004-01-10 Ravindra - - * All Enums: Made serializable. - - * ImageAttributes.cs: Implements ICloneable. - - * Metafile.cs: Made serializable and invisible to COM. - -2003-11-13 Andreas Nahr - - * ColorMap.cs: Implemented - * ColorMatrix.cs: Implemented, Removed unneccesary members - * ImageAttributes.cs: Fixed signature - * ImageCodecInfo.cs: Added missing attribure, hide constructor - * ImageFormat.cs: Implemented, Added attribute - * MetaHeader.cs: Implemented - * PropertyItem.cs: Implemented - * ImageFlags.cs: Added Attribute - * ImageCodecFlags.cs: Added Attribute - * EmfPlusRecordType.cs: Added missing members - -2003-11-12 Alexandre Pigolkine - * BitmapData.cs new function to convert BRG to RGB - * JPEGCodec.cs convert BRG to RBG - * PNGCodec.cs - - -2003-11-02 Alexandre Pigolkine - * BmpCodec.cs - * ImageCodecInfo.cs - * JPEGCodec.cs - * PNGCodec.cs - codec can select pixel format of bitmap - -2003-10-23 Miguel de Icaza - - * JPEGCodec.cs (JSAMPARRAY): Do not allocate memory here anymore, - we will just have the JPEG library copy directly into our buffer. - - (Encode, Decode): Ported to the new model which avoid copies, and - eliminates InternalImageInfo. - - TODO: need to port the PNG coder/decoder, and add support for RGBA - images which got dropped from this version - - * BmpCodec.cs: Rework this one to use BitmapData and Image. Do - not use the RawBytes property, instead pull the data one line at a - time, and write that out. - - * ImageCodecInfo.cs: Make the encoding and decoding delegates take - a Image parameter; - - * BmpCodec.cs: - - * BitmapData.cs: Make this one sequential, and also mimic the - layout of GdiPlus.h so we can use this instead of making copies - back and forth. - -2003-10-12 Alexandre Pigolkine - * BmpCodec.cs warning removed - -2003-07-23 Alexandre Pigolkine - * JPEGCodec.cs - * PNGCodec.cs - * BmpCodec.cs cosmetic changes - -2003-07-22 Alexandre Pigolkine - * ImageCodecInfo.cs - * ImageFormat.cs - * JPEGCodec.cs - changes for PNG codec - - * PNGCodec.cs added - -2003-07-21 Andreas Nahr - - * Metafile.cs: Inherits from image (fix for System.Drawing.Design) - -2003-06-29 Alexandre Pigolkine - * BmpCodec.cs handle 32bpp images - * JPEGCodec.cs small fix - -2003-06-27 Alexandre Pigolkine - * JPEGCodec.cs encode 32 bpp images - -2003-06-23 Alexandre Pigolkine - * JPEGCodec.cs set pixel format in InternalImageInfo - -2003-06-23 Alexandre Pigolkine - * BmpCodec.cs pixel format check added - * JPEGCodec.cs encoder implemented - -2003-06-15 Alexandre Pigolkine - * ColorPalette.cs - * ImageCodecInfo.cs - * ImageFormat.cs - implementation added - - * BmpCodec.cs - * JPEGCodec.cs - added - -2002-9-2 DennisHayes - -* PropertyItem.cs t -* MetaHeader.cs t -* MetafileHeader.cs t -* Metafile.cs t -* ImageFormat.cs t -* ImageCodecInfo.cs t -* ColorMatrix.cs t -* ColorMap.cs t -* WmfPlaceableFileHeader.cs t -* Added todos back - -2002-9-2 DennisHayes - * checked in for Everaldo Canuto (everaldo.canuto@bol,com.br) - * BitmapData.cs - * ColorAdjustType.cs - * ColorChannelFlag.cs - * ColorMap.cs - * ColorMapType.cs - * ColorMatrix.cs - * ColorMatrixFlag.cs - * ColorMode.cs - * EmfPlusRecordType.cs - * EmfType.cs - * EncoderParameterValueType.cs - * EncoderValue.cs - * ImageCodecFlags.cs - * ImageCodecInfo.cs - * ImageFlags.cs - * ImageFormat.cs - * ImageLockMode.cs - * MetafileFrameUnit.cs - * MetafileHeader.cs - * MetaHeader.cs - * PaletteFlags.cs - * PixelFormat.cs - * PlayRecordCallback.cs - * PropertyItem.cs - * WmfPlaceableFileHeader.cs - * Added null classes for most/all classes, Many stubs, and some implmentation - -2002-9-2 DennisHayes - - * ColorPalette.cs - * FrameDimension.cs - * Metafile.cs - * Added stubs, implmentation - -2002-05-03 Mike Kestner - - * Metafile.cs : Use System.IO. Fix exception typos. - -2002-04-27 Christian Meyer - - * Metafile.cs: Copyright now holds Ximian. - -2002-04-21 Dennis Hayes - - * corrected emum values. - -2002-04-14 Christian Meyer - - * ChangeLog: created. - * Metafile.cs: Added. Wrote some ctors. No impl done, yet. - diff --git a/mcs/class/System.Drawing/System.Drawing.Imaging/ColorAdjustType.cs b/mcs/class/System.Drawing/System.Drawing.Imaging/ColorAdjustType.cs deleted file mode 100644 index 7244eb94ad5..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Imaging/ColorAdjustType.cs +++ /dev/null @@ -1,43 +0,0 @@ -// -// System.Drawing.Imaging.ColorAdjustType.cs -// -// (C) 2002 Ximian, Inc. http://www.ximian.com -// Author: Dennis Hayes (dennish@raytek.com) -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -using System; -namespace System.Drawing.Imaging -{ - [Serializable] - public enum ColorAdjustType { - Any = 6, - Bitmap = 1, - Brush = 2, - Count = 5, - Default = 0, - Pen = 3, - Text = 4 - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Imaging/ColorChannelFlag.cs b/mcs/class/System.Drawing/System.Drawing.Imaging/ColorChannelFlag.cs deleted file mode 100644 index 2c7800080c9..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Imaging/ColorChannelFlag.cs +++ /dev/null @@ -1,41 +0,0 @@ -// -// System.Drawing.Imaging.ColorChannelFlag.cs -// -// (C) 2002 Ximian, Inc. http://www.ximian.com -// Author: Dennis Hayes (dennish@raytek.com) -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -using System; -namespace System.Drawing.Imaging -{ - [Serializable] - public enum ColorChannelFlag { - ColorChannelC = 0, - ColorChannelK = 3, - ColorChannelLast = 4, - ColorChannelM = 1, - ColorChannelY = 2 - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Imaging/ColorMap.cs b/mcs/class/System.Drawing/System.Drawing.Imaging/ColorMap.cs deleted file mode 100644 index 7235f16868e..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Imaging/ColorMap.cs +++ /dev/null @@ -1,62 +0,0 @@ -// -// System.Drawing.Imaging.ColorMap.cs -// -// Authors: -// Everaldo Canuto (everaldo.canuto@bol.com.br) -// Andreas Nahr (ClassDevelopment@A-SoftTech.com) -// Dennis Hayes (dennish@raytek.com) -// -// (C) 2002 Ximian, Inc. http://www.ximian.com -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; -using System.IO; -using System.Reflection; - -namespace System.Drawing.Imaging { - - public sealed class ColorMap { - - private Color newColor; - private Color oldColor; - - // constructors - public ColorMap() { - } - - // properties - public Color NewColor { - get { return newColor; } - set { newColor = value; } - } - - public Color OldColor { - get { return oldColor; } - set { oldColor = value; } - } - } - -} diff --git a/mcs/class/System.Drawing/System.Drawing.Imaging/ColorMapType.cs b/mcs/class/System.Drawing/System.Drawing.Imaging/ColorMapType.cs deleted file mode 100644 index 59317e0be89..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Imaging/ColorMapType.cs +++ /dev/null @@ -1,38 +0,0 @@ -// -// System.Drawing.Imaging.ColorMapType.cs -// -// (C) 2002 Ximian, Inc. http://www.ximian.com -// Author: Dennis Hayes (dennish@raytek.com) -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -using System; -namespace System.Drawing.Imaging -{ - [Serializable] - public enum ColorMapType{//check - Brush = 1, - Default = 0 - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Imaging/ColorMatrix.cs b/mcs/class/System.Drawing/System.Drawing.Imaging/ColorMatrix.cs deleted file mode 100644 index 5830bbf0020..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Imaging/ColorMatrix.cs +++ /dev/null @@ -1,367 +0,0 @@ -// -// Copyright 2002 Ximian, Inc. http://www.ximian.com -// Copyright (C) 2004-2005 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// -// Authors: -// Jordi Mas i Hernandez (jordi@ximian.com) -// -// Partially based on work by: -// -// Everaldo Canuto (everaldo.canuto@bol.com.br) -// Andreas Nahr (ClassDevelopment@A-SoftTech.com) -// Dennis Hayes (dennish@raytek.com) -// - - -using System; - -namespace System.Drawing.Imaging -{ - public sealed class ColorMatrix - { - private float color00; - private float color01; - private float color02; - private float color03; - private float color04; - private float color10; - private float color11; - private float color12; - private float color13; - private float color14; - private float color20; - private float color21; - private float color22; - private float color23; - private float color24; - private float color30; - private float color31; - private float color32; - private float color33; - private float color34; - private float color40; - private float color41; - private float color42; - private float color43; - private float color44; - - // constructors - public ColorMatrix () - { - color01 = color02 = color03 = color04 = 0; - color10 = color12 = color13 = color14 = 0; - color20 = color21 = color23 = color24 = 0; - color30 = color31 = color32 = color34 = 0; - color40 = color41 = color42 = color43 = 0; - color00 = color11 = color22 = color33 = color44 = 1; - } - - [CLSCompliant(false)] - public ColorMatrix (float[][] matrix) - { - color00 = matrix [0][0]; - color01 = matrix [0][1]; - color02 = matrix [0][2]; - color03 = matrix [0][3]; - color04 = matrix [0][4]; - color10 = matrix [1][0]; - color11 = matrix [1][1]; - color12 = matrix [1][2]; - color13 = matrix [1][3]; - color14 = matrix [1][4]; - color20 = matrix [2][0]; - color21 = matrix [2][1]; - color22 = matrix [2][2]; - color23 = matrix [2][3]; - color24 = matrix [2][4]; - color30 = matrix [3][0]; - color31 = matrix [3][1]; - color32 = matrix [3][2]; - color33 = matrix [3][3]; - color34 = matrix [3][4]; - color40 = matrix [4][0]; - color41 = matrix [4][1]; - color42 = matrix [4][2]; - color43 = matrix [4][3]; - color44 = matrix [4][4]; - } - - // properties - public float this[int row, int column] { - get { - switch (row) { - case 0: { - switch (column) { - case 0: return color00; - case 1: return color01; - case 2: return color02; - case 3: return color03; - case 4: return color04; - default: break; - } - break; - } - case 1: { - switch (column) { - case 0: return color10; - case 1: return color11; - case 2: return color12; - case 3: return color13; - case 4: return color14; - default: break; - } - break; - } - case 2: { - switch (column) { - case 0: return color20; - case 1: return color21; - case 2: return color22; - case 3: return color23; - case 4: return color24; - default: break; - } - break; - } - case 3: { - switch (column) { - case 0: return color30; - case 1: return color31; - case 2: return color32; - case 3: return color33; - case 4: return color34; - default: break; - } - break; - } - case 4: { - switch (column) { - case 0: return color40; - case 1: return color41; - case 2: return color42; - case 3: return color43; - case 4: return color44; - default: break; - } - break; - } - default: - break; - } - - throw new IndexOutOfRangeException ("Index was outside the bounds of the array"); - } - - set { - switch (row) { - case 0: { - switch (column) { - case 0: color00 = value; return; - case 1: color01 = value; return; - case 2: color02 = value; return; - case 3: color03 = value; return; - case 4: color04 = value; return; - default: break; - } - break; - } - case 1: { - switch (column) { - case 0: color10 = value; return; - case 1: color11 = value; return; - case 2: color12 = value; return; - case 3: color13 = value; return; - case 4: color14 = value; return; - default: break; - } - break; - } - case 2: { - switch (column) { - case 0: color20 = value; return; - case 1: color21 = value; return; - case 2: color22 = value; return; - case 3: color23 = value; return; - case 4: color24 = value; return; - default: break; - } - break; - } - case 3: { - switch (column) { - case 0: color30 = value; return; - case 1: color31 = value; return; - case 2: color32 = value; return; - case 3: color33 = value; return; - case 4: color34 = value; return; - default: break; - } - break; - } - case 4: { - switch (column) { - case 0: color40 = value; return; - case 1: color41 = value; return; - case 2: color42 = value; return; - case 3: color43 = value; return; - case 4: color44 = value; return; - default: break; - } - break; - } - default: - break; - } - - throw new IndexOutOfRangeException ("Index was outside the bounds of the array"); - } - } - - - public float Matrix00 { - get { return color00; } - set { color00 = value; } - } - - public float Matrix01 { - get { return color01; } - set { color01 = value; } - } - - public float Matrix02 { - get { return color02; } - set { color02 = value; } - } - - public float Matrix03 { - get { return color03; } - set { color03 = value; } - } - - public float Matrix04 { - get { return color04; } - set { color04 = value; } - } - - public float Matrix10 { - get { return color10; } - set { color10 = value; } - } - - public float Matrix11 { - get { return color11; } - set { color11 = value; } - } - - public float Matrix12 { - get { return color12; } - set { color12 = value; } - } - - public float Matrix13 { - get { return color13; } - set { color13 = value; } - } - - public float Matrix14 { - get { return color14; } - set { color14 = value; } - } - - public float Matrix20 { - get { return color20; } - set { color20 = value; } - } - - public float Matrix21 { - get { return color21; } - set { color21 = value; } - } - - public float Matrix22 { - get { return color22; } - set { color22 = value; } - } - - public float Matrix23 { - get { return color23; } - set { color23 = value; } - } - - public float Matrix24 { - get { return color24; } - set { color24 = value; } - } - - public float Matrix30 { - get { return color30; } - set { color30 = value; } - } - - public float Matrix31 { - get { return color31; } - set { color31 = value; } - } - - public float Matrix32 { - get { return color32; } - set { color32 = value; } - } - - public float Matrix33 { - get { return color33; } - set { color33 = value; } - } - - public float Matrix34 { - get { return color34; } - set { color34 = value; } - } - - public float Matrix40 { - get { return color40; } - set { color40 = value; } - } - - public float Matrix41 { - get { return color41; } - set { color41 = value; } - } - - public float Matrix42 { - get { return color42; } - set { color42 = value; } - } - - public float Matrix43 { - get { return color43; } - set { color43 = value; } - } - - public float Matrix44 { - get { return color44; } - set { color44 = value; } - } - - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Imaging/ColorMatrixFlag.cs b/mcs/class/System.Drawing/System.Drawing.Imaging/ColorMatrixFlag.cs deleted file mode 100644 index 3b5b678805c..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Imaging/ColorMatrixFlag.cs +++ /dev/null @@ -1,39 +0,0 @@ -// -// System.Drawing.Imaging.ColorMatrixFlag.cs -// -// (C) 2002 Ximian, Inc. http://www.ximian.com -// Author: Dennis Hayes (dennish@raytek.com) -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -using System; -namespace System.Drawing.Imaging -{ - [Serializable] - public enum ColorMatrixFlag{ - AltGrays = 2, - Default = 0, - SkipGrays = 1 - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Imaging/ColorMode.cs b/mcs/class/System.Drawing/System.Drawing.Imaging/ColorMode.cs deleted file mode 100644 index 46408177f22..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Imaging/ColorMode.cs +++ /dev/null @@ -1,38 +0,0 @@ -// -// System.Drawing.Imaging.ColorMode.cs -// -// (C) 2002 Ximian, Inc. http://www.ximian.com -// Author: Dennis Hayes (dennish@raytek.com) -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -using System; -namespace System.Drawing.Imaging -{ - [Serializable] - public enum ColorMode { - Argb32Mode = 0, - Argb64Mode = 1 - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Imaging/ColorPalette.cs b/mcs/class/System.Drawing/System.Drawing.Imaging/ColorPalette.cs deleted file mode 100644 index 7b231135537..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Imaging/ColorPalette.cs +++ /dev/null @@ -1,116 +0,0 @@ -// -// System.Drawing.Imaging.ColorPalette.cs -// -// (C) 2002 Ximian, Inc. http://www.ximian.com -// -// Author: -// Miguel de Icaza (miguel@ximian.com) -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; -using System.Drawing; -using System.Runtime.InteropServices; - -namespace System.Drawing.Imaging -{ - public sealed class ColorPalette { - // 0x1: the color values in the array contain alpha information - // 0x2: the color values are grayscale values. - // 0x4: the colors in the array are halftone values. - - private int flags; - private Color [] entries; - - // - // There is no public constructor, this will be used somewhere in the - // drawing code - // - internal ColorPalette () - { - flags = 0; - entries = new Color [0]; - } - - internal ColorPalette (int flags, Color[] colors) { - this.flags = flags; - entries = colors; - } - - public Color [] Entries { - get { - return entries; - } - } - - public int Flags { - get { - return flags; - } - } -#if !TARGET_JVM - /* Caller should call FreeHGlobal*/ - internal IntPtr getGDIPalette() - { - GdiColorPalette palette = new GdiColorPalette (); - Color[] entries = Entries; - int entry = 0; - int size = Marshal.SizeOf (palette) + (Marshal.SizeOf (entry) * entries.Length); - IntPtr lfBuffer = Marshal.AllocHGlobal(size); - - palette.Flags = Flags; - palette.Count = entries.Length; - - int[] values = new int[palette.Count]; - - for (int i = 0; i < values.Length; i++) { - values[i] = entries[i].ToArgb(); - } - - Marshal.StructureToPtr (palette, lfBuffer, false); - Marshal.Copy (values, 0, (IntPtr) (lfBuffer.ToInt32() + Marshal.SizeOf (palette)), values.Length); - - return lfBuffer; - } - - internal void setFromGDIPalette (IntPtr palette) - { - IntPtr ptr = palette; - int cnt, color; - - flags = Marshal.ReadInt32 (ptr); ptr = (IntPtr) (ptr.ToInt32() + 4); - cnt = Marshal.ReadInt32 (ptr); ptr = (IntPtr) (ptr.ToInt32() + 4); - - entries = new Color [cnt]; - - for (int i = 0; i < cnt; i++) { - color = Marshal.ReadInt32 (ptr); - entries[i] = Color.FromArgb (color); - ptr = (IntPtr) (ptr.ToInt32() + 4); - } - } -#endif - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Imaging/EmfPlusRecordType.cs b/mcs/class/System.Drawing/System.Drawing.Imaging/EmfPlusRecordType.cs deleted file mode 100644 index f068a4afcb2..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Imaging/EmfPlusRecordType.cs +++ /dev/null @@ -1,289 +0,0 @@ -// -// System.Drawing.Imaging.EmfPlusRecordType.cs -// -// (C) 2002 Ximian, Inc. http://www.ximian.com -// Author: Dennis Hayes (dennish@raytek.com) -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -using System; -namespace System.Drawing.Imaging -{ - [Serializable] - public enum EmfPlusRecordType { - BeginContainer = 16423, - BeginContainerNoParams = 16424, - Clear = 16393, - Comment = 16387, - DrawArc = 16402, - DrawBeziers = 16409, - DrawClosedCurve = 16407, - DrawCurve = 16408, - DrawDriverString = 16438, - DrawEllipse = 16399, - DrawImage = 16410, - DrawImagePoints = 16411, - DrawLines = 16397, - DrawPath = 16405, - DrawPie = 16401, - DrawRects = 16395, - DrawString = 16412, - EmfAbortPath = 68, - EmfAlphaBlend = 114, - EmfAngleArc = 41, - EmfArcTo = 55, - EmfBeginPath = 59, - EmfBitBlt = 76, - EmfChord = 46, - EmfCloseFigure = 61, - EmfColorCorrectPalette = 111, - EmfColorMatchToTargetW = 121, - EmfCreateBrushIndirect = 39, - EmfCreateColorSpace = 99, - EmfCreateColorSpaceW = 122, - EmfCreateDibPatternBrushPt = 94, - EmfCreateMonoBrush = 93, - EmfCreatePalette = 49, - EmfCreatePen = 38, - EmfDeleteColorSpace = 101, - EmfDeleteObject = 40, - EmfDrawEscape = 105, - EmfEllipse = 42, - EmfEndPath = 60, - EmfEof = 14, - EmfExcludeClipRect = 29, - EmfExtCreateFontIndirect = 82, - EmfExtCreatePen = 95, - EmfExtEscape = 106, - EmfExtFloodFill = 53, - EmfExtSelectClipRgn = 75, - EmfExtTextOutA = 83, - EmfExtTextOutW = 84, - EmfFillPath = 62, - EmfFillRgn = 71, - EmfFlattenPath = 65, - EmfForceUfiMapping = 109, - EmfFrameRgn = 72, - EmfGdiComment = 70, - EmfGlsBoundedRecord = 103, - EmfGlsRecord = 102, - EmfGradientFill = 118, - EmfHeader = 1, - EmfIntersectClipRect = 30, - EmfInvertRgn = 73, - EmfLineTo = 54, - EmfMaskBlt = 78, - EmfMax = 122, - EmfMin = 1, - EmfModifyWorldTransform = 36, - EmfMoveToEx = 27, - EmfNamedEscpae = 110, - EmfOffsetClipRgn = 26, - EmfPaintRgn = 74, - EmfPie = 47, - EmfPixelFormat = 104, - EmfPlgBlt = 79, - EmfPlusRecordBase = 16384, - EmfPolyBezier = 2, - EmfPolyBezier16 = 85, - EmfPolyBezierTo = 5, - EmfPolyBezierTo16 = 88, - EmfPolyDraw = 56, - EmfPolyDraw16 = 92, - EmfPolygon = 3, - EmfPolygon16 = 86, - EmfPolyline = 4, - EmfPolyPolygon16 = 91, - EmfPolyPolyline = 7, - EmfPolyline16 = 87, - EmfPolyPolygon = 8, - EmfPolyPolyline16 = 90, - EmfPolyTextOutA = 96, - EmfPolyTextOutW = 97, - EmfRealizePalette = 52, - EmfRectangle = 43, - EmfReserved069 = 69, - EmfReserved117 = 117, - EmfResizePalette = 51, - EmfRestoreDC = 34, - EmfRoundArc = 45, - EmfRoundRect = 44, - EmfSaveDC = 33, - EmfScaleViewportExtEx = 31, - EmfScaleWindowExtEx = 32, - EmfSelectClipPath = 67, - EmfSelectObject = 37, - EmfSelectPalette = 48, - EmfSetArcDirection = 57, - EmfSetBkColor = 25, - EmfSetBkMode = 18, - EmfSetBrushOrgEx = 13, - EmfSetColorAdjustment = 23, - EmfSetColorSpace = 100, - EmfSetDIBitsToDevice = 80, - EmfSetIcmMode = 98, - EmfSetIcmProfileA = 112, - EmfSetIcmProfileW = 113, - EmfSetLayout = 115, - EmfSetLinkedUfis = 119, - EmfSetMapMode = 17, - EmfSetMapperFlags = 16, - EmfSetMetaRgn = 28, - EmfSetMiterLimit = 58, - EmfSetPaletteEntries = 50, - EmfSetPixelV = 15, - EmfSetPolyFillMode = 19, - EmfSetROP2 = 20, - EmfSetStretchBltMode = 21, - EmfSetTextAlign = 22, - EmfSetTextColor = 24, - EmfSetTextJustification =120 , - EmfSetViewportExtEx = 11, - EmfSetViewportOrgEx = 12, - EmfSetWindowExtEx = 9, - EmfSetWindowOrgEx = 10, - EmfSetWorldTransform = 35, - EmfSmallTextOut = 108, - EmfStartDoc = 107, - EmfStretchBlt = 77, - EmfStretchDIBits = 81, - EmfStrokeAndFillPath = 63, - EmfStrokePath = 64, - EmfTransparentBlt = 116, - EmfWidenPath = 66, - EndContainer = 16425, - EndOfFile = 16386, - FillClosedCurve = 16406, - FillEllipse = 16398, - FillPath = 16404, - FillPie = 16400, - FillPolygon = 16396, - FillRects = 16394, - FillRegion = 16403, - GetDC = 16388, - Header = 16385, - Invalid = 16384, - Max = 16438, - Min = 16385, - MultiFormatEnd = 16391, - MultiFormatSection = 16390, - MultiFormatStart = 16389, - MultiplyWorldTransform = 16428, - Object = 16392, - OffsetClip = 16437, - ResetClip = 16433, - ResetWorldTransform = 16427, - Restore = 16422, - RotateWorldTransform = 16431, - Save = 16421, - ScaleWorldTransform = 16430, - SetAntiAliasMode = 16414, - SetClipPath = 16435, - SetClipRect = 16434, - SetClipRegion = 16436, - SetCompositingMode = 16419, - SetCompositingQuality = 16420, - SetInterpolationMode = 16417, - SetPageTransform = 16432, - SetPixelOffsetMode = 16418, - SetRenderingOrigin = 16413, - SetTextContrast = 16416, - SetTextRenderingHint = 16415, - SetWorldTransform = 16426, - Total = 16439, - TranslateWorldTransform = 16429, - WmfAnimatePalette = 66614, - WmfArc = 67607, - WmfBitBlt = 67874, - WmfChord = 67632, - WmfCreateBrushIndirect = 66300, - WmfCreateFontIndirect = 66299, - WmfCreatePalette = 65783, - WmfCreatePatternBrush = 66041, - WmfCreatePenIndirect = 66298, - WmfCreateRegion = 67327, - WmfDeleteObject = 66032, - WmfDibBitBlt = 67904, - WmfDibCreatePatternBrush = 65858, - WmfFillRegion = 66088, - WmfFloodFill = 66585, - WmfFrameRegion = 66601, - WmfIntersectClipRect = 66582, - WmfInvertRegion = 65834, - WmfLineTo = 66067, - WmfMoveTo = 66068, - WmfOffsetCilpRgn = 66080, - WmfOffsetViewportOrg = 66065, - WmfOffsetWindowOrg = 66063, - WmfPaintRegion = 65835, - WmfPatBlt = 67101, - WmfPie = 67610, - WmfPolygon = 66340, - WmfPolyline = 66341, - WmfPolyPolygon = 66872, - WmfRealizePalette = 65589, - WmfRecordBase = 65536, - WmfRectangle = 66587, - WmfResizePalette = 65849, - WmfRestoreDC = 65831, - WmfRoundRect = 67100, - WmfSaveDC = 65566, - WmfScaleViewportExt = 66578, - WmfScaleWindowExt = 66576, - WmfSelectClipRegion = 65836, - WmfSelectObject = 65837, - WmfSelectPalette = 66100, - WmfSetBkColor = 66049, - WmfSetBkMode = 65794, - WmfSetDibToDev = 68915, - WmfSetLayout = 65865, - WmfSetMapMode = 65795, - WmfSetMapperFlags = 66097, - WmfSetPalEntries = 65591, - WmfSetPixel = 66591, - WmfSetPolyFillMode = 65798, - WmfSetRelAbs = 65797, - WmfSetROP2 = 65796, - WmfSetStretchBltMode = 65799, - WmfSetTextAlign = 65838, - WmfSetTextCharExtra = 65800, - WmfSetTextColor = 66057, - WmfSetTextJustification = 66058, - WmfSetViewportExt = 66062, - WmfSetViewportOrg = 66061, - WmfSetWindowExt = 66060, - WmfSetWindowOrg = 66059, - WmfStretchBlt = 68387, - WmfStretchDib = 69443, - WmfTextOut = 66849, - EmfPolyLineTo = 6, - EmfPolylineTo16 = 89, - WmfDibStretchBlt = 68417, - WmfEllipse = 66584, - WmfEscape = 67110, - WmfExcludeClipRect = 66581, - WmfExtFloodFill = 66888, - WmfExtTextOut = 68146 - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Imaging/EmfType.cs b/mcs/class/System.Drawing/System.Drawing.Imaging/EmfType.cs deleted file mode 100644 index 76287fd72c3..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Imaging/EmfType.cs +++ /dev/null @@ -1,39 +0,0 @@ -// -// System.Drawing.Imaging.EmfType.cs -// -// (C) 2002 Ximian, Inc. http://www.ximian.com -// Author: Dennis Hayes (dennish@raytek.com) -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -using System; -namespace System.Drawing.Imaging -{ - [Serializable] - public enum EmfType { - EmfOnly = 3, - EmfPlusDual = 5, - EmfPlusOnly = 4 - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Imaging/Encoder.cs b/mcs/class/System.Drawing/System.Drawing.Imaging/Encoder.cs deleted file mode 100644 index e085b6c7fbe..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Imaging/Encoder.cs +++ /dev/null @@ -1,79 +0,0 @@ -// -// System.Drawing.Imaging.Encoder.cs -// -// (C) 2004 Novell, Inc. http://www.novell.com -// Author: Ravindra (rkumar@novell.com) -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; - -namespace System.Drawing.Imaging -{ - public sealed class Encoder - { - private Guid guid; - - public static readonly Encoder ChrominanceTable; - public static readonly Encoder ColorDepth; - public static readonly Encoder Compression; - public static readonly Encoder LuminanceTable; - public static readonly Encoder Quality; - public static readonly Encoder RenderMethod; - public static readonly Encoder SaveFlag; - public static readonly Encoder ScanMethod; - public static readonly Encoder Transformation; - public static readonly Encoder Version; - - static Encoder () - { - // GUID values are taken from my windows machine. - ChrominanceTable = new Encoder ("f2e455dc-09b3-4316-8260-676ada32481c"); - ColorDepth = new Encoder ("66087055-ad66-4c7c-9a18-38a2310b8337"); - Compression = new Encoder ("e09d739d-ccd4-44ee-8eba-3fbf8be4fc58"); - LuminanceTable = new Encoder ("edb33bce-0266-4a77-b904-27216099e717"); - Quality = new Encoder ("1d5be4b5-fa4a-452d-9cdd-5db35105e7eb"); - RenderMethod = new Encoder ("6d42c53a-229a-4825-8bb7-5c99e2b9a8b8"); - SaveFlag = new Encoder ("292266fc-ac40-47bf-8cfc-a85b89a655de"); - ScanMethod = new Encoder ("3a4e2661-3109-4e56-8536-42c156e7dcfa"); - Transformation = new Encoder ("8d0eb2d1-a58e-4ea8-aa14-108074b7b6f9"); - Version = new Encoder ("24d18c76-814a-41a4-bf53-1c219cccf797"); - } - - internal Encoder (String guid) { - this.guid = new Guid (guid); - } - - public Encoder (Guid guid) { - this.guid = guid; - } - - public Guid Guid { - get { - return guid; - } - } - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Imaging/EncoderParameter.cs b/mcs/class/System.Drawing/System.Drawing.Imaging/EncoderParameter.cs deleted file mode 100644 index daa79d97ca3..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Imaging/EncoderParameter.cs +++ /dev/null @@ -1,356 +0,0 @@ -// -// System.Drawing.Imaging.EncoderParameter.cs -// -// Author: -// Ravindra (rkumar@novell.com) -// Vladimir Vukicevic (vladimir@pobox.com) -// -// (C) 2004 Novell, Inc. http://www.novell.com -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; -using System.Text; - -using System.Runtime.InteropServices; - -namespace System.Drawing.Imaging { - - public sealed class EncoderParameter : IDisposable { - - private Encoder encoder; - private int valuesCount; - private EncoderParameterValueType type; - private IntPtr valuePtr; - - internal EncoderParameter () - { - } - - public EncoderParameter (Encoder encoder, byte value) - { - this.encoder = encoder; - this.valuesCount = 1; - this.type = EncoderParameterValueType.ValueTypeByte; - this.valuePtr = Marshal.AllocHGlobal (1); - Marshal.WriteByte (this.valuePtr, value); - } - - public EncoderParameter (Encoder encoder, byte[] value) - { - this.encoder = encoder; - this.valuesCount = value.Length; - this.type = EncoderParameterValueType.ValueTypeByte; - this.valuePtr = Marshal.AllocHGlobal (1 * valuesCount); - Marshal.Copy (value, 0, this.valuePtr, valuesCount); - } - - public EncoderParameter (Encoder encoder, short value) - { - this.encoder = encoder; - this.valuesCount = 1; - this.type = EncoderParameterValueType.ValueTypeShort; - this.valuePtr = Marshal.AllocHGlobal (2); - Marshal.WriteInt16 (this.valuePtr, value); - } - - public EncoderParameter (Encoder encoder, short[] value) - { - this.encoder = encoder; - this.valuesCount = value.Length; - this.type = EncoderParameterValueType.ValueTypeShort; - this.valuePtr = Marshal.AllocHGlobal (2 * valuesCount); - Marshal.Copy (value, 0, this.valuePtr, valuesCount); - } - - - public EncoderParameter (Encoder encoder, long value) - { - this.encoder = encoder; - this.valuesCount = 1; - this.type = EncoderParameterValueType.ValueTypeLong; - this.valuePtr = Marshal.AllocHGlobal (4); - Marshal.WriteInt32 (this.valuePtr, (int) value); - } - - public EncoderParameter (Encoder encoder, long[] value) - { - this.encoder = encoder; - this.valuesCount = value.Length; - this.type = EncoderParameterValueType.ValueTypeLong; - this.valuePtr = Marshal.AllocHGlobal (4 * valuesCount); - int [] ivals = new int[value.Length]; - for (int i = 0; i < value.Length; i++) ivals[i] = (int) value[i]; - Marshal.Copy (ivals, 0, this.valuePtr, valuesCount); - } - - public EncoderParameter (Encoder encoder, string value) - { - this.encoder = encoder; - - ASCIIEncoding ascii = new ASCIIEncoding (); - int asciiByteCount = ascii.GetByteCount (value); - byte[] bytes = new byte [asciiByteCount]; - ascii.GetBytes (value, 0, value.Length, bytes, 0); - - this.valuesCount = bytes.Length; - this.type = EncoderParameterValueType.ValueTypeAscii; - this.valuePtr = Marshal.AllocHGlobal (valuesCount); - Marshal.Copy (bytes, 0, this.valuePtr, valuesCount); - } - - public EncoderParameter (Encoder encoder, byte value, bool undefined) - { - this.encoder = encoder; - this.valuesCount = 1; - if (undefined) - this.type = EncoderParameterValueType.ValueTypeUndefined; - else - this.type = EncoderParameterValueType.ValueTypeByte; - this.valuePtr = Marshal.AllocHGlobal (1); - Marshal.WriteByte (this.valuePtr, value); - } - - public EncoderParameter (Encoder encoder, byte[] value, bool undefined) - { - this.encoder = encoder; - this.valuesCount = value.Length; - if (undefined) - this.type = EncoderParameterValueType.ValueTypeUndefined; - else - this.type = EncoderParameterValueType.ValueTypeByte; - this.valuePtr = Marshal.AllocHGlobal (valuesCount); - Marshal.Copy (value, 0, this.valuePtr, valuesCount); - } - - public EncoderParameter (Encoder encoder, int numerator, int denominator) - { - this.encoder = encoder; - this.valuesCount = 1; - this.type = EncoderParameterValueType.ValueTypeRational; - this.valuePtr = Marshal.AllocHGlobal (8); - int [] valuearray = { numerator, denominator }; - Marshal.Copy (valuearray, 0, this.valuePtr, valuearray.Length); - } - - public EncoderParameter (Encoder encoder, int[] numerator, int[] denominator) - { - if (numerator.Length != denominator.Length) - throw new ArgumentException ("Invalid parameter used."); - - this.encoder = encoder; - this.valuesCount = numerator.Length; - this.type = EncoderParameterValueType.ValueTypeRational; - this.valuePtr = Marshal.AllocHGlobal (4 * valuesCount * 2); - IntPtr dest = this.valuePtr; - for (int i = 0; i < valuesCount; i++) { - Marshal.WriteInt32 (dest, (int) numerator[i]); - dest = (IntPtr) ((int) dest + 4); - Marshal.WriteInt32 (dest, (int) denominator[i]); - dest = (IntPtr) ((int) dest + 4); - } - } - - public EncoderParameter (Encoder encoder, long rangebegin, long rangeend) - { - this.encoder = encoder; - this.valuesCount = 1; - this.type = EncoderParameterValueType.ValueTypeLongRange; - this.valuePtr = Marshal.AllocHGlobal (8); - int [] valuearray = { (int) rangebegin, (int) rangeend }; - Marshal.Copy (valuearray, 0, this.valuePtr, valuearray.Length); - } - - public EncoderParameter (Encoder encoder, long[] rangebegin, long[] rangeend) - { - if (rangebegin.Length != rangeend.Length) - throw new ArgumentException ("Invalid parameter used."); - - this.encoder = encoder; - this.valuesCount = rangebegin.Length; - this.type = EncoderParameterValueType.ValueTypeLongRange; - - this.valuePtr = Marshal.AllocHGlobal (4 * valuesCount * 2); - IntPtr dest = this.valuePtr; - for (int i = 0; i < valuesCount; i++) { - Marshal.WriteInt32 (dest, (int) rangebegin[i]); - dest = (IntPtr) ((int) dest + 4); - Marshal.WriteInt32 (dest, (int) rangeend[i]); - dest = (IntPtr) ((int) dest + 4); - } - } - - public EncoderParameter (Encoder encoder, int numberOfValues, int type, int value) - { - this.encoder = encoder; - this.valuePtr = (IntPtr) value; - this.valuesCount = numberOfValues; - this.type = (EncoderParameterValueType) type; - } - - public EncoderParameter (Encoder encoder, int numerator1, int denominator1, int numerator2, int denominator2) - { - this.encoder = encoder; - this.valuesCount = 1; - this.type = EncoderParameterValueType.ValueTypeRationalRange; - this.valuePtr = Marshal.AllocHGlobal (4 * 4); - int [] valuearray = { numerator1, denominator1, numerator2, denominator2 }; - Marshal.Copy (valuearray, 0, this.valuePtr, 4); - } - - public EncoderParameter (Encoder encoder, int[] numerator1, int[] denominator1, int[] numerator2, int[] denominator2) - { - if (numerator1.Length != denominator1.Length || - numerator2.Length != denominator2.Length || - numerator1.Length != numerator2.Length) - throw new ArgumentException ("Invalid parameter used."); - - this.encoder = encoder; - this.valuesCount = numerator1.Length; - this.type = EncoderParameterValueType.ValueTypeRationalRange; - - this.valuePtr = Marshal.AllocHGlobal (4 * valuesCount * 4); - IntPtr dest = this.valuePtr; - for (int i = 0; i < valuesCount; i++) { - Marshal.WriteInt32 (dest, numerator1[i]); - dest = (IntPtr) ((int) dest + 4); - Marshal.WriteInt32 (dest, denominator1[i]); - dest = (IntPtr) ((int) dest + 4); - Marshal.WriteInt32 (dest, numerator2[i]); - dest = (IntPtr) ((int) dest + 4); - Marshal.WriteInt32 (dest, denominator2[i]); - dest = (IntPtr) ((int) dest + 4); - } - } - - public Encoder Encoder { - get { - return encoder; - } - - set { - encoder = value; - } - } - - public int NumberOfValues { - get { - return valuesCount; - } - } - - public EncoderParameterValueType Type { - get { - return type; - } - } - - public EncoderParameterValueType ValueType { - get { - return type; - } - } - - void Dispose (bool disposing) { - if (valuePtr != IntPtr.Zero) { - Marshal.FreeHGlobal (valuePtr); - valuePtr = IntPtr.Zero; - } - } - - public void Dispose () { - Dispose (true); - } - - ~EncoderParameter () { - Dispose (false); - } - - internal static int NativeSize () { - return Marshal.SizeOf (typeof(GdipEncoderParameter)); - } - - internal void ToNativePtr (IntPtr epPtr) { - GdipEncoderParameter ep = new GdipEncoderParameter (); - ep.guid = this.encoder.Guid; - ep.numberOfValues = (uint) this.valuesCount; - ep.type = this.type; - ep.value = this.valuePtr; - Marshal.StructureToPtr (ep, epPtr, false); - } - - internal static EncoderParameter FromNativePtr (IntPtr epPtr) { - GdipEncoderParameter ep; - ep = (GdipEncoderParameter) Marshal.PtrToStructure (epPtr, typeof(GdipEncoderParameter)); - - Type valType; - uint valCount; - - switch (ep.type) { - case EncoderParameterValueType.ValueTypeAscii: - case EncoderParameterValueType.ValueTypeByte: - case EncoderParameterValueType.ValueTypeUndefined: - valType = typeof(byte); - valCount = ep.numberOfValues; - break; - case EncoderParameterValueType.ValueTypeShort: - valType = typeof(short); - valCount = ep.numberOfValues; - break; - case EncoderParameterValueType.ValueTypeLong: - valType = typeof(int); - valCount = ep.numberOfValues; - break; - case EncoderParameterValueType.ValueTypeLongRange: - case EncoderParameterValueType.ValueTypeRational: - valType = typeof(int); - valCount = ep.numberOfValues * 2; - break; - case EncoderParameterValueType.ValueTypeRationalRange: - valType = typeof(int); - valCount = ep.numberOfValues * 4; - break; - default: - return null; - } - - EncoderParameter eparam = new EncoderParameter(); - eparam.encoder = new Encoder(ep.guid); - eparam.valuesCount = (int) ep.numberOfValues; - eparam.type = ep.type; - eparam.valuePtr = Marshal.AllocHGlobal ((int)(valCount * Marshal.SizeOf(valType))); - - /* There's nothing in Marshal to do a memcpy() between two IntPtrs. This sucks. */ - unsafe { - byte *s = (byte *) ep.value; - byte *d = (byte *) eparam.valuePtr; - for (int i = 0; i < valCount * Marshal.SizeOf(valType); i++) - *d++ = *s++; - } - - return eparam; - } - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Imaging/EncoderParameter.jvm.cs b/mcs/class/System.Drawing/System.Drawing.Imaging/EncoderParameter.jvm.cs deleted file mode 100755 index 52427a0e734..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Imaging/EncoderParameter.jvm.cs +++ /dev/null @@ -1,173 +0,0 @@ -// -// System.Drawing.Imaging.EncoderParameter.cs -// -// Author: -// Ravindra (rkumar@novell.com) -// Vladimir Vukicevic (vladimir@pobox.com) -// -// (C) 2004 Novell, Inc. http://www.novell.com -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; -using System.Text; - -using System.Runtime.InteropServices; - -namespace System.Drawing.Imaging { - - public sealed class EncoderParameter : IDisposable { - - private Encoder encoder; - private int valuesCount; - private EncoderParameterValueType type; - - internal EncoderParameter () - { - } - - public EncoderParameter (Encoder encoder, byte value) - { - throw new NotImplementedException(); - } - - public EncoderParameter (Encoder encoder, byte[] value) - { - throw new NotImplementedException(); - } - - public EncoderParameter (Encoder encoder, short value) - { - throw new NotImplementedException(); - } - - public EncoderParameter (Encoder encoder, short[] value) - { - throw new NotImplementedException(); - } - - - public EncoderParameter (Encoder encoder, long value) - { - throw new NotImplementedException(); - } - - public EncoderParameter (Encoder encoder, long[] value) - { - throw new NotImplementedException(); - } - - public EncoderParameter (Encoder encoder, string value) - { - throw new NotImplementedException(); - } - - public EncoderParameter (Encoder encoder, byte value, bool undefined) - { - throw new NotImplementedException(); - } - - public EncoderParameter (Encoder encoder, byte[] value, bool undefined) - { - throw new NotImplementedException(); - } - - public EncoderParameter (Encoder encoder, int numerator, int denominator) - { - throw new NotImplementedException(); - } - - public EncoderParameter (Encoder encoder, int[] numerator, int[] denominator) - { - throw new NotImplementedException(); - } - - public EncoderParameter (Encoder encoder, long rangebegin, long rangeend) - { - throw new NotImplementedException(); - } - - public EncoderParameter (Encoder encoder, long[] rangebegin, long[] rangeend) - { - throw new NotImplementedException(); - } - - public EncoderParameter (Encoder encoder, int numberOfValues, int type, int value) - { - throw new NotImplementedException(); - } - - public EncoderParameter (Encoder encoder, int numerator1, int denominator1, int numerator2, int denominator2) - { - throw new NotImplementedException(); - } - - public EncoderParameter (Encoder encoder, int[] numerator1, int[] denominator1, int[] numerator2, int[] denominator2) - { - throw new NotImplementedException(); - } - - public Encoder Encoder { - get { - return encoder; - } - - set { - encoder = value; - } - } - - public int NumberOfValues { - get { - return valuesCount; - } - } - - public EncoderParameterValueType Type { - get { - return type; - } - } - - public EncoderParameterValueType ValueType { - get { - return type; - } - } - - void Dispose (bool disposing) { - throw new NotImplementedException(); - } - - public void Dispose () { - Dispose (true); - } - - ~EncoderParameter () { - Dispose (false); - } - - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Imaging/EncoderParameterValueType.cs b/mcs/class/System.Drawing/System.Drawing.Imaging/EncoderParameterValueType.cs deleted file mode 100644 index e1b72c937ab..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Imaging/EncoderParameterValueType.cs +++ /dev/null @@ -1,44 +0,0 @@ -// -// System.Drawing.Imaging.EncoderParameterValueType.cs -// -// (C) 2002 Ximian, Inc. http://www.ximian.com -// Author: Dennis Hayes (dennish@raytek.com) -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -using System; -namespace System.Drawing.Imaging -{ - [Serializable] - public enum EncoderParameterValueType : int { - ValueTypeAscii = 2, - ValueTypeByte = 1, - ValueTypeLong = 4, - ValueTypeLongRange = 6, - ValueTypeRational = 5, - ValueTypeRationalRange = 8, - ValueTypeShort = 3, - ValueTypeUndefined = 7 - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Imaging/EncoderParameters.cs b/mcs/class/System.Drawing/System.Drawing.Imaging/EncoderParameters.cs deleted file mode 100644 index 4acb435c58b..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Imaging/EncoderParameters.cs +++ /dev/null @@ -1,114 +0,0 @@ -// -// System.Drawing.Imaging.EncoderParameters.cs -// -// Author: -// Ravindra (rkumar@novell.com) -// Vladimir Vukicevic (vladimir@pobox.com) -// -// (C) 2004 Novell, Inc. http://www.novell.com -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; -using System.Runtime.InteropServices; - -namespace System.Drawing.Imaging -{ - public sealed class EncoderParameters : IDisposable - { - private EncoderParameter[] parameters; - - public EncoderParameters () { - parameters = new EncoderParameter[1]; - } - - public EncoderParameters (int count) { - parameters = new EncoderParameter[count]; - } - - public EncoderParameter[] Param { - get { - return parameters; - } - - set { - parameters = value; - } - } - - public void Dispose () { - // Nothing - } -#if !TARGET_JVM - internal IntPtr ToNativePtr () { - IntPtr result; - IntPtr ptr; - - // 4 is the initial int32 "count" value - result = Marshal.AllocHGlobal (4 + parameters.Length * EncoderParameter.NativeSize()); - - ptr = result; - Marshal.WriteInt32 (ptr, parameters.Length); - - ptr = (IntPtr) ((int) ptr + 4); - for (int i = 0; i < parameters.Length; i++) { - parameters[i].ToNativePtr (ptr); - ptr = (IntPtr) ((int) ptr + EncoderParameter.NativeSize()); - } - - return result; - } - - /* The IntPtr passed in here is a blob returned from - * GdipImageGetEncoderParameterList. Its internal pointers - * (i.e. the Value pointers in the EncoderParameter entries) - * point to areas within this block of memeory; this means - * that we need to free it as a whole, and also means that - * we can't Marshal.PtrToStruct our way to victory. - */ - internal static EncoderParameters FromNativePtr (IntPtr epPtr) { - if (epPtr == IntPtr.Zero) - return null; - - IntPtr ptr = epPtr; - - int count = Marshal.ReadInt32 (ptr); - ptr = (IntPtr) ((int) ptr + 4); - - if (count == 0) - return null; - - EncoderParameters result = new EncoderParameters (count); - - for (int i = 0; i < count; i++) { - result.parameters[i] = EncoderParameter.FromNativePtr (ptr); - ptr = (IntPtr) ((int) ptr + EncoderParameter.NativeSize()); - } - - return result; - } -#endif - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Imaging/EncoderValue.cs b/mcs/class/System.Drawing/System.Drawing.Imaging/EncoderValue.cs deleted file mode 100644 index 6f054fe5af3..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Imaging/EncoderValue.cs +++ /dev/null @@ -1,60 +0,0 @@ -// -// System.Drawing.Imaging.EncoderValue.cs -// -// (C) 2002 Ximian, Inc. http://www.ximian.com -// Author: Dennis Hayes (dennish@raytek.com) -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -using System; -namespace System.Drawing.Imaging -{ - [Serializable] - public enum EncoderValue { - ColorTypeCMYK = 0, - ColorTypeYCCK = 1, - CompressionCCITT3 = 3, - CompressionCCITT4 = 4, - CompressionLZW = 2, - CompressionNone = 6, - CompressionRle = 5, - Flush = 20, - FrameDimensionPage = 23, - FrameDimensionResolution = 22, - FrameDimensionTime = 21, - LastFrame = 19, - MultiFrame = 18, - RenderNonProgressive = 12, - RenderProgressive = 11, - ScanMethodInterlaced = 7, - ScanMethodNonInterlaced = 8, - TransformFlipHorizontal = 16, - TransformFlipVertical = 17, - TransformRotate180 = 14, - TransformRotate270 = 15, - TransformRotate90 = 13, - VersionGif87 = 9, - VersionGif89 = 10 - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Imaging/FrameDimension.cs b/mcs/class/System.Drawing/System.Drawing.Imaging/FrameDimension.cs deleted file mode 100644 index 941d893a1d5..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Imaging/FrameDimension.cs +++ /dev/null @@ -1,101 +0,0 @@ -// created on 21.02.2002 at 17:06 -// -// FrameDimension.cs -// -// Author: Christian Meyer -// eMail: Christian.Meyer@cs.tum.edu -// Dennis Hayes (dennish@raytek.com) -// Sanjay Gupta -// Jordi Mas i Hernanez (jordi@ximian.com) - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -namespace System.Drawing.Imaging { - -using System; - -public sealed class FrameDimension { - - internal Guid guid; - - // constructor - public FrameDimension(Guid guid) - { - this.guid = guid; - } - - //properties - public Guid Guid { - get { - return guid; - } - } - - public static FrameDimension Page { - get { - return new FrameDimension (new Guid ("7462dc86-6180-4c7e-8e3f-ee7333a7a483")); - } - } - - public static FrameDimension Resolution { - get { - return new FrameDimension (new Guid ("84236f7b-3bd3-428f-8dab-4ea1439ca315" )); - } - } - - public static FrameDimension Time { - get { - return new FrameDimension (new Guid ("6aedbd6d-3fb5-418a-83a6-7f45229dc872" )); - } - } - -#if TARGET_JVM - internal static FrameDimension PixelFormat { - get { - return new FrameDimension (new Guid ("9BCCD13D-9D8C-401a-B9ED-BB548E5B3329" )); - } - } -#endif - - //methods - public override bool Equals(object o) - { - if (!(o is FrameDimension)) - return false; - - return (guid == ((FrameDimension)o).guid); - } - - public override int GetHashCode() - { - return guid.GetHashCode (); - } - - public override string ToString() - { - return "FrameDimension :" + guid; - } - -} -} diff --git a/mcs/class/System.Drawing/System.Drawing.Imaging/ImageAttributes.cs b/mcs/class/System.Drawing/System.Drawing.Imaging/ImageAttributes.cs deleted file mode 100644 index 6af0cf01391..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Imaging/ImageAttributes.cs +++ /dev/null @@ -1,432 +0,0 @@ -// -// System.Drawing.Imaging.ImageAttributes.cs -// -// Author: -// Dennis Hayes (dennish@raytek.com) (stubbed out) -// Jordi Mas i Hernàndez (jmas@softcatala.org) -// Sanjay Gupta (gsanjay@novell.com) -// -// (C) 2002-4 Ximian, Inc. http://www.ximian.com -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; -using System.Drawing; -using System.Drawing.Drawing2D; -using System.Runtime.InteropServices; - -namespace System.Drawing.Imaging -{ - /// - /// Summary description for ImageAttributes. - /// - public sealed class ImageAttributes : ICloneable, IDisposable { - - private IntPtr nativeImageAttr = IntPtr.Zero; - - internal IntPtr NativeObject{ - get{ - return nativeImageAttr; - } - } - - internal ImageAttributes(IntPtr native) - { - nativeImageAttr = native; - } - - public ImageAttributes() { - - Status status = GDIPlus.GdipCreateImageAttributes(out nativeImageAttr); - - if (status != Status.Ok) - throw new Exception ("Error calling GDIPlus.GdipCreateImageAttributes:" +status); - - } - - public void ClearBrushRemapTable() - { - ClearRemapTable (ColorAdjustType.Brush); - } - - //Clears the color keys for all GDI+ objects - public void ClearColorKey() - { - ClearColorKey (ColorAdjustType.Default); - } - - public void ClearColorKey(ColorAdjustType type) - { - Status status = GDIPlus.GdipSetImageAttributesColorKeys (nativeImageAttr, - type, false, 0, 0); - - GDIPlus.CheckStatus (status); - } - - public void ClearColorMatrix() - { - ClearColorMatrix (ColorAdjustType.Default); - } - - public void ClearColorMatrix(ColorAdjustType type) - { - Status status = GDIPlus.GdipSetImageAttributesColorMatrix (nativeImageAttr, - type, false, null, null, ColorMatrixFlag.Default); - - GDIPlus.CheckStatus (status); - } - - public void ClearGamma() - { - ClearGamma (ColorAdjustType.Default); - } - - public void ClearGamma(ColorAdjustType type) - { - Status status = GDIPlus.GdipSetImageAttributesGamma (nativeImageAttr, type, false, 0); - - GDIPlus.CheckStatus (status); - } - - public void ClearNoOp() - { - ClearNoOp (ColorAdjustType.Default); - } - - public void ClearNoOp(ColorAdjustType type) - { - Status status = GDIPlus.GdipSetImageAttributesNoOp (nativeImageAttr, type, false); - - GDIPlus.CheckStatus (status); - } - - public void ClearOutputChannel() - { - ClearOutputChannel (ColorAdjustType.Default); - } - - public void ClearOutputChannel(ColorAdjustType type) - { - Status status = GDIPlus.GdipSetImageAttributesOutputChannel (nativeImageAttr, - type, false, ColorChannelFlag.ColorChannelLast); - - GDIPlus.CheckStatus (status); - } - - public void ClearOutputChannelColorProfile() - { - ClearOutputChannelColorProfile (ColorAdjustType.Default); - } - - public void ClearOutputChannelColorProfile(ColorAdjustType type) - { - Status status = GDIPlus.GdipSetImageAttributesOutputChannelColorProfile (nativeImageAttr, - type, false, null); - - GDIPlus.CheckStatus (status); - } - - public void ClearRemapTable() - { - ClearRemapTable (ColorAdjustType.Default); - } - - public void ClearRemapTable(ColorAdjustType type) - { - Status status = GDIPlus.GdipSetImageAttributesRemapTable (nativeImageAttr, - type, false, 0, IntPtr.Zero); - - GDIPlus.CheckStatus (status); - } - - public void ClearThreshold() - { - ClearThreshold (ColorAdjustType.Default); - } - - public void ClearThreshold(ColorAdjustType type) - { - Status status = GDIPlus.GdipSetImageAttributesThreshold (nativeImageAttr, - type, false, 0); - - GDIPlus.CheckStatus (status); - } - - //Sets the color keys for all GDI+ objects - public void SetColorKey(Color colorLow, Color colorHigh) - { - - Status status = GDIPlus.GdipSetImageAttributesColorKeys(nativeImageAttr, - ColorAdjustType.Default, true, colorLow.ToArgb(), colorHigh.ToArgb()); - - if (status != Status.Ok) - throw new Exception ("Error calling GDIPlus.GdipSetImageAttributesColorKeys:" +status); - } - - public void SetColorMatrix(ColorMatrix colorMatrix) - { - - Status status = GDIPlus.GdipSetImageAttributesColorMatrix(nativeImageAttr, ColorAdjustType.Default, - true, colorMatrix, (ColorMatrix)null, ColorMatrixFlag.Default); - - if (status != Status.Ok) - throw new Exception ("Error calling GDIPlus.SetColorMatrix:" +status); - } - - public void SetColorMatrix(ColorMatrix colorMatrix, ColorMatrixFlag colorMatrixFlag) - { - - Status status = GDIPlus.GdipSetImageAttributesColorMatrix(nativeImageAttr, ColorAdjustType.Default, - true, colorMatrix, (ColorMatrix)null, colorMatrixFlag); - if (status != Status.Ok) - throw new Exception ("Error calling GDIPlus.SetColorMatrix:" +status); - - } - - public void SetColorMatrix(ColorMatrix colorMatrix, ColorMatrixFlag colorMatrixFlag, ColorAdjustType colorAdjustType) { - - Status status = GDIPlus.GdipSetImageAttributesColorMatrix(nativeImageAttr,colorAdjustType, - true, colorMatrix, (ColorMatrix)null, colorMatrixFlag); - - if (status != Status.Ok) - throw new Exception ("Error calling GDIPlus.SetColorMatrix:" +status); - } - - public void Dispose() - { - if (nativeImageAttr != IntPtr.Zero) { - - Status status = GDIPlus.GdipDisposeImageAttributes(nativeImageAttr); - GDIPlus.CheckStatus (status); - nativeImageAttr = IntPtr.Zero; - } - - System.GC.SuppressFinalize (this); - } - - ~ImageAttributes() - { - Dispose (); - } - - public object Clone() - { - IntPtr imgclone; - - Status status = GDIPlus.GdipCloneImageAttributes (nativeImageAttr, out imgclone); - GDIPlus.CheckStatus (status); - - return new ImageAttributes (imgclone); - } - - public void GetAdjustedPalette(ColorPalette palette, ColorAdjustType type) - { - IntPtr colorPalette; - - Status status = GDIPlus.GdipGetImageAttributesAdjustedPalette (nativeImageAttr, - out colorPalette, type); - - palette.setFromGDIPalette (colorPalette); - GDIPlus.CheckStatus (status); - } - - public void SetBrushRemapTable(ColorMap[] map) - { - GdiColorMap gdiclr = new GdiColorMap (); - IntPtr clrmap, lpPointer; - int mapsize = Marshal.SizeOf (gdiclr); - int size = mapsize * map.Length; - clrmap = lpPointer = Marshal.AllocHGlobal (size); - - for (int i=0; i < map.Length; i++) - { - gdiclr.from = map[i].OldColor.ToArgb(); - gdiclr.to = map[i].NewColor.ToArgb(); - - Marshal.StructureToPtr (gdiclr, lpPointer, false); - lpPointer = (IntPtr) (lpPointer.ToInt32() + mapsize); - } - - Status status = GDIPlus.GdipSetImageAttributesRemapTable (nativeImageAttr, - ColorAdjustType.Brush, true, (uint) map.Length, clrmap); - - Marshal.FreeHGlobal (clrmap); - - GDIPlus.CheckStatus (status); - } - - - public void SetColorKey(Color colorLow, Color colorHigh, ColorAdjustType type) - { - Status status = GDIPlus.GdipSetImageAttributesColorKeys (nativeImageAttr, - type, true, colorLow.ToArgb (), colorHigh.ToArgb ()); - - GDIPlus.CheckStatus (status); - } - - - public void SetColorMatrices(ColorMatrix newColorMatrix, ColorMatrix grayMatrix) - { - Status status = GDIPlus.GdipSetImageAttributesColorMatrix (nativeImageAttr, - ColorAdjustType.Default, true, newColorMatrix, grayMatrix, ColorMatrixFlag.Default); - - GDIPlus.CheckStatus (status); - } - - public void SetColorMatrices(ColorMatrix newColorMatrix, ColorMatrix grayMatrix, ColorMatrixFlag flags) - { - Status status = GDIPlus.GdipSetImageAttributesColorMatrix (nativeImageAttr, - ColorAdjustType.Default, true, newColorMatrix, grayMatrix, flags); - - GDIPlus.CheckStatus (status); - } - - public void SetColorMatrices(ColorMatrix newColorMatrix, ColorMatrix grayMatrix, ColorMatrixFlag mode, ColorAdjustType type) - { - Status status = GDIPlus.GdipSetImageAttributesColorMatrix (nativeImageAttr, - ColorAdjustType.Default, true, newColorMatrix, grayMatrix, mode); - - GDIPlus.CheckStatus (status); - } - - public void SetGamma(float gamma) - { - SetGamma (gamma, ColorAdjustType.Default); - } - - public void SetGamma(float gamma, ColorAdjustType coloradjust) - { - Status status = GDIPlus.GdipSetImageAttributesGamma (nativeImageAttr, coloradjust, true, - gamma); - - GDIPlus.CheckStatus (status); - } - - public void SetNoOp() - { - SetNoOp (ColorAdjustType.Default); - } - - public void SetNoOp(ColorAdjustType type) - { - Status status = GDIPlus.GdipSetImageAttributesNoOp (nativeImageAttr, - type, true); - - GDIPlus.CheckStatus (status); - } - - public void SetOutputChannel(ColorChannelFlag flags) - { - SetOutputChannel (flags, ColorAdjustType.Default); - } - - public void SetOutputChannel(ColorChannelFlag flags, ColorAdjustType type) - { - Status status = GDIPlus.GdipSetImageAttributesOutputChannel (nativeImageAttr, - type, true, flags); - - GDIPlus.CheckStatus (status); - } - - public void SetOutputChannelColorProfile(string colorProfileFilename) - { - SetOutputChannelColorProfile (colorProfileFilename, ColorAdjustType.Default); - } - - public void SetOutputChannelColorProfile(string colorProfileFilename, ColorAdjustType type) - { - Status status = GDIPlus.GdipSetImageAttributesOutputChannelColorProfile (nativeImageAttr, - type, true, colorProfileFilename); - - GDIPlus.CheckStatus (status); - } - - public void SetRemapTable(ColorMap[] map) - { - SetRemapTable (map, ColorAdjustType.Default); - } - - - public void SetRemapTable(ColorMap[] map, ColorAdjustType type) - { - GdiColorMap gdiclr = new GdiColorMap (); - IntPtr clrmap, lpPointer; - int mapsize = Marshal.SizeOf (gdiclr); - int size = mapsize * map.Length; - clrmap = lpPointer = Marshal.AllocHGlobal (size); - - for (int i=0; i < map.Length; i++) - { - gdiclr.from = map[i].OldColor.ToArgb(); - gdiclr.to = map[i].NewColor.ToArgb(); - - Marshal.StructureToPtr (gdiclr, lpPointer, false); - lpPointer = (IntPtr) (lpPointer.ToInt32() + mapsize); - } - - Status status = GDIPlus.GdipSetImageAttributesRemapTable (nativeImageAttr, - type, true, (uint) map.Length, clrmap); - - Marshal.FreeHGlobal (clrmap); - - GDIPlus.CheckStatus (status); - - } - - public void SetThreshold(float threshold) - { - SetThreshold (threshold, ColorAdjustType.Default); - } - - public void SetThreshold(float threshold, ColorAdjustType type) - { - Status status = GDIPlus.GdipSetImageAttributesThreshold (nativeImageAttr, - type, true, 0); - - GDIPlus.CheckStatus (status); - } - - public void SetWrapMode(WrapMode mode) - { - SetWrapMode (mode, Color.Black); - } - - - public void SetWrapMode(WrapMode mode, Color color) - { - SetWrapMode (mode, color, false); - } - - - public void SetWrapMode(WrapMode mode, Color color, bool clamp) - { - Status status = GDIPlus.GdipSetImageAttributesWrapMode (nativeImageAttr, mode, - color.ToArgb(), clamp); - - GDIPlus.CheckStatus (status); - } - - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Imaging/ImageAttributes.jvm.cs b/mcs/class/System.Drawing/System.Drawing.Imaging/ImageAttributes.jvm.cs deleted file mode 100755 index 93df3b86ca1..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Imaging/ImageAttributes.jvm.cs +++ /dev/null @@ -1,303 +0,0 @@ - -using System; -using System.Drawing; -using System.Drawing.Drawing2D; - -namespace System.Drawing.Imaging -{ - /// - /// Summary description for ImageAttributes. - /// - /// - public sealed class ImageAttributes : ICloneable, IDisposable - { - - public ImageAttributes() - { - } - - public void Dispose() - { - } - - - public void Finalize() - { - Dispose(); - } - - public Object Clone() - { - ImageAttributes imgAttr = new ImageAttributes(); - imgAttr.clrMatrix = clrMatrix; - imgAttr.clrMatrixFlag = clrMatrixFlag; - imgAttr.clrAdjustType = clrAdjustType; - imgAttr.gMatrix = gMatrix; - imgAttr.thresh = thresh; - imgAttr.gamma = gamma; - imgAttr.clrChannelFlags = clrChannelFlags; - imgAttr.clrProfileFilename = clrProfileFilename; - imgAttr.clrLow = clrLow; - imgAttr.clrHigh = clrHigh; - imgAttr.clrMap = clrMap; - imgAttr.wrapMode = wrapMode; - imgAttr.col = col; - imgAttr.bClamp = bClamp; - imgAttr.clrPalette = clrPalette; - imgAttr.bNoOp = bNoOp; - return imgAttr; - } - - - public void SetColorMatrix(ColorMatrix newColorMatrix) - { - SetColorMatrix(newColorMatrix, ColorMatrixFlag.Default, ColorAdjustType.Default); - } - - public void SetColorMatrix(ColorMatrix newColorMatrix, ColorMatrixFlag flags) - { - SetColorMatrix(newColorMatrix, flags, ColorAdjustType.Default); - } - - public void SetColorMatrix(ColorMatrix newColorMatrix, ColorMatrixFlag mode, ColorAdjustType type) - { - clrMatrix = newColorMatrix; - clrMatrixFlag = mode; - clrAdjustType = type; - } - - public void ClearColorMatrix() - { - ClearColorMatrix(ColorAdjustType.Default); - } - - public void ClearColorMatrix(ColorAdjustType type) - { - ColorMatrix cm = new ColorMatrix(); - clrMatrix = cm; - clrAdjustType = type; - } - - public void SetColorMatrices(ColorMatrix newColorMatrix, ColorMatrix gMatrix) - { - SetColorMatrices(newColorMatrix, gMatrix, ColorMatrixFlag.Default, ColorAdjustType.Default); - } - - public void SetColorMatrices(ColorMatrix newColorMatrix, ColorMatrix gMatrix, ColorMatrixFlag flags) - { - SetColorMatrices(newColorMatrix, gMatrix, flags, ColorAdjustType.Default); - } - - public void SetColorMatrices(ColorMatrix newColorMatrix, ColorMatrix gMatrix, ColorMatrixFlag mode, ColorAdjustType type) - { - clrMatrix = newColorMatrix; - this.gMatrix = gMatrix; - clrMatrixFlag = mode; - clrAdjustType = type; - } - - public void SetThreshold(float thresh) - { - SetThreshold(thresh, ColorAdjustType.Default); - } - - public void SetThreshold(float thresh, ColorAdjustType type) - { - this.thresh = thresh; - clrAdjustType = type; - } - - public void ClearThreshold() - { - ClearThreshold(ColorAdjustType.Default); - } - - public void ClearThreshold(ColorAdjustType type) - { - thresh = 1.0F; - clrAdjustType = type; - } - - public void SetGamma(float gamma) - { - SetGamma(gamma, ColorAdjustType.Default); - } - - public void SetGamma(float gamma, ColorAdjustType type) - { - this.gamma = gamma; - clrAdjustType = type; - return; - } - - public void ClearGamma() - { - ClearGamma(ColorAdjustType.Default); - } - - public void ClearGamma(ColorAdjustType type) - { - gamma = 1; - clrAdjustType = type; - } - - public void SetNoOp() - { - SetNoOp(ColorAdjustType.Default); - } - - public void SetNoOp(ColorAdjustType type) - { - bNoOp = true; - clrAdjustType = type; - } - - public void ClearNoOp() - { - ClearNoOp(ColorAdjustType.Default); - } - - public void ClearNoOp(ColorAdjustType type) - { - bNoOp = false; - clrAdjustType = type; - } - - public void SetColorKey(Color clrLow, Color clrHigh) - { - SetColorKey(clrLow, clrHigh, ColorAdjustType.Default); - } - - public void SetColorKey(Color clrLow, Color clrHigh, ColorAdjustType type) - { - this.clrLow = clrLow; - this.clrHigh = clrHigh; - clrAdjustType = type; - } - - public void ClearColorKey() - { - ClearColorKey(ColorAdjustType.Default); - } - - public void ClearColorKey(ColorAdjustType type) - { - clrAdjustType = type; - } - - public void SetOutputChannel(ColorChannelFlag flags) - { - SetOutputChannel(flags, ColorAdjustType.Default); - } - - public void SetOutputChannel(ColorChannelFlag flags, ColorAdjustType type) - { - clrChannelFlags = flags; - clrAdjustType = type; - } - - public void ClearOutputChannel() - { - ClearOutputChannel(ColorAdjustType.Default); - } - - public void ClearOutputChannel(ColorAdjustType type) - { - clrAdjustType = type; - } - - public void SetOutputChannelColorProfile(String clrProfileFilename) - { - SetOutputChannelColorProfile(clrProfileFilename, ColorAdjustType.Default); - } - - public void SetOutputChannelColorProfile(String clrProfileFilename, ColorAdjustType type) - { - this.clrProfileFilename = clrProfileFilename; - clrAdjustType = type; - } - - public void ClearOutputChannelColorProfile() - { - ClearOutputChannel(ColorAdjustType.Default); - } - - public void ClearOutputChannelColorProfile(ColorAdjustType type) - { - clrProfileFilename = null; - clrAdjustType = type; - } - - public void SetRemapTable(ColorMap[] map) - { - SetRemapTable(map, ColorAdjustType.Default); - } - - public void SetRemapTable(ColorMap[] map, ColorAdjustType type) - { - clrMap = map; - clrAdjustType = type; - } - - public void ClearRemapTable() - { - ClearRemapTable(ColorAdjustType.Default); - } - - public void ClearRemapTable(ColorAdjustType type) - { - clrMap = null; - clrAdjustType = type; - } - - public void SetBrushRemapTable(ColorMap []map) - { - SetRemapTable(map, ColorAdjustType.Brush); - } - - public void ClearBrushRemapTable() - { - ClearRemapTable(ColorAdjustType.Brush); - } - - public void SetWrapMode(WrapMode mode) - { - SetWrapMode(mode, new Color(), false); - } - - public void SetWrapMode(WrapMode mode, Color clr) - { - SetWrapMode(mode, clr, false); - } - - public void SetWrapMode(WrapMode mode, Color clr, bool bClamp) - { - wrapMode = mode; - col = clr; - this.bClamp = bClamp; - } - - public void GetAdjustedPalette(ColorPalette palette, ColorAdjustType type) - { - clrPalette = palette; - clrAdjustType = type; - } - - public ColorMatrix clrMatrix; - public ColorMatrixFlag clrMatrixFlag; - public ColorAdjustType clrAdjustType; - public ColorMatrix gMatrix; - public float thresh; - public float gamma; - public ColorChannelFlag clrChannelFlags; - public string clrProfileFilename; - public Color clrLow; - public Color clrHigh; - public ColorMap[] clrMap; - public WrapMode wrapMode; - public Color col; - public bool bClamp; - public ColorPalette clrPalette; - public bool bNoOp; - } -} \ No newline at end of file diff --git a/mcs/class/System.Drawing/System.Drawing.Imaging/ImageCodec.jvm.cs b/mcs/class/System.Drawing/System.Drawing.Imaging/ImageCodec.jvm.cs deleted file mode 100644 index a12262bcef1..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Imaging/ImageCodec.jvm.cs +++ /dev/null @@ -1,642 +0,0 @@ -using System; -using System.Configuration; -using System.Collections; -using System.Collections.Specialized; -using System.Drawing.Imaging; -using System.Xml; -using Mainsoft.Drawing.Configuration; - -using imageio = javax.imageio; -using stream = javax.imageio.stream; -using awt = java.awt; -using image = java.awt.image; -using spi = javax.imageio.spi; -using dom = org.w3c.dom; - -namespace Mainsoft.Drawing.Imaging { - /// - /// Summary description for ImageCodec. - /// - public class ImageCodec { - - #region Members - - imageio.ImageReader _nativeReader = null; - imageio.ImageWriter _nativeWriter = null; - stream.ImageInputStream _nativeStream = null; - - ImageFormat _imageFormat = null; - - int _currentFrame = 0; - - #endregion - - #region Constructros - - protected ImageCodec() { - } - - static ImageCodec() { - } - - #endregion - - #region Internal properties - - internal imageio.ImageReader NativeReader { - get { return _nativeReader; } - set { - _nativeReader = value; - _imageFormat = MimeTypesToImageFormat( value.getOriginatingProvider().getMIMETypes() ); - } - } - internal imageio.ImageWriter NativeWriter { - get { return _nativeWriter; } - set { - _nativeWriter = value; - _imageFormat = MimeTypesToImageFormat( value.getOriginatingProvider().getMIMETypes() ); - } - } - - internal stream.ImageInputStream NativeStream { - get { return _nativeStream; } - set { - if (value == null) - throw new ArgumentNullException("stream"); - - _nativeStream = value; - - if (NativeReader != null) - NativeReader.setInput( value ); - - if (NativeWriter != null) - NativeWriter.setOutput( value ); - } - } - - #endregion - - #region ImageCodec factory methods - - public static ImageCodec CreateReader(stream.ImageInputStream inputStream) { - java.util.Iterator iter = imageio.ImageIO.getImageReaders( inputStream ); - return CreateReader(iter); - } - - public static ImageCodec CreateReader(ImageFormat imageFormat) { - return CreateReader( ImageFormatToClsid( imageFormat ) ); - } - - public static ImageCodec CreateReader(Guid clsid) { - ImageCodecInfo codecInfo = (ImageCodecInfo) Decoders[clsid]; - java.util.Iterator iter = imageio.ImageIO.getImageReadersByMIMEType( codecInfo.MimeType ); - return CreateReader(iter); - } - - private static ImageCodec CreateReader(java.util.Iterator iter) { - if ( !iter.hasNext() ) - throw new OutOfMemoryException ("Out of memory"); - - ImageCodec imageCodec = new ImageCodec(); - imageCodec.NativeReader = (imageio.ImageReader) iter.next(); - return imageCodec; - } - - public static ImageCodec CreateWriter(ImageFormat imageFormat) { - return CreateWriter( ImageFormatToClsid( imageFormat ) ); - } - - public static ImageCodec CreateWriter(Guid clsid) { - ImageCodecInfo codecInfo = (ImageCodecInfo) Encoders[clsid]; - java.util.Iterator iter = imageio.ImageIO.getImageWritersByMIMEType( codecInfo.MimeType ); - return CreateWriter(iter); - } - - public static ImageCodec CreateWriter(java.util.Iterator iter) { - if ( !iter.hasNext() ) - throw new OutOfMemoryException ("Out of memory"); - - ImageCodec imageCodec = new ImageCodec(); - imageCodec.NativeWriter = (imageio.ImageWriter) iter.next(); - return imageCodec; - } - - #endregion - - #region Codec enumerations - - internal static Hashtable Decoders { - get { - const string MYNAME = "System.Drawing.Imaging.ImageCodecInfo.decoders"; - Hashtable o = (Hashtable) AppDomain.CurrentDomain.GetData (MYNAME); - if (o != null) - return o; - o = new ReaderSpiIterator().Iterate(); - AppDomain.CurrentDomain.SetData(MYNAME, o); - return o; - } - } - - internal static Hashtable Encoders { - get { - const string MYNAME = "System.Drawing.Imaging.ImageCodecInfo.encoders"; - Hashtable o = (Hashtable) AppDomain.CurrentDomain.GetData (MYNAME); - if (o != null) - return o; - o = new WriterSpiIterator().Iterate(); - AppDomain.CurrentDomain.SetData(MYNAME, o); - return o; - } - } - - internal static ImageCodecInfo FindEncoder (Guid clsid) { - return (ImageCodecInfo) Encoders[clsid]; - } - - internal static ImageCodecInfo FindDecoder (Guid clsid) { - return (ImageCodecInfo) Decoders[clsid]; - } - - #endregion - - #region SpiIterators - - abstract class BaseSpiIterator { - protected abstract java.util.Iterator GetIterator (string mimeType); - protected abstract spi.ImageReaderWriterSpi GetNext (java.util.Iterator iter); - - #region ProcessOneCodec - private ImageCodecInfo ProcessOneCodec (Guid clsid, Guid formatID, string mimeType) { - ImageCodecInfo ici = new ImageCodecInfo (); - ici.Clsid = clsid; - ici.FormatID = formatID; - ici.MimeType = mimeType; - java.util.Iterator iter = GetIterator (mimeType); - while (iter.hasNext ()) { - spi.ImageReaderWriterSpi rw = GetNext (iter); - try { - ici.CodecName = rw.getDescription (java.util.Locale.getDefault ()); - ici.DllName = null; - foreach (string suffix in rw.getFileSuffixes ()) { - if (ici.FilenameExtension != null) - ici.FilenameExtension += ";"; - ici.FilenameExtension += "*."+suffix; - } - ici.Flags = ImageCodecFlags.Builtin|ImageCodecFlags.SupportBitmap; - if (rw is spi.ImageReaderSpi) { - ici.Flags |= ImageCodecFlags.Decoder; - if ((rw as spi.ImageReaderSpi).getImageWriterSpiNames().Length != 0) - ici.Flags |= ImageCodecFlags.Encoder; - } - if (rw is spi.ImageWriterSpi) { - ici.Flags |= ImageCodecFlags.Encoder; - if ((rw as spi.ImageWriterSpi).getImageReaderSpiNames().Length != 0) - ici.Flags |= ImageCodecFlags.Decoder; - } - ici.FormatDescription = string.Join(";", - rw.getFormatNames()); - ici.Version = (int)Convert.ToDouble(rw.getVersion ()); - break; - } - catch { - } - } - return ici; - } - #endregion - - internal Hashtable Iterate () { - // TBD: Insert Exception handling here - NameValueCollection nvc = (NameValueCollection) System.Configuration.ConfigurationSettings - .GetConfig ("system.drawing/codecs"); - Hashtable codecs = new Hashtable (10); - - for (int i=0; i 0) { - thArray = new awt.Image[ tmbNumber ]; - - for (int i = 0; i < tmbNumber; i++) { - thArray[i] = NativeReader.readThumbnail(frameIndex, i); - } - } - } - return thArray; - } - catch (java.io.IOException ex) { - throw new System.IO.IOException(ex.Message, ex); - } - } -#endif - public void WritePlainImage(PlainImageCollection pic) { - if ((pic == null) || (pic.Count == 0)) - return; - - if (pic.Count == 1) { - WritePlainImage( pic[0] ); - return; - } - - try { - if (NativeWriter.canWriteSequence ()) { - NativeWriter.prepareWriteSequence (null); - for (int i=0; i < pic.Count; i++) { - imageio.IIOImage iio = GetIIOImageContainer( pic[i] ); - NativeWriter.writeToSequence (iio, null); - } - NativeWriter.endWriteSequence (); - } - else - WritePlainImage( pic[0] ); - } - catch (java.io.IOException ex) { - throw new System.IO.IOException(ex.Message, ex); - } - } - - public void WritePlainImage(PlainImage pi) { - try { - imageio.IIOImage iio = GetIIOImageContainer( pi ); - WriteImage( iio ); - } - catch (java.io.IOException ex) { - throw new System.IO.IOException(ex.Message, ex); - } - } - - private void WriteImage(imageio.IIOImage iio) { - if (NativeStream == null) - throw new Exception("Output stream not specified"); - - NativeWriter.write( iio ); - } - - private imageio.IIOImage GetIIOImageContainer(PlainImage pi) { - java.util.ArrayList al = null; - - // prepare thumbnails list - if (pi.Thumbnails != null) { - al = new java.util.ArrayList( pi.Thumbnails.Length ); - for (int i=0; i < pi.Thumbnails.Length; i++) - al.add(pi.Thumbnails[i]); - } - - // prepare IIOImage container - if (pi.NativeImage is image.BufferedImage) { - imageio.IIOImage iio = new javax.imageio.IIOImage( - (image.BufferedImage)pi.NativeImage, al, pi.NativeMetadata); - return iio; - } - else - // TBD: This codec is for raster formats only - throw new NotSupportedException("Only raster formats are supported"); - } - - - private imageio.metadata.IIOMetadata ReadImageMetadata(int frameIndex) { - if (NativeStream == null) - throw new Exception("Input stream not specified"); - - try { - imageio.metadata.IIOMetadata md = NativeReader.getImageMetadata( frameIndex ); - return md; - } - catch (java.io.IOException ex) { - throw new System.IO.IOException(ex.Message, ex); - } - } - - #endregion - - #region Extra properties - - public ImageFormat ImageFormat { - get { return _imageFormat; } - } - - #endregion - - #region Metadata parse - - private float [] GetResolution(XmlDocument metaData) { - if (metaData == null) - return new float[]{0, 0}; - - ResolutionConfigurationCollection rcc = - (ResolutionConfigurationCollection) - ConfigurationSettings.GetConfig("system.drawing/codecsmetadata"); - - if (rcc == null) - throw new ConfigurationException("Configuration section codecsmetadata not found"); - - ResolutionConfiguration rc = rcc[ ImageFormat.ToString() ]; - - if (rc == null) - return new float[]{0, 0}; - - // Horizontal resolution - string xResPath = rc.XResPath; - string xRes; - - if (xResPath == string.Empty) - xRes = rc.XResDefault; - else - xRes = GetValueFromMetadata(metaData, xResPath); - - if ((xRes == null) || (xRes == string.Empty)) - xRes = rc.XResDefault; - - // Vertical resolution - string yResPath = rc.YResPath; - string yRes; - - if (yResPath == string.Empty) - yRes = rc.YResDefault; - else - yRes = GetValueFromMetadata(metaData, yResPath); - - if ((yRes == null) || (yRes == string.Empty)) - yRes = rc.YResDefault; - - // Resolution units - string resUnitsPath = rc.UnitsTypePath; - string resUnitsType; - - if (resUnitsPath == string.Empty) - resUnitsType = rc.UnitsTypeDefault; - else - resUnitsType = GetValueFromMetadata(metaData, resUnitsPath); - - if (resUnitsType == null) - resUnitsType = rc.UnitsTypeDefault; - - // Unit scale - string unitScale = rc.UnitsScale[resUnitsType].ToString(); - - // Adjust resolution to its units - float [] res = new float[2]; - res[0] = ParseFloatValue(xRes) * ParseFloatValue(unitScale); - res[1] = ParseFloatValue(yRes) * ParseFloatValue(unitScale); - - return res; - } - - private string GetValueFromMetadata(XmlDocument metaData, string path) { - XmlNode n = metaData.SelectSingleNode(path); - if (n == null) - return null; - - return n.InnerText; - } - - private XmlDocument ConvertImageMetadata(imageio.metadata.IIOMetadata metaData) { - string [] formatNames = metaData.getMetadataFormatNames(); - dom.Element rootNode = (dom.Element) metaData.getAsTree(formatNames[0]); - - XmlDocument _metadataDocument = new XmlDocument(); - XmlConvert(rootNode, _metadataDocument); - - return _metadataDocument; - } - - private void XmlConvert(dom.Node jNode, XmlNode nNode) { - XmlDocument document = nNode.OwnerDocument; - if (document == null) - document = (XmlDocument)nNode; - - XmlNode n = null; - switch (jNode.getNodeType()) { - case 1 : - n = document.CreateNode(XmlNodeType.Element, jNode.getNodeName(), jNode.getNamespaceURI()); - break; - - case 4 : - n = document.CreateNode(XmlNodeType.CDATA, jNode.getNodeName(), jNode.getNamespaceURI()); - break; - - default: - return; - } - //set value - n.InnerText = jNode.getNodeValue(); - nNode.AppendChild( n ); - - //copy attributes - org.w3c.dom.NamedNodeMap nm = jNode.getAttributes(); - for (int i=0; i - - * InvalidPrinterException.cs: Removed NotImplementedException (not - required) and added a demand for SerializationFormatter on the - GetObjectData method. - * PrintingPermission.cs: Throw ArgumentException if the class or - version attributes are missing in the supplied XML (only in 1.x). - -2005-03-23 Jordi Mas i Hernandez - * PaperKind.cs: fixes wrong enum values - -2005-01-27 Lluis Sanchez Gual - - * MarginsConverter.cs: Implemented support for InstanceDescriptor. diff --git a/mcs/class/System.Drawing/System.Drawing.Printing/Duplex.cs b/mcs/class/System.Drawing/System.Drawing.Printing/Duplex.cs deleted file mode 100644 index dd90e0f98f4..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Printing/Duplex.cs +++ /dev/null @@ -1,39 +0,0 @@ -// -// System.Drawing.Duplex.cs -// -// (C) 2001 Ximian, Inc. http://www.ximian.com -// Author: Dennis Hayes (dennish@raytek.com) -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -using System; -namespace System.Drawing.Printing -{ - public enum Duplex { - Default = -1, - Horizontal = 3, - Simplex = 1, - Vertical = 2 - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Printing/InvalidPrinterException.cs b/mcs/class/System.Drawing/System.Drawing.Printing/InvalidPrinterException.cs deleted file mode 100644 index 9ee8b733b7f..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Printing/InvalidPrinterException.cs +++ /dev/null @@ -1,64 +0,0 @@ -// -// System.Drawing.InvalidPrinterExecption.cs -// -// Author: -// Dennis Hayes (dennish@Raytek.com) -// -// (C) 2002 Ximian, Inc -// - -// -// Copyright (C) 2004-2005 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System.Runtime.Serialization; -using System.Security.Permissions; - -namespace System.Drawing.Printing { - -#if NET_2_0 - [Serializable] -#endif - public class InvalidPrinterException : SystemException { - - private PrinterSettings settings; - - public InvalidPrinterException (PrinterSettings settings) - { - this.settings = settings; - } - - protected InvalidPrinterException (SerializationInfo info, StreamingContext context) - : base (info, context) - { - } - - [SecurityPermission (SecurityAction.Demand, SerializationFormatter = true)] - public override void GetObjectData (SerializationInfo info, StreamingContext context) - { - if (info == null) - throw new ArgumentNullException ("info"); - - base.GetObjectData (info, context); - } - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Printing/Margins.cs b/mcs/class/System.Drawing/System.Drawing.Printing/Margins.cs deleted file mode 100644 index f505533dde4..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Printing/Margins.cs +++ /dev/null @@ -1,148 +0,0 @@ -// -// System.Drawing.Margins.cs -// -// Authors: -// Dennis Hayes (dennish@Raytek.com) -// Andreas Nahr (ClassDevelopment@A-SoftTech.com) -// -// (C) 2002 Ximian, Inc -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; -using System.ComponentModel; - -namespace System.Drawing.Printing -{ - [TypeConverter (typeof (MarginsConverter))] - public class Margins : ICloneable - { - int left; - int right; - int top; - int bottom; - - public Margins() - { - left = 100; - right = 100; - top = 100; - bottom = 100; - } - - public Margins(int left, int right, int top, int bottom) - { - //Verify parameters - if (left < 0) - throw new System.ArgumentException("All Margins must be greater than 0", "left"); - if (right < 0) - throw new System.ArgumentException("All Margins must be greater than 0", "right"); - if (top < 0) - throw new System.ArgumentException("All Margins must be greater than 0", "top"); - if (bottom < 0) - throw new System.ArgumentException("All Margins must be greater than 0", "bottom"); - - //Set proprities - this.left = left; - this.right = right; - this.top = top; - this.bottom = bottom; - } - - public int Left { - get { - return left; - } - set { - if (left < 0) - throw new System.ArgumentException("All Margins must be greater than 0", "left"); - left = value; - } - } - - public int Right { - get { - return right; - } - set { - if (right < 0) - throw new System.ArgumentException("All Margins must be greater than 0", "left"); - right = value; - } - } - - public int Top { - get { - return top; - } - set { - if (top < 0) - throw new System.ArgumentException("All Margins must be greater than 0", "left"); - top = value; - } - } - - public int Bottom { - get { - return bottom; - } - set { - if (bottom < 0) - throw new System.ArgumentException("All Margins must be greater than 0", "left"); - bottom = value; - } - } - - public object Clone() - { - return new Margins (this.Left, this.Right, this.Top, this.Bottom); - } - - public override bool Equals (object obj) - { - Margins m = obj as Margins; - - if (m == null) - return false; - if (m.Left == left && m.Right == right && m.Top == top && m.Bottom == bottom) - return true; - - return false; - } - - public override int GetHashCode () - { - // Try to create a somewhat meaningful hash - int hash = left + right * 2^8 + top * 2^16 + bottom * 2^24; - return hash; - } - - public override string ToString() - { - string ret = "[Margins Left={0} Right={1} Top={2} Bottom={3}]"; - return String.Format (ret, this.Left, this.Right, this.Top, this.Bottom); - } - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Printing/MarginsConverter.cs b/mcs/class/System.Drawing/System.Drawing.Printing/MarginsConverter.cs deleted file mode 100644 index c437a1c4b68..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Printing/MarginsConverter.cs +++ /dev/null @@ -1,137 +0,0 @@ -// -// System.Drawing.MarginsConverter.cs -// -// Author: -// Dennis Hayes (dennish@Raytek.com) -// Herve Poussineau (hpoussineau@fr.st) -// -// (C) 2002 Ximian, Inc -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -using System; -using System.ComponentModel; -using System.Globalization; -using System.Text.RegularExpressions; -using System.ComponentModel.Design.Serialization; -using System.Reflection; - -namespace System.Drawing.Printing { - /// - /// Summary description for MarginsConverter. - /// - public class MarginsConverter : ExpandableObjectConverter { - public MarginsConverter() { - } - #region Methods - public override bool CanConvertFrom(ITypeDescriptorContext context,Type sourceType) { - if (sourceType == typeof(string)) - return true; - - return base.CanConvertFrom(context, sourceType); - } - - public override bool CanConvertTo(ITypeDescriptorContext context,Type destinationType) { - if (destinationType == typeof(string)) - return true; - - if (destinationType == typeof (InstanceDescriptor)) - return true; - - return base.CanConvertTo(context, destinationType); - } - - public override object ConvertFrom(ITypeDescriptorContext context,CultureInfo culture,object value) { - if (value is string) - { - if (value == null) - return new Margins(); - - // format [left];[right];[top];[bottom] - string separator = @"( |\t)*"; - separator = separator + ";" + separator; - string regex = @"(?\d+)" + separator + @"(?\d+)" + separator + @"(?\d+)" + separator + @"(?\d+)"; - - Match match = new Regex(regex).Match(value as string); - if (!match.Success) - throw new ArgumentException("value"); - - int left, right, top, bottom; - try - { - left = int.Parse(match.Groups["left"].Value); - right = int.Parse(match.Groups["right"].Value); - top = int.Parse(match.Groups["top"].Value); - bottom = int.Parse(match.Groups["bottom"].Value); - } - catch (Exception e) - { - throw new ArgumentException("value", e); - } - return new Margins(left, right, top, bottom); - } else - return base.ConvertFrom(context, culture, value); - } - - public override object ConvertTo(ITypeDescriptorContext context,CultureInfo culture,object value,Type destinationType) { - if (destinationType == typeof(string) && value is Margins) - { - Margins source = value as Margins; - string ret = "{0}; {1}; {2}; {3}"; - return String.Format(ret, source.Left, source.Right, source.Top, source.Bottom); - } - if (destinationType == typeof (InstanceDescriptor) && value is Margins) { - Margins c = (Margins) value; - ConstructorInfo ctor = typeof(Margins).GetConstructor (new Type[] {typeof(int), typeof(int), typeof(int), typeof(int)} ); - return new InstanceDescriptor (ctor, new object[] {c.Left, c.Right, c.Top, c.Bottom}); - } - - return base.ConvertTo(context, culture, value, destinationType); - } - - public override bool GetCreateInstanceSupported(ITypeDescriptorContext context) - { - return true; - } - - public override object CreateInstance(ITypeDescriptorContext context, System.Collections.IDictionary propertyValues) - { - try - { - Margins margins = new Margins(); - margins.Left = int.Parse(propertyValues["Left"].ToString()); - margins.Right = int.Parse(propertyValues["Right"].ToString()); - margins.Top = int.Parse(propertyValues["Top"].ToString()); - margins.Bottom = int.Parse(propertyValues["Bottom"].ToString()); - return margins; - } - catch (Exception) - { - // in case of error, return null - return null; - } - } - #endregion - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Printing/PageSettings.cs b/mcs/class/System.Drawing/System.Drawing.Printing/PageSettings.cs deleted file mode 100644 index 1c63fd247c1..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Printing/PageSettings.cs +++ /dev/null @@ -1,189 +0,0 @@ -// -// System.Drawing.PageSettings.cs -// -// Authors: -// Dennis Hayes (dennish@Raytek.com) -// Herve Poussineau (hpoussineau@fr.st) -// Andreas Nahr (ClassDevelopment@A-SoftTech.com) -// -// (C) 2002 Ximian, Inc -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; -using System.Runtime.InteropServices; - -namespace System.Drawing.Printing -{ - [ComVisible (false)] - public class PageSettings : ICloneable - { - bool _Color; - bool _Landscape; - // create a new default Margins object (is 1 inch for all margins) - Margins _Margins = new Margins(); - PaperSize _PaperSize; - PaperSource _PaperSource; - PrinterResolution _PrinterResolution; - PrinterSettings _PrinterSettings; - - public PageSettings() : this(new PrinterSettings()) - { - } - - public PageSettings(PrinterSettings printerSettings) - { - PrinterSettings = printerSettings; - - Color = printerSettings.DefaultPageSettings.Color; - Landscape = printerSettings.DefaultPageSettings.Landscape; - PaperSize = printerSettings.DefaultPageSettings.PaperSize; - PaperSource = printerSettings.DefaultPageSettings.PaperSource; - PrinterResolution = printerSettings.DefaultPageSettings.PrinterResolution; - } - - // used by PrinterSettings.DefaultPageSettings - internal PageSettings(PrinterSettings printerSettings, bool color, bool landscape, PaperSize paperSize, PaperSource paperSource, PrinterResolution printerResolution) - { - PrinterSettings = printerSettings; - - Color = color; - Landscape = landscape; - PaperSize = paperSize; - PaperSource = paperSource; - PrinterResolution = printerResolution; - } - - //props - public Rectangle Bounds{ - get{ - int width = this.PaperSize.Width; - int height = this.PaperSize.Height; - - width -= this.Margins.Left + this.Margins.Right; - height -= this.Margins.Top + this.Margins.Bottom; - - if (this.Landscape) { - // swap width and height - int tmp = width; - width = height; - height = tmp; - } - return new Rectangle(0, 0, width, height); - } - } - - public bool Color{ - get{ - return _Color; - } - set{ - _Color = value; - } - } - - public bool Landscape { - get{ - return _Landscape; - } - set{ - _Landscape = value; - } - } - - public Margins Margins{ - get{ - return _Margins; - } - set{ - _Margins = value; - } - } - - public PaperSize PaperSize{ - get{ - return _PaperSize; - } - set{ - _PaperSize = value; - } - } - - public PaperSource PaperSource{ - get{ - return _PaperSource; - } - set{ - _PaperSource = value; - } - } - - public PrinterResolution PrinterResolution{ - get{ - return _PrinterResolution; - } - set{ - _PrinterResolution = value; - } - } - - public PrinterSettings PrinterSettings{ - get{ - return _PrinterSettings; - } - set{ - _PrinterSettings = value; - } - } - - public object Clone(){ - return new PageSettings(this.PrinterSettings); - } - - - [MonoTODO("PageSettings.CopyToHdevmode")] - public void CopyToHdevmode (IntPtr hdevmode){ - throw new NotImplementedException (); - } - - - [MonoTODO("PageSettings.SetHdevmode")] - public void SetHdevmode (IntPtr hdevmode){ - throw new NotImplementedException (); - } - - public override string ToString(){ - string ret = "[PageSettings: Color={0}"; - ret += ", Landscape={1}"; - ret += ", Margins={2}"; - ret += ", PaperSize={3}"; - ret += ", PaperSource={4}"; - ret += ", PrinterResolution={5}"; - ret += "]"; - - return String.Format(ret, this.Color, this.Landscape, this.Margins, this.PaperSize, this.PaperSource, this.PrinterResolution); - } - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Printing/PaperKind.cs b/mcs/class/System.Drawing/System.Drawing.Printing/PaperKind.cs deleted file mode 100644 index ecb66971d78..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Printing/PaperKind.cs +++ /dev/null @@ -1,154 +0,0 @@ -// -// System.Drawing.PaperKind.cs -// -// (C) 2002 Ximian, Inc. http://www.ximian.com -// Author: Dennis Hayes (dennish@raytek.com) -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -using System; - -namespace System.Drawing.Printing -{ - public enum PaperKind - { - A2 = 66, - A3 = 8, - A3Extra = 63, - A3ExtraTransverse = 68, - A3Rotated = 76, - A3Transverse = 67, - A4 = 9, - A4Extra = 53, - A4Plus = 60, - A4Rotated = 77, - A4Small = 10, - A4Transverse = 55, - A5 = 11, - A5Extra = 64, - A5Rotated = 78, - A5Transverse = 61, - A6 = 70, - A6Rotated = 83, - APlus = 57, - B4 = 12, - B4Envelope = 33, - B4JisRotated = 79, - B5 = 13, - B5Envelope = 34, - B5Extra = 65, - B5JisRotated = 80, - B5Transverse = 62, - B6Envelope = 35, - B6Jis = 88, - B6JisRotated = 89, - BPlus = 58, - C3Envelope = 29, - C4Envelope = 30, - C5Envelope = 28, - C65Envelope = 32, - C6Envelope = 31, - CSheet = 24, - Custom = 0, - DLEnvelope = 27, - DSheet = 25, - ESheet = 26, - Executive = 7, - Folio = 14, - GermanLegalFanfold = 41, - GermanStandardFanfold = 40, - InviteEnvelope = 47, - IsoB4 = 42, - ItalyEnvelope = 36, - JapaneseDoublePostcard = 69, - JapaneseDoublePostcardRotated = 82, - JapaneseEnvelopeChouNumber3 = 73, - JapaneseEnvelopeChouNumber3Rotated = 86, - JapaneseEnvelopeChouNumber4 = 74, - JapaneseEnvelopeChouNumber4Rotated = 87, - JapaneseEnvelopeKakuNumber2 = 71, - JapaneseEnvelopeKakuNumber2Rotated = 84, - JapaneseEnvelopeKakuNumber3 = 72, - JapaneseEnvelopeKakuNumber3Rotated = 85, - JapaneseEnvelopeYouNumber4 = 91, - JapaneseEnvelopeYouNumber4Rotated = 92, - JapanesePostcard = 43, - JapanesePostcardRotated = 81, - Ledger = 4, - Legal = 5, - LegalExtra = 51, - Letter = 1, - LetterExtra = 50, - LetterExtraTransverse = 56, - LetterPlus = 59, - LetterRotated = 75, - LetterSmall = 2, - LetterTransverse = 54, - MonarchEnvelope = 37, - Note = 18, - Number10Envelope = 20, - Number11Envelope = 21, - Number12Envelope = 22, - Number14Envelope = 23, - Number9Envelope = 19, - PersonalEnvelope = 38, - Prc16K = 93, - Prc16KRotated = 106, - Prc32K = 94, - Prc32KBig = 95, - Prc32KBigRotated = 108, - Prc32KRotated = 107, - PrcEnvelopeNumber1 = 96, - PrcEnvelopeNumber10 = 105, - PrcEnvelopeNumber10Rotated = 118, - PrcEnvelopeNumber1Rotated = 109, - PrcEnvelopeNumber2 = 97, - PrcEnvelopeNumber2Rotated = 110, - PrcEnvelopeNumber3 = 98, - PrcEnvelopeNumber3Rotated = 111, - PrcEnvelopeNumber4 = 99, - PrcEnvelopeNumber4Rotated = 112, - PrcEnvelopeNumber5 = 100, - PrcEnvelopeNumber5Rotated = 113, - PrcEnvelopeNumber6 = 101, - PrcEnvelopeNumber6Rotated = 114, - PrcEnvelopeNumber7 = 102, - PrcEnvelopeNumber7Rotated = 115, - PrcEnvelopeNumber8 = 103, - PrcEnvelopeNumber8Rotated = 116, - PrcEnvelopeNumber9 = 104, - PrcEnvelopeNumber9Rotated = 117, - Quarto = 15, - Standard10x11 = 45, - Standard10x14 = 16, - Standard11x17 = 17, - Standard12x11 = 90, - Standard15x11 = 46, - Standard9x11 = 44, - Statement = 6, - Tabloid = 3, - TabloidExtra = 52, - USStandardFanfold = 39 - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Printing/PaperSize.cs b/mcs/class/System.Drawing/System.Drawing.Printing/PaperSize.cs deleted file mode 100644 index 4a4d59a0126..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Printing/PaperSize.cs +++ /dev/null @@ -1,97 +0,0 @@ -// -// System.Drawing.PaperSize.cs -// -// Author: -// Dennis Hayes (dennish@Raytek.com) -// Herve Poussineau (hpoussineau@fr.st) -// -// (C) 2002 Ximian, Inc -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -using System; - -namespace System.Drawing.Printing -{ - /// - /// Summary description for PaperSize. - /// - public class PaperSize - { - string name; - int width; - int height; - PaperKind kind; - - public PaperSize(string name, int width, int height) - { - this.width = width; - this.height = height; - this.name = name; - this.kind = PaperKind.Custom; - } - public int Width{ - get{ - return width; - }set - { - if (Kind != PaperKind.Custom) - throw new ArgumentException(); - width = value; - } - } - public int Height{ - get{ - return height; - }set - { - if (Kind != PaperKind.Custom) - throw new ArgumentException(); - height = value; - } - } - - public string PaperName{ - get{ - return name; - } - set{ - if (Kind != PaperKind.Custom) - throw new ArgumentException(); - name = value; - } - } - - public PaperKind Kind{ - get{ - return kind; - } - } - - public override string ToString(){ - string ret = "[PaperSize {0} Kind={1} Height={2} Width={3}]"; - return String.Format(ret, this.PaperName, this.Kind, this.Height, this.Width); - } - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Printing/PaperSource.cs b/mcs/class/System.Drawing/System.Drawing.Printing/PaperSource.cs deleted file mode 100644 index 7c4026acb62..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Printing/PaperSource.cs +++ /dev/null @@ -1,66 +0,0 @@ -// -// System.Drawing.PaperSource.cs -// -// Author: -// Dennis Hayes (dennish@Raytek.com) -// Herve Poussineau (hpoussineau@fr.st) -// -// (C) 2002 Ximian, Inc -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -using System; - -namespace System.Drawing.Printing -{ - /// - /// Summary description for PaperSource. - /// - public class PaperSource - { - PaperSourceKind _Kind; - string _SourceName; - - // NOTE:how to construct this class? - // I have added a constructor, but I am not sure of me... - internal PaperSource(string sourceName, PaperSourceKind kind) - { - _SourceName = sourceName; - _Kind = kind; - } - - public PaperSourceKind Kind{ - get { - return _Kind; } - } - public string SourceName{ - get { - return _SourceName; } - } - public override string ToString(){ - string ret = "[PaperSource {0} Kind={1}]"; - return String.Format(ret, this.SourceName, this.Kind); - } - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Printing/PaperSourceKind.cs b/mcs/class/System.Drawing/System.Drawing.Printing/PaperSourceKind.cs deleted file mode 100644 index 14fdab3315a..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Printing/PaperSourceKind.cs +++ /dev/null @@ -1,49 +0,0 @@ -// -// System.Drawing.PaperSourceKind.cs -// -// (C) 2002 Ximian, Inc. http://www.ximian.com -// Author: Dennis Hayes (dennish@raytek.com) -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -using System; -namespace System.Drawing.Printing -{ - public enum PaperSourceKind { - AutomaticFeed = 7, - Cassette = 14, - Custom = 257, - Envelope = 5, - FormSource = 15, - LargeCapacity = 11, - LargeFormat = 10, - Lower = 2, - Manual = 4, - ManualFeed = 6, - Middle = 3, - SmallFormat = 9, - TractorFeed = 8, - Upper = 1 - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Printing/PreviewPageInfo.cs b/mcs/class/System.Drawing/System.Drawing.Printing/PreviewPageInfo.cs deleted file mode 100644 index 4242b054e11..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Printing/PreviewPageInfo.cs +++ /dev/null @@ -1,57 +0,0 @@ -// -// System.Drawing.PreviewPageInfo.cs -// -// Author: -// Dennis Hayes (dennish@Raytek.com) -// -// (C) 2002 Ximian, Inc -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -using System; - -namespace System.Drawing.Printing -{ - /// - /// Summary description for PreviewPageInfo. - /// - public sealed class PreviewPageInfo { - Image image; - Size physicalSize; - public PreviewPageInfo(Image image, Size physicalSize) { - this.image = image; - this.physicalSize = physicalSize; - } - public Image Image { - get{ - return image; - } - } - public Size PhysicalSize{ - get{ - return physicalSize; - } - } - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Printing/PreviewPrintController.cs b/mcs/class/System.Drawing/System.Drawing.Printing/PreviewPrintController.cs deleted file mode 100644 index 7b460d8381e..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Printing/PreviewPrintController.cs +++ /dev/null @@ -1,81 +0,0 @@ -// -// System.Drawing.PreviewPrintController.cs -// -// Author: -// Dennis Hayes (dennish@Raytek.com) -// -// (C) 2002 Ximian, Inc -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; - -namespace System.Drawing.Printing -{ - public class PreviewPrintController : PrintController - { - private bool useantialias; - - public PreviewPrintController() - { - useantialias = false; - } - - [MonoTODO] - public override void OnEndPage(PrintDocument document, PrintPageEventArgs e){ - throw new NotImplementedException (); - } - - [MonoTODO] - public override void OnStartPrint(PrintDocument document, PrintEventArgs e){ - throw new NotImplementedException (); - } - - [MonoTODO] - public override void OnEndPrint(PrintDocument document, PrintEventArgs e){ - throw new NotImplementedException (); - } - - [MonoTODO] - public override Graphics OnStartPage(PrintDocument document, PrintPageEventArgs e){ - throw new NotImplementedException (); - } - - public bool UseAntiAlias { - get{ - return useantialias; - } - set{ - useantialias = value; - } - } - - [MonoTODO] - public PreviewPageInfo [] GetPreviewPageInfo(){ - throw new NotImplementedException (); - } - - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Printing/PrintController.cs b/mcs/class/System.Drawing/System.Drawing.Printing/PrintController.cs deleted file mode 100644 index 8ab7c4cb5b1..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Printing/PrintController.cs +++ /dev/null @@ -1,64 +0,0 @@ -// -// System.Drawing.PrintController.cs -// -// Author: -// Dennis Hayes (dennish@Raytek.com) -// -// (C) 2002 Ximian, Inc -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; - -namespace System.Drawing.Printing -{ - public abstract class PrintController - { - public PrintController () - { - } - - [MonoTODO] - public virtual void OnEndPage (PrintDocument document, PrintPageEventArgs e) - { - } - - [MonoTODO] - public virtual void OnStartPrint (PrintDocument document, PrintEventArgs e) - { - } - - [MonoTODO] - public virtual void OnEndPrint (PrintDocument document, PrintEventArgs e) - { - } - - [MonoTODO] - public virtual Graphics OnStartPage (PrintDocument document, PrintPageEventArgs e) - { - throw new NotImplementedException(); - } - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Printing/PrintDocument.cs b/mcs/class/System.Drawing/System.Drawing.Printing/PrintDocument.cs deleted file mode 100644 index 9142aedbfbd..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Printing/PrintDocument.cs +++ /dev/null @@ -1,200 +0,0 @@ -// -// System.Drawing.PrintDocument.cs -// -// Authors: -// Dennis Hayes (dennish@Raytek.com) -// Herve Poussineau (hpoussineau@fr.st) -// Andreas Nahr (ClassDevelopment@A-SoftTech.com) -// -// (C) 2002 Ximian, Inc -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; -using System.ComponentModel; - -namespace System.Drawing.Printing -{ - [DefaultEvent ("PrintPage"), DefaultProperty ("DocumentName")] - [ToolboxItemFilter ("System.Drawing.Printing", ToolboxItemFilterType.Allow)] - public class PrintDocument : System.ComponentModel.Component - { - private PageSettings defaultpagesettings; - private PrinterSettings printersettings; - private PrintController printcontroller; - private string documentname; -#if !(NET_1_0) - private bool originAtMargins = false; // .NET V1.1 Beta -#endif - - public PrintDocument() { - documentname = "document"; //offical default. - defaultpagesettings = new PageSettings(); // use default values of default printer - printersettings = new PrinterSettings(); // use default values - printcontroller = new StandardPrintController(); - } - - // properties - [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)] - [Browsable (false)] - [SRDescription ("The settings for the current page.")] - public PageSettings DefaultPageSettings{ - get{ - return defaultpagesettings; - } - set{ - defaultpagesettings = value; - } - } - - // Name of the document, not the file! - [DefaultValue ("document")] - [SRDescription ("The name of the document.")] - public string DocumentName{ - get{ - return documentname; - } - set{ - documentname = value; - } - } - - [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)] - [Browsable (false)] - [SRDescription ("The print controller object.")] - public PrintController PrintController{ - get{ - return printcontroller; - } - set{ - printcontroller = value; - } - } - - [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)] - [Browsable (false)] - [SRDescription ("The current settings for the active printer.")] - public PrinterSettings PrinterSettings{ - get{ - return printersettings; - } - set{ - printersettings = value; - } - } - -#if !(NET_1_0) - [DefaultValue (false)] - [SRDescription ("Determines if the origin is set at the specified margins.")] - public bool OriginAtMargins{ - get{ - return originAtMargins; - } - set{ - originAtMargins = value; - } - } -#endif - - // methods - public void Print(){ - PrintEventArgs printArgs = new PrintEventArgs(); - this.OnBeginPrint(printArgs); - if (printArgs.Cancel) - return; - PrintController.OnStartPrint(this, printArgs); - if (printArgs.Cancel) - return; - - // while there is more pages - PrintPageEventArgs printPageArgs; - do - { - PageSettings pageSettings = DefaultPageSettings.Clone() as PageSettings; - this.OnQueryPageSettings(new QueryPageSettingsEventArgs(pageSettings)); - - printPageArgs = new PrintPageEventArgs( - null, - pageSettings.Bounds, - new Rectangle(0, 0, pageSettings.PaperSize.Width, pageSettings.PaperSize.Height), - pageSettings); - Graphics g = PrintController.OnStartPage(this, printPageArgs); - // assign Graphics in printPageArgs - printPageArgs.SetGraphics(g); - - if (!printPageArgs.Cancel) - this.OnPrintPage(printPageArgs); - - PrintController.OnEndPage(this, printPageArgs); - if (printPageArgs.Cancel) - break; - } while (printPageArgs.HasMorePages); - - this.OnEndPrint(printArgs); - PrintController.OnEndPrint(this, printArgs); - } - - public override string ToString(){ - return "[PrintDocument " + this.DocumentName + "]"; - } - - // events - protected virtual void OnBeginPrint(PrintEventArgs e){ - //fire the event - if (BeginPrint != null) - BeginPrint(this, e); - } - - protected virtual void OnEndPrint(PrintEventArgs e){ - //fire the event - if (EndPrint != null) - EndPrint(this, e); - } - - protected virtual void OnPrintPage(PrintPageEventArgs e){ - //fire the event - if (PrintPage != null) - PrintPage(this, e); - } - - protected virtual void OnQueryPageSettings(QueryPageSettingsEventArgs e){ - //fire the event - if (QueryPageSettings != null) - QueryPageSettings(this, e); - } - - [SRDescription ("Raised when printing begins")] - public event PrintEventHandler BeginPrint; - - [SRDescription ("Raised when printing ends")] - public event PrintEventHandler EndPrint; - - [SRDescription ("Raised when printing of a new page begins")] - public event PrintPageEventHandler PrintPage; - - [SRDescription ("Raised before printing of a new page begins")] - public event QueryPageSettingsEventHandler QueryPageSettings; - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Printing/PrintEventArgs.cs b/mcs/class/System.Drawing/System.Drawing.Printing/PrintEventArgs.cs deleted file mode 100644 index a3fe2ebed9b..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Printing/PrintEventArgs.cs +++ /dev/null @@ -1,45 +0,0 @@ -// -// System.Drawing.PrintEventArgs.cs -// -// Author: -// Dennis Hayes (dennish@Raytek.com) -// -// (C) 2002 Ximian, Inc -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -using System; -//NOTE: Complete! Aparently just a redifiniton of CancleEventArgs specific to Printing. -namespace System.Drawing.Printing -{ - /// - /// Summary description for PrintEventArgs. - /// - public class PrintEventArgs : System.ComponentModel.CancelEventArgs - { - public PrintEventArgs() - { - } - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Printing/PrintEventHandler.cs b/mcs/class/System.Drawing/System.Drawing.Printing/PrintEventHandler.cs deleted file mode 100644 index 2cff92bcff1..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Printing/PrintEventHandler.cs +++ /dev/null @@ -1,40 +0,0 @@ -// -// System.Drawing.PrintEventHandler.cs -// -// Author: -// Dennis Hayes (dennish@Raytek.com) -// -// (C) 2002 Ximian, Inc -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -using System; - -namespace System.Drawing.Printing -{ - /// - /// Summary description for PrintEventHandler. - /// - public delegate void PrintEventHandler(object sender, PrintEventArgs e); -} diff --git a/mcs/class/System.Drawing/System.Drawing.Printing/PrintPageEventArgs.cs b/mcs/class/System.Drawing/System.Drawing.Printing/PrintPageEventArgs.cs deleted file mode 100644 index 3a6a5df38a6..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Printing/PrintPageEventArgs.cs +++ /dev/null @@ -1,97 +0,0 @@ -// -// System.Drawing.PrintPageEventArgs.cs -// -// Author: -// Dennis Hayes (dennish@Raytek.com) -// Herve Poussineau (hpoussineau@fr.st) -// -// (C) 2002 Ximian, Inc -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -using System; -using System.Drawing; -namespace System.Drawing.Printing { - /// - /// Summary description for PrintPageEventArgs. - /// - public class PrintPageEventArgs : EventArgs { - bool cancel; - Graphics graphics; - bool hasmorePages; - Rectangle marginBounds; - Rectangle pageBounds; - PageSettings pageSettings; - - public PrintPageEventArgs(Graphics graphics, Rectangle marginBounds, - Rectangle pageBounds, PageSettings pageSettings) { - this.graphics = graphics; - this.marginBounds = marginBounds; - this.pageBounds = pageBounds; - this.pageSettings = pageSettings; - } - public bool Cancel { - get{ - return cancel; - } - set{ - cancel = value; - } - } - public Graphics Graphics { - get{ - return graphics; - } - } - public bool HasMorePages { - get{ - return hasmorePages; - } - set{ - hasmorePages = value; - } - } - public Rectangle MarginBounds { - get{ - return marginBounds; - } - } - public Rectangle PageBounds { - get{ - return pageBounds; - } - } - public PageSettings PageSettings { - get{ - return pageSettings; - } - } - - // used in PrintDocument.Print() - internal void SetGraphics(Graphics g) - { - graphics = g; - } -} -} diff --git a/mcs/class/System.Drawing/System.Drawing.Printing/PrintPageEventHandler.cs b/mcs/class/System.Drawing/System.Drawing.Printing/PrintPageEventHandler.cs deleted file mode 100644 index e60998de74c..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Printing/PrintPageEventHandler.cs +++ /dev/null @@ -1,40 +0,0 @@ -// -// System.Drawing.PrintPageEventHandler.cs -// -// Author: -// Dennis Hayes (dennish@Raytek.com) -// -// (C) 2002 Ximian, Inc -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -using System; - -namespace System.Drawing.Printing -{ - /// - /// Summary description for PrintPageEventHandler. - /// - public delegate void PrintPageEventHandler(object sender, PrintPageEventArgs e); -} diff --git a/mcs/class/System.Drawing/System.Drawing.Printing/PrintRange.cs b/mcs/class/System.Drawing/System.Drawing.Printing/PrintRange.cs deleted file mode 100644 index a73191ac31c..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Printing/PrintRange.cs +++ /dev/null @@ -1,38 +0,0 @@ -// -// System.Drawing.PrintRange.cs -// -// (C) 2002 Ximian, Inc. http://www.ximian.com -// Author: Dennis Hayes (dennish@raytek.com) -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -using System; -namespace System.Drawing.Printing -{ - public enum PrintRange { - AllPages = 0, - Selection = 1, - SomePages = 2 - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Printing/PrinterResolution.cs b/mcs/class/System.Drawing/System.Drawing.Printing/PrinterResolution.cs deleted file mode 100644 index b3eabb74fc0..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Printing/PrinterResolution.cs +++ /dev/null @@ -1,79 +0,0 @@ -// -// System.Drawing.Printing.PrinterResolution.cs -// -// Author: -// Dennis Hayes (dennish@Raytek.com) -// Andreas Nahr (ClassDevelopment@A-SoftTech.com) -// -// (C) 2002 Ximian, Inc -// (C) 2003 Andreas Nahr -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -using System; - -namespace System.Drawing.Printing -{ - - public class PrinterResolution - { - private PrinterResolutionKind kind; - private int x; - private int y; - - private PrinterResolution () - { - } - - internal PrinterResolution (int x, int y, PrinterResolutionKind kind) - { - this.x = x; - this.y = y; - this.kind = kind; - } - - public int X { - get { - return x; - } - } - - public int Y { - get { - return y; - } - } - - public PrinterResolutionKind Kind { - get { - return kind; - } - } - - public override string ToString () - { - return "[PrinterResolution X=" + x + " Y=" + y + "]"; - } - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Printing/PrinterResolutionKind.cs b/mcs/class/System.Drawing/System.Drawing.Printing/PrinterResolutionKind.cs deleted file mode 100644 index f678c40a968..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Printing/PrinterResolutionKind.cs +++ /dev/null @@ -1,40 +0,0 @@ -// -// System.Drawing.PrinterResolutionKind.cs -// -// (C) 2002 Ximian, Inc. http://www.ximian.com -// Author: Dennis Hayes (dennish@raytek.com) -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -using System; -namespace System.Drawing.Printing -{ - public enum PrinterResolutionKind { - Custom = 0, - Draft = -1, - High = -4, - Low = -2, - Medium = -3 - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Printing/PrinterSettings.cs b/mcs/class/System.Drawing/System.Drawing.Printing/PrinterSettings.cs deleted file mode 100644 index f84892d0c4b..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Printing/PrinterSettings.cs +++ /dev/null @@ -1,373 +0,0 @@ -// -// System.Drawing.PrinterSettings.cs -// -// Authors: -// Dennis Hayes (dennish@Raytek.com) -// Herve Poussineau (hpoussineau@fr.st) -// Andreas Nahr (ClassDevelopment@A-SoftTech.com) -// -// (C) 2002 Ximian, Inc -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; -using System.Runtime.InteropServices; -using System.Collections; -using System.Drawing.Printing; - -namespace System.Drawing.Printing -{ - [Serializable] - [ComVisible(false)] - public class PrinterSettings : ICloneable - { - public PrinterSettings() - { - } - - // Public subclasses - - public class PaperSourceCollection : ICollection - { - ArrayList _PaperSources = new ArrayList(); - - public PaperSourceCollection(PaperSource[] array) { - foreach (PaperSource ps in array) - _PaperSources.Add(ps); - } - - public int Count { get { return _PaperSources.Count; } } - bool ICollection.IsSynchronized { get { return false; } } - object ICollection.SyncRoot { get { return this; } } - - public virtual PaperSource this[int index] { - get { return _PaperSources[index] as PaperSource; } - } - - public IEnumerator GetEnumerator() - { - return _PaperSources.GetEnumerator(); - } - - void ICollection.CopyTo(Array array, int index) - { - _PaperSources.CopyTo(array, index); - } - } - - public class PaperSizeCollection : ICollection - { - ArrayList _PaperSizes = new ArrayList(); - - public PaperSizeCollection(PaperSize[] array) { - foreach (PaperSize ps in array) - _PaperSizes.Add(ps); - } - - public int Count { get { return _PaperSizes.Count; } } - bool ICollection.IsSynchronized { get { return false; } } - object ICollection.SyncRoot { get { return this; } } - - public virtual PaperSize this[int index] { - get { return _PaperSizes[index] as PaperSize; } - } - - public IEnumerator GetEnumerator() - { - return _PaperSizes.GetEnumerator(); - } - - void ICollection.CopyTo(Array array, int index) - { - _PaperSizes.CopyTo(array, index); - } - } - - public class PrinterResolutionCollection : ICollection - { - ArrayList _PrinterResolutions = new ArrayList(); - - public PrinterResolutionCollection(PrinterResolution[] array) { - foreach (PrinterResolution pr in array) - _PrinterResolutions.Add(pr); - } - - public int Count { get { return _PrinterResolutions.Count; } } - bool ICollection.IsSynchronized { get { return false; } } - object ICollection.SyncRoot { get { return this; } } - - public virtual PrinterResolution this[int index] { - get { return _PrinterResolutions[index] as PrinterResolution; } - } - - public IEnumerator GetEnumerator() - { - return _PrinterResolutions.GetEnumerator(); - } - - void ICollection.CopyTo(Array array, int index) - { - _PrinterResolutions.CopyTo(array, index); - } - } - - public class StringCollection : ICollection - { - ArrayList _Strings = new ArrayList(); - - public StringCollection(string[] array) { - foreach (string s in array) - _Strings.Add(s); - } - - public int Count { get { return _Strings.Count; } } - bool ICollection.IsSynchronized { get { return false; } } - object ICollection.SyncRoot { get { return this; } } - - public virtual string this[int index] { - get { return _Strings[index] as string; } - } - - public IEnumerator GetEnumerator() - { - return _Strings.GetEnumerator(); - } - - void ICollection.CopyTo(Array array, int index) - { - _Strings.CopyTo(array, index); - } - } - - //properties - - [MonoTODO("PrinterSettings.CanDuplex")] - public bool CanDuplex - { - get { throw new NotImplementedException(); } - } - - [MonoTODO("PrinterSettings.Collate")] - public bool Collate - { - get { throw new NotImplementedException(); } - set { throw new NotImplementedException(); } - } - - [MonoTODO("PrinterSettings.Copies")] - public short Copies - { - get { throw new NotImplementedException(); } - set { throw new NotImplementedException(); } - } - - [MonoTODO("PrinterSettings.DefaultPageSettings")] - public PageSettings DefaultPageSettings - { - get - { - return new PageSettings( - this, - // TODO: get default color mode for this printer - false, - // TODO: get default orientation for this printer - false, - // TODO: get default paper size for this printer - new PaperSize("A4", 827, 1169), - // TODO: get default paper source for this printer - new PaperSource("default", PaperSourceKind.FormSource), - // TODO: get default resolution for this printer - new PrinterResolution(300, 300, PrinterResolutionKind.Medium) - ); - } - } - - [MonoTODO("PrinterSettings.Duplex")] - public Duplex Duplex - { - get { throw new NotImplementedException(); } - set { throw new NotImplementedException(); } - } - - [MonoTODO("PrinterSettings.FromPage")] - public int FromPage - { - get { throw new NotImplementedException(); } - set { throw new NotImplementedException(); } - } - - [MonoTODO("PrinterSettings.InstalledPrinters")] - public static PrinterSettings.StringCollection InstalledPrinters - { - get { throw new NotImplementedException(); } - } - - [MonoTODO("PrinterSettings.IsDefaultPrinter")] - public bool IsDefaultPrinter - { - get { throw new NotImplementedException(); } - } - - [MonoTODO("PrinterSettings.IsPlotter")] - public bool IsPlotter - { - get { throw new NotImplementedException(); } - } - - [MonoTODO("PrinterSettings.IsValid")] - public bool IsValid - { - get { throw new NotImplementedException(); } - } - - [MonoTODO("PrinterSettings.LandscapeAngle")] - public int LandscapeAngle - { - get { throw new NotImplementedException(); } - } - - [MonoTODO("PrinterSettings.MaximumCopies")] - public int MaximumCopies - { - get { throw new NotImplementedException(); } - } - - [MonoTODO("PrinterSettings.MaximumPage")] - public int MaximumPage - { - get { throw new NotImplementedException(); } - set { throw new NotImplementedException(); } - } - - [MonoTODO("PrinterSettings.MinimumPage")] - public int MinimumPage - { - get { throw new NotImplementedException(); } - set { throw new NotImplementedException(); } - } - - [MonoTODO("PrinterSettings.PaperSizes")] - public PrinterSettings.PaperSizeCollection PaperSizes - { - get { throw new NotImplementedException(); } - } - - [MonoTODO("PrinterSettings.PaperSources")] - public PrinterSettings.PaperSourceCollection PaperSources - { - get { throw new NotImplementedException(); } - } - - [MonoTODO("PrinterSettings.PrinterName")] - public string PrinterName - { - get { throw new NotImplementedException(); } - set { throw new NotImplementedException(); } - } - - [MonoTODO("PrinterSettings.PrinterResolutions")] - public PrinterSettings.PrinterResolutionCollection PrinterResolutions - { - get { throw new NotImplementedException(); } - } - - [MonoTODO("PrinterSettings.PrintRange")] - public PrintRange PrintRange - { - get { throw new NotImplementedException(); } - set { throw new NotImplementedException(); } - } - - [MonoTODO("PrinterSettings.PrintToFile")] - public bool PrintToFile - { - get { throw new NotImplementedException(); } - set { throw new NotImplementedException(); } - } - - [MonoTODO("PrinterSettings.SupportsColor")] - public bool SupportsColor - { - get { throw new NotImplementedException(); } - } - - [MonoTODO("PrinterSettings.ToPage")] - public int ToPage - { - get { throw new NotImplementedException(); } - set { throw new NotImplementedException(); } - } - - //methods - - [MonoTODO("PrinterSettings.Clone")] - public virtual object Clone() - { - throw new NotImplementedException(); - } - - [MonoTODO("PrinterSettings.CreateMeasurementGraphics")] - public Graphics CreateMeasurementGraphics() - { - throw new NotImplementedException(); - } - - [MonoTODO("PrinterSettings.GetHdevmode")] - public IntPtr GetHdevmode() - { - throw new NotImplementedException(); - } - - [MonoTODO("PrinterSettings.GetHdevmode")] - public IntPtr GetHdevmode(PageSettings pageSettings) - { - throw new NotImplementedException(); - } - - [MonoTODO("PrinterSettings.GetHdevname")] - public IntPtr GetHdevnames() - { - throw new NotImplementedException(); - } - - [MonoTODO("PrinterSettings.SetHdevmode")] - public void SetHdevmode(IntPtr hdevmode) - { - throw new NotImplementedException(); - } - - [MonoTODO("PrinterSettings.SetHdevnames")] - public void SetHdevnames(IntPtr hdevnames) - { - throw new NotImplementedException(); - } - - [MonoTODO("PrinterSettings.ToString")] - public override string ToString() - { - throw new NotImplementedException(); - } - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Printing/PrinterUnit.cs b/mcs/class/System.Drawing/System.Drawing.Printing/PrinterUnit.cs deleted file mode 100644 index ff9264c7bef..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Printing/PrinterUnit.cs +++ /dev/null @@ -1,39 +0,0 @@ -// -// System.Drawing.PrinterUnit.cs -// -// (C) 2002 Ximian, Inc. http://www.ximian.com -// Author: Dennis Hayes (dennish@raytek.com) -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -using System; -namespace System.Drawing.Printing -{ - public enum PrinterUnit { - Display = 0, - HundredthsOfAMillimeter = 2, - TenthsOfAMillimeter = 3, - ThousandthsOfAnInch = 1 - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Printing/PrinterUnitConvert.cs b/mcs/class/System.Drawing/System.Drawing.Printing/PrinterUnitConvert.cs deleted file mode 100644 index bdaef44b3ef..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Printing/PrinterUnitConvert.cs +++ /dev/null @@ -1,136 +0,0 @@ -// -// System.Drawing.Printing.PrinterUnitConvert.cs -// -// Authors: -// Martin Willemoes Hansen (mwh@sysrq.dk) -// Herve Poussineau (hpoussineau@fr.st) -// -// (C) 2003 Martin Willemoes Hansen -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -namespace System.Drawing.Printing -{ - public sealed class PrinterUnitConvert - { - private PrinterUnitConvert () - { - } - - public static double Convert (double value, - PrinterUnit fromUnit, - PrinterUnit toUnit) - { - switch (fromUnit) - { - case PrinterUnit.Display: - switch (toUnit) - { - case PrinterUnit.Display: return value; - case PrinterUnit.ThousandthsOfAnInch: return value * 10; - case PrinterUnit.HundredthsOfAMillimeter: return value * 2.54; - case PrinterUnit.TenthsOfAMillimeter: return value * .254; - } - break; - case PrinterUnit.ThousandthsOfAnInch: - switch (toUnit) - { - case PrinterUnit.Display: return value / 10; - case PrinterUnit.ThousandthsOfAnInch: return value; - case PrinterUnit.HundredthsOfAMillimeter: return value * .254; - case PrinterUnit.TenthsOfAMillimeter: return value * .0254; - } - break; - case PrinterUnit.HundredthsOfAMillimeter: - switch (toUnit) - { - case PrinterUnit.Display: return value / 2.54; - case PrinterUnit.ThousandthsOfAnInch: return value / .254; - case PrinterUnit.HundredthsOfAMillimeter: return value; - case PrinterUnit.TenthsOfAMillimeter: return value / 10; - } - break; - case PrinterUnit.TenthsOfAMillimeter: - switch (toUnit) - { - case PrinterUnit.Display: return value / .254; - case PrinterUnit.ThousandthsOfAnInch: return value / .0254; - case PrinterUnit.HundredthsOfAMillimeter: return value * 10; - case PrinterUnit.TenthsOfAMillimeter: return value; - } - break; - } - // should never happen - throw new NotImplementedException(); - } - - public static int Convert (int value, - PrinterUnit fromUnit, - PrinterUnit toUnit) - { - return (int)Convert((double)value, fromUnit, toUnit); - } - - public static Margins Convert (Margins value, - PrinterUnit fromUnit, - PrinterUnit toUnit) - { - return new Margins( - Convert(value.Left, fromUnit, toUnit), - Convert(value.Right, fromUnit, toUnit), - Convert(value.Top, fromUnit, toUnit), - Convert(value.Bottom, fromUnit, toUnit)); - } - - public static Point Convert (Point value, - PrinterUnit fromUnit, - PrinterUnit toUnit) - { - return new Point( - Convert(value.X, fromUnit, toUnit), - Convert(value.Y, fromUnit, toUnit)); - } - - public static Rectangle Convert (Rectangle value, - PrinterUnit fromUnit, - PrinterUnit toUnit) - { - return new Rectangle( - Convert(value.X, fromUnit, toUnit), - Convert(value.Y, fromUnit, toUnit), - Convert(value.Width, fromUnit, toUnit), - Convert(value.Height, fromUnit, toUnit)); - } - - public static Size Convert (Size value, - PrinterUnit fromUnit, - PrinterUnit toUnit) - { - return new Size( - Convert(value.Width, fromUnit, toUnit), - Convert(value.Height, fromUnit, toUnit)); - } - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Printing/PrintingPermission.cs b/mcs/class/System.Drawing/System.Drawing.Printing/PrintingPermission.cs deleted file mode 100644 index 8aee6ce95cd..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Printing/PrintingPermission.cs +++ /dev/null @@ -1,259 +0,0 @@ -// -// System.Drawing.PrintingPermission.cs -// -// Authors: -// Dennis Hayes (dennish@Raytek.com) -// Herve Poussineau (hpoussineau@fr.st) -// Sebastien Pouliot -// -// (C) 2002 Ximian, Inc -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System.Globalization; -using System.Security; -using System.Security.Permissions; - -namespace System.Drawing.Printing { - - [Serializable] - public sealed class PrintingPermission : CodeAccessPermission, IUnrestrictedPermission { - - private const int version = 1; - - private PrintingPermissionLevel _Level; - - public PrintingPermission (PermissionState state) - { - if (CheckPermissionState (state, true) == PermissionState.Unrestricted) - _Level = PrintingPermissionLevel.AllPrinting; - else - _Level = PrintingPermissionLevel.NoPrinting; - } - - public PrintingPermission (PrintingPermissionLevel printingLevel) - { - Level = printingLevel; - } - - // properties - - public PrintingPermissionLevel Level{ - get { return _Level; } - set { - if (!Enum.IsDefined (typeof (PrintingPermissionLevel), value)) { - string msg = Locale.GetText ("Invalid enum {0}"); - throw new ArgumentException (String.Format (msg, value), "Level"); - } - _Level = value; - } - } - - // methods - - public override IPermission Copy () - { - return new PrintingPermission (this.Level); - } - - public override void FromXml (SecurityElement esd) - { - CheckSecurityElement (esd, "esd", version, version); - // Note: we do not (yet) care about the return value - // as we only accept version 1 (min/max values) - - if (IsUnrestricted (esd)) - _Level = PrintingPermissionLevel.AllPrinting; - else { - string level = esd.Attribute ("Level"); - if (level != null) { - _Level = (PrintingPermissionLevel) Enum.Parse ( - typeof (PrintingPermissionLevel), level); - } - else - _Level = PrintingPermissionLevel.NoPrinting; - } - } - - public override IPermission Intersect (IPermission target) - { - PrintingPermission pp = Cast (target); - if ((pp == null) || IsEmpty () || pp.IsEmpty ()) - return null; - - PrintingPermissionLevel level = (_Level <= pp.Level) ? _Level : pp.Level; - return new PrintingPermission (level); - } - - public override bool IsSubsetOf (IPermission target) - { - PrintingPermission pp = Cast (target); - if (pp == null) - return IsEmpty (); - - return (_Level <= pp.Level); - } - - public bool IsUnrestricted () - { - return (_Level == PrintingPermissionLevel.AllPrinting); - } - - public override SecurityElement ToXml () - { - SecurityElement se = Element (version); - if (IsUnrestricted ()) - se.AddAttribute ("Unrestricted", "true"); - else - se.AddAttribute ("Level", _Level.ToString ()); - return se; - } - - public override IPermission Union (IPermission target) - { - PrintingPermission pp = Cast (target); - if (pp == null) - return new PrintingPermission (_Level); - if (IsUnrestricted () || pp.IsUnrestricted ()) - return new PrintingPermission (PermissionState.Unrestricted); - if (IsEmpty () && pp.IsEmpty ()) - return null; - - PrintingPermissionLevel level = (_Level > pp.Level) ? _Level : pp.Level; - return new PrintingPermission (level); - } - - // Internal helpers methods - - private bool IsEmpty () - { - return (_Level == PrintingPermissionLevel.NoPrinting); - } - - private PrintingPermission Cast (IPermission target) - { - if (target == null) - return null; - - PrintingPermission pp = (target as PrintingPermission); - if (pp == null) { - ThrowInvalidPermission (target, typeof (PrintingPermission)); - } - - return pp; - } - - // NOTE: The following static methods should be moved out to a (static?) class - // if (ever) System.Drawing.dll gets more than one permission in it's assembly. - - // snippet moved from FileIOPermission (nickd) to be reused in all derived classes - internal SecurityElement Element (int version) - { - SecurityElement se = new SecurityElement ("IPermission"); - Type type = this.GetType (); - se.AddAttribute ("class", type.FullName + ", " + type.Assembly.ToString ().Replace ('\"', '\'')); - se.AddAttribute ("version", version.ToString ()); - return se; - } - - internal static PermissionState CheckPermissionState (PermissionState state, bool allowUnrestricted) - { - string msg; - switch (state) { - case PermissionState.None: - break; - case PermissionState.Unrestricted: - if (!allowUnrestricted) { - msg = Locale.GetText ("Unrestricted isn't not allowed for identity permissions."); - throw new ArgumentException (msg, "state"); - } - break; - default: - msg = String.Format (Locale.GetText ("Invalid enum {0}"), state); - throw new ArgumentException (msg, "state"); - } - return state; - } - - // logic isn't identical to CodeAccessPermission.CheckSecurityElement - see unit tests - internal static int CheckSecurityElement (SecurityElement se, string parameterName, int minimumVersion, int maximumVersion) - { - if (se == null) - throw new ArgumentNullException (parameterName); - - string c = se.Attribute ("class"); -#if NET_2_0 - if (c == null) { - string msg = Locale.GetText ("Missing 'class' attribute."); - throw new ArgumentException (msg, parameterName); - } -#else - if ((c == null) || (String.Compare (c, 0, "System.Drawing.Printing.PrintingPermission", 0, 42) != 0)) { - string msg = Locale.GetText ("Wrong 'class' attribute."); - throw new ArgumentException (msg, parameterName); - } -#endif - // we assume minimum version if no version number is supplied - int version = minimumVersion; - string v = se.Attribute ("version"); - if (v != null) { - try { - version = Int32.Parse (v); - } - catch (Exception e) { - string msg = Locale.GetText ("Couldn't parse version from '{0}'."); - msg = String.Format (msg, v); - throw new ArgumentException (msg, parameterName, e); - } - } -#if !NET_2_0 - else { - string msg = Locale.GetText ("Missing 'version' attribute."); - throw new ArgumentException (msg, parameterName); - } -#endif - - if ((version < minimumVersion) || (version > maximumVersion)) { - string msg = Locale.GetText ("Unknown version '{0}', expected versions between ['{1}','{2}']."); - msg = String.Format (msg, version, minimumVersion, maximumVersion); - throw new ArgumentException (msg, parameterName); - } - return version; - } - - // must be called after CheckSecurityElement (i.e. se != null) - internal static bool IsUnrestricted (SecurityElement se) - { - string value = se.Attribute ("Unrestricted"); - if (value == null) - return false; - return (String.Compare (value, Boolean.TrueString, true, CultureInfo.InvariantCulture) == 0); - } - - internal static void ThrowInvalidPermission (IPermission target, Type expected) - { - string msg = Locale.GetText ("Invalid permission type '{0}', expected type '{1}'."); - msg = String.Format (msg, target.GetType (), expected); - throw new ArgumentException (msg, "target"); - } - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Printing/PrintingPermissionAttribute.cs b/mcs/class/System.Drawing/System.Drawing.Printing/PrintingPermissionAttribute.cs deleted file mode 100644 index da6623c14eb..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Printing/PrintingPermissionAttribute.cs +++ /dev/null @@ -1,69 +0,0 @@ -// -// System.Drawing.PrintingPermissionAttribute.cs -// -// Authors: -// Dennis Hayes (dennish@Raytek.com) -// Herve Poussineau (hpoussineau@fr.st) -// Sebastien Pouliot -// -// (C) 2002 Ximian, Inc -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System.Security; -using System.Security.Permissions; - -namespace System.Drawing.Printing { - - [AttributeUsage (AttributeTargets.All, AllowMultiple=true)] - // strangely this class isn't [Serializable] like other permission classes - public sealed class PrintingPermissionAttribute : CodeAccessSecurityAttribute { - - private PrintingPermissionLevel _level; - - public PrintingPermissionAttribute (SecurityAction action) - : base (action) - { - // seems to always assign PrintingPermissionLevel.NoPrinting ... - _level = PrintingPermissionLevel.NoPrinting; - } - - public PrintingPermissionLevel Level { - get { return _level; } - set { - if (!Enum.IsDefined (typeof (PrintingPermissionLevel), value)) { - string msg = Locale.GetText ("Invalid enum {0}"); - throw new ArgumentException (String.Format (msg, value), "Level"); - } - _level = value; - } - } - - public override IPermission CreatePermission () - { - if (base.Unrestricted) - return new PrintingPermission (PermissionState.Unrestricted); - else - return new PrintingPermission (_level); - } - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Printing/PrintingPermissionLevel.cs b/mcs/class/System.Drawing/System.Drawing.Printing/PrintingPermissionLevel.cs deleted file mode 100644 index 16e3ad80f4b..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Printing/PrintingPermissionLevel.cs +++ /dev/null @@ -1,41 +0,0 @@ -// -// System.Drawing.PrintingPermissionLevel.cs -// -// Author: -// Dennis Hayes (dennish@raytek.com) -// -// (C) 2002 Ximian, Inc. http://www.ximian.com -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -namespace System.Drawing.Printing { - -#if NET_2_0 - [Serializable] -#endif - public enum PrintingPermissionLevel { - AllPrinting = 3, - DefaultPrinting = 2, - NoPrinting = 0, - SafePrinting = 1 - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Printing/QueryPageSettingsEventArgs.cs b/mcs/class/System.Drawing/System.Drawing.Printing/QueryPageSettingsEventArgs.cs deleted file mode 100644 index 2e9215076e5..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Printing/QueryPageSettingsEventArgs.cs +++ /dev/null @@ -1,57 +0,0 @@ -// -// System.Drawing.QueryPageSettingsEventArgs.cs -// -// Author: -// Dennis Hayes (dennish@Raytek.com) -// -// (C) 2002 Ximian, Inc -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -using System; - -namespace System.Drawing.Printing -{ - /// - /// Summary description for QueryPageSettingEventArgs. - /// - public class QueryPageSettingsEventArgs : PrintEventArgs - { - private PageSettings pageSettings; - - public QueryPageSettingsEventArgs(PageSettings pageSettings) - { - this.pageSettings = pageSettings; - } - public PageSettings PageSettings { - get{ - return pageSettings; - } - set{ - pageSettings = value; - } - } - - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Printing/QueryPageSettingsEventHandler.cs b/mcs/class/System.Drawing/System.Drawing.Printing/QueryPageSettingsEventHandler.cs deleted file mode 100644 index 373eeb85ff4..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Printing/QueryPageSettingsEventHandler.cs +++ /dev/null @@ -1,40 +0,0 @@ -// -// System.Drawing.QueryPageSettingsEventHandler.cs -// -// Author: -// Dennis Hayes (dennish@Raytek.com) -// -// (C) 2002 Ximian, Inc -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -using System; - -namespace System.Drawing.Printing -{ - /// - /// Summary description for QueryPageSettingsEventHandler. - /// - public delegate void QueryPageSettingsEventHandler(object sender, QueryPageSettingsEventArgs e); -} diff --git a/mcs/class/System.Drawing/System.Drawing.Printing/StandardPrintController.cs b/mcs/class/System.Drawing/System.Drawing.Printing/StandardPrintController.cs deleted file mode 100644 index f78284ef154..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Printing/StandardPrintController.cs +++ /dev/null @@ -1,93 +0,0 @@ -// -// System.Drawing.StandardPrintController.cs -// -// Author: -// Dennis Hayes (dennish@Raytek.com) -// Herve Poussineau (hpoussineau@fr.st) -// -// (C) 2002 Ximian, Inc -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; - -namespace System.Drawing.Printing -{ - public class StandardPrintController : PrintController - { - private int page; - private Image image; - - public StandardPrintController() - { - } - - [MonoTODO("StandardPrintController.OnEndPage")] - public override void OnEndPage(PrintDocument document, PrintPageEventArgs e) - { - //TODO: print current page - // - image to print is this.image - // - page settings are in e.PageSettings - // - printer settings are in document.PrinterSettings - // - don't forget to use document.OriginAtMargins (only if .NET 1.1) - - // actually, "print" == "save to a file" - try - { - string fileName = document.DocumentName + " " + page.ToString("D4") + ".jpg"; - Console.WriteLine("StandardPrintController: Print page \"{0}\"", fileName); - image.Save(fileName, System.Drawing.Imaging.ImageFormat.Jpeg); - } - catch (Exception) {} - - if (e.Graphics != null) - e.Graphics.Dispose(); - } - - [MonoTODO("StandardPrintController.OnStartPrint")] - public override void OnStartPrint(PrintDocument document, PrintEventArgs e){ - page = 0; - } - - [MonoTODO("StandardPrintController.OnEndPrint")] - public override void OnEndPrint(PrintDocument document, PrintEventArgs e){ - return; - } - - [MonoTODO("StandardPrintController.OnStartPage")] - public override Graphics OnStartPage(PrintDocument document, PrintPageEventArgs e) - { - //FIXME: I'm not sure of what I'm doing - // I don't know what size to give to image - // and why I have to clear it - page++; - // returns a new (empty) graphics - image = new Bitmap(e.MarginBounds.Width, e.MarginBounds.Height); - Graphics g = Graphics.FromImage(image); - g.Clear(Color.White); - return g; - } - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Text/FontCollection.cs b/mcs/class/System.Drawing/System.Drawing.Text/FontCollection.cs deleted file mode 100644 index 81d6ed771e3..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Text/FontCollection.cs +++ /dev/null @@ -1,100 +0,0 @@ -// -// System.Drawing.Text.FontCollection.cs -// -// (C) 2002 Ximian, Inc. http://www.ximian.com -// Author: Everaldo Canuto everaldo.canuto@bol.com.br -// Sanjay Gupta (gsanjay@novell.com) -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -using System; -using System.Drawing; -using System.Runtime.InteropServices; - -namespace System.Drawing.Text { - - public abstract class FontCollection : IDisposable { - - internal IntPtr nativeFontCollection = IntPtr.Zero; - - internal FontCollection () - { - } - - internal FontCollection (IntPtr ptr) - { - nativeFontCollection = ptr; - } - - // methods - public void Dispose() - { - Dispose (true); - GC.SuppressFinalize (true); - } - - protected virtual void Dispose (bool disposing) - { - } - - // properties - public FontFamily[] Families - { - get { - int found; - int returned; - Status status; - FontFamily[] families; - - status = GDIPlus.GdipGetFontCollectionFamilyCount (nativeFontCollection, out found); - GDIPlus.CheckStatus (status); - - int nSize = Marshal.SizeOf (IntPtr.Zero); - IntPtr dest = Marshal.AllocHGlobal (nSize * found); - - status = GDIPlus.GdipGetFontCollectionFamilyList(nativeFontCollection, found, dest, out returned); - - IntPtr[] ptrAr = new IntPtr [returned]; - int pos = dest.ToInt32 (); - for ( int i = 0; i < returned ; i++, pos+=nSize) - ptrAr[i] = (IntPtr)Marshal.PtrToStructure ((IntPtr)pos, typeof(IntPtr)); - - Marshal.FreeHGlobal (dest); - - families = new FontFamily [returned]; - for ( int i = 0; i < returned; i++ ) - families[i] = new FontFamily (ptrAr[i]); - - return families; - } - } - - ~FontCollection() - { - Dispose (false); - } - - } - -} diff --git a/mcs/class/System.Drawing/System.Drawing.Text/FontCollection.jvm.cs b/mcs/class/System.Drawing/System.Drawing.Text/FontCollection.jvm.cs deleted file mode 100644 index a993aac9057..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Text/FontCollection.jvm.cs +++ /dev/null @@ -1,83 +0,0 @@ -// -// System.Drawing.Text.FontCollection.cs -// -// (C) 2002 Ximian, Inc. http://www.ximian.com -// Author: Everaldo Canuto everaldo.canuto@bol.com.br -// Sanjay Gupta (gsanjay@novell.com) -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -using System; -using System.Collections; -using System.Collections.Specialized; -using awt = java.awt; - -namespace System.Drawing.Text -{ - /// - /// Summary description for FontCollection. - /// - public abstract class FontCollection : IDisposable - { - protected ArrayList _fonts; - - protected FontCollection() - { - _fonts = new ArrayList(); - } - - public FontFamily[] Families { - get { - Hashtable h = CollectionsUtil.CreateCaseInsensitiveHashtable(_fonts.Count); - for (int i = 0; i < _fonts.Count; i++) { - string family = ((awt.Font)_fonts[i]).getFamily(); - if (!h.ContainsKey(family)) - h[family] = new FontFamily(family); - } - - ICollection values = h.Values; - FontFamily[] families = new FontFamily[values.Count]; - values.CopyTo(families, 0); - return families; - } - } - - internal virtual string GetFamilyName(string name) { - for (int i = 0; i < _fonts.Count; i++) { - string family = ((awt.Font)_fonts[i]).getFamily(); - if (string.Compare(family, name, true) == 0) - return family; - } - - return null; - } - #region IDisposable Members - - public void Dispose() { - // TODO: Add FontCollection.Dispose implementation - } - - #endregion - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Text/GenericFontFamilies.cs b/mcs/class/System.Drawing/System.Drawing.Text/GenericFontFamilies.cs deleted file mode 100644 index e58731ac6a3..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Text/GenericFontFamilies.cs +++ /dev/null @@ -1,39 +0,0 @@ -// -// System.Drawing.GenericFontFamilies.cs -// -// (C) 2002 Ximian, Inc. http://www.ximian.com -// Author: Dennis Hayes (dennish@raytek.com) -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -using System; -namespace System.Drawing.Text -{ - [Serializable] - public enum GenericFontFamilies { - Monospace = 2, - SansSerif = 1, - Serif = 0 - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Text/HotkeyPrefix.cs b/mcs/class/System.Drawing/System.Drawing.Text/HotkeyPrefix.cs deleted file mode 100644 index be833c7b2fd..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Text/HotkeyPrefix.cs +++ /dev/null @@ -1,39 +0,0 @@ -// -// System.Drawing.HotkeyPrefix.cs -// -// (C) 2002 Ximian, Inc. http://www.ximian.com -// Author: Dennis Hayes (dennish@raytek.com) -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -using System; -namespace System.Drawing.Text -{ - [Serializable] - public enum HotkeyPrefix { - Hide = 2, - None = 0, - Show = 1 - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Text/InstalledFontCollection.cs b/mcs/class/System.Drawing/System.Drawing.Text/InstalledFontCollection.cs deleted file mode 100644 index c7414581162..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Text/InstalledFontCollection.cs +++ /dev/null @@ -1,49 +0,0 @@ -// -// System.Drawing.Text.InstalledFontCollection.cs -// -// (C) 2002 Ximian, Inc. http://www.ximian.com -// Author: Everaldo Canuto everaldo.canuto@bol.com.br -// Alexandre Pigolkine ( pigolkine@gmx.de) -// Sanjay Gupta (gsanjay@novell.com) -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -using System; -using System.Drawing; - -namespace System.Drawing.Text { - - public sealed class InstalledFontCollection : FontCollection { - - internal InstalledFontCollection(IntPtr ptr): base (ptr) - {} - - public InstalledFontCollection() - { - Status status = GDIPlus.GdipNewInstalledFontCollection (out nativeFontCollection); - GDIPlus.CheckStatus (status); - } - } -} - diff --git a/mcs/class/System.Drawing/System.Drawing.Text/InstalledFontCollection.jvm.cs b/mcs/class/System.Drawing/System.Drawing.Text/InstalledFontCollection.jvm.cs deleted file mode 100644 index f966c279623..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Text/InstalledFontCollection.jvm.cs +++ /dev/null @@ -1,62 +0,0 @@ -// -// System.Drawing.InstalledFontCollection.cs -// -// (C) 2005 Mainsoft Corporation (http://www.mainsoft.com) -// Author: Konstantin Triger (kostat@mainsoft.com) -// - -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; -using System.Collections; -using System.Collections.Specialized; -using awt = java.awt; - -namespace System.Drawing.Text -{ - /// - /// Summary description for InstalledFontCollection. - /// - public sealed class InstalledFontCollection : FontCollection - { - Hashtable _names; - public InstalledFontCollection() - { - _fonts.AddRange( - java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment().getAllFonts()); - - Hashtable h = CollectionsUtil.CreateCaseInsensitiveHashtable(_fonts.Count); - for (int i = 0; i < _fonts.Count; i++) { - string family = ((awt.Font)_fonts[i]).getFamily(); - if (!h.ContainsKey(family)) - h[family] = family; - } - - _names = h; - } - - internal override string GetFamilyName(string name) { - return (string)_names[name]; - } - - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Text/PrivateFontCollection.cs b/mcs/class/System.Drawing/System.Drawing.Text/PrivateFontCollection.cs deleted file mode 100644 index e5d46ed8397..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Text/PrivateFontCollection.cs +++ /dev/null @@ -1,84 +0,0 @@ -// -// System.Drawing.Text.PrivateFontCollection.cs -// -// (C) 2002 Ximian, Inc. http://www.ximian.com -// Author: Everaldo Canuto everaldo.canuto@bol.com.br -// Sanjay Gupta (gsanjay@novell.com) -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -using System; -using System.IO; -using System.Drawing; -using System.Runtime.InteropServices; - -namespace System.Drawing.Text { - - [ComVisible(false)] - public sealed class PrivateFontCollection : FontCollection { - - // constructors - internal PrivateFontCollection (IntPtr ptr): base (ptr) - {} - - public PrivateFontCollection() - { - Status status = GDIPlus.GdipNewPrivateFontCollection (out nativeFontCollection); - GDIPlus.CheckStatus (status); - } - - // methods - public void AddFontFile(string filename) - { - if ( filename == null ) - throw new Exception ("Value cannot be null, Parameter name : filename"); - bool exists = File.Exists(filename); - if (!exists) - throw new Exception ("The path is not of a legal form"); - - Status status = GDIPlus.GdipPrivateAddFontFile (nativeFontCollection, filename); - GDIPlus.CheckStatus (status); - } - - public void AddMemoryFont(IntPtr memory, int length) - { - Status status = GDIPlus.GdipPrivateAddMemoryFont (nativeFontCollection, memory, length); - GDIPlus.CheckStatus (status); - } - - // methods - protected override void Dispose(bool disposing) - { - if (nativeFontCollection!=IntPtr.Zero){ - GDIPlus.GdipDeletePrivateFontCollection (nativeFontCollection); - nativeFontCollection = IntPtr.Zero; - } - - base.Dispose (true); - } - - - } -} - diff --git a/mcs/class/System.Drawing/System.Drawing.Text/PrivateFontCollection.jvm.cs b/mcs/class/System.Drawing/System.Drawing.Text/PrivateFontCollection.jvm.cs deleted file mode 100644 index c72636607a6..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Text/PrivateFontCollection.jvm.cs +++ /dev/null @@ -1,60 +0,0 @@ -// -// System.Drawing.PrivateFontCollection.cs -// -// (C) 2005 Mainsoft Corporation (http://www.mainsoft.com) -// Author: Konstantin Triger (kostat@mainsoft.com) -// - -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; -using awt = java.awt; -using io = java.io; -using vmw.common; - -namespace System.Drawing.Text -{ - /// - /// Summary description for PrivateFontCollection. - /// - public sealed class PrivateFontCollection : FontCollection - { - public PrivateFontCollection() - { - } - - public void AddFontFile(string filename) { - io.File file = IOUtils.getJavaFile(filename); - io.FileInputStream stream = new io.FileInputStream(file); - try { - _fonts.Add(awt.Font.createFont(awt.Font.TRUETYPE_FONT, stream)); - } - finally { - stream.close(); - } - } -#if INTPTR_SUPPORT - public void AddMemoryFont(IntPtr memory, int length) { - } -#endif - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Text/TextRenderingHint.cs b/mcs/class/System.Drawing/System.Drawing.Text/TextRenderingHint.cs deleted file mode 100644 index 0a2cc394378..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Text/TextRenderingHint.cs +++ /dev/null @@ -1,42 +0,0 @@ -// -// System.Drawing.TextRenderingHint.cs -// -// (C) 2002 Ximian, Inc. http://www.ximian.com -// Author: Dennis Hayes (dennish@raytek.com) -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -using System; -namespace System.Drawing.Text -{ - [Serializable] - public enum TextRenderingHint { - AntiAlias = 4, - AntiAliasGridFit = 3, - ClearTypeGridFit = 5, - SingleBitPerPixel = 2, - SingleBitPerPixelGridFit = 1, - SystemDefault = 0 - } -} diff --git a/mcs/class/System.Drawing/System.Drawing.Text/changelog b/mcs/class/System.Drawing/System.Drawing.Text/changelog deleted file mode 100644 index 709dd393404..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.Text/changelog +++ /dev/null @@ -1,73 +0,0 @@ -2005-08-03 Andrew Skiba - - * FontCollection.jvm.cs, InstalledFontCollection.jvm.cs, - PrivateFontCollection.jvm.cs: added TARGET_JVM implementation - -2005-04-04 Jordi Mas i Hernandez - - * PrivateFontCollection.cs: nativeFontCollection equals IntPtr.Zero to - avoid errors on multiple disposes - - * FontCollection.cs: implements dispose - -2004-11-25 Marek Safar - - * Image.cs: Add CheckStatus to Families. - -2004-02-25 Andreas Nahr - - * PrivateFontCollection.cs: Removed excess attributes - -2004-02-25 Andreas Nahr - - * FontCollection.cs: Remove console - -2004-02-06 Sanjay Gupta - * CheckStatus(): Used method of GDIPlus for error checking - in FontCollection.cs, InstalledFontCollection.cs and - PrivateFontCollection.cs - -2004-01-29 Sanjay Gupta - * FontCollection.cs: Implemented Dispose method. - * InstalledFontCollection.cs: Removed Console.WriteLine calls. - * PrivateFontCollection.cs: Implemented AddMemoryFont method. - -2004-01-28 Jordi Mas - * FontCollection.cs: fixed marshalling issues - -2004-01-28 Sanjay Gupta - - * FontCollection.cs: Implemented missing functionalities. - * InstalledFontCollection.css: Implemented missing functionalities. - * PrivateFontCollection.cs: Implemented few methods. - -2004-01-10 Ravindra - - * All Enums: Made serializable. - -2003-10-12 Alexandre Pigolkine - * InstalledFontCollection.cs factory removed - -2003-06-22 Alexandre Pigolkine - * FontCollection.cs - * InstalledFontCollection.cs - calls to implementation added - -2002-09-16 Nick Drochak - - * PrivateFontCollection.cs: Fix build error. Cannot put ComVisible on - constructors. - -2003-09-14 Piers Haken - - * PrivateFontCollection.cs: import interop for ComVisible attribute - -2002-09-13 Dennis Hayes (dennish@raytek.com) -* checked in for Everaldo Canuto everaldo.canuto@bol.com.br - -* FontCollection.cs -* GenericFontFamilies.cs -* HotkeyPrefix.cs -* InstalledFontCollection.cs -* PrivateFontCollection.cs -* TextRenderingHint.cs diff --git a/mcs/class/System.Drawing/System.Drawing.dll.sources b/mcs/class/System.Drawing/System.Drawing.dll.sources deleted file mode 100755 index 961966f8fd4..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.dll.sources +++ /dev/null @@ -1,180 +0,0 @@ -Assembly/AssemblyInfo.cs -../../build/common/Consts.cs -../../build/common/Locale.cs -System.Drawing/Bitmap.cs -System.Drawing/Brush.cs -System.Drawing/Brushes.cs -System.Drawing/CharacterRange.cs -System.Drawing/carbonFunctions.cs -System.Drawing/ColorConverter.cs -System.Drawing/Color.cs -System.Drawing/ColorTranslator.cs -System.Drawing/ComIStreamMarshaler.cs -System.Drawing/ComIStreamWrapper.cs -System.Drawing/ContentAlignment.cs -System.Drawing/Font.cs -System.Drawing/FontConverter.cs -System.Drawing/FontFamily.cs -System.Drawing/FontStyle.cs -System.Drawing/Graphics.cs -System.Drawing/GraphicsUnit.cs -System.Drawing/gdipEnums.cs -System.Drawing/gdipFunctions.cs -System.Drawing/gdipStructs.cs -System.Drawing/KnownColor.cs -System.Drawing/IconConverter.cs -System.Drawing/Icon.cs -System.Drawing/ImageAnimator.cs -System.Drawing/ImageConverter.cs -System.Drawing/Image.cs -System.Drawing/ImageFormatConverter.cs -System.Drawing/Pen.cs -System.Drawing/Pens.cs -System.Drawing/PointConverter.cs -System.Drawing/Point.cs -System.Drawing/PointF.cs -System.Drawing/RectangleConverter.cs -System.Drawing/Rectangle.cs -System.Drawing/RectangleF.cs -System.Drawing/Region.cs -System.Drawing/RotateFlipType.cs -System.Drawing/SizeConverter.cs -System.Drawing/Size.cs -System.Drawing/SizeF.cs -System.Drawing/SolidBrush.cs -System.Drawing/SRDescriptionAttribute.cs -System.Drawing/StringAligment.cs -System.Drawing/StringDigitSubstitute.cs -System.Drawing/StringFormat.cs -System.Drawing/StringFormatFlags.cs -System.Drawing/StringTrimming.cs -System.Drawing/StringUnit.cs -System.Drawing/SystemBrushes.cs -System.Drawing/SystemColors.cs -System.Drawing/SystemIcons.cs -System.Drawing/SystemPens.cs -System.Drawing/TextureBrush.cs -System.Drawing/ToolboxBitmapAttribute.cs -System.Drawing.Design/UITypeEditorEditStyle.cs -System.Drawing.Design/IPropertyValueUIService.cs -System.Drawing.Design/PropertyValueItem.cs -System.Drawing.Design/PropertyValueUIHandler.cs -System.Drawing.Design/PropertyValueUIItemInvokeHandler.cs -System.Drawing.Design/CategoryNameCollection.cs -System.Drawing.Design/IToolboxService.cs -System.Drawing.Design/IToolboxUser.cs -System.Drawing.Design/PaintValueEventArgs.cs -System.Drawing.Design/ToolboxComponentsCreatedEventArgs.cs -System.Drawing.Design/ToolboxComponentsCreatedEventHandler.cs -System.Drawing.Design/ToolboxComponentsCreatingEventArgs.cs -System.Drawing.Design/ToolboxComponentsCreatingEventHandler.cs -System.Drawing.Design/ToolboxItemCreatorCallback.cs -System.Drawing.Design/ToolboxItem.cs -System.Drawing.Design/UITypeEditor.cs -System.Drawing.Design/ToolboxItemCollection.cs -System.Drawing.Drawing2D/AdjustableArrowCap.cs -System.Drawing.Drawing2D/Blend.cs -System.Drawing.Drawing2D/ColorBlend.cs -System.Drawing.Drawing2D/CombineMode.cs -System.Drawing.Drawing2D/CompostingMode.cs -System.Drawing.Drawing2D/CompostingQuality.cs -System.Drawing.Drawing2D/CoordinateSpace.cs -System.Drawing.Drawing2D/CustomLineCap.cs -System.Drawing.Drawing2D/DashCap.cs -System.Drawing.Drawing2D/DashStyle.cs -System.Drawing.Drawing2D/FillMode.cs -System.Drawing.Drawing2D/FlushIntention.cs -System.Drawing.Drawing2D/GraphicsContainer.cs -System.Drawing.Drawing2D/GraphicsPath.cs -System.Drawing.Drawing2D/GraphicsPathIterator.cs -System.Drawing.Drawing2D/GraphicsState.cs -System.Drawing.Drawing2D/HatchBrush.cs -System.Drawing.Drawing2D/HatchStyle.cs -System.Drawing.Drawing2D/InterpolationMode.cs -System.Drawing.Drawing2D/LinearGradientBrush.cs -System.Drawing.Drawing2D/LinearGradientMode.cs -System.Drawing.Drawing2D/LineCap.cs -System.Drawing.Drawing2D/LineJoin.cs -System.Drawing.Drawing2D/Matrix.cs -System.Drawing.Drawing2D/MatrixOrder.cs -System.Drawing.Drawing2D/PathData.cs -System.Drawing.Drawing2D/PathGradientBrush.cs -System.Drawing.Drawing2D/PathPointType.cs -System.Drawing.Drawing2D/PenAlignment.cs -System.Drawing.Drawing2D/PenType.cs -System.Drawing.Drawing2D/PixelOffsetMode.cs -System.Drawing.Drawing2D/QualityMode.cs -System.Drawing.Drawing2D/RegionData.cs -System.Drawing.Drawing2D/SmoothingMode.cs -../../build/common/MonoTODOAttribute.cs -System.Drawing.Drawing2D/WarpMode.cs -System.Drawing.Drawing2D/WrapMode.cs -System.Drawing.Imaging/BitmapData.cs -System.Drawing.Imaging/ColorAdjustType.cs -System.Drawing.Imaging/ColorChannelFlag.cs -System.Drawing.Imaging/ColorMap.cs -System.Drawing.Imaging/ColorMapType.cs -System.Drawing.Imaging/ColorMatrix.cs -System.Drawing.Imaging/ColorMatrixFlag.cs -System.Drawing.Imaging/ColorMode.cs -System.Drawing.Imaging/ColorPalette.cs -System.Drawing.Imaging/EmfPlusRecordType.cs -System.Drawing.Imaging/EmfType.cs -System.Drawing.Imaging/Encoder.cs -System.Drawing.Imaging/EncoderParameter.cs -System.Drawing.Imaging/EncoderParameters.cs -System.Drawing.Imaging/EncoderParameterValueType.cs -System.Drawing.Imaging/EncoderValue.cs -System.Drawing.Imaging/FrameDimension.cs -System.Drawing.Imaging/ImageAttributes.cs -System.Drawing.Imaging/ImageCodecFlags.cs -System.Drawing.Imaging/ImageCodecInfo.cs -System.Drawing.Imaging/ImageFlags.cs -System.Drawing.Imaging/ImageFormat.cs -System.Drawing.Imaging/ImageLockMode.cs -System.Drawing.Imaging/Metafile.cs -System.Drawing.Imaging/MetafileFrameUnit.cs -System.Drawing.Imaging/MetafileHeader.cs -System.Drawing.Imaging/MetafileType.cs -System.Drawing.Imaging/MetaHeader.cs -System.Drawing.Imaging/PaletteFlags.cs -System.Drawing.Imaging/PixelFormat.cs -System.Drawing.Imaging/PlayRecordCallback.cs -System.Drawing.Imaging/PropertyItem.cs -System.Drawing.Imaging/WmfPlaceableFileHeader.cs -System.Drawing.Printing/Duplex.cs -System.Drawing.Printing/InvalidPrinterException.cs -System.Drawing.Printing/MarginsConverter.cs -System.Drawing.Printing/Margins.cs -System.Drawing.Printing/PageSettings.cs -System.Drawing.Printing/PaperKind.cs -System.Drawing.Printing/PaperSize.cs -System.Drawing.Printing/PaperSource.cs -System.Drawing.Printing/PaperSourceKind.cs -System.Drawing.Printing/PreviewPageInfo.cs -System.Drawing.Printing/PreviewPrintController.cs -System.Drawing.Printing/PrintController.cs -System.Drawing.Printing/PrintDocument.cs -System.Drawing.Printing/PrinterResolution.cs -System.Drawing.Printing/PrinterResolutionKind.cs -System.Drawing.Printing/PrinterSettings.cs -System.Drawing.Printing/PrinterUnit.cs -System.Drawing.Printing/PrinterUnitConvert.cs -System.Drawing.Printing/PrintEventArgs.cs -System.Drawing.Printing/PrintEventHandler.cs -System.Drawing.Printing/PrintingPermissionAttribute.cs -System.Drawing.Printing/PrintingPermission.cs -System.Drawing.Printing/PrintingPermissionLevel.cs -System.Drawing.Printing/PrintPageEventArgs.cs -System.Drawing.Printing/PrintPageEventHandler.cs -System.Drawing.Printing/PrintRange.cs -System.Drawing.Printing/QueryPageSettingsEventArgs.cs -System.Drawing.Printing/QueryPageSettingsEventHandler.cs -System.Drawing.Printing/StandardPrintController.cs -System.Drawing.Text/FontCollection.cs -System.Drawing.Text/PrivateFontCollection.cs -System.Drawing.Text/GenericFontFamilies.cs -System.Drawing.Text/HotkeyPrefix.cs -System.Drawing.Text/InstalledFontCollection.cs -System.Drawing.Text/TextRenderingHint.cs - diff --git a/mcs/class/System.Drawing/System.Drawing.sln b/mcs/class/System.Drawing/System.Drawing.sln deleted file mode 100644 index 3b05edfd090..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.sln +++ /dev/null @@ -1,21 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 8.00 -Project("{83B010C7-76FC-4FAD-A26C-00D7EFE60256}") = "System.Drawing", "System.Drawing.vmwcsproj", "{33E3C30E-1978-4FBD-A743-AF0885938266}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfiguration) = preSolution - Debug_Java = Debug_Java - Release_Java = Release_Java - EndGlobalSection - GlobalSection(ProjectConfiguration) = postSolution - {33E3C30E-1978-4FBD-A743-AF0885938266}.Debug_Java.ActiveCfg = Debug_Java|.NET - {33E3C30E-1978-4FBD-A743-AF0885938266}.Debug_Java.Build.0 = Debug_Java|.NET - {33E3C30E-1978-4FBD-A743-AF0885938266}.Release_Java.ActiveCfg = Release_Java|.NET - {33E3C30E-1978-4FBD-A743-AF0885938266}.Release_Java.Build.0 = Release_Java|.NET - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - EndGlobalSection - GlobalSection(ExtensibilityAddIns) = postSolution - EndGlobalSection -EndGlobal diff --git a/mcs/class/System.Drawing/System.Drawing.vmwcsproj b/mcs/class/System.Drawing/System.Drawing.vmwcsproj deleted file mode 100644 index 98500a73218..00000000000 --- a/mcs/class/System.Drawing/System.Drawing.vmwcsproj +++ /dev/null @@ -1,159 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/mcs/class/System.Drawing/System.Drawing/AdvancedStroke.jvm.cs b/mcs/class/System.Drawing/System.Drawing/AdvancedStroke.jvm.cs deleted file mode 100755 index 4d6b6aa948b..00000000000 --- a/mcs/class/System.Drawing/System.Drawing/AdvancedStroke.jvm.cs +++ /dev/null @@ -1,537 +0,0 @@ -using System; -using System.Drawing.Drawing2D; -using java.lang; - -using java.awt; -using java.awt.geom; -using sun.dc.path; -using sun.dc.pr; - -namespace System.Drawing { - internal class AdvancedStroke : Stroke { - - public const float PenUnits = 0.01f; - public const int MinPenUnits = 100; - public const int MinPenUnitsAA = 20; - public const float MinPenSizeAA = PenUnits * MinPenUnitsAA; - public const double MinPenSizeAASquared = (MinPenSizeAA * MinPenSizeAA); - public const double MinPenSizeSquared = 1.000000001; - public const double MinPenSizeNorm = 1.5; - public const double MinPenSizeSquaredNorm = (MinPenSizeNorm * MinPenSizeNorm); - - /** - * Joins path segments by extending their outside edges until - * they meet. - */ - public const int JOIN_MITER = 0; - - /** - * Joins path segments by rounding off the corner at a radius - * of half the line width. - */ - public const int JOIN_ROUND = 1; - - /** - * Joins path segments by connecting the outer corners of their - * wide outlines with a straight segment. - */ - public const int JOIN_BEVEL = 2; - - /** - * Ends unclosed subpaths and dash segments with no added - * decoration. - */ - public const int CAP_BUTT = 0; - - /** - * Ends unclosed subpaths and dash segments with a round - * decoration that has a radius equal to half of the width - * of the pen. - */ - public const int CAP_ROUND = 1; - - /** - * Ends unclosed subpaths and dash segments with a square - * projection that extends beyond the end of the segment - * to a distance equal to half of the line width. - */ - public const int CAP_SQUARE = 2; - - float width; - - int join; - int cap; - float miterlimit; - - float[] dash; - float dash_phase; - - AffineTransform _penTransform; - AffineTransform _outputTransform; - bool _fitPen; - - /** - * Constructs a new AdvancedStroke with the specified - * attributes. - * @param width the width of this AdvancedStroke. The - * width must be greater than or equal to 0.0f. If width is - * set to 0.0f, the stroke is rendered as the thinnest - * possible line for the target device and the antialias - * hint setting. - * @param cap the decoration of the ends of a AdvancedStroke - * @param join the decoration applied where path segments meet - * @param miterlimit the limit to trim the miter join. The miterlimit - * must be greater than or equal to 1.0f. - * @param dash the array representing the dashing pattern - * @param dash_phase the offset to start the dashing pattern - * @throws IllegalArgumentException if width is negative - * @throws IllegalArgumentException if cap is not either - * CAP_BUTT, CAP_ROUND or CAP_SQUARE - * @throws IllegalArgumentException if miterlimit is less - * than 1 and join is JOIN_MITER - * @throws IllegalArgumentException if join is not - * either JOIN_ROUND, JOIN_BEVEL, or JOIN_MITER - * @throws IllegalArgumentException if dash_phase - * is negative and dash is not null - * @throws IllegalArgumentException if the length of - * dash is zero - * @throws IllegalArgumentException if dash lengths are all zero. - */ - public AdvancedStroke(float width, int cap, int join, float miterlimit, - float[] dash, float dash_phase, AffineTransform penTransform, - AffineTransform outputTransform, bool fitPen) { - if (width < 0.0f) { - throw new IllegalArgumentException("negative width"); - } - if (cap != CAP_BUTT && cap != CAP_ROUND && cap != CAP_SQUARE) { - throw new IllegalArgumentException("illegal end cap value"); - } - if (join == JOIN_MITER) { - if (miterlimit < 1.0f) { - throw new IllegalArgumentException("miter limit < 1"); - } - } else if (join != JOIN_ROUND && join != JOIN_BEVEL) { - throw new IllegalArgumentException("illegal line join value"); - } - if (dash != null) { - if (dash_phase < 0.0f) { - throw new IllegalArgumentException("negative dash phase"); - } - bool allzero = true; - for (int i = 0; i < dash.Length; i++) { - float d = dash[i]; - if (d > 0.0) { - allzero = false; - } else if (d < 0.0) { - throw new IllegalArgumentException("negative dash length"); - } - } - if (allzero) { - throw new IllegalArgumentException("dash lengths all zero"); - } - } - this.width = width; - this.cap = cap; - this.join = join; - this.miterlimit = miterlimit; - if (dash != null) { - this.dash = (float []) dash.Clone(); - } - this.dash_phase = dash_phase; - this._penTransform = penTransform; - this._outputTransform = outputTransform; - this._fitPen = fitPen; - } - - /** - * Constructs a solid AdvancedStroke with the specified - * attributes. - * @param width the width of the AdvancedStroke - * @param cap the decoration of the ends of a AdvancedStroke - * @param join the decoration applied where path segments meet - * @param miterlimit the limit to trim the miter join - * @throws IllegalArgumentException if width is negative - * @throws IllegalArgumentException if cap is not either - * CAP_BUTT, CAP_ROUND or CAP_SQUARE - * @throws IllegalArgumentException if miterlimit is less - * than 1 and join is JOIN_MITER - * @throws IllegalArgumentException if join is not - * either JOIN_ROUND, JOIN_BEVEL, or JOIN_MITER - */ - public AdvancedStroke(float width, int cap, int join, float miterlimit) : - this(width, cap, join, miterlimit, null, 0.0f, null, null, false) { - } - - /** - * Constructs a solid AdvancedStroke with the specified - * attributes. The miterlimit parameter is - * unnecessary in cases where the default is allowable or the - * line joins are not specified as JOIN_MITER. - * @param width the width of the AdvancedStroke - * @param cap the decoration of the ends of a AdvancedStroke - * @param join the decoration applied where path segments meet - * @throws IllegalArgumentException if width is negative - * @throws IllegalArgumentException if cap is not either - * CAP_BUTT, CAP_ROUND or CAP_SQUARE - * @throws IllegalArgumentException if join is not - * either JOIN_ROUND, JOIN_BEVEL, or JOIN_MITER - */ - public AdvancedStroke(float width, int cap, int join) : - this(width, cap, join, 10.0f, null, 0.0f, null, null, false) { - } - - /** - * Constructs a solid AdvancedStroke with the specified - * line width and with default values for the cap and join - * styles. - * @param width the width of the AdvancedStroke - * @throws IllegalArgumentException if width is negative - */ - public AdvancedStroke(float width) : - this(width, CAP_SQUARE, JOIN_MITER, 10.0f, null, 0.0f, null, null, false) { - } - - /** - * Constructs a new AdvancedStroke with defaults for all - * attributes. - * The default attributes are a solid line of width 1.0, CAP_SQUARE, - * JOIN_MITER, a miter limit of 10.0. - */ - public AdvancedStroke() : - this(1.0f, CAP_SQUARE, JOIN_MITER, 10.0f, null, 0.0f, null, null, false) { - } - - - /** - * Returns a Shape whose interior defines the - * stroked outline of a specified Shape. - * @param s the Shape boundary be stroked - * @return the Shape of the stroked outline. - */ - public Shape createStrokedShape(Shape s) { - FillAdapter filler = new FillAdapter(); - PathStroker stroker = new PathStroker(filler); - PathConsumer consumer; - - stroker.setPenDiameter(width); - if (_fitPen) - stroker.setPenFitting(PenUnits, MinPenUnitsAA); - - float[] t4 = null; - if (PenTransform != null && !PenTransform.isIdentity()) { - t4 = new float[]{ - (float)PenTransform.getScaleX(), (float)PenTransform.getShearY(), - (float)PenTransform.getShearX(), (float)PenTransform.getScaleY() - }; - } - - float[] t6 = null; - if (OutputTransform != null && !OutputTransform.isIdentity()) { - t6 = new float[] { - (float)OutputTransform.getScaleX(), (float)OutputTransform.getShearY(), - (float)OutputTransform.getShearX(), (float)OutputTransform.getScaleY(), - (float)OutputTransform.getTranslateX(), (float)OutputTransform.getTranslateY() - }; - } - - stroker.setPenT4(t4); - stroker.setOutputT6(t6); - stroker.setCaps(RasterizerCaps[cap]); - stroker.setCorners(RasterizerCorners[join], miterlimit); - if (dash != null) { - PathDasher dasher = new PathDasher(stroker); - dasher.setDash(dash, dash_phase); - dasher.setDashT4(t4); - consumer = dasher; - } else { - consumer = stroker; - } - - PathIterator pi = s.getPathIterator(null); - - try { - consumer.beginPath(); - bool pathClosed = false; - float mx = 0.0f; - float my = 0.0f; - float[] point = new float[6]; - - while (!pi.isDone()) { - int type = pi.currentSegment(point); - if (pathClosed == true) { - pathClosed = false; - if (type != PathIterator__Finals.SEG_MOVETO) { - // Force current point back to last moveto point - consumer.beginSubpath(mx, my); - } - } - switch ((GraphicsPath.JPI)type) { - case GraphicsPath.JPI.SEG_MOVETO: - mx = point[0]; - my = point[1]; - consumer.beginSubpath(point[0], point[1]); - break; - case GraphicsPath.JPI.SEG_LINETO: - consumer.appendLine(point[0], point[1]); - break; - case GraphicsPath.JPI.SEG_QUADTO: - // Quadratic curves take two points - consumer.appendQuadratic(point[0], point[1], - point[2], point[3]); - break; - case GraphicsPath.JPI.SEG_CUBICTO: - // Cubic curves take three points - consumer.appendCubic(point[0], point[1], - point[2], point[3], - point[4], point[5]); - break; - case GraphicsPath.JPI.SEG_CLOSE: - consumer.closedSubpath(); - pathClosed = true; - break; - } - pi.next(); - } - - consumer.endPath(); - } catch (PathException e) { - throw new InternalError("Unable to Stroke shape ("+ - e.Message+")"); - } - - return filler.getShape(); - } - - /** - * Returns the line width. Line width is represented in user space, - * which is the default-coordinate space used by Java 2D. See the - * Graphics2D class comments for more information on - * the user space coordinate system. - * @return the line width of this AdvancedStroke. - * @see Graphics2D - */ - public float getLineWidth() { - return width; - } - - /** - * Returns the end cap style. - * @return the end cap style of this AdvancedStroke as one - * of the static int values that define possible end cap - * styles. - */ - public int getEndCap() { - return cap; - } - - /** - * Returns the line join style. - * @return the line join style of the AdvancedStroke as one - * of the static int values that define possible line - * join styles. - */ - public int getLineJoin() { - return join; - } - - /** - * Returns the limit of miter joins. - * @return the limit of miter joins of the AdvancedStroke. - */ - public float getMiterLimit() { - return miterlimit; - } - - /** - * Returns the array representing the lengths of the dash segments. - * Alternate entries in the array represent the user space lengths - * of the opaque and transparent segments of the dashes. - * As the pen moves along the outline of the Shape - * to be stroked, the user space - * distance that the pen travels is accumulated. The distance - * value is used to index into the dash array. - * The pen is opaque when its current cumulative distance maps - * to an even element of the dash array and transparent otherwise. - * @return the dash array. - */ - public float[] getDashArray() { - if (dash == null) { - return null; - } - - return (float[]) dash.Clone(); - } - - /** - * Returns the current dash phase. - * The dash phase is a distance specified in user coordinates that - * represents an offset into the dashing pattern. In other words, the dash - * phase defines the point in the dashing pattern that will correspond to - * the beginning of the stroke. - * @return the dash phase as a float value. - */ - public float getDashPhase() { - return dash_phase; - } - - /** - * Returns the hashcode for this stroke. - * @return a hash code for this stroke. - */ - public override int GetHashCode() { - int hash = Float.floatToIntBits(width); - hash = hash * 31 + join; - hash = hash * 31 + cap; - hash = hash * 31 + Float.floatToIntBits(miterlimit); - if (dash != null) { - hash = hash * 31 + Float.floatToIntBits(dash_phase); - for (int i = 0; i < dash.Length; i++) { - hash = hash * 31 + Float.floatToIntBits(dash[i]); - } - } - return hash; - } - - /** - * Returns true if this AdvancedStroke represents the same - * stroking operation as the given argument. - */ - /** - * Tests if a specified object is equal to this AdvancedStroke - * by first testing if it is a AdvancedStroke and then comparing - * its width, join, cap, miter limit, dash, and dash phase attributes with - * those of this AdvancedStroke. - * @param obj the specified object to compare to this - * AdvancedStroke - * @return true if the width, join, cap, miter limit, dash, and - * dash phase are the same for both objects; - * false otherwise. - */ - public override bool Equals(object obj) { - if (!(obj is AdvancedStroke)) { - return false; - } - - AdvancedStroke bs = (AdvancedStroke) obj; - if (width != bs.width) { - return false; - } - - if (join != bs.join) { - return false; - } - - if (cap != bs.cap) { - return false; - } - - if (miterlimit != bs.miterlimit) { - return false; - } - - if (dash != null) { - if (dash_phase != bs.dash_phase) { - return false; - } - - if (!java.util.Arrays.equals(dash, bs.dash)) { - return false; - } - } - else if (bs.dash != null) { - return false; - } - - return true; - } - - public AffineTransform PenTransform { - get{ - return _penTransform; - } - set{ - _penTransform = value; - } - } - - public AffineTransform OutputTransform { - get { - return _outputTransform; - } - set { - _outputTransform = value; - } - } - - private static readonly int[] RasterizerCaps = { - Rasterizer.BUTT, Rasterizer.ROUND, Rasterizer.SQUARE - }; - - private static readonly int[] RasterizerCorners = { - Rasterizer.MITER, Rasterizer.ROUND, Rasterizer.BEVEL - }; - - #region FillAdapter - - private class FillAdapter : PathConsumer { - bool closed; - GeneralPath path; - - public FillAdapter() { - path = new GeneralPath(GeneralPath.WIND_NON_ZERO); - } - - public Shape getShape() { - return path; - } - - public void beginPath() {} - - public void beginSubpath(float x0, float y0) { - if (closed) { - path.closePath(); - closed = false; - } - path.moveTo(x0, y0); - } - - public void appendLine(float x1, float y1) { - path.lineTo(x1, y1); - } - - public void appendQuadratic(float xm, float ym, float x1, float y1) { - path.quadTo(xm, ym, x1, y1); - } - - public void appendCubic(float xm, float ym, - float xn, float yn, - float x1, float y1) { - path.curveTo(xm, ym, xn, yn, x1, y1); - } - - public void closedSubpath() { - closed = true; - } - - public void endPath() { - if (closed) { - path.closePath(); - closed = false; - } - } - - public void useProxy(FastPathProducer proxy) { - proxy.sendTo(this); - } - - public long getCPathConsumer() { - return 0; - } - - public void dispose() { - } - } - - #endregion - } -} \ No newline at end of file diff --git a/mcs/class/System.Drawing/System.Drawing/BasicShape.jvm.cs b/mcs/class/System.Drawing/System.Drawing/BasicShape.jvm.cs deleted file mode 100755 index 5aad895321f..00000000000 --- a/mcs/class/System.Drawing/System.Drawing/BasicShape.jvm.cs +++ /dev/null @@ -1,85 +0,0 @@ -using System; -using System.Drawing; -using System.Drawing.Drawing2D; -using System.Runtime.InteropServices; - -using awt = java.awt; -using geom = java.awt.geom; - -namespace System.Drawing -{ - /// - /// Summary description for BasicShape. - /// - public abstract class BasicShape : MarshalByRefObject, awt.Shape, IDisposable - { - awt.Shape _shape; - - protected BasicShape(awt.Shape shape) - { - _shape = shape; - } - - protected awt.Shape Shape { - get { - return _shape; - } - set { - _shape = value; - } - } - - #region IDisposable - public void Dispose () { - Dispose (true); - } - - void Dispose (bool disposing) { - } - #endregion - - #region Shape Members - - awt.Rectangle awt.Shape.getBounds() { - return Shape.getBounds(); - } - - bool awt.Shape.contains(double arg_0, double arg_1) { - return Shape.contains(arg_0, arg_1); - } - - bool awt.Shape.contains(geom.Point2D arg_0) { - return Shape.contains(arg_0); - } - - bool awt.Shape.contains(double arg_0, double arg_1, double arg_2, double arg_3) { - return Shape.contains(arg_0, arg_1, arg_2, arg_3); - } - - bool awt.Shape.contains(geom.Rectangle2D arg_0) { - return Shape.contains(arg_0); - } - - geom.PathIterator awt.Shape.getPathIterator(geom.AffineTransform arg_0) { - return Shape.getPathIterator(arg_0); - } - - geom.PathIterator awt.Shape.getPathIterator(geom.AffineTransform arg_0, double arg_1) { - return Shape.getPathIterator(arg_0, arg_1); - } - - geom.Rectangle2D awt.Shape.getBounds2D() { - return Shape.getBounds2D(); - } - - bool awt.Shape.intersects(double arg_0, double arg_1, double arg_2, double arg_3) { - return Shape.intersects(arg_0, arg_1, arg_2, arg_3); - } - - bool awt.Shape.intersects(geom.Rectangle2D arg_0) { - return Shape.intersects(arg_0); - } - - #endregion - } -} diff --git a/mcs/class/System.Drawing/System.Drawing/Bitmap.cs b/mcs/class/System.Drawing/System.Drawing/Bitmap.cs deleted file mode 100644 index d25f2122132..00000000000 --- a/mcs/class/System.Drawing/System.Drawing/Bitmap.cs +++ /dev/null @@ -1,319 +0,0 @@ -// -// System.Drawing.Bitmap.cs -// -// Copyright (C) 2002 Ximian, Inc. http://www.ximian.com -// Copyright (C) 2004 Novell, Inc. http://www.novell.com -// -// Authors: -// Alexandre Pigolkine (pigolkine@gmx.de) -// Christian Meyer (Christian.Meyer@cs.tum.edu) -// Miguel de Icaza (miguel@ximian.com) -// Jordi Mas i Hernandez (jmas@softcatala.org) -// Ravindra (rkumar@novell.com) -// - -// -// Copyright (C) 2004-2005 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System.IO; -using System.Drawing.Imaging; -using System.Runtime.Serialization; -using System.Runtime.InteropServices; -using System.ComponentModel; -using System.Security.Permissions; - -namespace System.Drawing -{ - [Serializable] - [ComVisible (true)] - [Editor ("System.Drawing.Design.BitmapEditor, " + Consts.AssemblySystem_Drawing_Design, typeof (System.Drawing.Design.UITypeEditor))] - public sealed class Bitmap : Image - { - #region constructors - // constructors - internal Bitmap (IntPtr ptr) - { - nativeObject = ptr; - } - - public Bitmap (int width, int height) : this (width, height, PixelFormat.Format32bppArgb) - { - - } - - public Bitmap (int width, int height, Graphics g) - { - IntPtr bmp; - Status s = GDIPlus.GdipCreateBitmapFromGraphics (width, height, g.nativeObject, out bmp); - GDIPlus.CheckStatus (s); - nativeObject = (IntPtr)bmp; - } - - public Bitmap (int width, int height, PixelFormat format) - { - IntPtr bmp; - Status s = GDIPlus.GdipCreateBitmapFromScan0 (width, height, 0, format, IntPtr.Zero, out bmp); - GDIPlus.CheckStatus (s); - nativeObject = (IntPtr) bmp; - - } - - public Bitmap (Image original) : this (original, original.Width, original.Height) {} - - public Bitmap (Stream stream) : this (stream, false) {} - - public Bitmap (string filename) : this (filename, false) {} - - public Bitmap (Image original, Size newSize) : this(original, newSize.Width, newSize.Height) {} - - internal Bitmap (int width, int height, PixelFormat pixel, IntPtr bmp) - { - nativeObject = (IntPtr)bmp; - } - - internal Bitmap (float width, float height, PixelFormat pixel, IntPtr bmp) - { - nativeObject = (IntPtr)bmp; - - } - - public Bitmap (Stream stream, bool useIcm) - { - if (stream == null) - throw new ArgumentNullException ("stream"); - - InitFromStream (stream); - } - - public Bitmap (string filename, bool useIcm) - { - IntPtr imagePtr; - Status st; - - if (useIcm) - st = GDIPlus.GdipCreateBitmapFromFileICM (filename, out imagePtr); - else - st = GDIPlus.GdipCreateBitmapFromFile (filename, out imagePtr); - - GDIPlus.CheckStatus (st); - nativeObject = imagePtr; - } - - public Bitmap (Type type, string resource) - { - using (Stream s = type.Assembly.GetManifestResourceStream (type, resource)){ - if (s == null) - throw new FileNotFoundException ("Resource name was not found: `" + resource + "'"); - - InitFromStream (s); - } - } - - public Bitmap (Image original, int width, int height) : this(width, height, PixelFormat.Format32bppArgb) - { - Graphics graphics = Graphics.FromImage(this); - - graphics.DrawImage(original, 0, 0, width, height); - graphics.Dispose(); - } - - public Bitmap (int width, int height, int stride, PixelFormat format, IntPtr scan0) - { - IntPtr bmp; - - Status status = GDIPlus.GdipCreateBitmapFromScan0 (width, height, stride, format, scan0, out bmp); - GDIPlus.CheckStatus (status); - nativeObject = (IntPtr) bmp; - } - - private Bitmap (SerializationInfo info, StreamingContext context) - { - foreach (SerializationEntry serEnum in info) { - if (String.Compare(serEnum.Name, "Data", true) == 0) { - byte[] bytes = (byte[]) serEnum.Value; - - if (bytes != null) { - InitFromStream(new MemoryStream(bytes)); - } - } - } - } - //The below function is not required. Call should resolve to base - //Moreover there is a problem with the declaration. Base class function - //is not declared as protected to access in descendent class - /*private Bitmap (SerializationInfo info, StreamingContext context) : base(info, context) - { - }*/ - - #endregion - // methods - public Color GetPixel (int x, int y) { - - int argb; - - Status s = GDIPlus.GdipBitmapGetPixel(nativeObject, x, y, out argb); - GDIPlus.CheckStatus (s); - - return Color.FromArgb(argb); - } - - public void SetPixel (int x, int y, Color color) - { - Status s = GDIPlus.GdipBitmapSetPixel(nativeObject, x, y, color.ToArgb()); - GDIPlus.CheckStatus (s); - } - - public Bitmap Clone (Rectangle rect,PixelFormat format) - { - IntPtr bmp; - Status status = GDIPlus.GdipCloneBitmapAreaI(rect.X, rect.Top, rect.Width, rect.Height, - PixelFormat, nativeObject, out bmp); - - GDIPlus.CheckStatus (status); - - Bitmap bmpnew = new Bitmap (rect.Width, rect.Height, PixelFormat, (IntPtr) bmp); - return bmpnew; - } - - public Bitmap Clone (RectangleF rect, PixelFormat format) - { - IntPtr bmp; - Status status = GDIPlus.GdipCloneBitmapArea (rect.X, rect.Top, rect.Width, rect.Height, - PixelFormat, nativeObject, out bmp); - GDIPlus.CheckStatus (status); - - Bitmap bmpnew = new Bitmap (rect.Width, rect.Height, PixelFormat, (IntPtr) bmp); - return bmpnew; - } - - public static Bitmap FromHicon (IntPtr hicon) //TODO: Untested - { - IntPtr bitmap; - - Status status = GDIPlus.GdipCreateBitmapFromHICON (hicon, out bitmap); - GDIPlus.CheckStatus (status); - - return new Bitmap (0,0, PixelFormat.Format32bppArgb, bitmap); // FIXME - } - - public static Bitmap FromResource (IntPtr hinstance, string bitmapName) //TODO: Untested - { - IntPtr bitmap; - - Status status = GDIPlus.GdipCreateBitmapFromResource (hinstance, bitmapName, out bitmap); - GDIPlus.CheckStatus (status); - - return new Bitmap (0,0, PixelFormat.Format32bppArgb, bitmap); // FIXME - } - - [EditorBrowsable (EditorBrowsableState.Advanced)] - [SecurityPermission (SecurityAction.LinkDemand, UnmanagedCode = true)] - public IntPtr GetHbitmap () - { - return GetHbitmap(Color.Gray); - } - - [EditorBrowsable (EditorBrowsableState.Advanced)] - [SecurityPermission (SecurityAction.LinkDemand, UnmanagedCode = true)] - public IntPtr GetHbitmap (Color background) - { - IntPtr HandleBmp; - - Status status = GDIPlus.GdipCreateHBITMAPFromBitmap (nativeObject, out HandleBmp, background.ToArgb ()); - GDIPlus.CheckStatus (status); - - return HandleBmp; - } - - [EditorBrowsable (EditorBrowsableState.Advanced)] - [SecurityPermission (SecurityAction.LinkDemand, UnmanagedCode = true)] - public IntPtr GetHicon () - { - IntPtr HandleIcon; - - Status status = GDIPlus.GdipCreateHICONFromBitmap (nativeObject, out HandleIcon); - GDIPlus.CheckStatus (status); - - return HandleIcon; - } - - public BitmapData LockBits (Rectangle rect, ImageLockMode flags, PixelFormat format) - { - BitmapData result = new BitmapData(); - - if (nativeObject == (IntPtr) 0) - throw new Exception ("nativeObject is null"); - - IntPtr lfBuffer = Marshal.AllocHGlobal(Marshal.SizeOf(result)); - Marshal.StructureToPtr(result, lfBuffer, false); - - Status status = GDIPlus.GdipBitmapLockBits (nativeObject, ref rect, flags, format, lfBuffer); - - result = (BitmapData) Marshal.PtrToStructure(lfBuffer, typeof(BitmapData)); - Marshal.FreeHGlobal (lfBuffer); - //NOTE: scan0 points to piece of memory allocated in the unmanaged space - GDIPlus.CheckStatus (status); - - return result; - } - - public void MakeTransparent () - { - Color clr = GetPixel(0,0); - MakeTransparent (clr); - } - - public void MakeTransparent (Color transparentColor) - { - // We have to draw always over a 32-bitmap surface that supports alpha channel - Bitmap bmp = new Bitmap(Width, Height, PixelFormat.Format32bppArgb); - Graphics gr = Graphics.FromImage(bmp); - Rectangle destRect = new Rectangle(0, 0, Width, Height); - ImageAttributes imageAttr = new ImageAttributes(); - - imageAttr.SetColorKey(transparentColor, transparentColor); - - gr.DrawImage (this, destRect, 0, 0, Width, Height, GraphicsUnit.Pixel, imageAttr); - - IntPtr oldBmp = nativeObject; - nativeObject = bmp.nativeObject; - bmp.nativeObject = oldBmp; - - gr.Dispose(); - bmp.Dispose(); - imageAttr.Dispose(); - } - - public void SetResolution (float xDpi, float yDpi) - { - Status status = GDIPlus.GdipBitmapSetResolution (nativeObject, xDpi, yDpi); - GDIPlus.CheckStatus (status); - } - - public void UnlockBits (BitmapData bitmap_data) - { - Status status = GDIPlus.GdipBitmapUnlockBits (nativeObject, bitmap_data); - GDIPlus.CheckStatus (status); - } - } -} diff --git a/mcs/class/System.Drawing/System.Drawing/Bitmap.jvm.cs b/mcs/class/System.Drawing/System.Drawing/Bitmap.jvm.cs deleted file mode 100644 index af0fd07b38e..00000000000 --- a/mcs/class/System.Drawing/System.Drawing/Bitmap.jvm.cs +++ /dev/null @@ -1,377 +0,0 @@ -using System; -using System.IO; -using System.Drawing.Imaging; -using System.Runtime.Serialization; -using Mainsoft.Drawing.Imaging; - -using io = java.io; -using imageio = javax.imageio; -using stream = javax.imageio.stream; -using spi = javax.imageio.spi; -using BufferedImage = java.awt.image.BufferedImage; -using JavaImage = java.awt.Image; -using awt = java.awt; -using image = java.awt.image; - -namespace System.Drawing -{ - public sealed class Bitmap : Image { - - #region constructors - - Bitmap (PlainImage orig) { - base.Initialize( orig, false ); - } - - private Bitmap (SerializationInfo info, StreamingContext context) { - throw new NotImplementedException (); - } - - public Bitmap (int width, int height, Graphics g) - :this (width, height, PixelFormat.Format32bppArgb) { - CurrentImage.HorizontalResolution = g.DpiX; - CurrentImage.VerticalResolution = g.DpiY; - } - - public Bitmap (Image original) - :this (original, original.Size) {} - - public Bitmap (Image orig, Size newSize) - :this (orig, newSize.Width, newSize.Height) {} - - public Bitmap (Image orig, int width, int height) - :base (CreateScaledImage (orig, width, height), ImageFormat.MemoryBmp) {} - - internal Bitmap (java.awt.Image nativeObject, ImageFormat format) - :base (nativeObject, format) {} - - private Bitmap (java.awt.Image nativeObject, ImageFormat format, PixelFormat pixFormat) - :this (nativeObject, format) { - if (pixFormat != this.PixelFormat) - throw new NotImplementedException ("Converting PixelFormat is not implemented yet."); - } - - public Bitmap (int width, int height) - :this (width, height, PixelFormat.Format32bppArgb) {} - - public Bitmap (int width, int height, PixelFormat format) - :base ( - new java.awt.image.BufferedImage (width, height, - ToBufferedImageFormat (format)), - ImageFormat.Bmp) { - } - - public Bitmap (Stream stream) - :this (stream, false) {} - - public Bitmap (string filename) - :this (filename, false) {} - - public Bitmap (Stream stream, bool useIcm) - :this (stream, useIcm, null) {} - - public Bitmap (string filename, bool useIcm) - :this (filename, useIcm, null) {} - - internal Bitmap (Stream stream, bool useIcm, ImageFormat format) { - // TBD: useIcm param - io.InputStream jis = vmw.common.IOUtils.ToInputStream (stream); - Initialize (new stream.MemoryCacheImageInputStream (jis), format); - } - - internal Bitmap (string filename, bool useIcm, ImageFormat format) { - // TBD: useIcm param - java.io.File file = vmw.common.IOUtils.getJavaFile (filename); - if (!file.exists ()) - throw new System.IO.FileNotFoundException (filename); - Initialize (new stream.FileImageInputStream (file), format); - } - - public Bitmap (Type type, string resource) { - using (Stream s = type.Assembly.GetManifestResourceStream (resource)) { - if (s == null) - throw new ArgumentException("Resource '" + resource + "' could not be found in class '" + type.ToString() + "'"); - - io.InputStream jis = vmw.common.IOUtils.ToInputStream (s); - Initialize (new stream.MemoryCacheImageInputStream (jis), null); - } - } -#if INTPTR_SUPPORT - public Bitmap (int width, int height, int stride, PixelFormat format, IntPtr scan0) - { - throw new NotImplementedException(); - } -#endif - #endregion - - #region Internal Initialization - - private void Initialize (stream.ImageInputStream input, ImageFormat format) { - ImageCodec ic = null; - - if (format == null) - ic = ImageCodec.CreateReader(input); - else - ic = ImageCodec.CreateReader(format); - - try { - ic.NativeStream = input; - PlainImage pi = ic.ReadPlainImage(); - base.Initialize( pi, false ); - - pi = ic.ReadNextPlainImage(); - while ( pi != null) { - base.Initialize( pi, true ); - pi = ic.ReadNextPlainImage(); - } - - _flags |= (int)(ImageFlags.ImageFlagsReadOnly | ImageFlags.ImageFlagsHasRealPixelSize); - } - catch (IOException ex) { - throw ex; - } - catch (Exception) { - throw new OutOfMemoryException ("Out of memory"); - } - } - - #endregion - - #region InternalSave - protected override void InternalSave (stream.ImageOutputStream output, Guid clsid) { - - ImageCodec ic = ImageCodec.CreateWriter( clsid ); - - // .net saves in png if cannot find requested encoder. act id 316563 - if (ic == null) - ic = ImageCodec.CreateWriter( ImageFormat.Png ); - - if (ic != null) { - ic.NativeStream = output; - ic.WritePlainImage( CurrentImage ); - } - else { - throw new NotSupportedException("The requested format encoder is not supported"); - } - } - - #endregion - - #region private statics: ToBufferedImageFormat, CreateScaledImage - - private static int ToBufferedImageFormat (PixelFormat format) { - switch(format) { - case PixelFormat.Format16bppGrayScale: - return BufferedImage.TYPE_USHORT_GRAY; - case PixelFormat.Format1bppIndexed: - return BufferedImage.TYPE_BYTE_GRAY; - case PixelFormat.Format32bppArgb: - return BufferedImage.TYPE_INT_ARGB; - case PixelFormat.Format32bppRgb: - return BufferedImage.TYPE_INT_RGB; - case PixelFormat.Format32bppPArgb: - return BufferedImage.TYPE_INT_ARGB_PRE; - case PixelFormat.Format16bppRgb555: - return BufferedImage.TYPE_USHORT_555_RGB; - case PixelFormat.Format16bppRgb565: - return BufferedImage.TYPE_USHORT_565_RGB; - case PixelFormat.Indexed: - return BufferedImage.TYPE_BYTE_INDEXED; - default: - return 0; - } - } - - private static java.awt.Image CreateScaledImage(Image original, int width, int height) { - JavaImage oldscaled = original.CurrentImage.NativeImage.getScaledInstance(width, height, - JavaImage.SCALE_DEFAULT); - BufferedImage newimage = new BufferedImage(oldscaled.getWidth(null), - oldscaled.getHeight(null), - BufferedImage.TYPE_INT_ARGB); - java.awt.Graphics2D graphics2d = newimage.createGraphics(); - graphics2d.drawImage(oldscaled, 0, 0, null); - graphics2d.dispose(); - return newimage; - } - #endregion - - #region Get-SetPixel - public Color GetPixel (int x, int y) - { - - int argb = NativeObject.getRGB(x,y); - return Color.FromArgb(argb); - } - - public void SetPixel (int x, int y, Color color) - { - int rgb = color.ToArgb(); - NativeObject.setRGB(x,y,rgb); - } - #endregion - - #region Clone - public override object Clone () { - return new Bitmap ( (PlainImage)CurrentImage.Clone() ); - } - - public Bitmap Clone (Rectangle rect, PixelFormat pixFormat) - { - return Clone(new RectangleF( rect.X, rect.Y, rect.Width, rect.Height ), pixFormat); - } - - public Bitmap Clone (RectangleF rect, PixelFormat pixFormat) - { - PlainImage plainImage = (PlainImage)CurrentImage.Clone(); - plainImage.NativeImage = ((BufferedImage)plainImage.NativeImage).getSubimage((int)rect.X,(int)rect.Y,(int)rect.Width,(int)rect.Height); - - if (pixFormat != this.PixelFormat) - throw new NotImplementedException ("Converting PixelFormat is not implemented yet."); - - return new Bitmap(plainImage); - } - #endregion - - #region LockBits - // TBD: implement this - public BitmapData LockBits (Rectangle rect, ImageLockMode flags, PixelFormat format) { - throw new NotImplementedException(); - } - #endregion - - #region MakeTransparent - public void MakeTransparent () - { - Color clr = GetPixel(0,0); - MakeTransparent (clr); - } - - public void MakeTransparent (Color transparentColor) - { - byte A = transparentColor.A; - image.WritableRaster raster = NativeObject.getRaster(); - int numBands = raster.getNumBands(); - int maxWidth = raster.getWidth() + raster.getMinX(); - int maxHeight = raster.getHeight() + raster.getMinY(); - int[] srcPix = new int[numBands]; - - for (int y = raster.getMinY(); y < maxHeight; y++) { - for (int x = raster.getMinX(); x < maxWidth; x++) { - /*srcPix =*/ raster.getPixel(x, y, srcPix); - for (int z = 0; z < numBands; z++) { - int argb = srcPix[z]; - if ((uint)argb >> 24 == A) { - argb &= 0x00FFFFFF; - srcPix[z] = argb; - } - } - } - } - } - #endregion - - #region SetResolution - public void SetResolution (float xDpi, float yDpi) - { - CurrentImage.HorizontalResolution = xDpi; - CurrentImage.VerticalResolution = yDpi; - } - #endregion - - #region UnlockBits - // TBD: implement this - public void UnlockBits (BitmapData bitmap_data) - { - throw new NotImplementedException(); - } - #endregion - - #region NativeObject - internal new BufferedImage NativeObject { - get { - return (BufferedImage)base.NativeObject.CurrentImage.NativeImage; - } - } - - protected override java.awt.Image[] CloneNativeObjects(java.awt.Image[] src) { - if (src == null) - return null; - - awt.Image[] dst = new awt.Image[src.Length]; - for (int i = 0; i < dst.Length; i++) { - BufferedImage image = src[i] as BufferedImage; - if (image == null) - throw new ArgumentException(String.Format("Unsupported image type '{0}'", src[i].ToString()), "src"); - - dst[i] = new BufferedImage(image.getColorModel(), image.copyData(null), image.isAlphaPremultiplied(), null); - } - - return dst; - } - - #endregion - - #region InternalPixelFormat - protected override PixelFormat InternalPixelFormat { - get { - int t = NativeObject.getType(); - switch(t) { - case 11://JavaImage.TYPE_USHORT_GRAY: - return PixelFormat.Format16bppGrayScale; - case 10://JavaImage.TYPE_BYTE_GRAY: - return PixelFormat.Format1bppIndexed; - case 1: //JavaImage.TYPE_INT_RGB - return PixelFormat.Format32bppRgb; - case 2: //JavaImage.TYPE_INT_ARGB: - return PixelFormat.Format32bppArgb; - case 3://JavaImage.TYPE_INT_ARGB_PRE: - return PixelFormat.Format32bppPArgb; - case 9://JavaImage.TYPE_USHORT_555_RGB: - return PixelFormat.Format16bppRgb555; - case 8://JavaImage.TYPE_USHORT_565_RGB: - return PixelFormat.Format16bppRgb565; - case 13://JavaImage.TYPE_BYTE_INDEXED: - return PixelFormat.Indexed; - //TBD: support this - case 12://JavaImage.TYPE_BYTE_BINARY: - case 0://JavaImage.TYPE_CUSTOM: - case 4://JavaImage.TYPE_INT_BGR: - case 5://JavaImage.TYPE_3BYTE_BGR: - case 6://JavaImage.TYPE_4BYTE_ABGR: - case 7://JavaImage.TYPE_4BYTE_ABGR_PRE: - default: - return PixelFormat.Undefined; - } - } - } - #endregion - -#if INTPTR_SUPPORT - public static Bitmap FromHicon (IntPtr hicon) - { - throw new NotImplementedException(); - } - - public static Bitmap FromResource (IntPtr hinstance, string bitmapName) //TBD: Untested - { - throw new NotImplementedException(); - } - - public IntPtr GetHbitmap () - { - throw new NotImplementedException(); - } - - public IntPtr GetHbitmap (Color background) - { - throw new NotImplementedException(); - } - - public IntPtr GetHicon () - { - throw new NotImplementedException(); - } -#endif - - } -} diff --git a/mcs/class/System.Drawing/System.Drawing/Brush.cs b/mcs/class/System.Drawing/System.Drawing/Brush.cs deleted file mode 100644 index b26822f51a5..00000000000 --- a/mcs/class/System.Drawing/System.Drawing/Brush.cs +++ /dev/null @@ -1,101 +0,0 @@ -// -// System.Drawing.Brush.cs -// -// Authors: -// Miguel de Icaza (miguel@ximian.com) -// Ravindra (rkumar@novell.com) -// -// (C) Ximian, Inc. http://www.ximian.com -// (C) Novell, Inc. Http://www.novell.com -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; -using System.Drawing; -using System.Drawing.Drawing2D; -using System.Collections; - -namespace System.Drawing -{ - public abstract class Brush : MarshalByRefObject, ICloneable, IDisposable - { - internal IntPtr nativeObject; - abstract public object Clone (); - - internal Brush () - { } - - internal Brush (IntPtr ptr) - { - nativeObject = ptr; - } - - internal IntPtr NativeObject { - get { - return nativeObject; - } - set { - nativeObject = value; - } - } - - internal Brush CreateBrush (IntPtr brush, System.Drawing.BrushType type) - { - switch (type) { - case BrushType.BrushTypeSolidColor: - return new SolidBrush (brush); - - case BrushType.BrushTypeHatchFill: - return new HatchBrush (brush); - - case BrushType.BrushTypeTextureFill: - return new TextureBrush (brush); - - default: - throw new NotImplementedException (); - } - } - - public void Dispose () - { - Dispose (true); - System.GC.SuppressFinalize (this); - } - - protected virtual void Dispose (bool disposing) - { - if (nativeObject != IntPtr.Zero) { - GDIPlus.GdipDeleteBrush (nativeObject); - nativeObject = IntPtr.Zero; - } - } - - ~Brush () - { - Dispose (false); - } - } -} - diff --git a/mcs/class/System.Drawing/System.Drawing/Brush.jvm.cs b/mcs/class/System.Drawing/System.Drawing/Brush.jvm.cs deleted file mode 100755 index 8f67829256b..00000000000 --- a/mcs/class/System.Drawing/System.Drawing/Brush.jvm.cs +++ /dev/null @@ -1,92 +0,0 @@ -using System; -using System.Drawing; -using System.Drawing.Drawing2D; -using System.Collections; - -using awt = java.awt; -using image = java.awt.image; -using geom = java.awt.geom; - - -namespace System.Drawing -{ - public abstract class Brush : MarshalByRefObject, ICloneable, IDisposable, awt.Paint { - protected abstract java.awt.Paint NativeObject { - get; - } - - awt.PaintContext awt.Paint.createContext (image.ColorModel cm, - awt.Rectangle deviceBounds, geom.Rectangle2D userBounds, geom.AffineTransform xform, - awt.RenderingHints hints) { - Matrix.Multiply(xform, _brushTransform.NativeObject, MatrixOrder.Append); - return NativeObject.createContext (cm, deviceBounds, userBounds, xform, hints); - } - - int awt.Transparency.getTransparency () { - return NativeObject.getTransparency (); - } - - abstract public object Clone (); - - public void Dispose () { - Dispose (true); - } - - protected virtual void Dispose (bool disposing) { - } - - #region Brush transform - - private readonly Matrix _brushTransform = new Matrix(); - - protected Matrix BrushTransform { - get { return _brushTransform.Clone(); } - set { - if (value == null) - throw new ArgumentNullException("matrix"); - - value.CopyTo( _brushTransform ); - } - } - - protected void BrushTranslateTransform (float dx, float dy) { - BrushTranslateTransform(dx, dy, MatrixOrder.Prepend); - } - protected void BrushTranslateTransform (float dx, float dy, MatrixOrder order) { - BrushTransform.Translate(dx,dy,order); - } - protected void BrushResetTransform () { - BrushTransform.Reset(); - } - protected void BrushRotateTransform (float angle) { - BrushRotateTransform(angle, MatrixOrder.Prepend); - } - protected void BrushRotateTransform (float angle, MatrixOrder order) { - BrushTransform.Rotate(angle, order); - } - protected void BrushScaleTransform (float sx, float sy) { - BrushScaleTransform(sx, sy, MatrixOrder.Prepend); - } - protected void BrushScaleTransform (float sx, float sy, MatrixOrder order) { - BrushTransform.Scale(sx, sy, order); - } - protected void BrushMultiplyTransform (Matrix matrix) { - BrushMultiplyTransform(matrix, MatrixOrder.Prepend); - } - protected void BrushMultiplyTransform (Matrix matrix, MatrixOrder order) { - if (matrix == null) - throw new ArgumentNullException("matrix"); - BrushTransform.Multiply(matrix, order); - } - - #endregion - - // TODO: implement transform methods. - -// ~Brush () -// { -// Dispose (false); -// } - } -} - diff --git a/mcs/class/System.Drawing/System.Drawing/Brushes.cs b/mcs/class/System.Drawing/System.Drawing/Brushes.cs deleted file mode 100644 index 98a387c6de1..00000000000 --- a/mcs/class/System.Drawing/System.Drawing/Brushes.cs +++ /dev/null @@ -1,1459 +0,0 @@ -// -// System.Windows.Drawing.Brushes.cs -// -// Authors: -// Dennis Hayes (dennish@Raytek.com) -// Suesan Chaney -// Peter Bartok (pbartok@novell.com) -// -// (C) Ximian, Inc., 2002 http://www.ximian.com -// (C) Novell, Inc., 2004 http://www.novell.com -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; - -namespace System.Drawing -{ - public sealed class Brushes - { - static SolidBrush aliceBlue; - static SolidBrush antiqueWhite; - static SolidBrush aqua; - static SolidBrush aquamarine; - static SolidBrush azure; - static SolidBrush beige; - static SolidBrush bisque; - static SolidBrush black; - static SolidBrush blanchedAlmond; - static SolidBrush blue; - static SolidBrush blueViolet; - static SolidBrush brown; - static SolidBrush burlyWood; - static SolidBrush cadetBlue; - static SolidBrush chartreuse; - static SolidBrush chocolate; - static SolidBrush coral; - static SolidBrush cornflowerBlue; - static SolidBrush cornsilk; - static SolidBrush crimson; - static SolidBrush cyan; - static SolidBrush darkBlue; - static SolidBrush darkCyan; - static SolidBrush darkGoldenrod; - static SolidBrush darkGray; - static SolidBrush darkGreen; - static SolidBrush darkKhaki; - static SolidBrush darkMagenta; - static SolidBrush darkOliveGreen; - static SolidBrush darkOrange; - static SolidBrush darkOrchid; - static SolidBrush darkRed; - static SolidBrush darkSalmon; - static SolidBrush darkSeaGreen; - static SolidBrush darkSlateBlue; - static SolidBrush darkSlateGray; - static SolidBrush darkTurquoise; - static SolidBrush darkViolet; - static SolidBrush deepPink; - static SolidBrush deepSkyBlue; - static SolidBrush dimGray; - static SolidBrush dodgerBlue; - static SolidBrush firebrick; - static SolidBrush floralWhite; - static SolidBrush forestGreen; - static SolidBrush fuchsia; - static SolidBrush gainsboro; - static SolidBrush ghostWhite; - static SolidBrush gold; - static SolidBrush goldenrod; - static SolidBrush gray; - static SolidBrush green; - static SolidBrush greenYellow; - static SolidBrush honeydew; - static SolidBrush hotPink; - static SolidBrush indianRed; - static SolidBrush indigo; - static SolidBrush ivory; - static SolidBrush khaki; - static SolidBrush lavender; - static SolidBrush lavenderBlush; - static SolidBrush lawnGreen; - static SolidBrush lemonChiffon; - static SolidBrush lightBlue; - static SolidBrush lightCoral; - static SolidBrush lightCyan; - static SolidBrush lightGoldenrodYellow; - static SolidBrush lightGray; - static SolidBrush lightGreen; - static SolidBrush lightPink; - static SolidBrush lightSalmon; - static SolidBrush lightSeaGreen; - static SolidBrush lightSkyBlue; - static SolidBrush lightSlateGray; - static SolidBrush lightSteelBlue; - static SolidBrush lightYellow; - static SolidBrush lime; - static SolidBrush limeGreen; - static SolidBrush linen; - static SolidBrush magenta; - static SolidBrush maroon; - static SolidBrush mediumAquamarine; - static SolidBrush mediumBlue; - static SolidBrush mediumOrchid; - static SolidBrush mediumPurple; - static SolidBrush mediumSeaGreen; - static SolidBrush mediumSlateBlue; - static SolidBrush mediumSpringGreen; - static SolidBrush mediumTurquoise; - static SolidBrush mediumVioletRed; - static SolidBrush midnightBlue; - static SolidBrush mintCream; - static SolidBrush mistyRose; - static SolidBrush moccasin; - static SolidBrush navajoWhite; - static SolidBrush navy; - static SolidBrush oldLace; - static SolidBrush olive; - static SolidBrush oliveDrab; - static SolidBrush orange; - static SolidBrush orangeRed; - static SolidBrush orchid; - static SolidBrush paleGoldenrod; - static SolidBrush paleGreen; - static SolidBrush paleTurquoise; - static SolidBrush paleVioletRed; - static SolidBrush papayaWhip; - static SolidBrush peachPuff; - static SolidBrush peru; - static SolidBrush pink; - static SolidBrush plum; - static SolidBrush powderBlue; - static SolidBrush purple; - static SolidBrush red; - static SolidBrush rosyBrown; - static SolidBrush royalBlue; - static SolidBrush saddleBrown; - static SolidBrush salmon; - static SolidBrush sandyBrown; - static SolidBrush seaGreen; - static SolidBrush seaShell; - static SolidBrush sienna; - static SolidBrush silver; - static SolidBrush skyBlue; - static SolidBrush slateBlue; - static SolidBrush slateGray; - static SolidBrush snow; - static SolidBrush springGreen; - static SolidBrush steelBlue; - static SolidBrush tan; - static SolidBrush teal; - static SolidBrush thistle; - static SolidBrush tomato; - static SolidBrush transparent; - static SolidBrush turquoise; - static SolidBrush violet; - static SolidBrush wheat; - static SolidBrush white; - static SolidBrush whiteSmoke; - static SolidBrush yellow; - static SolidBrush yellowGreen; - - // We intentionally do not set the is_modifiable=false flag on - // the brushes, to stay Microsoft compatible - - private Brushes () { } - - public static Brush AliceBlue { - get { - if (aliceBlue==null) { - aliceBlue=new SolidBrush(Color.AliceBlue); - } - return(aliceBlue); - } - } - - public static Brush AntiqueWhite { - get { - if (antiqueWhite==null) { - antiqueWhite=new SolidBrush(Color.AntiqueWhite); - } - return(antiqueWhite); - } - } - - public static Brush Aqua { - get { - if (aqua==null) { - aqua=new SolidBrush(Color.Aqua); - } - return(aqua); - } - } - - public static Brush Aquamarine { - get { - if (aquamarine==null) { - aquamarine=new SolidBrush(Color.Aquamarine); - } - return(aquamarine); - } - } - - public static Brush Azure { - get { - if (azure==null) { - azure=new SolidBrush(Color.Azure); - } - return(azure); - } - } - - public static Brush Beige { - get { - if (beige==null) { - beige=new SolidBrush(Color.Beige); - } - return(beige); - } - } - - public static Brush Bisque { - get { - if (bisque==null) { - bisque=new SolidBrush(Color.Bisque); - } - return(bisque); - } - } - - public static Brush Black { - get { - if (black==null) { - black=new SolidBrush(Color.Black); - } - return(black); - } - } - - public static Brush BlanchedAlmond { - get { - if (blanchedAlmond==null) { - blanchedAlmond=new SolidBrush(Color.BlanchedAlmond); - } - return(blanchedAlmond); - } - } - - public static Brush Blue { - get { - if (blue==null) { - blue=new SolidBrush(Color.Blue); - } - return(blue); - } - } - - public static Brush BlueViolet { - get { - if (blueViolet==null) { - blueViolet=new SolidBrush(Color.BlueViolet); - } - return(blueViolet); - } - } - - public static Brush Brown { - get { - if (brown==null) { - brown=new SolidBrush(Color.Brown); - } - return(brown); - } - } - - public static Brush BurlyWood { - get { - if (burlyWood==null) { - burlyWood=new SolidBrush(Color.BurlyWood); - } - return(burlyWood); - } - } - - public static Brush CadetBlue { - get { - if (cadetBlue==null) { - cadetBlue=new SolidBrush(Color.CadetBlue); - } - return(cadetBlue); - } - } - - public static Brush Chartreuse { - get { - if (chartreuse==null) { - chartreuse=new SolidBrush(Color.Chartreuse); - } - return(chartreuse); - } - } - - public static Brush Chocolate { - get { - if (chocolate==null) { - chocolate=new SolidBrush(Color.Chocolate); - } - return(chocolate); - } - } - - public static Brush Coral { - get { - if (coral==null) { - coral=new SolidBrush(Color.Coral); - } - return(coral); - } - } - - public static Brush CornflowerBlue { - get { - if (cornflowerBlue==null) { - cornflowerBlue=new SolidBrush(Color.CornflowerBlue); - } - return(cornflowerBlue); - } - } - - public static Brush Cornsilk { - get { - if (cornsilk==null) { - cornsilk=new SolidBrush(Color.Cornsilk); - } - return(cornsilk); - } - } - - public static Brush Crimson { - get { - if (crimson==null) { - crimson=new SolidBrush(Color.Crimson); - } - return(crimson); - } - } - - public static Brush Cyan { - get { - if (cyan==null) { - cyan=new SolidBrush(Color.Cyan); - } - return(cyan); - } - } - - public static Brush DarkBlue { - get { - if (darkBlue==null) { - darkBlue=new SolidBrush(Color.DarkBlue); - } - return(darkBlue); - } - } - - public static Brush DarkCyan { - get { - if (darkCyan==null) { - darkCyan=new SolidBrush(Color.DarkCyan); - } - return(darkCyan); - } - } - - public static Brush DarkGoldenrod { - get { - if (darkGoldenrod==null) { - darkGoldenrod=new SolidBrush(Color.DarkGoldenrod); - } - return(darkGoldenrod); - } - } - - public static Brush DarkGray { - get { - if (darkGray==null) { - darkGray=new SolidBrush(Color.DarkGray); - } - return(darkGray); - } - } - - public static Brush DarkGreen { - get { - if (darkGreen==null) { - darkGreen=new SolidBrush(Color.DarkGreen); - } - return(darkGreen); - } - } - - public static Brush DarkKhaki { - get { - if (darkKhaki==null) { - darkKhaki=new SolidBrush(Color.DarkKhaki); - } - return(darkKhaki); - } - } - - public static Brush DarkMagenta { - get { - if (darkMagenta==null) { - darkMagenta=new SolidBrush(Color.DarkMagenta); - } - return(darkMagenta); - } - } - - public static Brush DarkOliveGreen { - get { - if (darkOliveGreen==null) { - darkOliveGreen=new SolidBrush(Color.DarkOliveGreen); - } - return(darkOliveGreen); - } - } - - public static Brush DarkOrange { - get { - if (darkOrange==null) { - darkOrange=new SolidBrush(Color.DarkOrange); - } - return(darkOrange); - } - } - - public static Brush DarkOrchid { - get { - if (darkOrchid==null) { - darkOrchid=new SolidBrush(Color.DarkOrchid); - } - return(darkOrchid); - } - } - - public static Brush DarkRed { - get { - if (darkRed==null) { - darkRed=new SolidBrush(Color.DarkRed); - } - return(darkRed); - } - } - - public static Brush DarkSalmon { - get { - if (darkSalmon==null) { - darkSalmon=new SolidBrush(Color.DarkSalmon); - } - return(darkSalmon); - } - } - - public static Brush DarkSeaGreen { - get { - if (darkSeaGreen==null) { - darkSeaGreen=new SolidBrush(Color.DarkSeaGreen); - } - return(darkSeaGreen); - } - } - - public static Brush DarkSlateBlue { - get { - if (darkSlateBlue==null) { - darkSlateBlue=new SolidBrush(Color.DarkSlateBlue); - } - return(darkSlateBlue); - } - } - - public static Brush DarkSlateGray { - get { - if (darkSlateGray==null) { - darkSlateGray=new SolidBrush(Color.DarkSlateGray); - } - return(darkSlateGray); - } - } - - public static Brush DarkTurquoise { - get { - if (darkTurquoise==null) { - darkTurquoise=new SolidBrush(Color.DarkTurquoise); - } - return(darkTurquoise); - } - } - - public static Brush DarkViolet { - get { - if (darkViolet==null) { - darkViolet=new SolidBrush(Color.DarkViolet); - } - return(darkViolet); - } - } - - public static Brush DeepPink { - get { - if (deepPink==null) { - deepPink=new SolidBrush(Color.DeepPink); - } - return(deepPink); - } - } - - public static Brush DeepSkyBlue { - get { - if (deepSkyBlue==null) { - deepSkyBlue=new SolidBrush(Color.DeepSkyBlue); - } - return(deepSkyBlue); - } - } - - public static Brush DimGray { - get { - if (dimGray==null) { - dimGray=new SolidBrush(Color.DimGray); - } - return(dimGray); - } - } - - public static Brush DodgerBlue { - get { - if (dodgerBlue==null) { - dodgerBlue=new SolidBrush(Color.DodgerBlue); - } - return(dodgerBlue); - } - } - - public static Brush Firebrick { - get { - if (firebrick==null) { - firebrick=new SolidBrush(Color.Firebrick); - } - return(firebrick); - } - } - - public static Brush FloralWhite { - get { - if (floralWhite==null) { - floralWhite=new SolidBrush(Color.FloralWhite); - } - return(floralWhite); - } - } - - public static Brush ForestGreen { - get { - if (forestGreen==null) { - forestGreen=new SolidBrush(Color.ForestGreen); - } - return(forestGreen); - } - } - - public static Brush Fuchsia { - get { - if (fuchsia==null) { - fuchsia=new SolidBrush(Color.Fuchsia); - } - return(fuchsia); - } - } - - public static Brush Gainsboro { - get { - if (gainsboro==null) { - gainsboro=new SolidBrush(Color.Gainsboro); - } - return(gainsboro); - } - } - - public static Brush GhostWhite { - get { - if (ghostWhite==null) { - ghostWhite=new SolidBrush(Color.GhostWhite); - } - return(ghostWhite); - } - } - - public static Brush Gold { - get { - if (gold==null) { - gold=new SolidBrush(Color.Gold); - } - return(gold); - } - } - - public static Brush Goldenrod { - get { - if (goldenrod==null) { - goldenrod=new SolidBrush(Color.Goldenrod); - } - return(goldenrod); - } - } - - public static Brush Gray { - get { - if (gray==null) { - gray=new SolidBrush(Color.Gray); - } - return(gray); - } - } - - public static Brush Green { - get { - if (green==null) { - green=new SolidBrush(Color.Green); - } - return(green); - } - } - - public static Brush GreenYellow { - get { - if (greenYellow==null) { - greenYellow=new SolidBrush(Color.GreenYellow); - } - return(greenYellow); - } - } - - public static Brush Honeydew { - get { - if (honeydew==null) { - honeydew=new SolidBrush(Color.Honeydew); - } - return(honeydew); - } - } - - public static Brush HotPink { - get { - if (hotPink==null) { - hotPink=new SolidBrush(Color.HotPink); - } - return(hotPink); - } - } - - public static Brush IndianRed { - get { - if (indianRed==null) { - indianRed=new SolidBrush(Color.IndianRed); - } - return(indianRed); - } - } - - public static Brush Indigo { - get { - if (indigo==null) { - indigo=new SolidBrush(Color.Indigo); - } - return(indigo); - } - } - - public static Brush Ivory { - get { - if (ivory==null) { - ivory=new SolidBrush(Color.Ivory); - } - return(ivory); - } - } - - public static Brush Khaki { - get { - if (khaki==null) { - khaki=new SolidBrush(Color.Khaki); - } - return(khaki); - } - } - - public static Brush Lavender { - get { - if (lavender==null) { - lavender=new SolidBrush(Color.Lavender); - } - return(lavender); - } - } - - public static Brush LavenderBlush { - get { - if (lavenderBlush==null) { - lavenderBlush=new SolidBrush(Color.LavenderBlush); - } - return(lavenderBlush); - } - } - - public static Brush LawnGreen { - get { - if (lawnGreen==null) { - lawnGreen=new SolidBrush(Color.LawnGreen); - } - return(lawnGreen); - } - } - - public static Brush LemonChiffon { - get { - if (lemonChiffon==null) { - lemonChiffon=new SolidBrush(Color.LemonChiffon); - } - return(lemonChiffon); - } - } - - public static Brush LightBlue { - get { - if (lightBlue==null) { - lightBlue=new SolidBrush(Color.LightBlue); - } - return(lightBlue); - } - } - - public static Brush LightCoral { - get { - if (lightCoral==null) { - lightCoral=new SolidBrush(Color.LightCoral); - } - return(lightCoral); - } - } - - public static Brush LightCyan { - get { - if (lightCyan==null) { - lightCyan=new SolidBrush(Color.LightCyan); - } - return(lightCyan); - } - } - - public static Brush LightGoldenrodYellow { - get { - if (lightGoldenrodYellow==null) { - lightGoldenrodYellow=new SolidBrush(Color.LightGoldenrodYellow); - } - return(lightGoldenrodYellow); - } - } - - public static Brush LightGray { - get { - if (lightGray==null) { - lightGray=new SolidBrush(Color.LightGray); - } - return(lightGray); - } - } - - public static Brush LightGreen { - get { - if (lightGreen==null) { - lightGreen=new SolidBrush(Color.LightGreen); - } - return(lightGreen); - } - } - - public static Brush LightPink { - get { - if (lightPink==null) { - lightPink=new SolidBrush(Color.LightPink); - } - return(lightPink); - } - } - - public static Brush LightSalmon { - get { - if (lightSalmon==null) { - lightSalmon=new SolidBrush(Color.LightSalmon); - } - return(lightSalmon); - } - } - - public static Brush LightSeaGreen { - get { - if (lightSeaGreen==null) { - lightSeaGreen=new SolidBrush(Color.LightSeaGreen); - } - return(lightSeaGreen); - } - } - - public static Brush LightSkyBlue { - get { - if (lightSkyBlue==null) { - lightSkyBlue=new SolidBrush(Color.LightSkyBlue); - } - return(lightSkyBlue); - } - } - - public static Brush LightSlateGray { - get { - if (lightSlateGray==null) { - lightSlateGray=new SolidBrush(Color.LightSlateGray); - } - return(lightSlateGray); - } - } - - public static Brush LightSteelBlue { - get { - if (lightSteelBlue==null) { - lightSteelBlue=new SolidBrush(Color.LightSteelBlue); - } - return(lightSteelBlue); - } - } - - public static Brush LightYellow { - get { - if (lightYellow==null) { - lightYellow=new SolidBrush(Color.LightYellow); - } - return(lightYellow); - } - } - - public static Brush Lime { - get { - if (lime==null) { - lime=new SolidBrush(Color.Lime); - } - return(lime); - } - } - - public static Brush LimeGreen { - get { - if (limeGreen==null) { - limeGreen=new SolidBrush(Color.LimeGreen); - } - return(limeGreen); - } - } - - public static Brush Linen { - get { - if (linen==null) { - linen=new SolidBrush(Color.Linen); - } - return(linen); - } - } - - public static Brush Magenta { - get { - if (magenta==null) { - magenta=new SolidBrush(Color.Magenta); - } - return(magenta); - } - } - - public static Brush Maroon { - get { - if (maroon==null) { - maroon=new SolidBrush(Color.Maroon); - } - return(maroon); - } - } - - public static Brush MediumAquamarine { - get { - if (mediumAquamarine==null) { - mediumAquamarine=new SolidBrush(Color.MediumAquamarine); - } - return(mediumAquamarine); - } - } - - public static Brush MediumBlue { - get { - if (mediumBlue==null) { - mediumBlue=new SolidBrush(Color.MediumBlue); - } - return(mediumBlue); - } - } - - public static Brush MediumOrchid { - get { - if (mediumOrchid==null) { - mediumOrchid=new SolidBrush(Color.MediumOrchid); - } - return(mediumOrchid); - } - } - - public static Brush MediumPurple { - get { - if (mediumPurple==null) { - mediumPurple=new SolidBrush(Color.MediumPurple); - } - return(mediumPurple); - } - } - - public static Brush MediumSeaGreen { - get { - if (mediumSeaGreen==null) { - mediumSeaGreen=new SolidBrush(Color.MediumSeaGreen); - } - return(mediumSeaGreen); - } - } - - public static Brush MediumSlateBlue { - get { - if (mediumSlateBlue==null) { - mediumSlateBlue=new SolidBrush(Color.MediumSlateBlue); - } - return(mediumSlateBlue); - } - } - - public static Brush MediumSpringGreen { - get { - if (mediumSpringGreen==null) { - mediumSpringGreen=new SolidBrush(Color.MediumSpringGreen); - } - return(mediumSpringGreen); - } - } - - public static Brush MediumTurquoise { - get { - if (mediumTurquoise==null) { - mediumTurquoise=new SolidBrush(Color.MediumTurquoise); - } - return(mediumTurquoise); - } - } - - public static Brush MediumVioletRed { - get { - if (mediumVioletRed==null) { - mediumVioletRed=new SolidBrush(Color.MediumVioletRed); - } - return(mediumVioletRed); - } - } - - public static Brush MidnightBlue { - get { - if (midnightBlue==null) { - midnightBlue=new SolidBrush(Color.MidnightBlue); - } - return(midnightBlue); - } - } - - public static Brush MintCream { - get { - if (mintCream==null) { - mintCream=new SolidBrush(Color.MintCream); - } - return(mintCream); - } - } - - public static Brush MistyRose { - get { - if (mistyRose==null) { - mistyRose=new SolidBrush(Color.MistyRose); - } - return(mistyRose); - } - } - - public static Brush Moccasin { - get { - if (moccasin==null) { - moccasin=new SolidBrush(Color.Moccasin); - } - return(moccasin); - } - } - - public static Brush NavajoWhite { - get { - if (navajoWhite==null) { - navajoWhite=new SolidBrush(Color.NavajoWhite); - } - return(navajoWhite); - } - } - - public static Brush Navy { - get { - if (navy==null) { - navy=new SolidBrush(Color.Navy); - } - return(navy); - } - } - - public static Brush OldLace { - get { - if (oldLace==null) { - oldLace=new SolidBrush(Color.OldLace); - } - return(oldLace); - } - } - - public static Brush Olive { - get { - if (olive==null) { - olive=new SolidBrush(Color.Olive); - } - return(olive); - } - } - - public static Brush OliveDrab { - get { - if (oliveDrab==null) { - oliveDrab=new SolidBrush(Color.OliveDrab); - } - return(oliveDrab); - } - } - - public static Brush Orange { - get { - if (orange==null) { - orange=new SolidBrush(Color.Orange); - } - return(orange); - } - } - - public static Brush OrangeRed { - get { - if (orangeRed==null) { - orangeRed=new SolidBrush(Color.OrangeRed); - } - return(orangeRed); - } - } - - public static Brush Orchid { - get { - if (orchid==null) { - orchid=new SolidBrush(Color.Orchid); - } - return(orchid); - } - } - - public static Brush PaleGoldenrod { - get { - if (paleGoldenrod==null) { - paleGoldenrod=new SolidBrush(Color.PaleGoldenrod); - } - return(paleGoldenrod); - } - } - - public static Brush PaleGreen { - get { - if (paleGreen==null) { - paleGreen=new SolidBrush(Color.PaleGreen); - } - return(paleGreen); - } - } - - public static Brush PaleTurquoise { - get { - if (paleTurquoise==null) { - paleTurquoise=new SolidBrush(Color.PaleTurquoise); - } - return(paleTurquoise); - } - } - - public static Brush PaleVioletRed { - get { - if (paleVioletRed==null) { - paleVioletRed=new SolidBrush(Color.PaleVioletRed); - } - return(paleVioletRed); - } - } - - public static Brush PapayaWhip { - get { - if (papayaWhip==null) { - papayaWhip=new SolidBrush(Color.PapayaWhip); - } - return(papayaWhip); - } - } - - public static Brush PeachPuff { - get { - if (peachPuff==null) { - peachPuff=new SolidBrush(Color.PeachPuff); - } - return(peachPuff); - } - } - - public static Brush Peru { - get { - if (peru==null) { - peru=new SolidBrush(Color.Peru); - } - return(peru); - } - } - - public static Brush Pink { - get { - if (pink==null) { - pink=new SolidBrush(Color.Pink); - } - return(pink); - } - } - - public static Brush Plum { - get { - if (plum==null) { - plum=new SolidBrush(Color.Plum); - } - return(plum); - } - } - - public static Brush PowderBlue { - get { - if (powderBlue==null) { - powderBlue=new SolidBrush(Color.PowderBlue); - } - return(powderBlue); - } - } - - public static Brush Purple { - get { - if (purple==null) { - purple=new SolidBrush(Color.Purple); - } - return(purple); - } - } - - public static Brush Red { - get { - if (red==null) { - red=new SolidBrush(Color.Red); - } - return(red); - } - } - - public static Brush RosyBrown { - get { - if (rosyBrown==null) { - rosyBrown=new SolidBrush(Color.RosyBrown); - } - return(rosyBrown); - } - } - - public static Brush RoyalBlue { - get { - if (royalBlue==null) { - royalBlue=new SolidBrush(Color.RoyalBlue); - } - return(royalBlue); - } - } - - public static Brush SaddleBrown { - get { - if (saddleBrown==null) { - saddleBrown=new SolidBrush(Color.SaddleBrown); - } - return(saddleBrown); - } - } - - public static Brush Salmon { - get { - if (salmon==null) { - salmon=new SolidBrush(Color.Salmon); - } - return(salmon); - } - } - - public static Brush SandyBrown { - get { - if (sandyBrown==null) { - sandyBrown=new SolidBrush(Color.SandyBrown); - } - return(sandyBrown); - } - } - - public static Brush SeaGreen { - get { - if (seaGreen==null) { - seaGreen=new SolidBrush(Color.SeaGreen); - } - return(seaGreen); - } - } - - public static Brush SeaShell { - get { - if (seaShell==null) { - seaShell=new SolidBrush(Color.SeaShell); - } - return(seaShell); - } - } - - public static Brush Sienna { - get { - if (sienna==null) { - sienna=new SolidBrush(Color.Sienna); - } - return(sienna); - } - } - - public static Brush Silver { - get { - if (silver==null) { - silver=new SolidBrush(Color.Silver); - } - return(silver); - } - } - - public static Brush SkyBlue { - get { - if (skyBlue==null) { - skyBlue=new SolidBrush(Color.SkyBlue); - } - return(skyBlue); - } - } - - public static Brush SlateBlue { - get { - if (slateBlue==null) { - slateBlue=new SolidBrush(Color.SlateBlue); - } - return(slateBlue); - } - } - - public static Brush SlateGray { - get { - if (slateGray==null) { - slateGray=new SolidBrush(Color.SlateGray); - } - return(slateGray); - } - } - - public static Brush Snow { - get { - if (snow==null) { - snow=new SolidBrush(Color.Snow); - } - return(snow); - } - } - - public static Brush SpringGreen { - get { - if (springGreen==null) { - springGreen=new SolidBrush(Color.SpringGreen); - } - return(springGreen); - } - } - - public static Brush SteelBlue { - get { - if (steelBlue==null) { - steelBlue=new SolidBrush(Color.SteelBlue); - } - return(steelBlue); - } - } - - public static Brush Tan { - get { - if (tan==null) { - tan=new SolidBrush(Color.Tan); - } - return(tan); - } - } - - public static Brush Teal { - get { - if (teal==null) { - teal=new SolidBrush(Color.Teal); - } - return(teal); - } - } - - public static Brush Thistle { - get { - if (thistle==null) { - thistle=new SolidBrush(Color.Thistle); - } - return(thistle); - } - } - - public static Brush Tomato { - get { - if (tomato==null) { - tomato=new SolidBrush(Color.Tomato); - } - return(tomato); - } - } - - public static Brush Transparent { - get { - if (transparent==null) { - transparent=new SolidBrush(Color.Transparent); - } - return(transparent); - } - } - - public static Brush Turquoise { - get { - if (turquoise==null) { - turquoise=new SolidBrush(Color.Turquoise); - } - return(turquoise); - } - } - - public static Brush Violet { - get { - if (violet==null) { - violet=new SolidBrush(Color.Violet); - } - return(violet); - } - } - - public static Brush Wheat { - get { - if (wheat==null) { - wheat=new SolidBrush(Color.Wheat); - } - return(wheat); - } - } - - public static Brush White { - get { - if (white==null) { - white=new SolidBrush(Color.White); - } - return(white); - } - } - - public static Brush WhiteSmoke { - get { - if (whiteSmoke==null) { - whiteSmoke=new SolidBrush(Color.WhiteSmoke); - } - return(whiteSmoke); - } - } - - public static Brush Yellow { - get { - if (yellow==null) { - yellow=new SolidBrush(Color.Yellow); - } - return(yellow); - } - } - - public static Brush YellowGreen { - get { - if (yellowGreen==null) { - yellowGreen=new SolidBrush(Color.YellowGreen); - } - return(yellowGreen); - } - } - - } -} diff --git a/mcs/class/System.Drawing/System.Drawing/ChangeLog b/mcs/class/System.Drawing/System.Drawing/ChangeLog deleted file mode 100644 index 49ed2a11832..00000000000 --- a/mcs/class/System.Drawing/System.Drawing/ChangeLog +++ /dev/null @@ -1,2148 +0,0 @@ -2005-09-21 Vladimir Krasnov - - * Bitmap.jvm.cs: fixed Clone, InternalSave, Initialize, ctor refactoring, remarks refactoring - * Image.jvm.cs: fixed GetFrameCount, GetThumbnailImage, SelectActiveFrame, remarks refactoring - * PlainImage.jvm.cs: added metadata props, fixed ctor - * PlainImageCollection.jvm.cs: fixed class access - -2005-09-21 Jordi Mas i Hernandez - - * Graphics.cs: Fixes exception type at FromImage method - -2005-09-20 Vladimir Krasnov - - * Graphics.jvm.cs: bitmap resolution fix in DrawImage - -2005-09-20 Vladimir Krasnov - - * Graphics.jvm.cs: fixed DrawImage - -2005-09-19 Miguel de Icaza - - * Graphics.cs: Removed restriction on the images that can be - loaded. Indexed images *can* be loaded - -2005-09-18 Miguel de Icaza - - * Image.cs: introduce a workaround that catches errors on systems - that lack GDI+ as this is being triggered too easily when we - enumerate attributes on loaded classes. - - The real bug to fix is #76062. - -2005-09-17 Kornél Pál - - * Image.cs: Implemented FromHbitmap. - -2005-09-16 Sebastien Pouliot - - * gdipFunctions.cs: Add [SuppressUnmanagedCodeSecurity] attributes so - the JIT won't add demands for UnmanagedCode. - * carbonFunctions.cs: Add [SuppressUnmanagedCodeSecurity] attributes - so the JIT won't add demands for UnmanagedCode on Mac OSX. - * Bitmap.cs: Added LinkDemand for UnmanagedCode on GetHbitmap - (+ overloads) and GetHicon methods. - * Graphics.cs: Added LinkDemand for UnmanagedCode on FromHdcInternal, - FromHwndInternal and ReleaseHdcInternal methods (which are all public - despite their names). - -2005-09-15 Konstantin Triger - - * Graphics.jvm.cs: text transform, headless session - -2005-09-14 Vladimir Krasnov - - * Bitmap.jvm.cs: native object refactoring - * Image.jvm.cs: native object refactoring - * Graphics.jvm.cs: fixed access to image native object - * TextureBrush.jvm.cs: fixed access to image native object - * Added PlainImage.jvm.cs, PlainImageCollection.jvm.cs - -2005-09-14 Geoff Norton - - * carbonFunctions.cs: Add GetCGContextForNSView for Cocoa# integration - * Graphics.cs: Check GDIPlus.UseCocoaDrawable for Cocoa# integration - * gdipFunctions.cs: Set UseCocoaDrawable depending on the environment variable MONO_GDIP_USE_COCOA_BACKEND - -2005-09-14 Konstantin Triger - - * Graphics.jvm.cs: transform, container, thin pen - -2005-09-12 Konstantin Triger - - * AdvancedStroke.jvm.cs: constants for pen fitting calculations - * Pen.jvm.cs: fixing transform, pen fitting - -2005-09-12 Konstantin Triger - - * Region.jvm.cs: IsVisible is about intersection - -2005-09-12 Gert Driesen - - * ImageConverter.cs: Use default TypeDescriptor implementation of - GetProperties. - -2005-09-11 Konstantin Triger - - * Graphics.jvm.cs: fixing clipping with rotate transform - -2005-09-11 Konstantin Triger - - * Region.jvm.cs: default region is infinite - -2005-09-10 Konstantin Triger - - * Graphics.jvm.cs: fixing clipping stuff - -2005-09-07 Vladimir Krasnov - - * Bitmap.jvm.cs: fixed bitamp accessors - * Image.jvm.cs: fixed image accessors - -2005-09-07 Konstantin Triger - * AdvancedStroke.jvm.cs: fix matrix translate - * Graphics.jvm.cs: fix matrix concatenation order - -2005-09-07 Vladimir Krasnov - - * Brush.jvm.cs: added transform methods - -2005-09-06 Konstantin Triger - - * StrokeFactory.jvm.cs, AdvancedStroke.jvm.cs, Pen.jvm.cs: - implementing fitting, output transform - * Graphics.jvm.cs: fixing DrawXXX, Fill, Clipping, Containers - -2005-09-06 Konstantin Triger - - * ColorTranslator.cs: perform case insensitive check - -2005-09-05 Jordi Mas i Hernandez - - * gdipFunctions.cs: define new functions - * Bitmap.cs: fixes image loading and exceptions - * Image.cs: fixes image loading and exceptions - - Thanks Kornél Pál for its help - -2005-08-30 Vladimir Krasnov - - * Brush.jvm.cs: added brush transform field - -2005-08-28 Vladimir Krasnov - - * Graphics.jvm.cs: fixed .ctor (InterpolationMode) - -2005-08-28 Konstantin Triger - - * StrokeFactory.jvm.cs, AdvancedStroke.jvm.cs, Pen.jvm.cs - Graphics.jvm.cs: adjust stroke before widening - -2005-08-28 Vladimir Krasnov - - * Graphics.jvm.cs: Implemented BeginContainer, EndContainer, - Save, Restore - -2005-08-26 Gert Driesen - - * PointConverter.cs: Use Int32Converter instead of Int32.Parse. First - convert string to int before checking number of components. - * RectangleConverter.cs: same. - * SizeConverter.cs: same. - -2005-08-26 Gert Driesen - - * ColorConverter.cs: Use Int32Converter instead of Int32.Parse to - convert individual components. Special case string containing hex - prefix. Convert components before checking count. - -2005-08-25 Marek Safar - - * gdipFunctions.cs: GetIconInfo new user32 method. - GdipGetDC uses IntPtr. - - * gdipStructs.cs: Defined IconInfo struct. - - * Graphics.cs: FromImage throws exception when image has an indexed format. - GetHdc fixed. - - * Icon.cs: Implemented FromHandle, Dispose. - -2005-05-24 Michael Hutchinson - - * ToolboxBitmapAttribute.cs: Implemented retrieving the image - -2005-08-23 Vladimir Krasnov - - * Graphics.jvm.cs: Fixed ResetTransform, TransfromPoints - Fixed SmoothingMode property - -2005-08-23 Jordi Mas i Hernandez - - * Brushes: Do not create the objects every time that they are requested - as in Pens we create and cache them only once when need it. This also - fixes the Equals method between two objects requested to Brushes - -2005-08-22 Jordi Mas i Hernandez - - * SolidBrush.cs: Fixes Dispose to avoid non-disposing some objects - * Brush.cs Fixes Dispose to avoid non-disposing some objects - * Pen.cs: Fixes Dispose to avoid non-disposing some objects - * Region.cs: Dipose always frees if the resource was allocated - -2005-08-19 Jordi Mas i Hernandez - - * gdipFunctions.cs: Before calling GdiplusShutdown we make that all of handles - from gdiplus have been released - -2005-08-18 Vladimir Krasnov - - * Pen.jvm.cs: Fixed DashSpacing in createStrokedShape - * Color.cs: Fixed java NativeObject property - * Image.jvm.cs: Fixed Save method - -2005-08-16 Andrew Skiba - - * Icon.jvm.cs: match Bitmap internal constructor change - * Image.jvm.cs: use ImageCodecInfo.Clsid as primary format id, not ImageFormat - * Bitmap.jvm.cs: started changes for supporting ImageCodecInfo - -2005-08-16 Gert Driesen - - * Color.cs: To match MS.NET, throw ArgumentException instead of - ArgumentOutOfRangeException when color is not between 0 and 255. - * RectangleConverter.cs: Take culture into account when converting - to/from string. Use culture's ListSeparator as separator character. - -2005-08-16 Gert Driesen - - * Color.cs: Fixed line endings. Set eol-style to native. - * ColorConverter.cs: Fixed line endings. Set eol-style to native. - * Size.cs: Set eol-style to native. - * SizeF.cs: Use current culture in ToString(), set eol-style to native. - * SizeConverter.cs: Take culture into account when converting to/from - string. Set eol-style to native. - * Point.cs: Fixed line endings. Set eol-style to native. - * PointF.cs: Use current culture in ToString(), set eol-style to native. - * PointConverter.cs: Take culture into account when converting to/from - string. Set eol-style to native. - * ImageFormatConverter.cs: Fixed line endings. Set eol-style to - native. - * RectangleConverter.cs: Fixed line endings. Set eol-style to native. - -2005-08-16 Vladimir Krasnov - - * Graphics.jvm.cs: Fixed InterpolationMode property - -2005-08-15 Vladimir Krasnov - - * Graphics.jvm.cs: Fixed DrawImage - -2005-08-14 Gert Driesen - - * ColorConverter.cs: Use TextInfo.ListSeparator as separator, as this - appears to be what MS.NET uses. - -2005-08-14 Gert Driesen - - * Point.cs: Use invariant culture for converting numbers to string. - * PointF.cs: same - * SizeF.cs: same - -2005-08-14 Gert Driesen - - * Color.cs: Fixed ToString for uninitialized color. - * ColorConverter.cs: Support conversion from whitespace-only string to - Color.Empty. Fixed conversion from Color.Empty and known colors to - string. - -2005-08-14 Konstantin Triger - - * Graphics.jvm.cs: Initial properties implementation - -2005-08-14 Vladimir Krasnov - - * Graphics.jvm.cs: DrawImage refactoring - -2005-08-14 Vladimir Krasnov - - * Graphics.jvm.cs: Implemented PageUnit, PageScale. - Added UpdateInternalTransform - Fixed DrawImage, Transform, ConcatenateTransform - -2005-08-14 Vladimir Krasnov - - * Icon.jvm.cs: Internal constructor from bitmap - * Added SystemIcons.jvm.cs with implementation of SystemIcons - -2005-08-14 Vladimir Krasnov - - * Region.jvm.cs: Fixed GetBounds, IsVisible, IsEmpty, IsInfinite, Equals - (all methods that use Graphics object) - -2005-08-11 Konstantin Triger - - * Graphics.jvm.cs: Refactoring - -2005-08-11 Konstantin Triger - - * Graphics.jvm.cs: Fixed Clear, Refactoring - -2005-08-11 Konstantin Triger - - * Graphics.jvm.cs: Fixed FillClosedCurve - -2005-08-10 Zoltan Varga - - * Rectangle.cs (Intersect): Return a non-empty rectangle if the two - rectangles touch each other. - -2005-08-09 Konstantin Triger - - * Graphics.jvm.cs: Fixed DrawCurve. - -2005-08-09 Konstantin Triger - - * StrokeFactory.jvm.cs: use correct stroke - -2005-08-09 Konstantin Triger - - * Added AdvancedStoke.jvm.cs and StrokeFactory.jvm.cs - * Pen refactoring. - -2005-08-09 Andrew Skiba - - * FontConverter.cs: exclude not implemented destructor from TARGET_JVM - -2005-08-09 Andrew Skiba - - * ColorConverter.cs, ColorTranslator.cs: fixes to pass tests - committed in r48150 - -2005-08-08 Konstantin Triger - - * Graphics.jvm.cs: Refactoring - -2005-08-08 Vladimir Krasnov - - * Graphics.jvm.cs: Fixed DrawPolygon - -2005-08-08 Konstantin Triger - - * Graphics.jvm.cs: Refactoring - * Pen.jvm.cs: setting awt.Stroke as a base - -2005-08-07 Konstantin Triger - - * Graphics.jvm.cs: Refactoring - -2005-08-07 Vladimir Krasnov - - * Graphics.jvm.cs: Fixed DrawLines, DrawPolygon to use GraphicsPath - -2005-08-07 Andrew Skiba - - * Rectangle.cs: Intersect fixed - * RectandleF.cs: Intersect and Inflate fixed - -2005-08-07 Andrew Skiba - - * Point.cs: Produce same ToString result as dotnet - -2005-08-07 Andrew Skiba - - * Color.cs: GetHashCode is affected by Name, too - -2005-08-07 Vladimir Krasnov - - * Pen.jvm.cs: Fixed ctor, LineCap, SetLineCap - -2005-08-07 Vladimir Krasnov - - * Graphics.jvm.cs: Fixed DrawLines, DrawPolygon - -2005-08-03 Andrew Skiba - - * SolidBrush.jvm.cs: fix a typo - -2005-08-03 Andrew Skiba - - * Image.jvm.cs, StringFormat.jvm.cs, FontFamily.jvm.cs, Bitmap.jvm.cs, - Pen.jvm.cs, Region.jvm.cs, Brush.jvm.cs, Graphics.jvm.cs, TextureBrush.jvm.cs, - Font.jvm.cs: Added TARGET_JVM implementation - -2005-08-03 Andrew Skiba - - * Rectangle.cs, RectangleF.cs: TARGET_JVM - Add NativeObect property - -2005-08-03 Andrew Skiba - - * BasicShape.jvm.cs: Added TARGET_JVM specific class - -2005-08-03 Andrew Skiba - - * Icon.jvm.cs, SystemColors.jvm.cs: Added TARGET_JVM implementations - -2005-08-03 Andrew Skiba - - * ColorTranslator.cs: (GH merge) recognise HTML system colors - -2005-08-02 Andrew Skiba - - * SolidBrush.jvm.cs: added TARGET_JVM implementation of this class - -2005-08-02 Andrew Skiba - - * Color.cs: TARGET_JVM - NativeObject property - -2005-07-27 Andrew Skiba - - * Color.cs: Fixes equality operators, change isXXXcolor booleans into flags enum. - -2005-07-27 Jordi Mas i Hernandez - - * RectangleF.cs: Fixes IsEmpty logic - -2005-06-23 Jordi Mas i Hernandez - - * Graphics.cs: implements FromHwndInternal - - -2005-06-13 Peter Bartok - - * Icon.cs(ToBitmap): If the icon is not 32bits, create the bitmap - through an intermediary step, which turns it into a 32bit version. - Fixes #75254 - -2005-06-13 Kornél Pál - - * ComIStreamMarshaler.cs: Dispose releases managed objects as well, - removed some unnecessary code - * ComIStreamWrapper.cs: Reworked Seek method to proper support of - positions beyond the size of stream - -2005-06-11 Gonzalo Paniagua Javier - - * Font.cs: fix platform checks. - -2005-06-08 Jordi Mas i Hernandez - - * Rectangle.cs: - - Fixes is empty method IsEmpty logic - - Fixes Contains method logic - - Fixes IntersectsWith logic - - * RectangleF.cs: - - Fixes is empty method IsEmpty logic - - Fixes Contains method logic - - Fixes IntersectsWith logic - -2005-05-28 Kornél Pál - - * ComIStreamMarshaler.cs: GC.SuppressFinalize(this) is not called in - destructors. Some methods renamed. Removed unnecessary variables. - -2005-05-25 Jonathan Gilbert - - * Image.cs: Added retrieveGDIPalette () and storeGDIPalette () - and modified the Palette property to call them. This non- - persistent behaviour was discovered by trial and error with - Microsoft's implementation. In fact, the Palette property - does not behave like a property at all! It is the only way an - instance of System.Drawing.Imaging.ColorPalette can be created, - and it reflects a backing store that is only updated when the - property 'set' method is called. Also updated Clone () since - the palette is no longer cached at image load time. - * Image.cs: Added IsIndexedPixelFormat () in the same vein as - Image::IsAlphaPixelFormat and Image::IsCanonicalPixelFormat. - As such a function is not listed in MSDN nor given in - Microsoft's implementation, I have made it a private function - within the class that uses it. - -2005-05-24 Kornél Pál - - * Graphics.cs: Revised DrawString methods - -2005-03-22 Peter Bartok - - * Graphics.cs: Fixed bug #74762, DrawString was crashing on s.Length - if s was null. - -2005-05-20 Kornél Pál - - * Image.cs: Uses MemoryStream wrapping on all platforms if needed - * gdipFunctions.cs: Modified conditional compilation syntax - * ComIStreamWrapper.cs: Modified conditional compilation syntax - * ComIStreamMarshaler.cs: Modified conditional compilation syntax - -2005-05-18 Marek Safar - - * Bitmap.cs: Add null check into ctor. - -2005-05-16 Jordi Mas i Hernandez - - * gdipFunctions.cs: Kornél Pál's IStream bug fixing - * ComIStreamWrapper.cs: Kornél Pál's IStream bug fixing - * ComIStreamMarshaler.cs: Kornél Pál's IStream bug fixing - -2005-05-14 Jordi Mas i Hernandez - - * Bitmap.cs: Kornél Pál's Bitmap class ctor and MakeTransparent leak fixes - -2005-05-11 Jordi Mas i Hernandez - - * gdipFunctions.cs: add GdipLoadImageFromStream and GdipSaveImageToStream - * ComIStreamWrapper.cs: Kornel Pal COM Stream for Win32 - * ComIStreamMarshaler.cs: Kornel Pal COM Stream for Win32 - * Image.cs: uses new Win32 Stream functions when need it - -2005-05-10 Juraj Skripsky - - * Color.cs: Fix GetSaturation() again and remove - obsolete constants. - -2005-05-10 Juraj Skripsky - - * Color.cs: New, correct implementations for GetHue(), - GetBrightness() and GetSaturation(). - -2005-05-09 Sebastien Pouliot - - * gdipFunctions.cs: Use PlatformID.Unix under NET_2_0. - * Graphics.cs: Use PlatformID.Unix under NET_2_0. - * Image.cs: Use PlatformID.Unix under NET_2_0. - -2005-05-05 Miguel de Icaza - - * Bitmap.cs, Icon.cs (constructor): Use - GetManifestResourceStream(Type,string) in the constructor that - takes a type. - -2005-04-27 Lluis Sanchez Gual - - * PointF.cs: Make serialization compatible with MS. - -2005-04-10 Geoff Norton - - * Graphics.cs: - carbonFunctions.cs: - Use CGContextSynchronize instead of CGContextFlush. This saves - on average 20000 ticks per drawing operation. - -2005-04-04 Jordi Mas i Hernandez - - * Color.cs: take into account the name color in == and != operators - * Font.cs: Use Equals instead of == to compare the family name - * FontFamily.cs: - - Removes generic fontfamilies cache (done at libgdiplus level) - - Fixes Equals method - -2005-03-30 Jordi Mas i Hernandez - - * Pen.cs: remove locks. They are done at gdiplus level - * Brush.cs: remove locks. They are done at gdiplus level - * Image.cs: remove locks. They are done at gdiplus level - -2005-03-30 Rogério Pereira Araújo - - * Icon.cs: Finished Icon(Type, String) ctor - -2005-03-23 Jordi Mas i Hernandez - - * gdipFunctions.cs: fixes GdipGetImagePalette signature - * Image.cs: Implements Palette property using gdiplus - -2005-03-17 Peter Bartok - - * gdipFunctions.cs: - - Changed P/Invoke signature for GdipLoadImageFromDelegate_linux() - method, now includes a get header delegate - - Added StreamGetHeaderImpl method, to allow libgdiplus to determine - the image type even on non-seekable streams - - Fixed StreamGetBytesImpl to consider the bytes already retrieved - via StreamGetHeaderImpl - * Image.cs: Fixed call to GdipLoadImageFromDelegate_linux() to include - the new StreamGetHeader delegate - -2005-03-15 Jordi Mas i Hernandez - - * Pen.cs: Fixes dispose method to allow to be called multiple times - * Graphics.cs: matrix are saved and restored at gdiplus level - -2005-02-24 Geoff Norton - - * gdipFunctions.cs: Cache the delegates in the GdiPlusStreamHelper - so they dont get garbage collected before use. - -2005-02-11 Peter Bartok - - * gdipFunctions.cs: Fixed prototype to match previous checkin - -2005-02-11 Peter Bartok - - * Graphics.cs (FromImage): Fixed type of graphics to be IntPtr (since - it really is a pointer) - -2005-02-10 Geoff Norton - - * Icon.cs: Implement GetObjectData () - * Image.cs: Implement GetObjectData () - -2005-02-09 Geoff Norton - - * Icon.cs: Implement deserializer - * Bitmap.cs: Implement deserializer - -2005-02-06 Ben Maurer - - * Brushes.cs: Kill the static ctor here, it has tons of code bloat. - -2005-02-03 Jordi Mas i Hernandez - - * Region.cs: revert Jackson's patch and fix this at libgdiplus level - -2005-02-02 Jackson Harper - - * Region.cs: The default region constructor creates and infinite - region, not an empty one. - -2005-01-27 Peter Bartok - - * Color.cs (GetBrightness, GetSaturation, GetHue): Fixed calculations - of HSV numbers. Previous implementation returned wrong numbers and NaN - on achromatic colors - -2005-01-27 Lluis Sanchez Gual - - * PointConverter.cs, ImageFormatConverter.cs, RectangleConverter.cs, - SizeConverter.cs, ColorConverter.cs, FontConverter.cs - : Implemented support for InstanceDescriptor. - -2005-01-26 Peter Bartok - - * Icon.cs (ToBitmap): Now sets transparency in according to - icon AND mask - -2004-01-22 Jordi Mas i Hernandez - - * gdipFunctions.cs: Fixes GdipGet* function signatures - * FontFamily.cs: Fixes GdipGet* function calls - * Font.cs: Fixes ToString method - -2004-01-17 Jordi Mas i Hernandez - - * Graphics.cs: calls XCloseDisplay on X11 when need it - * gdipFunctions.cs: calls XCloseDisplay on X11 when need it - -2004-12-27 Zoltan Varga - - * gdipFunctions.cs Image.cs: Fix marshalling of arrays on amd64. - -2004-12-16 Peter Bartok - - * Graphics.cs (GetHdc): Removed Wine assumptions, the handle is now - equivalent to the gdi+ native object - - * Font.cs (GetHfont): Removed Wine assumptions, the handle is now - equivalent to the gdi+ native object - -2004-12-09 Geoff Norton - - * carbonFunctions.cs: New carbon functions/structures - * Graphics.cs: Update FromHwnd to work without being in the carbon eventing loop - -2004-12-08 Geoff Norton - - * Graphics.cs: Drop FromHwndWithSize; we can't change the public API - Add Quartz support to FromHwnd marshalling a struct back with the ptr/width/height. - -2004-12-07 Geoff Norton - - * Graphics.cs: Add FromHwndWithSize for the MWF/Quartz backend - * gdipFunctions.cs: Add the quartz dllimport into libgdiplus - -2004-12-06 Miguel de Icaza - - * FontFamily.cs: This one is static. - -2004-11-25 Ravindra - - * gdipFunctions.cs (GdipCreateFontFromLogfontA): Changed return - type from int to Status type. - -2004-11-25 Marek Safar - - * Image.cs: Add CheckStatus to SaveAdd. - -2004-11-22 Ravindra - - * Graphics.cs: Fixed null values handling in all overloads of - MeasureString method. - -2004-11-18 Ravindra - - * gdipFunctions.cs: Removed the .so extension from a DllImport - that hooks to X11. - -2004-10-27 Jordi Mas i Hernandez - - * gdipFunctions.cs: calls GdiplusShutdown to propery signal GDI+ - termination - -2004-11-03 Miguel de Icaza - - * TextureBrush.cs (Clone): While cloning, it is not enough to let - GDIPlus clone the underlying data, we must alos clone the managed - information. - - * Pen.cs (Dispose): Set the nativeObject to IntPtr.Zero to catch - errors in the future, set the lock on the object before doing any - other tests, not after. - - (Clone): While cloning, it is not enough to let - GDIPlus clone the underlying data, we must alos clone the managed - information. - - * Brush.cs (Dispose): Set the nativeObject to IntPtr.Zero to catch - errors in the future. - - Set the lock in the object before checkign disposed. - - * SolidBrush.cs (Clone): While cloning, it is not enough to let - GDIPlus clone the underlying data, we must alos clone the managed - information. - - (Dispose): Set the nativeObject to IntPtr.Zero to catch - errors in the future. - -2004-10-28 Ravindra - - * gdipFunctions.cs: Added checks for null stream in the - StreamHelper internal class. - * Icon.cs: Removed an ugly hack that used temp files in - ToBitmap () method. We use MemoryStream instead. - -2004-10-27 Jordi Mas i Hernandez - - * Font.cs: fixes bug 66533 - -2004-10-22 Jordi Mas i Hernandez - - * Bitmap.cs, Font.cs FontFamily.cs Graphics.cs Region.cs - SolidBrush.cs StringFormat.cs TextureBrush.cs: removes the - lock operations after conversation with Miguel. Do not really - need it. - -2004-10-22 Jordi Mas i Hernandez - - * Bitmap.cs: Fixes MakeTransparent problem with 24bbps - -2004-10-19 Jordi Mas i Hernandez - - * Bitmap.cs: Fixes MakeTransparent method - -2004-10-13 Ravindra - - * Graphics.cs: Moved the initialization of 'use_x_drawable' - member out of private constructor to class initialization. - So that, we get it right even if Graphics is not instantiated. - This fixes the problem we face (otherwise) when we make first - call to Graphics.FromHwnd () method. - -2004-10-08 Ravindra - - * Image.cs: Suppress finalization in Dispose () method. - -2004-10-04 Ravindra - - * gdipFunctioncs.cs: Fix from Alois for bug #67383. - -2004-09-29 Jackson Harper - - * Graphics.cs: Use FromHdcInternal to set the X display - handle. Add a flag to check if we are on unix so we aren't calling - Environment.OSVersion.Platform all the time. Mad props to Peter - Bartok for this. - -2004-09-17 Marek Safar - - * Font.cs (FromHfont, ToHfont): Fixed windows implementation. - ToLogFont: Implemented. - - * gdipFunctions.cs: GdipCreateFromHDC changed int to IntPtr to - avoid casts. - GdipCreateFontFromLogfontA: A new extern call. - -2004-09-13 Ravindra - - * Graphics.cs: MSDN says that using image width and height gives - better performance, hence we are using image width and height to - avoid autoscaling in DrawImageUnscaled. - -2004-09-10 Ravindra - - * Graphics.cs: Implemented DrawIcon methods and fixed - DrawImageUnscaled method implementation. - -2004-08-21 Jackson Harper - - * ImageAnimator.cs: Run animator as a background thread so we do - not hang on exit. - -2004-08-21 Ravindra - - * gdipFunctions.cs: Modified exception message to include the case - of missing required libraries for different formats. - -2004-08-10 Jackson Harper - - * SystemColors.cs: Make Highlight colour match colour from windows - classic color scheme. - -2004-07-30 Ravindra - - * Font.cs: Fixed Height property implementation and implemented - GetHeight method and its overloads. - -2004-07-29 Sanjay Gupta - - * gdipFunctions.cs: Corrected signature of GdipGetPropertyItem - P/Invoke function for Image. - * Image.cs: Implemented GetPropertyItem() and SetPropertyItem() method. - -2004-07-29 Sanjay Gupta - - * gdipFunctions.cs: Corrected signatures of GdipGetPropertySize and - GdipGetAllPropertyItems P/Invoke function for Image. - * gdipStructs.cs: Corrected MarshalTo() method of GdipPropertyItem. - * Image.cs: Corrected implementation of PropertyItems property. - -2004-07-29 Sanjay Gupta - - * gdipFunctions.cs: Corrected signature of GdipGetPropertyIdList - P/Invoke function for Image. - * Image.cs: Changed implementation of PropertyIdList property. - -2004-07-28 Sanjay Gupta - - * gdipStructs.cs: Implementing PropertyItem property in Image.cs. - * Image.cs: Implemented PropertyItems and PropertyIdList properties. - -2004-07-21 Ravindra - - * gdipFunctions.cs: Corrected signatures of GdipPathIterCopyData and - GdipPathIterEnumerate P/Invoke functions for GraphicsPathIterator. - -2004-07-21 Jordi Mas i Hernandez - - * Graphics.cs: fixes MeasureCharacterRanges function. It was completely wrong. - * StringFormat.cs: MeasurableCharacterRanges should be passed to GDI+ - * gdipFunctions.cs: new GDI function calls - -2004-07-16 Ravindra - - * gdipFunctions.cs: Added P/Invokes for GraphicsPathIterator. - -2004-07-15 Ravindra - - * gdipFunctions.cs: Removed GdipGetPathData P/Invoke. It is redundant. - -2004-07-13 Ravindra - - * gdipFunctions.cs: Removed GdipGetPathGradientRectI P/Invoke. - This was redundant. It was kept in previous checkin to avoid - build breakage. - -2004-07-13 Ravindra - - * gdipFunctions.cs: Added some P/Invokes for PathGradientBrush. - -2004-07-09 Peter Bartok - * Graphics.cs: Added support required for new managed SWF library - * gdipFunctions.cs: Added XOpenDisplay definition/import - -2004-07-02 Jordi Mas i Hernandez - - * gdipFunctions.cs: fixes bug 61050 - -2004-06-24 Sanjay Gupta - - * ImageAnimator.cs: Rewrote complete implementation. - -2004-06-24 Sanjay Gupta - - * gdipFunctions.cs: Corrected issue in GdiPlusStreamHelper class. - If read function was called after seek function call, the - implementation was returning data from bytes already peeked and - not from the new position in stream, which we have seeked. - -2004-06-22 Jordi Mas i Hernandez - - * Graphics.cs: added MeasureString wrappers - -2004-06-22 Jordi Mas i Hernandez - - * Graphics.cs, gdipFunctions.cs: define and use GdipSetVisibleClip_linux - -2004-06-20 Jordi Mas i Hernandez - - * Graphics.cs, gdipFunctions.cs: added missing clip function wrappers - -2004-06-18 Ravindra - - * FontConverter.cs: Implemented the missing functions. - * Font.cs: Added some notes. - -2004-06-16 Sanjay Gupta - - * gdipFunctions.cs: Modified Function signature for - GdipSaveImageToDelegate_linux() method for saving tiff images - to streams. - * image.cs: Modified function call GdipSaveImageToDelegate_linux() - with new signature. - -2004-06-15 Sanjay Gupta - - * gdipFunctions.cs: Added delegate and StreamHelper functions, Close - and Size, required by TIFFCodec. Modifed Function signature for - GdipLoadImageFromDelegate_linux() method. - * image.cs: Modified function call GdipLoadImageFromDelegate_linux() - with new signature. - -2004-06-11 Ravindra - - * gdipFunctions.cs: (GdipCreateSolidFill): Changed one argument - from out int to out IntPtr. - * SolidBrush.cs: Same. - -2004-06-10 Gert Driesen - - * Image.cs: API signature fixes, meaning DisposeResources is now - private and marked InitFromStream internal - -2004-05-12 Jordi Mas i Hernandez - - * FontFamily.cs: simplifies object destruction and fixes - -2004-05-12 Jordi Mas i Hernandez - - * FontFamily.cs: added destructor - * Graphics.cs: added destructor to stop leaking, remove debugging code - - -2004-05-12 Jordi Mas i Hernandez - - * gdipFunctions.cs: added GdipSaveAddImage - * Image.cs: added SaveAdd methods - -2004-06-02 Peter Bartok - * gdipFunctions.cs: Fixed reference to wrong DLLs for GetDC/ReleaseDC - (This fixes bug #59479) - -2004-06-01 Gert Driesen - - * Font.cs: Added missing Browsable attribute on SizeInPoints. - * Region.cs: Removed extra ComVisible attribute from Clone(). - -2004-06-01 Ravindra - - * Pen.cs: Added a note on Dispose method. - * Brush.cs: Fixed Dispose method. - * SolidBrush.cs: Fixed Dispose method. - -2004-05-28 Ravindra - - * gdipFunctions.cs: Added some P/Invoke calls for Draw/Fill - rectangles. - * Graphics.cs: Implemented Dispose method and changed Draw/Fill - rectangles implementation (This is basically done to avoid lots - of brush and pen setup happening in libgdiplus.) - -2004-05-27 Ravindra - - * Color.cs: Changed Color.Green to what MS.NET has. Conforming to MS. - -2004-05-26 Sanjay Gupta - - * ImageFormatConverter.cs: Fixed issues discovered from nunit - test cases. - -2004-05-26 Ravindra - - * Color.cs: Corrected Color.Green property. - -2004-05-24 Jordi Mas i Hernandez - * gdipStructs.cs: remove unnecessary code, since bug 57706 is fixed - -2004-05-20 Sanjay Gupta - - * Icon.cs: Fixed issue with size property. - -2004-05-18 Ravindra - - * Pen.cs: Added value checks in DashPattern and CompoundArray - properties. - -2004-05-16 Gert Driesen - - * Graphics.cs: fixed warning - * ImageAnimator.cs: fixed warning - * FontConverter.cs: fixed public API - -2004-05-14 Vladimir Vukicevic - - * gdipFunctions.cs: Fixed prototype for - GdipGetEncoderParameterList - - * Image.cs: Reworked Save functions to handle EncoderParameters. - Implemented GetEncoderParameterList - Also removed unused setGDIPalette internal method. - -2004-05-14 Peter Bartok - * StringFormat.cs: Added CharacterRange handling - * Graphics.cs: Implemented MeasureCharacterRanges method - -2004-05-14 Peter Bartok - * Graphics.cs: Added error check - -2004-05-14 Duncan Mak - * gdipFunctions.cs (GdipCreatePath2I, GdipAddPathPieI): - (GdipFlattenPath, GdipWarpPath, GdipWidenPath): - (GdipGetPathWorldBounds, GdipGetPathWorldBoundsI): Imported. - -2004-05-14 Sanjay Gupta - * ImageFormatConverter.cs: Modified implementation of ConvertFrom() method. - -2004-05-13 Sanjay Gupta - * ImageFormatConverter.cs: Implemented GetStandardValuesSupported () method. - -2004-05-13 Peter Bartok - * Bitmap.cs: Fixed bug #52868, Bitmap(Image, Size) did not - resize the image. - -2004-05-12 Peter Bartok - * Image.cs: Implemented GetThumbnailImage - -2004-05-13 Sanjay Gupta - * Graphics.cs: Made method DrawRectangle (Pen , RectangleF) and - FromXDrawable(IntPtr, IntPtr) internal. - -2004-05-12 Jordi Mas i Hernandez - * Color.cs: work for API compatibilty: private date, todos - * Font.cs: work for API compatibilty: private date, todos - * FontFamily.cs: work for API compatibilty: private date, todos - * Graphics.cs: work for API compatibilty: private date, todos - * Icon.cs: work for API compatibilty: private date, todos - * Image.cs: work for API compatibilty: private date, todos - * ImageAnimator.cs: work for API compatibilty: private date, todos - * Point.cs: work for API compatibilty: private date, todos - * PointF.cs: work for API compatibilty: private date, todos - * Rectangle.cs: work for API compatibilty: private date, todos - * RectangleF.cs: work for API compatibilty: private date, todos - * Region.cs: work for API compatibilty: private date, todos - * Size.cs: work for API compatibilty: private date, todos - * SizeF.cs: work for API compatibilty: private date, todos - * SolidBrush.cs: work for API compatibilty: private date, todos - * StringFormat.cs: work for API compatibilty: private date, todos - * SystemPens.cs: work for API compatibilty: private date, todos - * TextureBrush.cs: work for API compatibilty: private date, todos - * gdipStructs.cs: work for API compatibilty: private date, todos - -2004-05-12 Ravindra - - * Bitmap.cs, Font.cs, FontConverter.cs, Graphics.cs, Icon.cs, Image.cs - ImageAnimator.cs, Point.cs, PointF.cs, Rectangle.cs, RectangleF.cs - Region.cs, Size.cs, SizeF.cs, ToolboxBitmapAttribute.cs, gdipFunctions.cs: - Added missing attributes and some coding style fixes. - * Pen.cs: Implementing CustomStartCap and CustomEndCap properties and - some fixes. - -2004-05-11 Sanjay Gupta - - * ImageAnimator.cs: Implemented first version. - -2004-05-11 Ravindra - - * gdipFunctions.cs: Implementing AdjustableArrowCap. Added P/Invokes - for the same. - -2004-05-10 Ravindra - - * gdipFunctions.cs: Implementing CustomLineCap. Added P/Invokes - for the same. Added few related P/Invokes for Pen also. - -2004-05-06 Sanjay Gupta - - * ImageAnimator.cs: Corrected implementation of CanAnimate() method. - -2004-05-06 Ravindra - - * RectangleConverter.cs: Implemented GetProperties () method. - * SizeConverter.cs: Implemented GetProperties () method. - * PointConverter.cs: Implemented GetProperties () method. - * FontConverter.cs: Implemented some of the methods. - -2004-05-06 Ravindra - - * Color.cs: Fixed Name property. - * ColorTranslator.cs: Fixed the existing methods and implemented - the missing methods. - * ColorConverter.cs: Fixed the existing methods and implemented - the missing methods. Also, fixed coding style. - -2004-05-05 Jordi Mas i Hernandez - * Bitmap.cs: Let GDI+ calculate the strides, as it does in Win32. - -2004-05-05 Jordi Mas i Hernandez - * Image.cs: raw_format should be handled by GDI+ - * Bitmap.cs: raw_format should be handled by GDI+ - -2004-05-04 Ravindra - - * Pen.cs: Modified exception message. Fixed Transform, DashPattern, - and DashCap properties. Implementing CoumpoundArray, StartCap, EndCap - properties and SetLineCap method. In constructors use IntPtr instead - of int. - * SolidBrush.cs: Modified exception message. - * TextureBrush.cs: Fixed Transform property. - * gdipFunctions.cs: Fixed P/Invokes for Pen.cs, TextureBrush.cs and - LinearGradientBrush.cs. - -2004-04-30 Sanjay Gupta - - * Image.cs: Implemented FrameDimensionsList property. - -2004-04-30 Ravindra - - * gdipFunctions.cs: Added few more P/Invoke calls for - lineargradient brush and added one case statement in - CheckStatus method. - -2004-04-30 Jordi Mas i Hernandez - - * Image.cs: takes into account MemoryBmp format when saving - -2004-04-30 Ravindra - - * StringFormat.cs: Added checks for status. - -2004-04-30 Sanjay Gupta - - * Image.cs: Removed calls which passes byte[] for Guid parameter. - * gdipFunctions.cs: Removed unwanted unix specific function calls. - -2004-04-30 Ravindra - - * Graphics.cs: Added checks for status. - * Image.cs: Added a check for status. - * FontFamily.cs: Added checks for status. - -2004-04-29 Peter Bartok - - * Brushes.cs: Fixed bug #52695. No longer creates a new - brush for every request and behaves Microsoft compatible - -2004-04-29 Jordi Mas i Hernandez - - * Image.cs: fixes Save method. It now retrieves the proper encoder and uses - its ClsID instead of the formatID (as GDI+ expects) - -2004-04-29 Ravindra - - * Font.cs: Added checks for status. - * Bitmap.cs: Added checks for status. - * Pen.cs: Added checks for status. - -2004-04-28 Sanjay Gupta - - * ColorTranslator.cs, StringFormat.cs, SystemIcons.cs, ToolBoxBitmapAttributes.cs: - Converted to unix format from dos format. - -2004-04-28 Sanjay Gupta - - * ImageConverter.cs: Implemented GetProperties() and GetPropertiesSupported () methods. - -2004-04-28 Jordi Mas i Hernandez - - * gdipStructs.cs: added GdipImageCodecInfo struct - -2004-04-28 Sanjay Gupta - - * ImageFormatConverter.cs: Corrected ConvertFrom method. - -2004-04-27 Sanjay Gupta - - * ImageConverter.cs: Added exception message. - * IconConverter.cs: Added exception message. - * ImageFormatConverter.cs: Implemented first version. - -2004-04-27 Sanjay Gupta - - * ImageConverter.cs: Implemented first version. - -2004-04-27 Sanjay Gupta - - * IconConverter.cs: Implemented first version. - -2004-04-26 Sanjay Gupta - - * Image.cs: Corrected implementation of Property RawFormat. - * gdipFunctions.cs: Corrected declaration of GdipGetImageRawFormat. - -2004-04-25 Sanjay Gupta - - * Bitmap.cs: Resolved a compile time error. - * Image.cs: Changed the implementation of few methods to progress - with ImageAnimator class. - * gdipFunctions.cs: Added few linux only function calls. - * Icon.cs: Removed unused variable from code. - -2004-04-25 Vladimir Vukicevic - - * Graphics.cs, gdipFunctions.cs: Added CreateFromXDrawable_linux. - -2004-04-23 Vladimir Vukicevic - - * Commited patch from pcgod@gmx.net (Bnehamin Jemlich) for - serialization for Bitmaps. (Bugzilla #52568) - -2004-04-23 Ravindra - - * RectangleConverter.cs: Fixed ConvertTo () method. - * SizeConverter.cs: Fixed ConvertTo () method. - * PointConverter.cs: Fixed ConvertTo () method. - -2004-04-23 Sanjay Gupta - * ImageAnimator.cs: Implemented CanAnimate() method. - -2004-04-22 Jordi Mas i Hernandez - * Image.cs: added RotateFlip and RemovePropertyItem calls - -2004-04-22 Ravindra - - * RectangleConverter.cs: Implemented. Also changed file format - dos2unix. - * Rectangle.cs: Fixed ToString method. - * RectangleF.cs: Fixed ToString method. - -2004-04-22 Ravindra - - * SizeConverter.cs: Implemented some of the functions. - * PointConveter.cs: Implemented. - * gdipFunctions.cs: Corrected one typo. - * Brushes.cs: Added a comment. - -2004-04-22 Vladimir Vukicevic - - * gdipFunctions.cs: Fix StreamGetBytesImpl to handle - returning portions of the peek buffer back. Fixes #57379. - -2004-04-21 Peter Bartok - * Font.cs: Implemented Font.FromHfont method - * gdipStructs.cs: fixed sign for LOGFONTA lfHeight member - * gdipFunctions.cs: Added imports for functions required to support - Font.FromHfont method - -2004-04-21 Jordi Mas i Hernandez - * RectangleConverter.cs: stubbed out - * Font.cs : added missing members - -2004-04-19 Sanjay Gupta - * Icon.cs: Fixed problem in extracting bitmap from Icon. - -2004-04-16 Ravindra - - * Pen.cs: GC should be allowed to collect any pen including - system pens. - * SolidBrush.cs: GC should be allowed to collect any SolidBrush - including system brushes. - * Brushes.cs: Coding style. - * Pens.cs: Objects created by Pens are not modifiable on - MS.NET, so we are now. Also, coding style fixes. - * SystemPens.cs: Removed static constructor and changed file - format dos2unix. - * SystemBrushes.cs: Some cosmetic changes. - -2004-04-15 Sanjay Gupta - * Icon.cs: Implemented more missing bits and fixed the problem - of icon not getting saved in proper format - -2004-04-14 Sanjay Gupta - * Icon.cs: Implemented more missing bits - -2004-04-13 Sanjay Gupta - * Icon.cs: Implemented few more missing bits - -2004-04-12 Sanjay Gupta - * Icon.cs: Implemented first version - -2004-04-11 Peter Bartok - * Font.cs: Implemented Font.ToHfont method; used Jordi's suggestion of splitting - the code and using our own private gdiplus function when on Unix and using Win32 - functions when running on Windows - * gdipStructs.cs: Added LOGFONTA structure - * gdipFunctions.cs: Added various DllImports required for Font.ToHfont - -2004-04-10 Vladimir Vukicevic - - * Image.cs: Save should use encoder.FormatID, not Clsid - -2004-04-06 Jordi Mas i Hernandez - * Region.cs: fixes GdipCombineRegionRect and GdipCombineRegionRectI signature - * gdipFunctions.cs: fixes GdipCombineRegionRect and GdipCombineRegionRectI signature - -2004-04-06 Duncan Mak - - * gdipFunctions.cs (GdipCreatePath2): Fixed signature. - -2004-04-06 Jordi Mas i Hernandez - * Region.cs: fixes GetRegionScans - * gdipFunctions.cs: fixes GetRegionScans - -2004-04-06 Vladimir Vukicevic - - * gdipFunctions.cs: Added stream delegate helpers for - stream loading/saving on linux - - * Image.cs, Bitmap.cs: Converted to call into GDIPlus for - loading/saving image data. - -2004-04-05 Jordi Mas i Hernandez - * Region.cs: implemented new methods - * Graphics.cs: implemented new methods - -2004-04-02 Jordi Mas i Hernandez - * Region.cs: implemented - -2004-04-01 Duncan Mak - - * Graphics.cs (DrawCurve): Call the correct GDI+ wrappers. - - * gdipFunctions.cs (GdipAddPathCurveI): - (GdipAddPathCurve2, GdipAddPathCurve2I): - (GdipAddPathCurve3, GdipAddPathCurve3I): - (GdipAddPathClosedCurve, GdipAddPathClosedCurveI): - (GdipAddPathClosedCurve2, GdipAddPathClosedCurve2I): Added new - wrappers from GDI+. - -2004-03-30 Jordi Mas i Hernandez - * Image.cs: implemented a few GDI+ wrapper calls - -2004-03-30 Jordi Mas i Hernandez - * Bitmap.cs: remove redundant data already present at Image.cs - * Image.cs: use GDI+ functions to get image details - * StringFormat.cs: missing constructor and property - -2004-03-24 Jordi Mas i Hernandez - * FontFamily.cs: added missing members and style clean - * Graphics.cs: fixed signature of DrawArc and DrawPie - * Image.cs: added missing members, fixes - * StringFormat.cs: missing constructor and property - -2004-03-24 Jordi Mas i Hernandez - * Graphics.cs: Added missing DrawImage GDI+ calls - * gdipFunctions.cs: Added missing DrawImage GDI+ calls - -2004-03-23 Ravindra - * gdipFunctions.cs: Added few more P/Invoke calls for - LinearGradientBrush. - -2004-03-22 Ravindra - * gdipFunctions.cs: Added P/Invoke calls for LinearGradientBrush - and did few coding style fixes. - -2004-03-18 Ravindra - * Brush.cs: Fixed Dispose method. - * SolidBrush.cs: Fixed clone method. - * TextureBrush.cs: Fixed clone method. - * gdipFunctions.cs: Fixed P/Invokes for PathGradientBrush. - -2004-03-13 Gonzalo Paniagua Javier - - * SizeConverter.cs: fixd typo in ConvertFrom that made height be wrong. - -2004-03-10 Ravindra - * Pen.cs: Implemented PenType property. - * Brush.cs: Coding style. - -2004-03-06 Ravindra - * gdipFunctions.cs: Added few more GDI+ P/Invoke calls - for PathGradientBrush. - -2004-03-06 Ravindra - * gdipFunctions.cs: Added GDI+ P/Invoke calls for - PathGradientBrush. - -2004-03-04 Duncan Mak - - * Region.cs: Indentation. - - * RectangleF.cs: Changed the internal structure from a PointF, - SizeF to floats in order to match the layout from the C API. - -2004-03-04 Jordi Mas i Hernandez - * StringFormat.cs: DigitSubstitution and TabStob methods, coding-style - -2004-03-03 Sanjay Gupta - * gdipFunctions.cs: Added functions for ImageAttributes - -2004-03-03 Sanjay Gupta - * Icon.cs: Missing function stubs added - * Icon.cs: Missing function stubs added - * IconConverter.cs: Missing function stubs added - * ImageAnimator.cs: Missing function stubs added - * ImageConverter.cs: Missing function stubs added - * ImageFormatConverter.cs: Missing function stubs added - -2004-03-02 Jordi Mas i Hernandez - * Font.cs: Allow multiple styles - -2004-02-25 Jordi Mas i Hernandez - * StringFormat.cs: Clone method - -2004-02-24 Jordi Mas i Hernandez - * font.cs: fixes, Clone, and ToString - -2004-02-21 Jordi Mas i Hernandez - * gdipFunctions.cs: MeasureString - * Graphics.cs : MeasureString - -2004-02-17 Jordi Mas i Hernandez - * Font.cs: destructor and unit conversion - * Graphics.cs : system dpi support - -2004-02-13 Ravindra - * Pen.cs: Fixed some bugs. - * TextureBrush.cs: Fixed some bugs. - -2004-02-13 Sanjay Gupta - * gdipFunctions.cs: Added ImageCodecInfo functions - * Image.cs: Added few methods - -2004-02-13 Jordi Mas i Hernandez - * FontFamily.cs: remove hardcoded font names, a few bug fixes - -2004-02-12 Sanjay Gupta - * gdipFunctions.cs: Added Image class functions - * Image.cs: Added few methods - -2004-02-10 Jordi Mas i Hernandez - * graphics.cs: fixes parameters for DrawStrings functions - -2004-02-07 Andreas Nahr - - * SRDescriptionAttribute.cs: Added and implemented - * ToolboxBitmapAttribute.cs: Implemented a few members - * SystemIcons.cs: Stubbed - * StringFormat.cs: Implemented method - * Region.cs: Added Todo, fixed attribute - * Size.cs: Added attribute - * SizeF.cs: Added attribute - * RectangleF.cs: Added attributes - * Rectangle.cs: Added attributes - * PointF.cs: Added attribute - * Point.cs: Added attribute - -2004-02-06 Ravindra - - * Brush.cs: Renamed GetException method to CheckStatus - and moved it to gdipFunctions.cs. - * gdipFunctions.cs: Added CheckStatus method. - * SolidBrush.cs: Using CheckStatus method. - * TextureBrush.cs: Using CheckStatus method. - * gdipEnums.cs: Added a missing value. - -2004-02-05 Ravindra - - * Brush.cs: Added a missing namespace. - -2004-02-05 Ravindra - - * gdipFunctions.cs: Added methods for HatchBrush and - SolidBrush. - * SolidBrush.cs: Added checks for status. - * Brush.cs: Added support for HatchBrush and TextureBrush - types in internal CreateBrush() method. - -2004-02-03 Jordi Mas - * Font.cs: Setup font properties - -2004-02-03 Ravindra - - * TextureBrush.cs and Brush.cs: Moved GetException (Status) - method from TextureBrush.cs to Brush.cs. - * Brush.cs: Made GetException (Status) method internal. - -2004-02-03 Sanjay Gupta - - * gdipFunctions.cs: Added methods for Image class. - -2004-01-30 Ravindra - - * TextureBrush.cs: Added more methods to complete it. - * gdipFunctions.cs: Added methods for TextureBrush class. - -2004-01-30 Ravindra - - * gdipFunctions.cs: Added methods for TextureBrush class. - -2004-01-30 Ravindra - - * Pen.cs: Modified to handle TextureBrush also. - * Bitmap.cs: Added one internal constructor. - * TextureBrush.cs: Implemented. - -2004-01-29 Duncan Mak - - * gdipFunctions.cs - * Graphics.cs: Indentation fixes, removed long dangling lines and - extra spaces. - - * Graphics.cs (IsVisible): Renamed variable to not use hungarian - notation. - -2004-01-29 Sanjay Gupta - - * FontFamily.cs: Implemented few methods and a constructor - -2004-01-28 Sanjay Gupta - - * gdipFunctions.cs: Added FontFamily and FontCollection functions. - * FontFamily.cs: Implemented missing functionalities. - -2004-01-24 Duncan Mak - - * Graphics.cs (DrawPath): Implemented. - -2004-01-23 Ravindra - - * Point.cs: ToString modified. - * PointF.cs: ToString modified. - * Size.cs: ToString modified. - * SizeF.cs: ToString modified. ToPoint and ToSize methods - are added. - -2004-01-21 Jordi Mas i Hernàndez - * Bitmap.cs: Several new methods added. - -2004-01-21 Duncan Mak - - * gdipFunctions.cs (GdipGetPathTypes, GdipGetPathPoints): Add - OutAttribute to the array argument. This fixes the PathPoints - property in System.Drawing.Drawing2D.GraphicsPath. - -2004-01-20 Ravindra - - * Pen.cs: Fixed bug #52811 in Pen.Transform property. Setting - this property was hanging and getting was throwing a NullRef - Exception. Earlier we were passing Matrix object to and fro - which was causing the problem. Now, we are using IntPtr. - Thanks to Duncan for helping me. - Also, .NET behavior is to maintain Pen.Color and Pen.Brush - together. If color is set, a SolidBrush automatically gets - set with the same color, Pen loses the old brush object. - If a SolidBrush is set, Pen.Color gets the value same as that - of brush color losing the old value. Pen shows this behavior - now. - * gdipFunctions.cs: Changed the signature of GdipGetPenTransform - and GdipSetPenTransform methods to use IntPtr instead of Matrix. - -2004-01-19 Duncan Mak - - * gdipFunctions.cs: Import functions for GraphicsPath. - -2004-01-14 Ravindra - - * SolidBrush.cs: Made SolidBrush to initialize its color - from IntPtr. - - * gdipFunctions.cs: Added call to GdipGetSolidFillColor GDI+ API. - -2004-01-11 Duncan Mak - - * Bitmap.cs (LockBits): - * Graphics.cs (DrawString): Removed reference to GpRectF. - -2004-01-09 Duncan Mak - - * gdipStructs.cs (GpRectF, GpRect, GpPointF, GpPoint): - Removed. Didn't know that structs are laid out sequentially by - default. We don't need these anymore. - -2004-01-12 Ben Maurer - - * Color.cs: Keep KnownColors in an array so that we avoid ht lookup. - -2004-01-11 Daniel Morgan - - * Graphics.cs: fix compile error on Windows builds for out - parameter state in call to GdipSaveGraphics - -2004-01-10 Ravindra - - * All Enums: Made serializable. - - * Image.cs: Corrected signature of Dispose(bool) method. - - * Pen.cs, SolidBrush.cs, SystemPens.cs, SystemBrushes.cs: - Corrected coding style mistakes of my previous commit. - - * PointConverter.cs, RectangleConverter.cs: Inherit TypeConverter. - - * PointF.cs, RectangleF.cs, SizeF.cs: Made serializable. - - * StringFormat.cs: Inherits MarshalByRefObject. - - * ToolboxBitmapAttribute.cs: Added missing attribute [AttributeUsage]. - -2004-01-08 Ravindra - - * Pen.cs: Added isModifiable (bool) variable. It is required to - make Pens created by SystemPens.cs unmodifiable. All property - setters are modified for this. - - * SolidBrush.cs: Added isModifiable variable (bool). It is - required to make Brushes created by SystemBrushes.cs unmodifiable. - All property setters are modified for this. - - * SystemBrushes.cs: Modified all the properties as per the .NET - specs, so that Brushes are not created every time. Also, missing - properties are added. - - * SystemPens.cs: Modified all the properties as per the .NET - specs, so that Brushes are not created every time. Also, missing - properties are added. - -2003-12-12 Miguel de Icaza - - * Rectangle.cs: Patch from Bryan Bulten, fixes Inflate and makes - it serializable - -2004-01-06 Duncan Mak - - * gdipFunctions.cs: Import GraphicsPath functions from GDI+. - -2003-12-21 Duncan Mak - - * Graphics.cs (DrawArc): Fixed the method signature and hooked it - up to the GDI+ implementation. - (RotateTransform): Uncommented. - - * gdipFunctions.cs (DrawArc, DrawArcI): Import from - libgdiplus.so.dll. - -2003-12-13 Todd Berman - - * Font.cs: Implementing a couple things for porting purposes - * SystemBrushes.cs: ^ - * StringFormat.cs: ^^ - -2003-11-28 Duncan Mak - - * Pen.cs (CompoundArray): Hide this for now. - -2003-11-28 Duncan Mak - - * Brush.cs (CreateBrush): new internal factory method for creating - specific brushes based on the internal (GDI+ C API) BrushType - enum. - (Brush (IntPtr)): new internal constructor. - - * Pen.cs: Removed all the C# fields. We are using GDI+ completely - now. - (Pen (IntPtr)): new internal constructor. - (Pen (Brush, float)): Use GdipCreateBrush2. - (Clone): Implemented using GdipClonePen. - (Alignment, Brush, Color, Width): Use GDI+ implementations - instead. - (CompoundArray, DashCap, DashOffset, DashPattern, DashStyle): - Implemented these properties. - (CustomStartCap, CustomEndCap, StartCap, EndCap, SetLineCap): Stubbed. - (MultiplyTransform, ResetTransform, RotateTransform): - (ScaleTransform, TranslateTransform): Implemented these methods. - - * SolidBrush.cs (SolidBrush (IntPtr)): new internal constructor. - - * gdipEnums.cs (BrushType): Added new GDI+ enum. - - * gdipFunctions.cs: Imported new Brush and Pen functions. - -2003-11-22 Duncan Mak - - * gdipFunctions.cs - (GdipResetWorldTransform, GdipSetWorldTransform): - (GdipGetWorldTransform, GdipScaleWorldTransform): Imported. - - * Graphics.cs: Remove unnecessary TODO, and reformatted the code. - (transform): Removed this field. Always use the - matrix associated in the GpGraphics ptr. - (DrawBeziers): Implemented. - (DrawLine): Don't need to manually invoke the transform now. - (MultiplyTransform, ResetTransform): - (ScaleTransform, TranslateTransform): Use GDI+ implementation. - (Transform): Instead of storing a Matrix in managed code, use - equivalent GDI+ functions. - -2003-11-21 Gonzalo Paniagua Javier - - * SizeConverter.cs: fixed class signature and implemented some methods. - -2003-11-17 Duncan Mak - - * gdipFunctions.cs (GdipGetMatrixElements): Fix signature. - - * Graphics.cs (MultiplyTransform): Commented out until my Matrix commit. - -2003-11-17 Duncan Mak - - * Bitmap.cs (LockBits): - * Graphics.cs (DrawString): Use GpRectF. - - * gdipFunctions.cs: Updated method signatures. - - * Graphics.cs (MultiplyTransform): Implemented using - GdipMultiplyWorldTransform from GDI+. - - * gdipStructs.cs (GdipRectF, GdipRect): Renamed to GpRectF and - GpRect, to be more consistent with the C naming. - -2003-11-16 Miguel de Icaza - - * Graphics.cs: Implement the other DrawString overloads . - -2003-11-16 Miguel de Icaza - - * gdipStructs.cs (GdipRectF): Added utility constructor - -2003-11-15 Duncan Mak - - * gdipFunctions.cs: Imported matrix functions. - -2003-11-13 Andreas Nahr - - * Bitmap.cs: Added Attributes - * ColorTranslator.cs: Added private constructor - * Font.cs: Added Attributes - * FontFamily.cs: sealed - * Icon.cs: Added Attributes - * IconConverter.cs: Fixed signature - * Image.cs: Added attributes - * ImageAnimator.cs: - * ImageConverter.cs: - * ImageFormatConverter.cs: - * SolidBrush.cs: - * StringFormat.cs: - * SystemBrushes.cs: - * SystemColors.cs: - * SystemIcons.cs: - * SystemPens.cs: - * TextureBrush.cs: Fixed signature - * Color.cs: Added attributes - * Point.cs: - * PointF.cs: - * Rectangle.cs: - * Size.cs: - * SizeF.cs: Added attributes - * ContentAlignment.cs: Added attribute - -2003-11-13 Duncan Mak - - * Pen.cs (LineCap, LineJoin, MiterLimit, Transform): implemented. - - * gdipFunctions.cs - (GdipSetPenMiterLimit, GdipGetPenMiterLimit): - (GdipSetPenLineJoin, GdipGetPenLineJoin): - (GdipSetPenLineJoin, GdipGetPenTransform): imported. - -2003-11-12 Alexandre Pigolkine - * Bitmap.cs - * gdipFunctions.cs copy image in Bitmap constructor - -2003-11-06 Duncan Mak - * Graphics.cs (DrawPie): Use DrawPieI instead of DrawPie and fix - angle parameters for the integer case. - (DrawBezier): Hook it up with GdipDrawBezier. - (DrawEllipse): Fix Width, Height ordering. - -2003-11-05 Duncan Mak - - * Graphics.cs (DrawPie): - * gdipFunctions.cs (GdipDrawPie): Add hooks to the implementation - in graphics.c. - -2003-10-28 Duncan Mak - - * Graphics.cs (DrawEllipse, DrawLine, DrawPolygon): - (FillEllipse, FillPolygon): implemented. - (RenderingOrigin): implemented. - - * gdipFunctions.cs: Added new GDI+ equivalents. - -2003-10-25 Alexandre Pigolkine - * Bitmap.cs - * Image.cs small fixes - -2003-10-25 Atsushi Enomoto - - * Image.cs : renamed 'pallete' to 'colorPallete' for CLS compliance. - -2003-10-24 Miguel de Icaza - - * SystemBrushes.cs: Some more brushe3s. - - * SystemPens.cs: More pens. - - * Pen.cs: Implement IDisposable, ICloneable. - - * Region.cs: Add some more stubs here. - - * StringFormat.cs: Add some more code here. - -2003-10-23 Miguel de Icaza - - * Image.cs: Kill the InternalImageInfo, everything is now done in - terms of Image and BitmapData. - - * Rectangle.cs: Make this one also sequential, change from using - Point + Size to use x, y, width, height; So we can use GdiPlus. - - * gdipFunctions.cs (GdipBitmapLockBits): Remove the ref from the - BitmapData class argument, and instead use the [In,Out] - attributes, which will do struct marshalling on the fields. Now - we can use C#'s BitmapData directly to talk to Gdiplus. - - * gdipStructs.cs: Every internal structure that has to talk to - Gdi+ is properly prefixed, to minimize the confussion. - - * Bitmap.cs Bitmap (int width, int height, PixelFormat format): - Compute the stride here where we have the BPP information, - allocate a buffer of the proper size, and pass this to - GdipCreateBitmapFromScan0 - - * Image.cs: Implement Dispose pattern. - -2003-10-14 Alexandre Pigolkine - * Graphics.cs - * gdipFunctioncs.cs - * gdipStructs.cs DrawString function added - -2003-10-12 Alexandre Pigolkine - * gdipEnums.cs - * gdipFunctions.cs - * gdipStructs.cs added - - -2003-10-12 Alexandre Pigolkine - * Bitmap.cs - * Brush.cs - * Font.cs - * FontFamily.cs - * Graphics.cs - * Image.cs - * Pen.cs - * SolidBrush.cs - implementation changed to gdi+ - -2003-09-08 Duncan Mak - - * Factories.cs (DefaultImplementationNamespace): Change it from - "XrImpl" to "Cairo". - -2003-08-20 Gonzalo Paniagua Javier - - * Color.cs: fixed FromArgb to handle alpha value correctly. Closes - bug #47727. - -2003-08-08 Duncan Mak - - * Graphics.cs (DrawBezier): Fixed. - -2003-08-03 Alexandre Pigolkine - * Graphics.cs delegate Dispose to implementation - -2003-08-01 Gonzalo Paniagua Javier - - * FontConverter.cs: stub it out so that system.web compiles. - -2003-07-30 Alexandre Pigolkine - * Image.cs InternalImageInfo class improved - -2003-07-23 Miguel de Icaza - - * Factories.cs: If the AppDomain key `Mono.Running.Windows.Forms' - is set, default to Win32Impl - -2003-07-22 Alexandre Pigolkine - * Image.cs implementation added - -2003-07-21 Andreas Nahr - - * Icon.cs: Stubed out (fix for System.Drawing.Design) - -2003-07-17 Andreas Nahr - - * StringFormat.cs: Changes to become CLS-compliant - -2003-07-14 Miguel de Icaza - - * Factories.cs: Remove debugging message. - -2003-07-01 Alexandre Pigolkine - * Color.cs code generation program modified - -2003-06-29 Alexandre Pigolkine - * Graphics.cs image drawing - -2003-06-28 Alexandre Pigolkine - * Color.cs - * SystemColors.cs - supply KnowColor enum value to save Enum.Parse at runtime - -2003-06-26 Alexandre Pigolkine - * Graphics.cs coordinate transformations - * Image.cs small fix - -2003-06-22 Alexandre Pigolkine - * Factories.cs - * FontFamily.cs more implementation - -2003-06-20 Alexandre Pigolkine - * Font.cs - * FontFamily.cs more implementation - -2003-06-18 Alexandre Pigolkine - * Graphics.cs few more calls to implementation - -2003-06-15 Alexandre Pigolkine - * Bitmap.cs BITMAP declaration removed - * Graphics.cs few more calls to implementation - * Image.cs InternalImageInfo structure, image read/write functions - - -2003-05-26 Alexandre Pigolkine - * Factories.cs analyse environment variable and machine.config to select implementation - * Image.cs PixelFormat property added - -2003-04-30 Nick Drochak - - * Factories.cs: Change weird characters that broke build on windows. - -2003-04-26 Gonzalo Paniagua Javier - - * ColorConverter.cs: - (ConvertFrom): return a system or named color if there's one that fits - teh values parsed with Color.FromArgb. - -2003-04-26 Alexandre Pigolkine - * Bitmap.cs - * Brush.cs - * Font.cs - * Graphics.cs - * Image.cs - * Pen.cs - * SolidBrush.cs - * SystemBrushes.cs - * Factories.cs - delegate function calls to implementation - -2003-04-26 Alexandre Pigolkine - * Bitmap.cs - * ChangeLog - * Image.cs - * SystemBrushes.cs switch to Linux style line terminators - -2003-03-29 Alan Tam - * ToolboxBitmapAttribute - stubbed more constructors and fixed base class - -2003-03-01 Alexandre Pigolkine - * SystemBrushes.cs - added stubs to compile SWF - - -2003-02-21 Alexandre Pigolkine - * Font.cs - * Graphics.cs - * Image.cs - * SystemBrushes.cs - small changes to be able to run SWF apps - -2003-02-08 Gonzalo Paniagua Javier - - * Graphics.cs: stubbed out all the methods. - -2003-02-08 Piers Haken - - * fixed case of pens.cs and font.cs - -2003-02-07 Alexandre Pigolkine - * Font.cs Added - * Graphics.cs - * StringFormat.cs - * SystemBrushes.cs - stubs added - -2002-11-21 Dennis Hayes (dennish@raytek.com) - * checkin for Matt Stump (mstump@swfo.arizona.edu) - * Pens.cs - * Added file - -2002-10-19 Rachel Hestilow - - * ColorTranslator.cs (FromHtml): Implement. - -2002-10-14 Dennis Hayes (dennish@raytek.com) - * Region.cs - * changed using namespace from Drawing2d to Drawing2D - - 2002-9-15 Asier Llano - - * Fixes the enum values in the following enums - * ContentAlignment.cs: - * FontStyle.cs: - * GraphicsUnit.cs: - * KnownColor.cs: - * RotateFlipType.cs: - * StringAligment.cs: - * StringDigitSubstitute.cs: - * StringFormatFlags.cs: - * StringTrimming.cs: - * StringUnit.cs: - * SolidBrush.cs: Easy implementation - * Brushes.cs: Implementation based on SolidBrush and Color class. - * Brush.cs: Fixes based on the status web). - * CharacterRange.cs: Implemented the missing Lenth property. - -2002-9-14 Dennis Hayes (dennish@raytek.com) - - * sample.cs - * removed personal template that should not have been checked in - -2002-09-13 Gonzalo Paniagua Javier - - * ColorConverter.cs: readded MonoTODOs and implemented a couple of - methods. - -2002-9-14 DennisHayes - - * FontConverter.cs - * FontFamily.cs - * Icon.cs - * IconConverter.cs - * ImageAnimator.cs - * ImageConverter.cs - * ImageFormatConverter.cs - * PointConverter.cs - * RectangleConverter.cs - * Sample.cs - * SizeConverter.cs - * SolidBrush.cs - * StringFormat.cs - * SystemBrushes.cs - * SystemIcons.cs - * SystemPens.cs - * TextureBrush.cs - * ToolboxBitmapAttribute.cs - * Added null classes for most/all classes, Many stubs, and some implmentation - -2002-9-2 DennisHayes - - * Bitmap.cs - * Color.cs - * ColorConverter.cs - * Image.cs - * Pen.cs - * Added stubs, implmentation - -2002-9-2 DennisHayes - - * Brushes.cs : stubbed, added colors. Not sure how to implement, - but this should at least save someone some typing. - * CharacterRange.cs :Implmented - * Region.cs : stub needed for system.windows.forms - -2002-07-28 Gonzalo Paniagua Javier - - * ColorTranslator.cs: use Color.Name. - -2002-07-18 Gonzalo Paniagua Javier - - * Color.cs: implemented SystemColors and NamedColors properties that - are used by ColorConverter, removed public constructor, use - SystemColors, and misc. fixes to make it behave as MS (ToString, - parsing names, FromKnownColor,...). - - * ColorConverter.cs: use NamedColors and SystemColors from Color when - trying to get the color from its name. - - * SystemColors.cs: new file. - -2002-07-16 Gonzalo Paniagua Javier - - * Color.cs: changed static properties to use FromArgbNamed. Also - modified the program included in comments that get the values for - static properties. - - (FromArgbNamed): build named colors. - (FromKnownColor): fixed. - (FromName): use a hash to look up colors by name. - (FillColorNames): create the hash of colors. - (Equals): compare values and name. - (ToString): improved. - - * ColorTranslator.cs: implemented ToHtml. - -2002-06-20 Gonzalo Paniagua Javier - - * Color.cs: added TypeConverter attribute. - - * ColorConverter.cs: added constructor. - -2002-06-15 Gonzalo Paniagua Javier - - * ColorConverter.cs: implemented minimal set of features needed by xsp. - -2002-05-03 Mike Kestner - - * Bitmap.cs : using System.IO - * ColorTranslator.cs : Stubbed off build breakers. - * Image.cs : Stub off IDisposable and ICloneable. - -2002-04-27 Christian Meyer - - * Bitmap.cs: Ximian is the new copyright holder now. - * Image.cs: ditto - -2002-04-05 Christian Meyer - - * Uppercased several files. - -2002-04-05 Christian Meyer - - * color.cs: Fixed a typo in GetSaturation (). - -2002-02-26 Christian Meyer - - * Bitmap.cs: Added method headers. - -2002-02-25 Christian Meyer - - * Bitmap.cs: Added, no implementation's done, yet. - -2001-12-15 Mike Kestner - - * Rectangle.cs : Add a doc comment. - * RectangleF.cs : New struct implementation. - -2001-12-15 Mike Kestner - - * Rectangle.cs : New struct implementation. - -2001-08-17 Mike Kestner - - * PointF.cs, Size.cs, SizeF.cs : New struct implementations. - -2001-08-16 Mike Kestner - - * Point.cs : New. Implementation of System.Drawing.Point struct. - diff --git a/mcs/class/System.Drawing/System.Drawing/CharacterRange.cs b/mcs/class/System.Drawing/System.Drawing/CharacterRange.cs deleted file mode 100644 index 346a286dbe1..00000000000 --- a/mcs/class/System.Drawing/System.Drawing/CharacterRange.cs +++ /dev/null @@ -1,64 +0,0 @@ -// -// System.Windows.Drawing.CharacterRange.cs -// -// Author: -// Dennis Hayes (dennish@raytek.com) -// -// Copyright (C) 2002 Ximian, Inc http://www.ximian.com -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; - -namespace System.Drawing -{ - public struct CharacterRange - { - private int first; - private int length; - - public CharacterRange (int first, int length) - { - this.first = first; - this.length = length; - } - - public int First { - get { - return first; - } - set { - first = value; - } - } - - public int Length { - get { - return length; - } - set { - length = value; - } - } - } -} diff --git a/mcs/class/System.Drawing/System.Drawing/Color.cs b/mcs/class/System.Drawing/System.Drawing/Color.cs deleted file mode 100644 index 9a00a6a0065..00000000000 --- a/mcs/class/System.Drawing/System.Drawing/Color.cs +++ /dev/null @@ -1,1565 +0,0 @@ -// -// System.Drawing.Color.cs -// -// Authors: -// Dennis Hayes (dennish@raytek.com) -// Ben Houston (ben@exocortex.org) -// Gonzalo Paniagua (gonzalo@ximian.com) -// Juraj Skripsky (juraj@hotfeet.ch) -// -// (C) 2002 Dennis Hayes -// (c) 2002 Ximian, Inc. (http://www.ximiam.com) -// (C) 2005 HotFeet GmbH (http://www.hotfeet.ch) -// -// TODO: Are the static/non static functions declared correctly - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; -using System.Collections; -using System.Runtime.InteropServices; -using System.ComponentModel; -using System.Reflection; - -namespace System.Drawing -{ - [TypeConverter(typeof(ColorConverter))] - [ComVisible (true)] -#if !TARGET_JVM - [Editor ("System.Drawing.Design.ColorEditor, " + Consts.AssemblySystem_Drawing_Design, typeof (System.Drawing.Design.UITypeEditor))] -#endif - [Serializable] - public struct Color - { - private static Hashtable namedColors; - private static Hashtable systemColors; - static Color [] knownColors; - - // Private transparancy (A) and R,G,B fields. - private byte a; - private byte r; - private byte g; - private byte b; - private static string creatingColorNames = "creatingColorNames"; - - // The specs also indicate that all three of these propities are true - // if created with FromKnownColor or FromNamedColor, false otherwise (FromARGB). - // Per Microsoft and ECMA specs these varibles are set by which constructor is used, not by their values. - [Flags] - enum ColorType { - Empty=0, - ARGB=1, - Known=2, - Named=4, - System=8 - } - private ColorType colorType; - private KnownColor knownColor; - - private string myname; - -#if TARGET_JVM - internal java.awt.Color NativeObject { - get { - return new java.awt.Color (R, G, B, A); - } - } -#endif - - public string Name { - get{ - if (myname == null || myname == String.Empty) - return String.Format ("{0:x}", ToArgb ()); - return myname; - } - } - - public bool IsKnownColor { - get{ - return (colorType & ColorType.Known) != 0; - } - } - - public bool IsSystemColor { - get{ - return (colorType & ColorType.System) != 0; - } - } - - public bool IsNamedColor { - get{ - return (colorType & (ColorType.Known|ColorType.Named)) != 0; - } - } - - - public static Color FromArgb (int red, int green, int blue) - { - return FromArgb (255, red, green, blue); - } - - public static Color FromArgb (int alpha, int red, int green, int blue) - { - CheckARGBValues (alpha, red, green, blue); - Color color = new Color (); - color.colorType = ColorType.ARGB; - color.a = (byte) alpha; - color.r = (byte) red; - color.g = (byte) green; - color.b = (byte) blue; - color.myname = String.Empty; - return color; - } - - private static Color FromArgbNamed (int alpha, int red, int green, int blue, string name, KnownColor knownColor) - { - Color color = FromArgb (alpha, red, green, blue); - color.colorType = ColorType.Known|ColorType.Named; - //color.issystemcolor = false; //??? - color.myname = name; - // FIXME: here happens SEGFAULT. - //color.knownColor = (KnownColor) Enum.Parse (typeof (KnownColor), name, false); - color.knownColor = knownColor; - return color; - } - - internal static Color FromArgbSystem (int alpha, int red, int green, int blue, string name, KnownColor knownColor) - { - Color color = FromArgbNamed (alpha, red, green, blue, name, knownColor); - color.colorType |= ColorType.System; - return color; - } - - public int ToArgb() - { - return a << 24 | r << 16 | g << 8 | b; - } - - public static Color FromArgb (int alpha, Color baseColor) - { - return FromArgb (alpha, baseColor.r, baseColor.g, baseColor.b); - } - - public static Color FromArgb (int argb) - { - return FromArgb ((argb >> 24) & 0x0FF, (argb >> 16) & 0x0FF, (argb >> 8) & 0x0FF, argb & 0x0FF); - } - - public static Color FromKnownColor (KnownColor c) - { - if (knownColors == null) - FillColorNames (); - - if (c < KnownColor.ActiveBorder || c > KnownColor.YellowGreen) { - // This is what it returns! - Color d = FromArgb (0, 0, 0, 0); - d.myname = c.ToString (); - d.colorType |= ColorType.Named; - d.knownColor = c; - return d; - } - - return knownColors [(int) c]; - } - - private static Hashtable GetColorHashtableFromType (Type type) - { - Hashtable colorHash = new Hashtable (CaseInsensitiveHashCodeProvider.Default, - CaseInsensitiveComparer.Default); - - PropertyInfo [] props = type.GetProperties (); - foreach (PropertyInfo prop in props){ - if (prop.PropertyType != typeof (Color)) - continue; - - MethodInfo getget = prop.GetGetMethod (); - if (getget == null || getget.IsStatic == false) - continue; - - object o = prop.GetValue (null, null); - colorHash.Add (prop.Name, o); - - Color c = (Color) o; - knownColors [(int) c.knownColor] = c; - } - return colorHash; - } - - private static void FillColorNames () - { - if (systemColors != null) - return; - - lock (creatingColorNames) { - if (systemColors != null) - return; - - knownColors = new Color [(int)KnownColor.YellowGreen + 1]; - - Hashtable colorHash = GetColorHashtableFromType (typeof (Color)); - namedColors = colorHash; - - colorHash = GetColorHashtableFromType (typeof (SystemColors)); - systemColors = colorHash; - } - } - - public static Color FromName (string colorName) - { - object c = NamedColors [colorName]; - if (c == null) { - c = SystemColors [colorName]; - if (c == null) { - // This is what it returns! - Color d = FromArgb (0, 0, 0, 0); - d.myname = colorName; - d.colorType |= ColorType.Named; - c = d; - } - } - - return (Color) c; - } - - internal static Hashtable NamedColors - { - get { - FillColorNames (); - return namedColors; - } - } - - internal static Hashtable SystemColors - { - get { - FillColorNames (); - return systemColors; - } - } - - // ----------------------- - // Public Shared Members - // ----------------------- - - /// - /// Empty Shared Field - /// - /// - /// - /// An uninitialized Color Structure - /// - - public static readonly Color Empty; - - /// - /// Equality Operator - /// - /// - /// - /// Compares two Color objects. The return value is - /// based on the equivalence of the A,R,G,B properties - /// of the two Colors. - /// - - public static bool operator == (Color colorA, Color colorB) - { - if (colorA.a != colorB.a) - return false; - if (colorA.r != colorB.r) - return false; - if (colorA.g != colorB.g) - return false; - if (colorA.b != colorB.b) - return false; - if (colorA.IsNamedColor != colorB.IsNamedColor) - return false; - if (colorA.IsSystemColor != colorB.IsSystemColor) - return false; - if (colorA.Name != colorB.Name) - return false; - if (colorA.IsEmpty != colorB.IsEmpty) - return false; - return true; - } - - /// - /// Inequality Operator - /// - /// - /// - /// Compares two Color objects. The return value is - /// based on the equivalence of the A,R,G,B properties - /// of the two colors. - /// - - public static bool operator != (Color colorA, Color colorB) - { - return ! (colorA == colorB); - } - - public float GetBrightness () - { - byte minval = Math.Min (r, Math.Min (g, b)); - byte maxval = Math.Max (r, Math.Max (g, b)); - - return (float)(maxval + minval) / 510; - } - - public float GetSaturation () - { - byte minval = Math.Min (r, Math.Min (g, b)); - byte maxval = Math.Max (r, Math.Max (g, b)); - - if (maxval == minval) - return 0.0f; - - int sum = maxval + minval; - if (sum > 255) - sum = 510 - sum; - - return (float)(maxval - minval) / sum; - } - - public float GetHue () - { - byte minval = Math.Min (r, Math.Min (g, b)); - byte maxval = Math.Max (r, Math.Max (g, b)); - - if (maxval == minval) - return 0.0f; - - float diff = (float)(maxval - minval); - float rnorm = (maxval - r) / diff; - float gnorm = (maxval - g) / diff; - float bnorm = (maxval - b) / diff; - - float hue = 0.0f; - if (r == maxval) - hue = 60.0f * (6.0f + bnorm - gnorm); - if (g == maxval) - hue = 60.0f * (2.0f + rnorm - bnorm); - if (b == maxval) - hue = 60.0f * (4.0f + gnorm - rnorm); - if (hue > 360.0f) - hue = hue - 360.0f; - - return hue; - } - - // ----------------------- - // Public Instance Members - // ----------------------- - - /// - /// ToKnownColor method - /// - /// - /// - /// Returns the KnownColor enum value for this color, 0 if is not known. - /// - public KnownColor ToKnownColor () - { - return knownColor; - } - - /// - /// IsEmpty Property - /// - /// - /// - /// Indicates transparent black. R,G,B = 0; A=0? - /// - - public bool IsEmpty - { - get { - return colorType == ColorType.Empty; - } - } - - /// - /// A Property - /// - /// - /// - /// The transparancy of the Color. - /// - - public byte A - { - get { - return a; - } - } - - /// - /// R Property - /// - /// - /// - /// The red value of the Color. - /// - - public byte R - { - get { - return r; - } - } - - /// - /// G Property - /// - /// - /// - /// The green value of the Color. - /// - - public byte G - { - get { - return g; - } - } - - /// - /// B Property - /// - /// - /// - /// The blue value of the Color. - /// - - public byte B - { - get { - return b; - } - } - - /// - /// Equals Method - /// - /// - /// - /// Checks equivalence of this Color and another object. - /// - - public override bool Equals (object o) - { - if (! (o is Color)) - return false; - Color c = (Color) o; - return this == c; - } - - /// - /// Reference Equals Method - /// Is commented out because this is handled by the base class. - /// TODO: Is it correct to let the base class handel reference equals - /// - /// - /// - /// Checks equivalence of this Color and another object. - /// - //public bool ReferenceEquals (object o) - //{ - // if (!(o is Color))return false; - // return (this == (Color) o); - //} - - - - /// - /// GetHashCode Method - /// - /// - /// - /// Calculates a hashing value. - /// - - public override int GetHashCode () - { - return ToArgb().GetHashCode () ^ Name.GetHashCode (); - } - - /// - /// ToString Method - /// - /// - /// - /// Formats the Color as a string in ARGB notation. - /// - - public override string ToString () - { - if (IsEmpty) - return "Color [Empty]"; - - if (myname != "") - return "Color [" + myname + "]"; - - return String.Format ("Color [A={0}, R={1}, G={2}, B={3}]", a, r, g, b); - } - - private static void CheckRGBValues (int red,int green,int blue) - { - if( (red > 255) || (red < 0)) - throw CreateColorArgumentException(red, "red"); - if( (green > 255) || (green < 0)) - throw CreateColorArgumentException (green, "green"); - if( (blue > 255) || (blue < 0)) - throw CreateColorArgumentException (blue, "blue"); - } - - private static ArgumentException CreateColorArgumentException (int value, string color) - { - return new ArgumentException (string.Format ("'{0}' is not a valid" - + " value for '{1}'. '{1}' should be greater or equal to 0 and" - + " less than or equal to 255.", value, color)); - } - - private static void CheckARGBValues (int alpha,int red,int green,int blue) - { - if( (alpha > 255) || (alpha < 0)) - throw CreateColorArgumentException (alpha, "alpha"); - CheckRGBValues(red,green,blue); - } - - //Documentation, do not remove! - //This is the program that was used to generate the C# source code below. - //using System; - //using System.Diagnostics; - //using System.Drawing; - //using System.Reflection; - //public class m { - //static void Main(string[] args) - //{ - // Type cType = typeof (Color); - // PropertyInfo [] properties = cType.GetProperties (); - // foreach (PropertyInfo property in properties) { - // MethodInfo method = property.GetGetMethod(); - // if (method != null && method.IsStatic && method.ReturnType == cType) { - // Color c = (Color) method.Invoke( null, new object[0] ); - // Console.WriteLine("static public Color " + property.Name); - // Console.WriteLine("{\t\n\tget {"); - // Console.WriteLine("\t\treturn Color.FromArgbNamed ({0}, {1}, {2}, {3}, \"{4}\", KnownColor.{4});", - // c.A, c.R, c.G, c.B, property.Name); - // Console.WriteLine("\t}"); - // Console.WriteLine("}\n"); - // } - // } - //} - //} - - static public Color Transparent - { - get { - return Color.FromArgbNamed (0, 255, 255, 255, "Transparent", KnownColor.Transparent); - } - } - - static public Color AliceBlue - { - get { - return Color.FromArgbNamed (255, 240, 248, 255, "AliceBlue", KnownColor.AliceBlue); - } - } - - static public Color AntiqueWhite - { - get { - return Color.FromArgbNamed (255, 250, 235, 215, "AntiqueWhite", KnownColor.AntiqueWhite); - } - } - - static public Color Aqua - { - get { - return Color.FromArgbNamed (255, 0, 255, 255, "Aqua", KnownColor.Aqua); - } - } - - static public Color Aquamarine - { - get { - return Color.FromArgbNamed (255, 127, 255, 212, "Aquamarine", KnownColor.Aquamarine); - } - } - - static public Color Azure - { - get { - return Color.FromArgbNamed (255, 240, 255, 255, "Azure", KnownColor.Azure); - } - } - - static public Color Beige - { - get { - return Color.FromArgbNamed (255, 245, 245, 220, "Beige", KnownColor.Beige); - } - } - - static public Color Bisque - { - get { - return Color.FromArgbNamed (255, 255, 228, 196, "Bisque", KnownColor.Bisque); - } - } - - static public Color Black - { - get { - return Color.FromArgbNamed (255, 0, 0, 0, "Black", KnownColor.Black); - } - } - - static public Color BlanchedAlmond - { - get { - return Color.FromArgbNamed (255, 255, 235, 205, "BlanchedAlmond", KnownColor.BlanchedAlmond); - } - } - - static public Color Blue - { - get { - return Color.FromArgbNamed (255, 0, 0, 255, "Blue", KnownColor.Blue); - } - } - - static public Color BlueViolet - { - get { - return Color.FromArgbNamed (255, 138, 43, 226, "BlueViolet", KnownColor.BlueViolet); - } - } - - static public Color Brown - { - get { - return Color.FromArgbNamed (255, 165, 42, 42, "Brown", KnownColor.Brown); - } - } - - static public Color BurlyWood - { - get { - return Color.FromArgbNamed (255, 222, 184, 135, "BurlyWood", KnownColor.BurlyWood); - } - } - - static public Color CadetBlue - { - get { - return Color.FromArgbNamed (255, 95, 158, 160, "CadetBlue", KnownColor.CadetBlue); - } - } - - static public Color Chartreuse - { - get { - return Color.FromArgbNamed (255, 127, 255, 0, "Chartreuse", KnownColor.Chartreuse); - } - } - - static public Color Chocolate - { - get { - return Color.FromArgbNamed (255, 210, 105, 30, "Chocolate", KnownColor.Chocolate); - } - } - - static public Color Coral - { - get { - return Color.FromArgbNamed (255, 255, 127, 80, "Coral", KnownColor.Coral); - } - } - - static public Color CornflowerBlue - { - get { - return Color.FromArgbNamed (255, 100, 149, 237, "CornflowerBlue", KnownColor.CornflowerBlue); - } - } - - static public Color Cornsilk - { - get { - return Color.FromArgbNamed (255, 255, 248, 220, "Cornsilk", KnownColor.Cornsilk); - } - } - - static public Color Crimson - { - get { - return Color.FromArgbNamed (255, 220, 20, 60, "Crimson", KnownColor.Crimson); - } - } - - static public Color Cyan - { - get { - return Color.FromArgbNamed (255, 0, 255, 255, "Cyan", KnownColor.Cyan); - } - } - - static public Color DarkBlue - { - get { - return Color.FromArgbNamed (255, 0, 0, 139, "DarkBlue", KnownColor.DarkBlue); - } - } - - static public Color DarkCyan - { - get { - return Color.FromArgbNamed (255, 0, 139, 139, "DarkCyan", KnownColor.DarkCyan); - } - } - - static public Color DarkGoldenrod - { - get { - return Color.FromArgbNamed (255, 184, 134, 11, "DarkGoldenrod", KnownColor.DarkGoldenrod); - } - } - - static public Color DarkGray - { - get { - return Color.FromArgbNamed (255, 169, 169, 169, "DarkGray", KnownColor.DarkGray); - } - } - - static public Color DarkGreen - { - get { - return Color.FromArgbNamed (255, 0, 100, 0, "DarkGreen", KnownColor.DarkGreen); - } - } - - static public Color DarkKhaki - { - get { - return Color.FromArgbNamed (255, 189, 183, 107, "DarkKhaki", KnownColor.DarkKhaki); - } - } - - static public Color DarkMagenta - { - get { - return Color.FromArgbNamed (255, 139, 0, 139, "DarkMagenta", KnownColor.DarkMagenta); - } - } - - static public Color DarkOliveGreen - { - get { - return Color.FromArgbNamed (255, 85, 107, 47, "DarkOliveGreen", KnownColor.DarkOliveGreen); - } - } - - static public Color DarkOrange - { - get { - return Color.FromArgbNamed (255, 255, 140, 0, "DarkOrange", KnownColor.DarkOrange); - } - } - - static public Color DarkOrchid - { - get { - return Color.FromArgbNamed (255, 153, 50, 204, "DarkOrchid", KnownColor.DarkOrchid); - } - } - - static public Color DarkRed - { - get { - return Color.FromArgbNamed (255, 139, 0, 0, "DarkRed", KnownColor.DarkRed); - } - } - - static public Color DarkSalmon - { - get { - return Color.FromArgbNamed (255, 233, 150, 122, "DarkSalmon", KnownColor.DarkSalmon); - } - } - - static public Color DarkSeaGreen - { - get { - return Color.FromArgbNamed (255, 143, 188, 139, "DarkSeaGreen", KnownColor.DarkSeaGreen); - } - } - - static public Color DarkSlateBlue - { - get { - return Color.FromArgbNamed (255, 72, 61, 139, "DarkSlateBlue", KnownColor.DarkSlateBlue); - } - } - - static public Color DarkSlateGray - { - get { - return Color.FromArgbNamed (255, 47, 79, 79, "DarkSlateGray", KnownColor.DarkSlateGray); - } - } - - static public Color DarkTurquoise - { - get { - return Color.FromArgbNamed (255, 0, 206, 209, "DarkTurquoise", KnownColor.DarkTurquoise); - } - } - - static public Color DarkViolet - { - get { - return Color.FromArgbNamed (255, 148, 0, 211, "DarkViolet", KnownColor.DarkViolet); - } - } - - static public Color DeepPink - { - get { - return Color.FromArgbNamed (255, 255, 20, 147, "DeepPink", KnownColor.DeepPink); - } - } - - static public Color DeepSkyBlue - { - get { - return Color.FromArgbNamed (255, 0, 191, 255, "DeepSkyBlue", KnownColor.DeepSkyBlue); - } - } - - static public Color DimGray - { - get { - return Color.FromArgbNamed (255, 105, 105, 105, "DimGray", KnownColor.DimGray); - } - } - - static public Color DodgerBlue - { - get { - return Color.FromArgbNamed (255, 30, 144, 255, "DodgerBlue", KnownColor.DodgerBlue); - } - } - - static public Color Firebrick - { - get { - return Color.FromArgbNamed (255, 178, 34, 34, "Firebrick", KnownColor.Firebrick); - } - } - - static public Color FloralWhite - { - get { - return Color.FromArgbNamed (255, 255, 250, 240, "FloralWhite", KnownColor.FloralWhite); - } - } - - static public Color ForestGreen - { - get { - return Color.FromArgbNamed (255, 34, 139, 34, "ForestGreen", KnownColor.ForestGreen); - } - } - - static public Color Fuchsia - { - get { - return Color.FromArgbNamed (255, 255, 0, 255, "Fuchsia", KnownColor.Fuchsia); - } - } - - static public Color Gainsboro - { - get { - return Color.FromArgbNamed (255, 220, 220, 220, "Gainsboro", KnownColor.Gainsboro); - } - } - - static public Color GhostWhite - { - get { - return Color.FromArgbNamed (255, 248, 248, 255, "GhostWhite", KnownColor.GhostWhite); - } - } - - static public Color Gold - { - get { - return Color.FromArgbNamed (255, 255, 215, 0, "Gold", KnownColor.Gold); - } - } - - static public Color Goldenrod - { - get { - return Color.FromArgbNamed (255, 218, 165, 32, "Goldenrod", KnownColor.Goldenrod); - } - } - - static public Color Gray - { - get { - return Color.FromArgbNamed (255, 128, 128, 128, "Gray", KnownColor.Gray); - } - } - - static public Color Green - { - get { - // LAMESPEC: MS uses A=255, R=0, G=128, B=0 for Green Color, - // which is seems to be wrong. G must be 255. - return Color.FromArgbNamed (255, 0, 128, 0, "Green", KnownColor.Green); - } - } - - static public Color GreenYellow - { - get { - return Color.FromArgbNamed (255, 173, 255, 47, "GreenYellow", KnownColor.GreenYellow); - } - } - - static public Color Honeydew - { - get { - return Color.FromArgbNamed (255, 240, 255, 240, "Honeydew", KnownColor.Honeydew); - } - } - - static public Color HotPink - { - get { - return Color.FromArgbNamed (255, 255, 105, 180, "HotPink", KnownColor.HotPink); - } - } - - static public Color IndianRed - { - get { - return Color.FromArgbNamed (255, 205, 92, 92, "IndianRed", KnownColor.IndianRed); - } - } - - static public Color Indigo - { - get { - return Color.FromArgbNamed (255, 75, 0, 130, "Indigo", KnownColor.Indigo); - } - } - - static public Color Ivory - { - get { - return Color.FromArgbNamed (255, 255, 255, 240, "Ivory", KnownColor.Ivory); - } - } - - static public Color Khaki - { - get { - return Color.FromArgbNamed (255, 240, 230, 140, "Khaki", KnownColor.Khaki); - } - } - - static public Color Lavender - { - get { - return Color.FromArgbNamed (255, 230, 230, 250, "Lavender", KnownColor.Lavender); - } - } - - static public Color LavenderBlush - { - get { - return Color.FromArgbNamed (255, 255, 240, 245, "LavenderBlush", KnownColor.LavenderBlush); - } - } - - static public Color LawnGreen - { - get { - return Color.FromArgbNamed (255, 124, 252, 0, "LawnGreen", KnownColor.LawnGreen); - } - } - - static public Color LemonChiffon - { - get { - return Color.FromArgbNamed (255, 255, 250, 205, "LemonChiffon", KnownColor.LemonChiffon); - } - } - - static public Color LightBlue - { - get { - return Color.FromArgbNamed (255, 173, 216, 230, "LightBlue", KnownColor.LightBlue); - } - } - - static public Color LightCoral - { - get { - return Color.FromArgbNamed (255, 240, 128, 128, "LightCoral", KnownColor.LightCoral); - } - } - - static public Color LightCyan - { - get { - return Color.FromArgbNamed (255, 224, 255, 255, "LightCyan", KnownColor.LightCyan); - } - } - - static public Color LightGoldenrodYellow - { - get { - return Color.FromArgbNamed (255, 250, 250, 210, "LightGoldenrodYellow", KnownColor.LightGoldenrodYellow); - } - } - - static public Color LightGreen - { - get { - return Color.FromArgbNamed (255, 144, 238, 144, "LightGreen", KnownColor.LightGreen); - } - } - - static public Color LightGray - { - get { - return Color.FromArgbNamed (255, 211, 211, 211, "LightGray", KnownColor.LightGray); - } - } - - static public Color LightPink - { - get { - return Color.FromArgbNamed (255, 255, 182, 193, "LightPink", KnownColor.LightPink); - } - } - - static public Color LightSalmon - { - get { - return Color.FromArgbNamed (255, 255, 160, 122, "LightSalmon", KnownColor.LightSalmon); - } - } - - static public Color LightSeaGreen - { - get { - return Color.FromArgbNamed (255, 32, 178, 170, "LightSeaGreen", KnownColor.LightSeaGreen); - } - } - - static public Color LightSkyBlue - { - get { - return Color.FromArgbNamed (255, 135, 206, 250, "LightSkyBlue", KnownColor.LightSkyBlue); - } - } - - static public Color LightSlateGray - { - get { - return Color.FromArgbNamed (255, 119, 136, 153, "LightSlateGray", KnownColor.LightSlateGray); - } - } - - static public Color LightSteelBlue - { - get { - return Color.FromArgbNamed (255, 176, 196, 222, "LightSteelBlue", KnownColor.LightSteelBlue); - } - } - - static public Color LightYellow - { - get { - return Color.FromArgbNamed (255, 255, 255, 224, "LightYellow", KnownColor.LightYellow); - } - } - - static public Color Lime - { - get { - return Color.FromArgbNamed (255, 0, 255, 0, "Lime", KnownColor.Lime); - } - } - - static public Color LimeGreen - { - get { - return Color.FromArgbNamed (255, 50, 205, 50, "LimeGreen", KnownColor.LimeGreen); - } - } - - static public Color Linen - { - get { - return Color.FromArgbNamed (255, 250, 240, 230, "Linen", KnownColor.Linen); - } - } - - static public Color Magenta - { - get { - return Color.FromArgbNamed (255, 255, 0, 255, "Magenta", KnownColor.Magenta); - } - } - - static public Color Maroon - { - get { - return Color.FromArgbNamed (255, 128, 0, 0, "Maroon", KnownColor.Maroon); - } - } - - static public Color MediumAquamarine - { - get { - return Color.FromArgbNamed (255, 102, 205, 170, "MediumAquamarine", KnownColor.MediumAquamarine); - } - } - - static public Color MediumBlue - { - get { - return Color.FromArgbNamed (255, 0, 0, 205, "MediumBlue", KnownColor.MediumBlue); - } - } - - static public Color MediumOrchid - { - get { - return Color.FromArgbNamed (255, 186, 85, 211, "MediumOrchid", KnownColor.MediumOrchid); - } - } - - static public Color MediumPurple - { - get { - return Color.FromArgbNamed (255, 147, 112, 219, "MediumPurple", KnownColor.MediumPurple); - } - } - - static public Color MediumSeaGreen - { - get { - return Color.FromArgbNamed (255, 60, 179, 113, "MediumSeaGreen", KnownColor.MediumSeaGreen); - } - } - - static public Color MediumSlateBlue - { - get { - return Color.FromArgbNamed (255, 123, 104, 238, "MediumSlateBlue", KnownColor.MediumSlateBlue); - } - } - - static public Color MediumSpringGreen - { - get { - return Color.FromArgbNamed (255, 0, 250, 154, "MediumSpringGreen", KnownColor.MediumSpringGreen); - } - } - - static public Color MediumTurquoise - { - get { - return Color.FromArgbNamed (255, 72, 209, 204, "MediumTurquoise", KnownColor.MediumTurquoise); - } - } - - static public Color MediumVioletRed - { - get { - return Color.FromArgbNamed (255, 199, 21, 133, "MediumVioletRed", KnownColor.MediumVioletRed); - } - } - - static public Color MidnightBlue - { - get { - return Color.FromArgbNamed (255, 25, 25, 112, "MidnightBlue", KnownColor.MidnightBlue); - } - } - - static public Color MintCream - { - get { - return Color.FromArgbNamed (255, 245, 255, 250, "MintCream", KnownColor.MintCream); - } - } - - static public Color MistyRose - { - get { - return Color.FromArgbNamed (255, 255, 228, 225, "MistyRose", KnownColor.MistyRose); - } - } - - static public Color Moccasin - { - get { - return Color.FromArgbNamed (255, 255, 228, 181, "Moccasin", KnownColor.Moccasin); - } - } - - static public Color NavajoWhite - { - get { - return Color.FromArgbNamed (255, 255, 222, 173, "NavajoWhite", KnownColor.NavajoWhite); - } - } - - static public Color Navy - { - get { - return Color.FromArgbNamed (255, 0, 0, 128, "Navy", KnownColor.Navy); - } - } - - static public Color OldLace - { - get { - return Color.FromArgbNamed (255, 253, 245, 230, "OldLace", KnownColor.OldLace); - } - } - - static public Color Olive - { - get { - return Color.FromArgbNamed (255, 128, 128, 0, "Olive", KnownColor.Olive); - } - } - - static public Color OliveDrab - { - get { - return Color.FromArgbNamed (255, 107, 142, 35, "OliveDrab", KnownColor.OliveDrab); - } - } - - static public Color Orange - { - get { - return Color.FromArgbNamed (255, 255, 165, 0, "Orange", KnownColor.Orange); - } - } - - static public Color OrangeRed - { - get { - return Color.FromArgbNamed (255, 255, 69, 0, "OrangeRed", KnownColor.OrangeRed); - } - } - - static public Color Orchid - { - get { - return Color.FromArgbNamed (255, 218, 112, 214, "Orchid", KnownColor.Orchid); - } - } - - static public Color PaleGoldenrod - { - get { - return Color.FromArgbNamed (255, 238, 232, 170, "PaleGoldenrod", KnownColor.PaleGoldenrod); - } - } - - static public Color PaleGreen - { - get { - return Color.FromArgbNamed (255, 152, 251, 152, "PaleGreen", KnownColor.PaleGreen); - } - } - - static public Color PaleTurquoise - { - get { - return Color.FromArgbNamed (255, 175, 238, 238, "PaleTurquoise", KnownColor.PaleTurquoise); - } - } - - static public Color PaleVioletRed - { - get { - return Color.FromArgbNamed (255, 219, 112, 147, "PaleVioletRed", KnownColor.PaleVioletRed); - } - } - - static public Color PapayaWhip - { - get { - return Color.FromArgbNamed (255, 255, 239, 213, "PapayaWhip", KnownColor.PapayaWhip); - } - } - - static public Color PeachPuff - { - get { - return Color.FromArgbNamed (255, 255, 218, 185, "PeachPuff", KnownColor.PeachPuff); - } - } - - static public Color Peru - { - get { - return Color.FromArgbNamed (255, 205, 133, 63, "Peru", KnownColor.Peru); - } - } - - static public Color Pink - { - get { - return Color.FromArgbNamed (255, 255, 192, 203, "Pink", KnownColor.Pink); - } - } - - static public Color Plum - { - get { - return Color.FromArgbNamed (255, 221, 160, 221, "Plum", KnownColor.Plum); - } - } - - static public Color PowderBlue - { - get { - return Color.FromArgbNamed (255, 176, 224, 230, "PowderBlue", KnownColor.PowderBlue); - } - } - - static public Color Purple - { - get { - return Color.FromArgbNamed (255, 128, 0, 128, "Purple", KnownColor.Purple); - } - } - - static public Color Red - { - get { - return Color.FromArgbNamed (255, 255, 0, 0, "Red", KnownColor.Red); - } - } - - static public Color RosyBrown - { - get { - return Color.FromArgbNamed (255, 188, 143, 143, "RosyBrown", KnownColor.RosyBrown); - } - } - - static public Color RoyalBlue - { - get { - return Color.FromArgbNamed (255, 65, 105, 225, "RoyalBlue", KnownColor.RoyalBlue); - } - } - - static public Color SaddleBrown - { - get { - return Color.FromArgbNamed (255, 139, 69, 19, "SaddleBrown", KnownColor.SaddleBrown); - } - } - - static public Color Salmon - { - get { - return Color.FromArgbNamed (255, 250, 128, 114, "Salmon", KnownColor.Salmon); - } - } - - static public Color SandyBrown - { - get { - return Color.FromArgbNamed (255, 244, 164, 96, "SandyBrown", KnownColor.SandyBrown); - } - } - - static public Color SeaGreen - { - get { - return Color.FromArgbNamed (255, 46, 139, 87, "SeaGreen", KnownColor.SeaGreen); - } - } - - static public Color SeaShell - { - get { - return Color.FromArgbNamed (255, 255, 245, 238, "SeaShell", KnownColor.SeaShell); - } - } - - static public Color Sienna - { - get { - return Color.FromArgbNamed (255, 160, 82, 45, "Sienna", KnownColor.Sienna); - } - } - - static public Color Silver - { - get { - return Color.FromArgbNamed (255, 192, 192, 192, "Silver", KnownColor.Silver); - } - } - - static public Color SkyBlue - { - get { - return Color.FromArgbNamed (255, 135, 206, 235, "SkyBlue", KnownColor.SkyBlue); - } - } - - static public Color SlateBlue - { - get { - return Color.FromArgbNamed (255, 106, 90, 205, "SlateBlue", KnownColor.SlateBlue); - } - } - - static public Color SlateGray - { - get { - return Color.FromArgbNamed (255, 112, 128, 144, "SlateGray", KnownColor.SlateGray); - } - } - - static public Color Snow - { - get { - return Color.FromArgbNamed (255, 255, 250, 250, "Snow", KnownColor.Snow); - } - } - - static public Color SpringGreen - { - get { - return Color.FromArgbNamed (255, 0, 255, 127, "SpringGreen", KnownColor.SpringGreen); - } - } - - static public Color SteelBlue - { - get { - return Color.FromArgbNamed (255, 70, 130, 180, "SteelBlue", KnownColor.SteelBlue); - } - } - - static public Color Tan - { - get { - return Color.FromArgbNamed (255, 210, 180, 140, "Tan", KnownColor.Tan); - } - } - - static public Color Teal - { - get { - return Color.FromArgbNamed (255, 0, 128, 128, "Teal", KnownColor.Teal); - } - } - - static public Color Thistle - { - get { - return Color.FromArgbNamed (255, 216, 191, 216, "Thistle", KnownColor.Thistle); - } - } - - static public Color Tomato - { - get { - return Color.FromArgbNamed (255, 255, 99, 71, "Tomato", KnownColor.Tomato); - } - } - - static public Color Turquoise - { - get { - return Color.FromArgbNamed (255, 64, 224, 208, "Turquoise", KnownColor.Turquoise); - } - } - - static public Color Violet - { - get { - return Color.FromArgbNamed (255, 238, 130, 238, "Violet", KnownColor.Violet); - } - } - - static public Color Wheat - { - get { - return Color.FromArgbNamed (255, 245, 222, 179, "Wheat", KnownColor.Wheat); - } - } - - static public Color White - { - get { - return Color.FromArgbNamed (255, 255, 255, 255, "White", KnownColor.White); - } - } - - static public Color WhiteSmoke - { - get { - return Color.FromArgbNamed (255, 245, 245, 245, "WhiteSmoke", KnownColor.WhiteSmoke); - } - } - - static public Color Yellow - { - get { - return Color.FromArgbNamed (255, 255, 255, 0, "Yellow", KnownColor.Yellow); - } - } - - static public Color YellowGreen - { - get { - return Color.FromArgbNamed (255, 154, 205, 50, "YellowGreen", KnownColor.YellowGreen); - } - } - } -} diff --git a/mcs/class/System.Drawing/System.Drawing/ColorConverter.cs b/mcs/class/System.Drawing/System.Drawing/ColorConverter.cs deleted file mode 100644 index a5a07a06c1e..00000000000 --- a/mcs/class/System.Drawing/System.Drawing/ColorConverter.cs +++ /dev/null @@ -1,237 +0,0 @@ -// -// System.Drawing.ColorConverter -// -// Authors: -// Gonzalo Paniagua Javier (gonzalo@ximian.com) -// Ravindra (rkumar@novell.com) -// -// Copyright (C) 2002 Ximian, Inc. http://www.ximian.com -// Copyright (C) 2004 Novell, Inc. http://www.novell.com -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; -using System.Collections; -using System.ComponentModel; -using System.Globalization; -using System.Text; -using System.ComponentModel.Design.Serialization; -using System.Reflection; - -namespace System.Drawing -{ - public class ColorConverter : TypeConverter - { - static StandardValuesCollection cached; - static object creatingCached = new object (); - - public ColorConverter () { } - - public override bool CanConvertFrom (ITypeDescriptorContext context, Type sourceType) - { - if (sourceType == typeof (string)) - return true; - - return base.CanConvertFrom (context, sourceType); - } - - public override bool CanConvertTo (ITypeDescriptorContext context, Type destinationType) - { - if (destinationType == typeof (InstanceDescriptor)) - return true; - - return base.CanConvertTo (context, destinationType); - } - - public override object ConvertFrom (ITypeDescriptorContext context, - CultureInfo culture, - object value) - { - string s = value as string; - if (s == null) - return base.ConvertFrom (context, culture, value); - - s = s.Trim (); - - if (s.Length == 0) { - return Color.Empty; - } - - object named = Color.NamedColors [s]; - if (named != null) - return (Color) named; - - named = Color.SystemColors [s]; - if (named != null) - return (Color) named; - - String numSeparator = culture.TextInfo.ListSeparator; - - Int32Converter converter = new Int32Converter (); - - object result = null; - - if (s.IndexOf (numSeparator) == -1) { - if ((s.Length == 8 && (s.StartsWith ("0x") || s.StartsWith ("0X"))) - || (s.Length == 7 && s.StartsWith ("#"))) { - result = Color.FromArgb (-16777216 | (int) converter. - ConvertFromString (context, culture, s)); - } - } - - if (result == null) { - String [] components = s.Split (numSeparator.ToCharArray ()); - - // MS seems to convert the indivual component to int before - // checking the number of components - int[] numComponents = new int[components.Length]; - for (int i = 0; i < numComponents.Length; i++) { - numComponents[i] = (int) converter.ConvertFrom (context, - culture, components[i]); - } - - switch (components.Length) { - case 1: - result = Color.FromArgb (numComponents[0]); - break; - case 3: - result = Color.FromArgb (numComponents[0], numComponents[1], - numComponents[2]); - break; - case 4: - result = Color.FromArgb (numComponents[0], numComponents[1], - numComponents[2], numComponents[3]); - break; - default: - throw new ArgumentException (s + " is not a valid color value."); - } - } - - if (result != null) { - Color resultColor = (Color) result; - - // Look for a named or system color with those values - foreach (Color c in Color.NamedColors.Values) { - if (c == resultColor) - return c; - } - - foreach (Color c in Color.SystemColors.Values) { - if (c == resultColor) - return c; - } - } - - return result; - } - - public override object ConvertTo (ITypeDescriptorContext context, - CultureInfo culture, - object value, - Type destinationType) - { - if ((destinationType == typeof (string)) && (value is Color)) { - Color color = (Color) value; - - if (color == Color.Empty) { - return string.Empty; - } - - if (color.IsKnownColor) { - return color.Name; - } - - if (color.IsNamedColor) - return color.Name; - - String numSeparator = culture.TextInfo.ListSeparator; - - StringBuilder sb = new StringBuilder (); - if (color.A != 255) { - sb.Append (color.A); - sb.Append (numSeparator); - sb.Append (" "); - } - sb.Append (color.R); - sb.Append (numSeparator); - sb.Append (" "); - - sb.Append (color.G); - sb.Append (numSeparator); - sb.Append (" "); - - sb.Append (color.B); - return sb.ToString (); - } - - if (destinationType == typeof (InstanceDescriptor) && value is Color) { - Color c = (Color)value; - if (c.IsKnownColor){ - return new InstanceDescriptor (typeof (SystemColors).GetProperty (c.Name), null); - } else { - MethodInfo met = typeof(Color).GetMethod ("FromArgb", new Type[] { typeof(int), typeof(int), typeof(int), typeof(int) } ); - return new InstanceDescriptor (met, new object[] {c.A, c.R, c.G, c.B }); - } - } - - return base.ConvertTo (context, culture, value, destinationType); - } - - public override StandardValuesCollection GetStandardValues (ITypeDescriptorContext context) - { - if (cached != null) - return cached; - - lock (creatingCached) - { - if (cached != null) - return cached; - - ICollection named = (ICollection) Color.NamedColors.Values; - ICollection system = (ICollection) Color.SystemColors.Values; - Array colors = Array.CreateInstance (typeof (Color), named.Count + system.Count); - named.CopyTo (colors, 0); - system.CopyTo (colors, named.Count); - Array.Sort (colors, 0, colors.Length, new CompareColors ()); - cached = new StandardValuesCollection (colors); - } - - return cached; - } - - public override bool GetStandardValuesSupported (ITypeDescriptorContext context) - { - return true; - } - - class CompareColors : IComparer - { - public int Compare (object x, object y) - { - return String.Compare (((Color) x).Name, ((Color) y).Name); - } - } - } -} diff --git a/mcs/class/System.Drawing/System.Drawing/ColorTranslator.cs b/mcs/class/System.Drawing/System.Drawing/ColorTranslator.cs deleted file mode 100644 index 181d1a8d0ef..00000000000 --- a/mcs/class/System.Drawing/System.Drawing/ColorTranslator.cs +++ /dev/null @@ -1,200 +0,0 @@ -// -// System.Drawing.ColorTranslator.cs -// -// Copyright (C) 2001 Ximian, Inc. http://www.ximian.com -// Copyright (C) 2004 Novell, Inc. http://www.novell.com -// -// Authors: -// Dennis Hayes (dennish@raytek.com) -// Ravindra (rkumar@novell.com) -// -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; -using System.ComponentModel; - -namespace System.Drawing -{ - public sealed class ColorTranslator - { - private ColorTranslator () { } - - public static Color FromHtml (string HtmlFromColor) - { - switch (HtmlFromColor.ToLower()) { - case "buttonface": - return SystemColors.Control; - case "captiontext": - return SystemColors.ActiveCaptionText; - case "threeddarkshadow": - return SystemColors.ControlDarkDark; - case "background": - return SystemColors.Desktop; - case "buttontext": - return SystemColors.ControlText; - case "infobackground": - return SystemColors.Info; - } - TypeConverter converter = TypeDescriptor.GetConverter (typeof (Color)); - return (Color) converter.ConvertFromString (HtmlFromColor); - } - - public static Color FromOle (int OleFromColor) - { - // OleColor format is BGR - int R = OleFromColor & 0xFF; - int G = (OleFromColor >> 8) & 0xFF; - int B = (OleFromColor >> 16) & 0xFF; - - Color retcolor = Color.FromArgb (255, R, G, B); - foreach (Color c in Color.NamedColors.Values) { - if (c == retcolor) - return c; - } - - foreach (Color c in Color.SystemColors.Values) { - if (c == retcolor) - return c; - } - - return retcolor; - } - - public static Color FromWin32 (int Win32FromColor) - { - // Win32Color format is BGR - int R = Win32FromColor & 0xFF; - int G = (Win32FromColor >> 8) & 0xFF; - int B = (Win32FromColor >> 16) & 0xFF; - - Color retcolor = Color.FromArgb (255, R, G, B); - foreach (Color c in Color.NamedColors.Values) { - if (c == retcolor) - return c; - } - - foreach (Color c in Color.SystemColors.Values) { - if (c == retcolor) - return c; - } - - return retcolor; - } - - public static string ToHtml (Color c) - { - KnownColor kc; - if (c.IsEmpty) - return ""; - - string result; - if(c.IsSystemColor) { - kc = c.ToKnownColor(); - switch (kc) { - case KnownColor.ActiveBorder: - return "activeborder"; - case KnownColor.ActiveCaption: - return "activecaption"; - case KnownColor.ActiveCaptionText: - return "captiontext"; - case KnownColor.AppWorkspace: - return "appworkspace"; - case KnownColor.Control: - return "buttonface"; - case KnownColor.ControlDark: - return "buttonshadow"; - case KnownColor.ControlDarkDark: - return "threeddarkshadow"; - case KnownColor.ControlLight: - return "buttonface"; - case KnownColor.ControlLightLight: - return "buttonhighlight"; - case KnownColor.ControlText: - return "buttontext"; - case KnownColor.Desktop: - return "background"; - case KnownColor.GrayText: - return "graytext"; - case KnownColor.Highlight: - case KnownColor.HotTrack: - return "highlight"; - case KnownColor.HighlightText: - return "highlighttext"; - case KnownColor.InactiveBorder: - return "inactiveborder"; - case KnownColor.InactiveCaption: - return "inactivecaption"; - case KnownColor.InactiveCaptionText: - return "inactivecaptiontext"; - case KnownColor.Info: - return "infobackground"; - case KnownColor.InfoText: - return "infotext"; - case KnownColor.Menu: - return "menu"; - case KnownColor.MenuText: - return "menutext"; - case KnownColor.ScrollBar: - return "scrollbar"; - case KnownColor.Window: - return "window"; - case KnownColor.WindowFrame: - return "windowframe"; - case KnownColor.WindowText: - return "windowtext"; - default: - return String.Empty; - } - } - - if (c.IsNamedColor) { - if (c == Color.LightGray) { - result = "LightGrey"; - } - else - result = c.Name; - } - else - result = String.Format ("#{0:X2}{1:X2}{2:X2}", c.R, c.G, c.B); - - return result; - } - - public static int ToOle (Color color) - { - // OleColor format is BGR, same as Win32 - - return ((color.B << 16) | (color.G << 8) | color.R); - } - - public static int ToWin32 (Color color) - { - // Win32Color format is BGR, Same as OleColor - - return ((color.B << 16) | (color.G << 8) | color.R); - } - } -} diff --git a/mcs/class/System.Drawing/System.Drawing/ComIStreamMarshaler.cs b/mcs/class/System.Drawing/System.Drawing/ComIStreamMarshaler.cs deleted file mode 100644 index efcd589e760..00000000000 --- a/mcs/class/System.Drawing/System.Drawing/ComIStreamMarshaler.cs +++ /dev/null @@ -1,681 +0,0 @@ -// -// System.Drawing.ComIStreamMarshaler.cs -// -// Author: -// Kornél Pál -// -// Copyright (C) 2005 Kornél Pál -// - -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -// Undefine to debug the protected blocks -#define MAP_EX_TO_HR - -// Define to debug wrappers recursively -// #define RECURSIVE_WRAPPING - -using System; -using System.IO; -using System.Reflection; -using System.Runtime.InteropServices; -#if NET_2_0 -using System.Runtime.InteropServices.ComTypes; -using STATSTG = System.Runtime.InteropServices.ComTypes.STATSTG; -#else -using IStream = System.Runtime.InteropServices.UCOMIStream; -#endif - -namespace System.Drawing -{ - // Mono does not implement COM interface marshaling - // This custom marshaler should be replaced with UnmanagedType.Interface - // Provides identical behaviour under Mono and .NET Framework - internal sealed class ComIStreamMarshaler : ICustomMarshaler - { - private const int S_OK = 0x00000000; - private const int E_NOINTERFACE = unchecked((int)0x80004002); - - private delegate int QueryInterfaceDelegate(IntPtr @this, [In()] ref Guid riid, IntPtr ppvObject); - private delegate int AddRefDelegate(IntPtr @this); - private delegate int ReleaseDelegate(IntPtr @this); - private delegate int ReadDelegate(IntPtr @this, [Out(), MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 2)] byte[] pv, int cb, IntPtr pcbRead); - private delegate int WriteDelegate(IntPtr @this, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 2)] byte[] pv, int cb, IntPtr pcbWritten); - private delegate int SeekDelegate(IntPtr @this, long dlibMove, int dwOrigin, IntPtr plibNewPosition); - private delegate int SetSizeDelegate(IntPtr @this, long libNewSize); - private delegate int CopyToDelegate(IntPtr @this, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(ComIStreamMarshaler))] IStream pstm, long cb, IntPtr pcbRead, IntPtr pcbWritten); - private delegate int CommitDelegate(IntPtr @this, int grfCommitFlags); - private delegate int RevertDelegate(IntPtr @this); - private delegate int LockRegionDelegate(IntPtr @this, long libOffset, long cb, int dwLockType); - private delegate int UnlockRegionDelegate(IntPtr @this, long libOffset, long cb, int dwLockType); - private delegate int StatDelegate(IntPtr @this, out STATSTG pstatstg, int grfStatFlag); - private delegate int CloneDelegate(IntPtr @this, out IntPtr ppstm); - - [StructLayout(LayoutKind.Sequential)] - private sealed class IStreamInterface - { - internal IntPtr lpVtbl; - internal IntPtr gcHandle; - } - - [StructLayout(LayoutKind.Sequential)] - private sealed class IStreamVtbl - { - internal QueryInterfaceDelegate QueryInterface; - internal AddRefDelegate AddRef; - internal ReleaseDelegate Release; - internal ReadDelegate Read; - internal WriteDelegate Write; - internal SeekDelegate Seek; - internal SetSizeDelegate SetSize; - internal CopyToDelegate CopyTo; - internal CommitDelegate Commit; - internal RevertDelegate Revert; - internal LockRegionDelegate LockRegion; - internal UnlockRegionDelegate UnlockRegion; - internal StatDelegate Stat; - internal CloneDelegate Clone; - } - - // Managed COM Callable Wrapper implementation - // Reference counting is thread safe - private sealed class ManagedToNativeWrapper - { - // Mono does not implement Marshal.Release - [StructLayout(LayoutKind.Sequential)] - private sealed class ReleaseSlot - { - internal ReleaseDelegate Release; - } - - private sealed class VtableDestructor - { - ~VtableDestructor() - { - Marshal.DestroyStructure(comVtable, typeof(IStreamVtbl)); - Marshal.FreeHGlobal(comVtable); - } - } - - private static readonly Guid IID_IUnknown = new Guid("00000000-0000-0000-C000-000000000046"); - private static readonly Guid IID_IStream = new Guid("0000000C-0000-0000-C000-000000000046"); - private static readonly MethodInfo exceptionGetHResult = typeof(Exception).GetProperty("HResult", BindingFlags.GetProperty | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly | BindingFlags.ExactBinding, null, typeof(int), new Type[] {}, null).GetGetMethod(true); - // Keeps delegates alive while they are marshaled - private static readonly IStreamVtbl managedVtable; - private static readonly IntPtr comVtable; - private static readonly VtableDestructor vtableDestructor; - - private IStream managedInterface; - private IntPtr comInterface; - // Keeps the object alive when it has no managed references - private GCHandle gcHandle; - private int refCount = 1; - - static ManagedToNativeWrapper() - { - IStreamVtbl newVtable; - - newVtable = new IStreamVtbl(); - newVtable.QueryInterface = new QueryInterfaceDelegate(QueryInterface); - newVtable.AddRef = new AddRefDelegate(AddRef); - newVtable.Release = new ReleaseDelegate(Release); - newVtable.Read = new ReadDelegate(Read); - newVtable.Write = new WriteDelegate(Write); - newVtable.Seek = new SeekDelegate(Seek); - newVtable.SetSize = new SetSizeDelegate(SetSize); - newVtable.CopyTo = new CopyToDelegate(CopyTo); - newVtable.Commit = new CommitDelegate(Commit); - newVtable.Revert = new RevertDelegate(Revert); - newVtable.LockRegion = new LockRegionDelegate(LockRegion); - newVtable.UnlockRegion = new UnlockRegionDelegate(UnlockRegion); - newVtable.Stat = new StatDelegate(Stat); - newVtable.Clone = new CloneDelegate(Clone); - comVtable = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(IStreamVtbl))); - Marshal.StructureToPtr(newVtable, comVtable, false); - managedVtable = newVtable; - - vtableDestructor = new VtableDestructor(); - } - - private ManagedToNativeWrapper(IStream managedInterface) - { - IStreamInterface newInterface; - - this.managedInterface = managedInterface; - gcHandle = GCHandle.Alloc(this); - - newInterface = new IStreamInterface(); - newInterface.lpVtbl = comVtable; - newInterface.gcHandle = (IntPtr)gcHandle; - comInterface = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(IStreamInterface))); - Marshal.StructureToPtr(newInterface, comInterface, false); - } - - ~ManagedToNativeWrapper() - { - Dispose(false); - } - - private void Dispose(bool disposing) - { - Marshal.FreeHGlobal(comInterface); - gcHandle.Free(); - if (disposing) - { - comInterface = IntPtr.Zero; - managedInterface = null; - GC.SuppressFinalize(this); - } - } - - internal static IStream GetUnderlyingInterface(IntPtr comInterface, bool outParam) - { - if (Marshal.ReadIntPtr(comInterface) == comVtable) - { - IStream managedInterface = GetObject(comInterface).managedInterface; - - if (outParam) - Release(comInterface); - - return managedInterface; - } - else - return null; - } - - internal static IntPtr GetInterface(IStream managedInterface) - { - IntPtr comInterface; - - if (managedInterface == null) - return IntPtr.Zero; -#if !RECURSIVE_WRAPPING - else if ((comInterface = NativeToManagedWrapper.GetUnderlyingInterface(managedInterface)) == IntPtr.Zero) -#endif - comInterface = new ManagedToNativeWrapper(managedInterface).comInterface; - - return comInterface; - } - - internal static void ReleaseInterface(IntPtr comInterface) - { - if (comInterface != IntPtr.Zero) - { - IntPtr vtable = Marshal.ReadIntPtr(comInterface); - - if (vtable == comVtable) - Release(comInterface); - else - { - ReleaseSlot releaseSlot = (ReleaseSlot)Marshal.PtrToStructure((IntPtr)((long)vtable + (long)(IntPtr.Size * 2)), typeof(ReleaseSlot)); - releaseSlot.Release(comInterface); - } - } - } - - // Mono does not implement Marshal.GetHRForException - private static int GetHRForException(Exception e) - { - return (int)exceptionGetHResult.Invoke(e, null); - } - - private static ManagedToNativeWrapper GetObject(IntPtr @this) - { - return (ManagedToNativeWrapper)((GCHandle)Marshal.ReadIntPtr(@this, IntPtr.Size)).Target; - } - - private static int QueryInterface(IntPtr @this, ref Guid riid, IntPtr ppvObject) - { -#if MAP_EX_TO_HR - try - { -#endif - if (IID_IUnknown.Equals(riid) || IID_IStream.Equals(riid)) - { - Marshal.WriteIntPtr(ppvObject, @this); - AddRef(@this); - return S_OK; - } - else - { - Marshal.WriteIntPtr(ppvObject, IntPtr.Zero); - return E_NOINTERFACE; - } -#if MAP_EX_TO_HR - } - catch (Exception e) - { - return GetHRForException(e); - } -#endif - } - - private static int AddRef(IntPtr @this) - { -#if MAP_EX_TO_HR - try - { -#endif - ManagedToNativeWrapper thisObject = GetObject(@this); - - lock (thisObject) - { - return ++thisObject.refCount; - } -#if MAP_EX_TO_HR - } - catch - { - return 0; - } -#endif - } - - private static int Release(IntPtr @this) - { -#if MAP_EX_TO_HR - try - { -#endif - ManagedToNativeWrapper thisObject = GetObject(@this); - - lock (thisObject) - { - if ((thisObject.refCount != 0) && (--thisObject.refCount == 0)) - thisObject.Dispose(true); - - return thisObject.refCount; - } -#if MAP_EX_TO_HR - } - catch - { - return 0; - } -#endif - } - - private static int Read(IntPtr @this, byte[] pv, int cb, IntPtr pcbRead) - { -#if MAP_EX_TO_HR - try - { -#endif - GetObject(@this).managedInterface.Read(pv, cb, pcbRead); - return S_OK; -#if MAP_EX_TO_HR - } - catch (Exception e) - { - return GetHRForException(e); - } -#endif - } - - private static int Write(IntPtr @this, byte[] pv, int cb, IntPtr pcbWritten) - { -#if MAP_EX_TO_HR - try - { -#endif - GetObject(@this).managedInterface.Write(pv, cb, pcbWritten); - return S_OK; -#if MAP_EX_TO_HR - } - catch (Exception e) - { - return GetHRForException(e); - } -#endif - } - - private static int Seek(IntPtr @this, long dlibMove, int dwOrigin, IntPtr plibNewPosition) - { -#if MAP_EX_TO_HR - try - { -#endif - GetObject(@this).managedInterface.Seek(dlibMove, dwOrigin, plibNewPosition); - return S_OK; -#if MAP_EX_TO_HR - } - catch (Exception e) - { - return GetHRForException(e); - } -#endif - } - - private static int SetSize(IntPtr @this, long libNewSize) - { -#if MAP_EX_TO_HR - try - { -#endif - GetObject(@this).managedInterface.SetSize(libNewSize); - return S_OK; -#if MAP_EX_TO_HR - } - catch (Exception e) - { - return GetHRForException(e); - } -#endif - } - - private static int CopyTo(IntPtr @this, IStream pstm, long cb, IntPtr pcbRead, IntPtr pcbWritten) - { -#if MAP_EX_TO_HR - try - { -#endif - GetObject(@this).managedInterface.CopyTo(pstm, cb, pcbRead, pcbWritten); - return S_OK; -#if MAP_EX_TO_HR - } - catch (Exception e) - { - return GetHRForException(e); - } -#endif - } - - private static int Commit(IntPtr @this, int grfCommitFlags) - { -#if MAP_EX_TO_HR - try - { -#endif - GetObject(@this).managedInterface.Commit(grfCommitFlags); - return S_OK; -#if MAP_EX_TO_HR - } - catch (Exception e) - { - return GetHRForException(e); - } -#endif - } - - private static int Revert(IntPtr @this) - { -#if MAP_EX_TO_HR - try - { -#endif - GetObject(@this).managedInterface.Revert(); - return S_OK; -#if MAP_EX_TO_HR - } - catch (Exception e) - { - return GetHRForException(e); - } -#endif - } - - private static int LockRegion(IntPtr @this, long libOffset, long cb, int dwLockType) - { -#if MAP_EX_TO_HR - try - { -#endif - GetObject(@this).managedInterface.LockRegion(libOffset, cb, dwLockType); - return S_OK; -#if MAP_EX_TO_HR - } - catch (Exception e) - { - return GetHRForException(e); - } -#endif - } - - private static int UnlockRegion(IntPtr @this, long libOffset, long cb, int dwLockType) - { -#if MAP_EX_TO_HR - try - { -#endif - GetObject(@this).managedInterface.UnlockRegion(libOffset, cb, dwLockType); - return S_OK; -#if MAP_EX_TO_HR - } - catch (Exception e) - { - return GetHRForException(e); - } -#endif - } - - private static int Stat(IntPtr @this, out STATSTG pstatstg, int grfStatFlag) - { -#if MAP_EX_TO_HR - try - { -#endif - GetObject(@this).managedInterface.Stat(out pstatstg, grfStatFlag); - return S_OK; -#if MAP_EX_TO_HR - } - catch (Exception e) - { - pstatstg = new STATSTG(); - return GetHRForException(e); - } -#endif - } - - private static int Clone(IntPtr @this, out IntPtr ppstm) - { - ppstm = IntPtr.Zero; -#if MAP_EX_TO_HR - try - { -#endif - IStream newInterface; - - GetObject(@this).managedInterface.Clone(out newInterface); - ppstm = ManagedToNativeWrapper.GetInterface(newInterface); - return S_OK; -#if MAP_EX_TO_HR - } - catch (Exception e) - { - return GetHRForException(e); - } -#endif - } - } - - // Managed Runtime Callable Wrapper implementation - private sealed class NativeToManagedWrapper : IStream - { - private IntPtr comInterface; - private IStreamVtbl managedVtable; - - private NativeToManagedWrapper(IntPtr comInterface, bool outParam) - { - this.comInterface = comInterface; - managedVtable = (IStreamVtbl)Marshal.PtrToStructure(Marshal.ReadIntPtr(comInterface), typeof(IStreamVtbl)); - if (!outParam) - managedVtable.AddRef(comInterface); - } - - ~NativeToManagedWrapper() - { - Dispose(false); - } - - private void Dispose(bool disposing) - { - managedVtable.Release(comInterface); - if (disposing) - { - comInterface = IntPtr.Zero; - managedVtable = null; - GC.SuppressFinalize(this); - } - } - - internal static IntPtr GetUnderlyingInterface(IStream managedInterface) - { - if (managedInterface is NativeToManagedWrapper) - { - NativeToManagedWrapper wrapper = (NativeToManagedWrapper)managedInterface; - - wrapper.managedVtable.AddRef(wrapper.comInterface); - return wrapper.comInterface; - } - else - return IntPtr.Zero; - } - - internal static IStream GetInterface(IntPtr comInterface, bool outParam) - { - IStream managedInterface; - - if (comInterface == IntPtr.Zero) - return null; -#if !RECURSIVE_WRAPPING - else if ((managedInterface = ManagedToNativeWrapper.GetUnderlyingInterface(comInterface, outParam)) == null) -#endif - managedInterface = (IStream)new NativeToManagedWrapper(comInterface, outParam); - - return managedInterface; - } - - internal static void ReleaseInterface(IStream managedInterface) - { - if (managedInterface is NativeToManagedWrapper) - ((NativeToManagedWrapper)managedInterface).Dispose(true); - } - - // Mono does not implement Marshal.ThrowExceptionForHR - private static void ThrowExceptionForHR(int result) - { - if (result < 0) - throw new COMException(null, result); - } - - public void Read(byte[] pv, int cb, IntPtr pcbRead) - { - ThrowExceptionForHR(managedVtable.Read(comInterface, pv, cb, pcbRead)); - } - - public void Write(byte[] pv, int cb, IntPtr pcbWritten) - { - ThrowExceptionForHR(managedVtable.Write(comInterface, pv, cb, pcbWritten)); - } - - public void Seek(long dlibMove, int dwOrigin, IntPtr plibNewPosition) - { - ThrowExceptionForHR(managedVtable.Seek(comInterface, dlibMove, dwOrigin, plibNewPosition)); - } - - public void SetSize(long libNewSize) - { - ThrowExceptionForHR(managedVtable.SetSize(comInterface, libNewSize)); - } - - public void CopyTo(IStream pstm, long cb, IntPtr pcbRead, IntPtr pcbWritten) - { - ThrowExceptionForHR(managedVtable.CopyTo(comInterface, pstm, cb, pcbRead, pcbWritten)); - } - - public void Commit(int grfCommitFlags) - { - ThrowExceptionForHR(managedVtable.Commit(comInterface, grfCommitFlags)); - } - - public void Revert() - { - ThrowExceptionForHR(managedVtable.Revert(comInterface)); - } - - public void LockRegion(long libOffset, long cb, int dwLockType) - { - ThrowExceptionForHR(managedVtable.LockRegion(comInterface, libOffset, cb, dwLockType)); - } - - public void UnlockRegion(long libOffset, long cb, int dwLockType) - { - ThrowExceptionForHR(managedVtable.UnlockRegion(comInterface, libOffset, cb, dwLockType)); - } - - public void Stat(out STATSTG pstatstg, int grfStatFlag) - { - ThrowExceptionForHR(managedVtable.Stat(comInterface, out pstatstg, grfStatFlag)); - } - - public void Clone(out IStream ppstm) - { - IntPtr newInterface; - - ThrowExceptionForHR(managedVtable.Clone(comInterface, out newInterface)); - ppstm = NativeToManagedWrapper.GetInterface(newInterface, true); - } - } - - private static readonly ComIStreamMarshaler defaultInstance = new ComIStreamMarshaler(); - - private ComIStreamMarshaler() - { - } - - private static ICustomMarshaler GetInstance(string cookie) - { - return defaultInstance; - } - - public IntPtr MarshalManagedToNative(object managedObj) - { -#if RECURSIVE_WRAPPING - managedObj = NativeToManagedWrapper.GetInterface(ManagedToNativeWrapper.GetInterface((IStream)managedObj), true); -#endif - return ManagedToNativeWrapper.GetInterface((IStream)managedObj); - } - - public void CleanUpNativeData(IntPtr pNativeData) - { - ManagedToNativeWrapper.ReleaseInterface(pNativeData); - } - - public object MarshalNativeToManaged(IntPtr pNativeData) - { -#if RECURSIVE_WRAPPING - pNativeData = ManagedToNativeWrapper.GetInterface(NativeToManagedWrapper.GetInterface(pNativeData, true)); -#endif - return NativeToManagedWrapper.GetInterface(pNativeData, false); - } - - public void CleanUpManagedData(object managedObj) - { - NativeToManagedWrapper.ReleaseInterface((IStream)managedObj); - } - - public int GetNativeDataSize() - { - return -1; - } - } -} \ No newline at end of file diff --git a/mcs/class/System.Drawing/System.Drawing/ComIStreamWrapper.cs b/mcs/class/System.Drawing/System.Drawing/ComIStreamWrapper.cs deleted file mode 100644 index 74a16c1be1c..00000000000 --- a/mcs/class/System.Drawing/System.Drawing/ComIStreamWrapper.cs +++ /dev/null @@ -1,210 +0,0 @@ -// -// System.Drawing.ComIStreamWrapper.cs -// -// Author: -// Kornél Pál -// -// Copyright (C) 2005 Kornél Pál -// - -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; -using System.IO; -using System.Reflection; -using System.Runtime.InteropServices; -#if NET_2_0 -using System.Runtime.InteropServices.ComTypes; -using STATSTG = System.Runtime.InteropServices.ComTypes.STATSTG; -#else -using IStream = System.Runtime.InteropServices.UCOMIStream; -#endif - -namespace System.Drawing -{ - // Stream to IStream wrapper for COM interop - internal sealed class ComIStreamWrapper : IStream - { - private const int STG_E_INVALIDFUNCTION = unchecked((int)0x80030001); - - private readonly Stream baseStream; - private long position = -1; - - internal ComIStreamWrapper(Stream stream) - { - baseStream = stream; - } - - private void SetSizeToPosition() - { - if (position != -1) - { - if (position > baseStream.Length) - baseStream.SetLength(position); - baseStream.Position = position; - position = -1; - } - } - - public void Read(byte[] pv, int cb, IntPtr pcbRead) - { - int read = 0; - - if (cb != 0) - { - SetSizeToPosition(); - - read = baseStream.Read(pv, 0, cb); - } - - if (pcbRead != IntPtr.Zero) - Marshal.WriteInt32(pcbRead, read); - } - - public void Write(byte[] pv, int cb, IntPtr pcbWritten) - { - if (cb != 0) - { - SetSizeToPosition(); - - baseStream.Write(pv, 0, cb); - } - - if (pcbWritten != IntPtr.Zero) - Marshal.WriteInt32(pcbWritten, cb); - } - - public void Seek(long dlibMove, int dwOrigin, IntPtr plibNewPosition) - { - long newPosition; - - if (baseStream.CanWrite) - { - switch ((SeekOrigin)dwOrigin) - { - case SeekOrigin.Begin: - newPosition = dlibMove; - break; - case SeekOrigin.Current: - if ((newPosition = position) == -1) - newPosition = baseStream.Position; - newPosition += dlibMove; - break; - case SeekOrigin.End: - newPosition = baseStream.Length + dlibMove; - break; - default: - throw new ExternalException(null, STG_E_INVALIDFUNCTION); - } - - if (newPosition > baseStream.Length) - position = newPosition; - else - { - baseStream.Position = newPosition; - position = -1; - } - } - else - { - try - { - newPosition = baseStream.Seek(dlibMove, (SeekOrigin)dwOrigin); - } - catch (ArgumentException) - { - throw new ExternalException(null, STG_E_INVALIDFUNCTION); - } - position = -1; - } - - if (plibNewPosition != IntPtr.Zero) - Marshal.WriteInt64(plibNewPosition, newPosition); - } - - public void SetSize(long libNewSize) - { - baseStream.SetLength(libNewSize); - } - - public void CopyTo(IStream pstm, long cb, IntPtr pcbRead, IntPtr pcbWritten) - { - byte[] buffer = new byte[4096]; - long written = 0; - int read; - - if (cb != 0) - { - SetSizeToPosition(); - do - { - int count = 4096; - - if (written + 4096 > cb) - count = (int)(cb - written); - - if ((read = baseStream.Read(buffer, 0, count)) == 0) - break; - pstm.Write(buffer, read, IntPtr.Zero); - written += read; - } while (written < cb); - } - - if (pcbRead != IntPtr.Zero) - Marshal.WriteInt64(pcbRead, written); - if (pcbWritten != IntPtr.Zero) - Marshal.WriteInt64(pcbWritten, written); - } - - public void Commit(int grfCommitFlags) - { - baseStream.Flush(); - } - - public void Revert() - { - throw new ExternalException(null, STG_E_INVALIDFUNCTION); - } - - public void LockRegion(long libOffset, long cb, int dwLockType) - { - throw new ExternalException(null, STG_E_INVALIDFUNCTION); - } - - public void UnlockRegion(long libOffset, long cb, int dwLockType) - { - throw new ExternalException(null, STG_E_INVALIDFUNCTION); - } - - public void Stat(out STATSTG pstatstg, int grfStatFlag) - { - pstatstg = new STATSTG(); - pstatstg.cbSize = baseStream.Length; - } - - public void Clone(out IStream ppstm) - { - ppstm = null; - throw new ExternalException(null, STG_E_INVALIDFUNCTION); - } - } -} \ No newline at end of file diff --git a/mcs/class/System.Drawing/System.Drawing/ContentAlignment.cs b/mcs/class/System.Drawing/System.Drawing/ContentAlignment.cs deleted file mode 100644 index cc7f4d8f181..00000000000 --- a/mcs/class/System.Drawing/System.Drawing/ContentAlignment.cs +++ /dev/null @@ -1,49 +0,0 @@ -// -// System.Drawing.ContentAlignment.cs -// -// (C) 2001 Ximian, Inc. http://www.ximian.com -// Author: Dennis Hayes (dennish@raytek.com) -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; -using System.ComponentModel; - -namespace System.Drawing -{ - [Serializable] - [Editor ("System.Drawing.Design.ContentAlignmentEditor, " + Consts.AssemblySystem_Drawing_Design, typeof (System.Drawing.Design.UITypeEditor))] - public enum ContentAlignment { - TopLeft = 0x001, - TopCenter = 0x002, - TopRight = 0x004, - MiddleLeft = 0x010, - MiddleCenter = 0x020, - MiddleRight = 0x040, - BottomLeft = 0x100, - BottomCenter = 0x200, - BottomRight = 0x400 - } -} diff --git a/mcs/class/System.Drawing/System.Drawing/Font.cs b/mcs/class/System.Drawing/System.Drawing/Font.cs deleted file mode 100644 index 09cbb55aeaa..00000000000 --- a/mcs/class/System.Drawing/System.Drawing/Font.cs +++ /dev/null @@ -1,603 +0,0 @@ -// -// System.Drawing.Fonts.cs -// -// Authors: -// Alexandre Pigolkine (pigolkine@gmx.de) -// Miguel de Icaza (miguel@ximian.com) -// Todd Berman (tberman@sevenl.com) -// Jordi Mas i Hernandez (jordi@ximian.com) -// Ravindra (rkumar@novell.com) -// -// Copyright (C) 2004 Ximian, Inc. (http://www.ximian.com) -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; -using System.Runtime.Serialization; -using System.Runtime.InteropServices; -using System.ComponentModel; - -namespace System.Drawing -{ - [Serializable] - [ComVisible (true)] - [Editor ("System.Drawing.Design.FontEditor, " + Consts.AssemblySystem_Drawing_Design, typeof (System.Drawing.Design.UITypeEditor))] - [TypeConverter (typeof (FontConverter))] - public sealed class Font : MarshalByRefObject, ISerializable, ICloneable, IDisposable - { - private IntPtr fontObject = IntPtr.Zero; - - private Font (SerializationInfo info, StreamingContext context) - { - } - - void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context) - { - } - - ~Font() - { - Dispose (); - } - - public void Dispose () - { - if (fontObject != IntPtr.Zero) { - GDIPlus.CheckStatus (GDIPlus.GdipDeleteFont (fontObject)); - fontObject = IntPtr.Zero; - GC.SuppressFinalize (this); - } - } - - internal void unitConversion (GraphicsUnit fromUnit, GraphicsUnit toUnit, float nSrc, out float nTrg) - { - float inchs = 0; - nTrg = 0; - - switch (fromUnit) { - case GraphicsUnit.Display: - inchs = nSrc / 75f; - break; - case GraphicsUnit.Document: - inchs = nSrc / 300f; - break; - case GraphicsUnit.Inch: - inchs = nSrc; - break; - case GraphicsUnit.Millimeter: - inchs = nSrc / 25.4f; - break; - case GraphicsUnit.Pixel: - case GraphicsUnit.World: - inchs = nSrc / Graphics.systemDpiX; - break; - case GraphicsUnit.Point: - inchs = nSrc / 72f; - break; - default: - throw new ArgumentException("Invalid GraphicsUnit"); - } - - switch (toUnit) { - case GraphicsUnit.Display: - nTrg = inchs * 75; - break; - case GraphicsUnit.Document: - nTrg = inchs * 300; - break; - case GraphicsUnit.Inch: - nTrg = inchs; - break; - case GraphicsUnit.Millimeter: - nTrg = inchs * 25.4f; - break; - case GraphicsUnit.Pixel: - case GraphicsUnit.World: - nTrg = inchs * Graphics.systemDpiX; - break; - case GraphicsUnit.Point: - nTrg = inchs * 72; - break; - default: - throw new ArgumentException("Invalid GraphicsUnit"); - } - } - - internal void setProperties (FontFamily family, float emSize, FontStyle style, GraphicsUnit unit, byte charSet, bool isVertical) - { - _name = family.Name; - _fontFamily = family; - _size = emSize; - - // MS throws ArgumentException, if unit is set to GraphicsUnit.Display - _unit = unit; - _style = style; - _gdiCharSet = charSet; - _gdiVerticalFont = isVertical; - - unitConversion (unit, GraphicsUnit.Point, emSize, out _sizeInPoints); - - _bold = _italic = _strikeout = _underline = false; - - if ((style & FontStyle.Bold) == FontStyle.Bold) - _bold = true; - - if ((style & FontStyle.Italic) == FontStyle.Italic) - _italic = true; - - if ((style & FontStyle.Strikeout) == FontStyle.Strikeout) - _strikeout = true; - - if ((style & FontStyle.Underline) == FontStyle.Underline) - _underline = true; - } - - public static Font FromHfont (IntPtr Hfont) - { - OperatingSystem osInfo = Environment.OSVersion; - IntPtr newObject; - IntPtr hdc; - FontStyle newStyle = FontStyle.Regular; - float newSize; - LOGFONTA lf = new LOGFONTA (); - - // Sanity. Should we throw an exception? - if (Hfont == IntPtr.Zero) { - Font result = new Font ("Arial", (float)10.0, FontStyle.Regular); - return(result); - } - - if ((int) osInfo.Platform == 128 || (int) osInfo.Platform == 4) { - // If we're on Unix we use our private gdiplus API to avoid Wine - // dependencies in S.D - - Status s = GDIPlus.GdipCreateFontFromHfont (Hfont, out newObject, ref lf); - GDIPlus.CheckStatus (s); - - } else { - - // This needs testing - // GetDC, SelectObject, ReleaseDC GetTextMetric and - // GetFontFace are not really GDIPlus, see gdipFunctions.cs - - newStyle = FontStyle.Regular; - - hdc = GDIPlus.GetDC (IntPtr.Zero); - Font f = FromLogFont (lf, hdc); - GDIPlus.ReleaseDC (hdc); - return f; - } - - if (lf.lfItalic != 0) { - newStyle |= FontStyle.Italic; - } - - if (lf.lfUnderline != 0) { - newStyle |= FontStyle.Underline; - } - - if (lf.lfStrikeOut != 0) { - newStyle |= FontStyle.Strikeout; - } - - if (lf.lfWeight > 400) { - newStyle |= FontStyle.Bold; - } - - if (lf.lfHeight < 0) { - newSize = lf.lfHeight * -1; - } else { - newSize = lf.lfHeight; - } - - return (new Font (newObject, lf.lfFaceName, newStyle, newSize)); - } - - public IntPtr ToHfont () - { - IntPtr Hfont; - OperatingSystem osInfo = Environment.OSVersion; - - // Sanity. Should we throw an exception? - if (fontObject == IntPtr.Zero) { - return IntPtr.Zero; - } - - if ((int) osInfo.Platform == 128 || (int) osInfo.Platform == 4) { - return fontObject; - } else { - LOGFONTA lf = new LOGFONTA (); - ToLogFont(lf); - Hfont = GDIPlus.CreateFontIndirectA (ref lf); - } - return Hfont; - } - - internal Font (IntPtr newFontObject, string familyName, FontStyle style, float size) - { - FontFamily fontFamily; - - try { - fontFamily = new FontFamily (familyName); - } - catch (Exception){ - fontFamily = FontFamily.GenericSansSerif; - } - - setProperties (fontFamily, size, style, GraphicsUnit.Pixel, 0, false); - fontObject = newFontObject; - } - - public Font (Font original, FontStyle style) - { - Status status; - setProperties (original.FontFamily, original.Size, style, original.Unit, original.GdiCharSet, original.GdiVerticalFont); - - status = GDIPlus.GdipCreateFont (_fontFamily.NativeObject, Size, Style, Unit, out fontObject); - GDIPlus.CheckStatus (status); - } - - public Font (FontFamily family, float emSize, GraphicsUnit unit) - : this (family, emSize, FontStyle.Regular, unit, (byte)0, false) - { - } - - public Font (string familyName, float emSize, GraphicsUnit unit) - : this (new FontFamily (familyName), emSize, FontStyle.Regular, unit, (byte)0, false) - { - } - - public Font (FontFamily family, float emSize) - : this (family, emSize, FontStyle.Regular, GraphicsUnit.Point, (byte)0, false) - { - } - - public Font (FontFamily family, float emSize, FontStyle style) - : this (family, emSize, style, GraphicsUnit.Point, (byte)0, false) - { - } - - public Font (FontFamily family, float emSize, FontStyle style, GraphicsUnit unit) - : this (family, emSize, style, unit, (byte)0, false) - { - } - - public Font (FontFamily family, float emSize, FontStyle style, GraphicsUnit unit, byte charSet) - : this (family, emSize, style, unit, charSet, false) - { - } - - public Font (FontFamily family, float emSize, FontStyle style, - GraphicsUnit unit, byte charSet, bool isVertical) - { - // MS does not accept null family - Status status; - setProperties (family, emSize, style, unit, charSet, isVertical); - status = GDIPlus.GdipCreateFont (family.NativeObject, emSize, style, unit, out fontObject); - GDIPlus.CheckStatus (status); - } - - public Font (string familyName, float emSize) - : this (familyName, emSize, FontStyle.Regular, GraphicsUnit.Point, (byte)0, false) - { - } - - public Font (string familyName, float emSize, FontStyle style) - : this (familyName, emSize, style, GraphicsUnit.Point, (byte)0, false) - { - } - - public Font (string familyName, float emSize, FontStyle style, GraphicsUnit unit) - : this (familyName, emSize, style, unit, (byte)0, false) - { - } - - public Font (string familyName, float emSize, FontStyle style, GraphicsUnit unit, byte charSet) - : this (familyName, emSize, style, unit, charSet, false) - { - } - - public Font (string familyName, float emSize, FontStyle style, - GraphicsUnit unit, byte charSet, bool isVertical) - { - // NOTE: If family name is null, empty or invalid, - // MS creates Microsoft Sans Serif font. - Status status; - FontFamily family; - try { - family = new FontFamily (familyName); - } - catch (Exception){ - family = FontFamily.GenericSansSerif; - } - - setProperties (family, emSize, style, unit, charSet, isVertical); - - status = GDIPlus.GdipCreateFont (family.NativeObject, emSize, style, unit, out fontObject); - GDIPlus.CheckStatus (status); - } - - public object Clone () - { - return new Font (this, Style); - } - - internal IntPtr NativeObject { - get { - return fontObject; - } - set { - fontObject = value; - } - } - - private bool _bold; - - [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)] - public bool Bold { - get { - return _bold; - } - } - - private FontFamily _fontFamily; - - [Browsable (false)] - public FontFamily FontFamily { - get { - return _fontFamily; - } - } - - private byte _gdiCharSet; - - [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)] - public byte GdiCharSet { - get { - return _gdiCharSet; - } - } - - private bool _gdiVerticalFont; - - [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)] - public bool GdiVerticalFont { - get { - return _gdiVerticalFont; - } - } - - [Browsable (false)] - public int Height { - get { - return (int) Math.Ceiling (GetHeight ()); - } - } - - private bool _italic; - - [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)] - public bool Italic { - get { - return _italic; - } - } - - private string _name; - - [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)] - [Editor ("System.Drawing.Design.FontNameEditor, " + Consts.AssemblySystem_Drawing_Design, typeof (System.Drawing.Design.UITypeEditor))] - [TypeConverter (typeof (FontConverter.FontNameConverter))] - public string Name { - get { - return _name; - } - } - - private float _size; - public float Size { - get { - return _size; - } - } - - private float _sizeInPoints; - - [Browsable (false)] - public float SizeInPoints { - get { - return _sizeInPoints; - } - } - - private bool _strikeout; - - [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)] - public bool Strikeout { - get { - return _strikeout; - } - } - - private FontStyle _style; - - [Browsable (false)] - public FontStyle Style { - get { - return _style; - } - } - - private bool _underline; - - [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)] - public bool Underline { - get { - return _underline; - } - } - - private GraphicsUnit _unit; - - [TypeConverter (typeof (FontConverter.FontUnitConverter))] - public GraphicsUnit Unit { - get { - return _unit; - } - } - - public override bool Equals (object obj) - { - if (! (obj is Font)) - return false; - - Font fnt = (Font) obj; - - if (fnt.FontFamily.Equals (FontFamily) && fnt.Size == Size && - fnt.Style == Style && fnt.Unit == Unit && - fnt.GdiCharSet == GdiCharSet && - fnt.GdiVerticalFont == GdiVerticalFont) - return true; - else - return false; - } - - public override int GetHashCode () - { - return _name.GetHashCode (); - } - - [MonoTODO] - public static Font FromHdc (IntPtr hdc) - { - throw new NotImplementedException (); - } - - [MonoTODO("This is temporary implementation")] - public static Font FromLogFont (object lf, IntPtr hdc) - { - IntPtr newObject; - LOGFONTA o = (LOGFONTA)lf; - GDIPlus.GdipCreateFontFromLogfontA (hdc, ref o, out newObject); - return new Font (newObject, "Microsoft Sans Serif", FontStyle.Regular, 10); - } - - public float GetHeight () - { - return GetHeight (Graphics.systemDpiY); - } - - [MonoTODO] - public static Font FromLogFont (object lf) - { - throw new NotImplementedException (); - } - - public void ToLogFont (object logFont) - { - using (Graphics g = Graphics.FromHdc (GDIPlus.GetDC (IntPtr.Zero))) { - ToLogFont (logFont, g); - } - } - - public void ToLogFont (object logFont, Graphics graphics) - { - if (graphics == null) { - throw new ArgumentNullException ("graphics"); - } - - // TODO: Does it make a sense to deal with LOGFONTW ? - LOGFONTA o = (LOGFONTA)logFont; - GDIPlus.CheckStatus (GDIPlus.GdipGetLogFontA(NativeObject, graphics.NativeObject, ref o)); - } - - public float GetHeight (Graphics graphics) - { - float height = GetHeight (graphics.DpiY); - - switch (graphics.PageUnit) { - case GraphicsUnit.Document: - height *= (300f / graphics.DpiY); - break; - case GraphicsUnit.Display: - height *= (75f / graphics.DpiY); - break; - case GraphicsUnit.Inch: - height /= graphics.DpiY; - break; - case GraphicsUnit.Millimeter: - height *= (25.4f / graphics.DpiY); - break; - case GraphicsUnit.Point: - height *= (72f / graphics.DpiY); - break; - - case GraphicsUnit.Pixel: - case GraphicsUnit.World: - default: - break; - } - - return height; - } - - public float GetHeight (float dpi) - { - float height; - int emHeight = _fontFamily.GetEmHeight (_style); - int lineSpacing = _fontFamily.GetLineSpacing (_style); - - height = lineSpacing * (_size / emHeight); - - switch (_unit) { - case GraphicsUnit.Document: - height *= (dpi / 300f); - break; - case GraphicsUnit.Display: - height *= (dpi / 75f); - break; - case GraphicsUnit.Inch: - height *= dpi; - break; - case GraphicsUnit.Millimeter: - height *= (dpi / 25.4f); - break; - case GraphicsUnit.Point: - height *= (dpi / 72f); - break; - - case GraphicsUnit.Pixel: - case GraphicsUnit.World: - default: - break; - } - - return height; - } - - public override String ToString () - { - return String.Format ("[Font: Name={0}, Size={1}, Units={2}, GdiCharSet={3}, GdiVerticalFont={4}]", _name, _size, (int)_unit, _gdiCharSet, _gdiVerticalFont); - } - } -} diff --git a/mcs/class/System.Drawing/System.Drawing/Font.jvm.cs b/mcs/class/System.Drawing/System.Drawing/Font.jvm.cs deleted file mode 100644 index 81ede8209ea..00000000000 --- a/mcs/class/System.Drawing/System.Drawing/Font.jvm.cs +++ /dev/null @@ -1,409 +0,0 @@ - -using System.Runtime.Serialization; -using System.Runtime.InteropServices; -using System.ComponentModel; -using awt = java.awt; -using TextAttribute = java.awt.font.TextAttribute; - -namespace System.Drawing { - - public sealed class Font: IDisposable - { - const int DPI = 72; - private GraphicsUnit gUnit = GraphicsUnit.Point; - awt.Font _jFont; - - internal awt.Font NativeObject { - get { - return _jFont; - } - } - - public void Dispose() - { - - } - - private Font (SerializationInfo info, StreamingContext context) - { - - } - - - // FIXME: add this method when/if there will be resources needed to be disposed -// ~Font() -// { -// -// } - - internal float unitConversion(GraphicsUnit fromUnit, GraphicsUnit toUnit, float nSrc) - { - double inchs = 0; - double nTrg = 0; - - switch (fromUnit) { - case GraphicsUnit.Display: - inchs = nSrc / 75f; - break; - case GraphicsUnit.Document: - inchs = nSrc / 300f; - break; - case GraphicsUnit.Inch: - inchs = nSrc; - break; - case GraphicsUnit.Millimeter: - inchs = nSrc / 25.4f; - break; - case GraphicsUnit.Pixel: - case GraphicsUnit.World: - inchs = nSrc / Graphics.DefaultScreenResolution; - break; - case GraphicsUnit.Point: - inchs = nSrc / 72f; - break; - default: - throw new ArgumentException("Invalid GraphicsUnit"); - } - - switch (toUnit) { - case GraphicsUnit.Display: - nTrg = inchs * 75; - break; - case GraphicsUnit.Document: - nTrg = inchs * 300; - break; - case GraphicsUnit.Inch: - nTrg = inchs; - break; - case GraphicsUnit.Millimeter: - nTrg = inchs * 25.4f; - break; - case GraphicsUnit.Pixel: - case GraphicsUnit.World: - nTrg = inchs * Graphics.DefaultScreenResolution; - break; - case GraphicsUnit.Point: - nTrg = inchs * 72; - break; - default: - throw new ArgumentException("Invalid GraphicsUnit"); - } - return (float)nTrg; - } - -#if INTPTR_SUPPORT - public IntPtr ToHfont () - { - throw new NotImplementedException(); - } -#endif - - public Font(Font original, FontStyle style) - { - _jFont = original.NativeObject.deriveFont((int)style); - } - - public Font(FontFamily family, float emSize) - : this(family, emSize, FontStyle.Regular, GraphicsUnit.Point, (byte)0, false) - { - } - - public Font(FontFamily family, float emSize, FontStyle style) - : this(family, emSize, style, GraphicsUnit.Point, (byte)0, false) - { - } - public Font(FontFamily family, float emSize, GraphicsUnit unit) - : this(family, emSize, FontStyle.Regular, unit, (byte)0, false) - { - } - - public Font(FontFamily family, float emSize, FontStyle style, GraphicsUnit unit) - : this(family, emSize, style, unit, (byte)0, false) - { - } - - public Font(FontFamily family, float emSize, FontStyle style, GraphicsUnit unit, byte charSet) - : this(family, emSize, style, unit, charSet, false) - { - } - - public Font(FontFamily family, float emSize, FontStyle style, GraphicsUnit unit, byte charSet, bool isVertical) - :this(family.Name,emSize,style,unit,charSet,isVertical) - { - } - - public Font(string familyName, float emSize) - : this(familyName, emSize, FontStyle.Regular, GraphicsUnit.Point, (byte)0, false) - { - } - - public Font(string familyName, float emSize, FontStyle style) - : this(familyName, emSize, style, GraphicsUnit.Point, (byte)0, false) - { - } - - public Font(string familyName, float emSize, GraphicsUnit unit) - : this(familyName, emSize, FontStyle.Regular, unit, (byte)0, false) - { - } - - public Font(string familyName, float emSize, FontStyle style, GraphicsUnit unit) - : this(familyName, emSize, style, unit, (byte)0, false) - { - } - - public Font(string familyName, float emSize, FontStyle style, GraphicsUnit unit, byte charSet) - : this(familyName, emSize, style, unit, charSet, false) - { - } - - public Font(string familyName, float emSize, FontStyle style, GraphicsUnit unit, byte charSet, bool isVertical) - { - //TODO: charset management - gUnit = unit; - java.util.Hashtable attribs = new java.util.Hashtable(); - attribs.put(TextAttribute.FAMILY, familyName/*TODO: family doungrade possibility*/); - //init defaults - attribs.put(TextAttribute.POSTURE, TextAttribute.POSTURE_REGULAR); - - if((style & FontStyle.Bold) != FontStyle.Regular) - attribs.put(TextAttribute.WEIGHT, TextAttribute.WEIGHT_BOLD); - if((style & FontStyle.Italic) != FontStyle.Regular) - attribs.put(TextAttribute.POSTURE, TextAttribute.POSTURE_OBLIQUE); - if((style & FontStyle.Underline) != FontStyle.Regular) - attribs.put(TextAttribute.UNDERLINE, TextAttribute.UNDERLINE_ON); - if((style & FontStyle.Strikeout) != FontStyle.Regular) - attribs.put(TextAttribute.STRIKETHROUGH, TextAttribute.STRIKETHROUGH_ON); - - float newSize = unitConversion(gUnit,GraphicsUnit.World,emSize); - attribs.put(TextAttribute.SIZE,new java.lang.Float(newSize)); - - #region OldStyleSwitch - // switch(style) - // { - // case 0: // '\0' - // attribs.put(TextAttribute.POSTURE, TextAttribute.POSTURE_REGULAR); - // break; - // - // case 1: // '\001' - // attribs.put(TextAttribute.WEIGattribs, TextAttribute.WEIGattribs_BOLD); - // break; - // - // case 2: // '\002' - // attribs.put(TextAttribute.POSTURE, TextAttribute.POSTURE_OBLIQUE); - // break; - // - // case 3: // '\003' - // attribs.put(TextAttribute.WEIGattribs, TextAttribute.WEIGattribs_BOLD); - // attribs.put(TextAttribute.POSTURE, TextAttribute.POSTURE_OBLIQUE); - // break; - // - // case 4: // '\004' - // attribs.put(TextAttribute.UNDERLINE, TextAttribute.UNDERLINE_ON); - // break; - // - // case 5: // '\005' - // attribs.put(TextAttribute.WEIGattribs, TextAttribute.WEIGattribs_BOLD); - // attribs.put(TextAttribute.UNDERLINE, TextAttribute.UNDERLINE_ON); - // break; - // - // case 6: // '\006' - // attribs.put(TextAttribute.POSTURE, TextAttribute.POSTURE_OBLIQUE); - // attribs.put(TextAttribute.UNDERLINE, TextAttribute.UNDERLINE_ON); - // break; - // - // case 7: // '\007' - // attribs.put(TextAttribute.WEIGattribs, TextAttribute.WEIGattribs_BOLD); - // attribs.put(TextAttribute.POSTURE, TextAttribute.POSTURE_OBLIQUE); - // attribs.put(TextAttribute.UNDERLINE, TextAttribute.UNDERLINE_ON); - // break; - // - // case 8: // '\b' - // attribs.put(TextAttribute.STRIKETHROUGH, TextAttribute.STRIKETHROUGH_ON); - // break; - // - // case 9: // '\t' - // attribs.put(TextAttribute.WEIGattribs, TextAttribute.WEIGattribs_BOLD); - // attribs.put(TextAttribute.STRIKETHROUGH, TextAttribute.STRIKETHROUGH_ON); - // break; - // - // case 10: // '\n' - // attribs.put(TextAttribute.POSTURE, TextAttribute.POSTURE_OBLIQUE); - // attribs.put(TextAttribute.STRIKETHROUGH, TextAttribute.STRIKETHROUGH_ON); - // break; - // - // case 11: // '\013' - // attribs.put(TextAttribute.WEIGattribs, TextAttribute.WEIGattribs_BOLD); - // attribs.put(TextAttribute.POSTURE, TextAttribute.POSTURE_OBLIQUE); - // attribs.put(TextAttribute.STRIKETHROUGH, TextAttribute.STRIKETHROUGH_ON); - // break; - // - // case 12: // '\f' - // attribs.put(TextAttribute.UNDERLINE, TextAttribute.UNDERLINE_ON); - // attribs.put(TextAttribute.STRIKETHROUGH, TextAttribute.STRIKETHROUGH_ON); - // break; - // - // case 13: // '\r' - // attribs.put(TextAttribute.WEIGattribs, TextAttribute.WEIGattribs_BOLD); - // attribs.put(TextAttribute.UNDERLINE, TextAttribute.UNDERLINE_ON); - // attribs.put(TextAttribute.STRIKETHROUGH, TextAttribute.STRIKETHROUGH_ON); - // break; - // - // case 14: // '\016' - // attribs.put(TextAttribute.POSTURE, TextAttribute.POSTURE_OBLIQUE); - // attribs.put(TextAttribute.UNDERLINE, TextAttribute.UNDERLINE_ON); - // attribs.put(TextAttribute.STRIKETHROUGH, TextAttribute.STRIKETHROUGH_ON); - // break; - // - // case 15: // '\017' - // attribs.put(TextAttribute.WEIGattribs, TextAttribute.WEIGattribs_BOLD); - // attribs.put(TextAttribute.POSTURE, TextAttribute.POSTURE_OBLIQUE); - // attribs.put(TextAttribute.UNDERLINE, TextAttribute.UNDERLINE_ON); - // attribs.put(TextAttribute.STRIKETHROUGH, TextAttribute.STRIKETHROUGH_ON); - // break; - // - // default: - // attribs.put(TextAttribute.POSTURE, TextAttribute.POSTURE_REGULAR); - // break; - // } - #endregion - //TODO: units conversion - try - { - _jFont = new awt.Font(attribs); - } - catch (Exception e) - { -#if DEBUG - string mess = e.ToString(); - Console.WriteLine(mess); -#endif - throw e; - } - } - - public object Clone() - { - return new Font(this, Style); - } - - - - public bool Bold { - get { - return _jFont.isBold(); - } - } - - - public FontFamily FontFamily { - get { - return new FontFamily(_jFont.getFamily()); - } - } - - public byte GdiCharSet { - get { - throw new NotSupportedException(); - } - } - - public bool GdiVerticalFont { - get { - throw new NotSupportedException(); - } - } - - public int Height { - get { - awt.Container c = new awt.Container(); - return c.getFontMetrics(NativeObject).getHeight(); - } - } - - public bool Italic { - get { - return _jFont.isItalic(); - } - } - - public string Name { - get { - return _jFont.getName(); - } - } - - public float Size { - get { - return unitConversion(GraphicsUnit.World,gUnit,_jFont.getSize2D()); - } - } - - - public float SizeInPoints { - get { - return unitConversion(GraphicsUnit.World,GraphicsUnit.Point,_jFont.getSize2D()); - } - } - - - public bool Strikeout { - get { - try - { - if((java.lang.Boolean)_jFont.getAttributes().get(TextAttribute.STRIKETHROUGH) - == TextAttribute.STRIKETHROUGH_ON ) - return true; - } - catch - { - } - return false; - } - } - - public FontStyle Style { - get { - FontStyle style = FontStyle.Regular; - if (Bold) - style |= FontStyle.Bold; - if (Italic) - style |= FontStyle.Italic; - if (Underline) - style |= FontStyle.Underline; - if (Strikeout) - style |= FontStyle.Strikeout; - - return style; - } - } - - - public bool Underline { - get { - try - { - if((java.lang.Integer)_jFont.getAttributes().get(TextAttribute.UNDERLINE) - == TextAttribute.UNDERLINE_ON ) - return true; - } - catch - { - } - return false; - } - } - - [TypeConverter(typeof(FontConverter.FontUnitConverter))] - public GraphicsUnit Unit { - get { - return gUnit; - } - } - - public override System.String ToString() - { - return ("[Font: Name="+ Name +", Size="+ Size+", Style="+ Style +", Units="+ Unit + "]"); - } - } -} diff --git a/mcs/class/System.Drawing/System.Drawing/FontConverter.cs b/mcs/class/System.Drawing/System.Drawing/FontConverter.cs deleted file mode 100644 index db21c27588d..00000000000 --- a/mcs/class/System.Drawing/System.Drawing/FontConverter.cs +++ /dev/null @@ -1,297 +0,0 @@ -// -// System.Drawing.FontConverter.cs -// -// Authors: -// Dennis Hayes (dennish@Raytek.com) -// Gonzalo Paniagua Javier (gonzalo@ximian.com) -// Ravindra (rkumar@novell.com) -// -// Copyright (C) 2002,2003 Ximian, Inc. http://www.ximian.com -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; -using System.Text; -using System.Collections; -using System.ComponentModel; -using System.Globalization; -using System.Drawing.Text; -using System.ComponentModel.Design.Serialization; -using System.Reflection; - -namespace System.Drawing -{ - public class FontConverter : TypeConverter - { - public FontConverter () - { - } - - public override bool CanConvertFrom (ITypeDescriptorContext context, Type sourceType) - { - if (sourceType == typeof (string)) - return true; - - return base.CanConvertFrom (context, sourceType); - } - - public override bool CanConvertTo (ITypeDescriptorContext context, Type destinationType) - { - if (destinationType == typeof (String)) - return true; - - if (destinationType == typeof (InstanceDescriptor)) - return true; - - return base.CanConvertTo (context, destinationType); - } - - public override object ConvertTo (ITypeDescriptorContext context, - CultureInfo culture, - object value, - Type destinationType) - { - if ((destinationType == typeof (string)) && (value is Font)) { - Font font = (Font) value; - StringBuilder sb = new StringBuilder (); - sb.Append (font.Name).Append (", "); - sb.Append (font.Size); - - switch (font.Unit) { - // MS throws ArgumentException, if unit is set - // to GraphicsUnit.Display - // Don't know what to append for GraphicsUnit.Display - case GraphicsUnit.Display: - sb.Append ("display"); break; - - case GraphicsUnit.Document: - sb.Append ("doc"); break; - - case GraphicsUnit.Point: - sb.Append ("pt"); break; - - case GraphicsUnit.Inch: - sb.Append ("in"); break; - - case GraphicsUnit.Millimeter: - sb.Append ("mm"); break; - - case GraphicsUnit.Pixel: - sb.Append ("px"); break; - - case GraphicsUnit.World: - sb.Append ("world"); break; - } - - if (font.Style != FontStyle.Regular) - sb.Append (", style=").Append (font.Style); - - return sb.ToString (); - } - - if ((destinationType == typeof (InstanceDescriptor)) && (value is Font)) { - Font font = (Font) value; - ConstructorInfo met = typeof(Font).GetConstructor (new Type[] {typeof(string), typeof(float), typeof(FontStyle), typeof(GraphicsUnit)}); - object[] args = new object[4]; - args [0] = font.Name; - args [1] = font.Size; - args [2] = font.Style; - args [3] = font.Unit; - return new InstanceDescriptor (met, args); - } - - return base.ConvertTo (context, culture, value, destinationType); - } - - public override object ConvertFrom (ITypeDescriptorContext context, - CultureInfo culture, - object value) - { - string fontFamily = value as string; - if (fontFamily == null) - return base.ConvertFrom (context, culture, value); - - // MS creates a font from the given family with - // emSize = 8. - return new Font (fontFamily, 8); - } - - public override object CreateInstance (ITypeDescriptorContext context, - IDictionary propertyValues) - { - Object value; - byte charSet = 1; - float size = 8; - String name = null; - bool vertical = false; - FontStyle style = FontStyle.Regular; - FontFamily fontFamily = null; - GraphicsUnit unit = GraphicsUnit.Point; - - if ((value = propertyValues ["GdiCharSet"]) != null) - charSet = (byte) value; - - if ((value = propertyValues ["Size"]) != null) - size = (float) value; - - if ((value = propertyValues ["Unit"]) != null) - unit = (GraphicsUnit) value; - - if ((value = propertyValues ["Name"]) != null) - name = (String) value; - - if ((value = propertyValues ["GdiVerticalFont"]) != null) - vertical = (bool) value; - - if ((value = propertyValues ["Bold"]) != null) { - bool bold = (bool) value; - if (bold == true) - style |= FontStyle.Bold; - } - - if ((value = propertyValues ["Italic"]) != null) { - bool italic = (bool) value; - if (italic == true) - style |= FontStyle.Italic; - } - - if ((value = propertyValues ["Strikeout"]) != null) { - bool strike = (bool) value; - if (strike == true) - style |= FontStyle.Strikeout; - } - - if ((value = propertyValues ["Underline"]) != null) { - bool underline = (bool) value; - if (underline == true) - style |= FontStyle.Underline; - } - - /* ?? Should default font be culture dependent ?? */ - if (name == null) - fontFamily = new FontFamily ("Tahoma"); - else { - name = name.ToLower (); - FontCollection collection = new InstalledFontCollection (); - FontFamily [] installedFontList = collection.Families; - foreach (FontFamily font in installedFontList) { - if (name == font.Name.ToLower ()) { - fontFamily = font; - break; - } - } - - // font family not found in installed fonts - if (fontFamily == null) { - collection = new PrivateFontCollection (); - FontFamily [] privateFontList = collection.Families; - foreach (FontFamily font in privateFontList) { - if (name == font.Name.ToLower ()) { - fontFamily = font; - break; - } - } - } - - // font family not found in private fonts also - if (fontFamily == null) - fontFamily = FontFamily.GenericSansSerif; - } - - return new Font (fontFamily, size, style, unit, charSet, vertical); - } - - public override bool GetCreateInstanceSupported (ITypeDescriptorContext context) - { - return true; - } - - public override PropertyDescriptorCollection GetProperties - (ITypeDescriptorContext context, - object value, Attribute [] attributes) - { - if (value is Font) - return TypeDescriptor.GetProperties (value, attributes); - - return base.GetProperties (context, value, attributes); - } - - public override bool GetPropertiesSupported (ITypeDescriptorContext context) - { - return true; - } - - public sealed class FontNameConverter : TypeConverter - { - public FontNameConverter () - { - } - - public override bool CanConvertFrom (ITypeDescriptorContext context, Type sourceType) - { - if (sourceType == typeof (string)) - return true; - - return base.CanConvertFrom (context, sourceType); - } - - [MonoTODO] - public override object ConvertFrom (ITypeDescriptorContext context, - CultureInfo culture, - object value) - { - throw new NotImplementedException (); - } - - [MonoTODO] - public override StandardValuesCollection GetStandardValues (ITypeDescriptorContext context) - { - throw new NotImplementedException (); - } - - [MonoTODO] - public override bool GetStandardValuesExclusive (ITypeDescriptorContext context) - { - throw new NotImplementedException (); - } - - public override bool GetStandardValuesSupported (ITypeDescriptorContext context) - { - return true; - } - } - - public class FontUnitConverter : EnumConverter - { - public FontUnitConverter () : base (typeof (GraphicsUnit)) - { - } - - [MonoTODO] - public override TypeConverter.StandardValuesCollection GetStandardValues (ITypeDescriptorContext context) - { - throw new NotImplementedException (); - } - } - } -} diff --git a/mcs/class/System.Drawing/System.Drawing/FontFamily.cs b/mcs/class/System.Drawing/System.Drawing/FontFamily.cs deleted file mode 100644 index ad80e0bcbc4..00000000000 --- a/mcs/class/System.Drawing/System.Drawing/FontFamily.cs +++ /dev/null @@ -1,310 +0,0 @@ -// -// System.Drawing.FontFamily.cs -// -// Author: -// Dennis Hayes (dennish@Raytek.com) -// Alexandre Pigolkine (pigolkine@gmx.de) -// -// Copyright (C) 2002/2004 Ximian, Inc http://www.ximian.com -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -using System; -using System.Drawing.Text; -using System.Text; -using System.Runtime.InteropServices; - -namespace System.Drawing { - - public sealed class FontFamily : MarshalByRefObject, IDisposable - { - - static private FontFamily genericMonospace = null; - static private FontFamily genericSansSerif = null; - static private FontFamily genericSerif = null; - private string name; - internal IntPtr nativeFontFamily = IntPtr.Zero; - - internal FontFamily(IntPtr fntfamily) - { - nativeFontFamily = fntfamily; - refreshName(); - } - - internal void refreshName() - { - if (nativeFontFamily != IntPtr.Zero) { - int language = 0; - StringBuilder sBuilder = new StringBuilder (GDIPlus.FACESIZE * UnicodeEncoding.CharSize); - Status status = GDIPlus.GdipGetFamilyName (nativeFontFamily, sBuilder, language); - GDIPlus.CheckStatus (status); - name = sBuilder.ToString(); - } - } - - //Need to come back here, is Arial the right thing to do - internal FontFamily() : this ("Arial", null) - { - - } - - - ~FontFamily() - { - Dispose (); - } - - internal IntPtr NativeObject - { - get - { - return nativeFontFamily; - } - set - { - nativeFontFamily = value; - } - } - - public FontFamily(GenericFontFamilies genericFamily) - { - Status status; - switch (genericFamily) - { - case GenericFontFamilies.Monospace: - status = GDIPlus.GdipGetGenericFontFamilyMonospace (out nativeFontFamily); - GDIPlus.CheckStatus (status); - refreshName (); - break; - case GenericFontFamilies.SansSerif: - status = GDIPlus.GdipGetGenericFontFamilySansSerif (out nativeFontFamily); - GDIPlus.CheckStatus (status); - refreshName (); - break; - case GenericFontFamilies.Serif: - status = GDIPlus.GdipGetGenericFontFamilySerif (out nativeFontFamily); - GDIPlus.CheckStatus (status); - refreshName (); - break; - default: // Undocumented default - status = GDIPlus.GdipGetGenericFontFamilyMonospace (out nativeFontFamily); - GDIPlus.CheckStatus (status); - refreshName (); - break; - } - } - - public FontFamily(string familyName) : this (familyName, null) - { - } - - public FontFamily (string familyName, FontCollection collection) - { - Status status; - if ( collection != null ) - status = GDIPlus.GdipCreateFontFamilyFromName (familyName, collection.nativeFontCollection, out nativeFontFamily); - else - status = GDIPlus.GdipCreateFontFamilyFromName (familyName, IntPtr.Zero, out nativeFontFamily); - GDIPlus.CheckStatus (status); - - refreshName (); - } - - public string Name - { - get - { - return name; - } - } - - public static FontFamily GenericMonospace - { - get - { - - IntPtr generic = IntPtr.Zero; - Status status = GDIPlus.GdipGetGenericFontFamilyMonospace (out generic); - GDIPlus.CheckStatus (status); - FontFamily genericMonospace = new FontFamily (generic); - genericMonospace.refreshName (); - return genericMonospace; - } - } - - public static FontFamily GenericSansSerif - { - get - { - IntPtr generic = IntPtr.Zero; - Status status = GDIPlus.GdipGetGenericFontFamilySansSerif (out generic); - GDIPlus.CheckStatus (status); - FontFamily genericSansSerif = new FontFamily (generic); - genericSansSerif.refreshName (); - return genericSansSerif; - } - } - - public static FontFamily GenericSerif - { - get - { - IntPtr generic = IntPtr.Zero; - Status status = GDIPlus.GdipGetGenericFontFamilySerif (out generic); - GDIPlus.CheckStatus (status); - FontFamily genericSerif = new FontFamily (generic); - genericSerif.refreshName (); - return genericSerif; - } - } - - //[MONO TODO] - //Need to check how to get the Flags attribute to read - //bitwise value of the enumeration - internal int GetStyleCheck(FontStyle style) - { - int styleCheck = 0 ; - switch ( style) { - case FontStyle.Bold: - styleCheck = 1; - break; - case FontStyle.Italic: - styleCheck = 2; - break; - case FontStyle.Regular: - styleCheck = 0; - break; - case FontStyle.Strikeout: - styleCheck = 8; - break; - case FontStyle.Underline: - styleCheck = 4; - break; - } - return styleCheck; - } - - public int GetCellAscent (FontStyle style) - { - Status status; - short outProperty; - int styleCheck = GetStyleCheck (style); - status = GDIPlus.GdipGetCellAscent (nativeFontFamily, styleCheck, out outProperty); - GDIPlus.CheckStatus (status); - - return (int) outProperty; - } - - public int GetCellDescent (FontStyle style) - { - Status status; - short outProperty; - int styleCheck = GetStyleCheck (style); - status = GDIPlus.GdipGetCellDescent (nativeFontFamily, styleCheck, out outProperty); - GDIPlus.CheckStatus (status); - - return (int) outProperty; - } - - public int GetEmHeight (FontStyle style) - { - Status status; - short outProperty; - int styleCheck = GetStyleCheck (style); - status = GDIPlus.GdipGetEmHeight (nativeFontFamily, styleCheck, out outProperty); - GDIPlus.CheckStatus (status); - - return (int) outProperty; - } - - public int GetLineSpacing (FontStyle style) - { - Status status; - short outProperty; - int styleCheck = GetStyleCheck (style); - status = GDIPlus.GdipGetLineSpacing (nativeFontFamily, styleCheck, out outProperty); - GDIPlus.CheckStatus (status); - - return (int) outProperty; - } - - public bool IsStyleAvailable (FontStyle style) - { - Status status; - bool outProperty; - int styleCheck = GetStyleCheck (style); - status = GDIPlus.GdipIsStyleAvailable (nativeFontFamily, styleCheck, out outProperty); - GDIPlus.CheckStatus (status); - - return outProperty; - } - - public void Dispose () - { - Status status = GDIPlus.GdipDeleteFontFamily (nativeFontFamily); - if ( status == Status.Ok ) - nativeFontFamily = IntPtr.Zero; - } - - public override bool Equals(object obj) - { - if (!(obj is FontFamily)) - return false; - - FontFamily o = (FontFamily) obj; - return (nativeFontFamily == o.nativeFontFamily); - } - - public override int GetHashCode () - { - return name.GetHashCode (); - } - - - public static FontFamily[] Families - { - get { - - return GetFamilies (null); - } - } - - public static FontFamily[] GetFamilies (Graphics graphics) - { - InstalledFontCollection fntcol = new InstalledFontCollection (); - return fntcol.Families; - } - - [MonoTODO ("We only support the default system language")] - public string GetName (int language) - { - return name; - } - - public override string ToString () - { - return "FontFamily :" + name; - } - - } -} - diff --git a/mcs/class/System.Drawing/System.Drawing/FontFamily.jvm.cs b/mcs/class/System.Drawing/System.Drawing/FontFamily.jvm.cs deleted file mode 100644 index a869d271413..00000000000 --- a/mcs/class/System.Drawing/System.Drawing/FontFamily.jvm.cs +++ /dev/null @@ -1,194 +0,0 @@ -// -// System.Drawing.FontFamily.cs -// -// (C) 2005 Mainsoft Corporation (http://www.mainsoft.com) -// Author: Konstantin Triger (kostat@mainsoft.com) -// - -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; -using System.Drawing.Text; -using System.Text; -using System.Runtime.InteropServices; -using System.Globalization; -using awt = java.awt; -using geom = java.awt.geom; -using font = java.awt.font; - -namespace System.Drawing { - - public sealed class FontFamily : MarshalByRefObject, IDisposable { - - static readonly FontFamily _genericMonospace; - static readonly FontFamily _genericSansSerif; - static readonly FontFamily _genericSerif; - static readonly FontCollection _installedFonts; - - static FontFamily() { - _installedFonts = new InstalledFontCollection(); - _genericMonospace = new FontFamily("Monospaced"); - _genericSansSerif = new FontFamily("SansSerif"); - _genericSerif = new FontFamily("Serif"); - } - - private readonly string _name; - - // this is unavailable through Java API, usually 2048 for TT fonts - const int UnitsPerEm = 2048; - - -// ~FontFamily() -// { -// } - - // dummy ctors to work around convertor problems - internal FontFamily() {} - internal FontFamily(IntPtr family) {} - - public FontFamily(string familyName) : this(familyName, null) - {} - - public FontFamily(string name, FontCollection fontCollection) { - if (fontCollection == null) - fontCollection = _installedFonts; - - string familyName = fontCollection.GetFamilyName(name); - if (familyName == null) - throw new ArgumentException(String.Format("Font family '{0}' not found", name)); - - _name = familyName; - } - - public FontFamily(GenericFontFamilies genericFamily) { - switch(genericFamily) { - case GenericFontFamilies.SansSerif: - _name = _genericSansSerif._name; - break; - case GenericFontFamilies.Serif: - _name = _genericSerif._name; - break; - default: - _name = _genericMonospace._name; - break; - } - } - - - public string Name { - get { - return _name; - } - } - - public static FontFamily[] Families { - get { - return _installedFonts.Families; - } - } - - public static FontFamily GenericMonospace { - get { - return _genericMonospace; - } - } - - public static FontFamily GenericSansSerif { - get { - return _genericSansSerif; - } - } - - public static FontFamily GenericSerif { - get { - return _genericSerif; - } - } - - public override bool Equals(object obj) { - if (this == obj) - return true; - - if (!(obj is FontFamily)) - return false; - - return string.Compare(Name, ((FontFamily)obj).Name, true) == 0; - } - - awt.FontMetrics GetMetrics(FontStyle style) { - awt.Container c = new awt.Container(); - return c.getFontMetrics(new Font(this, (float)(UnitsPerEm<<1), style, GraphicsUnit.World).NativeObject); - } - - public int GetCellAscent(FontStyle style) { - return GetMetrics(style).getMaxAscent()>>1; - } - - public int GetCellDescent(FontStyle style) { - return GetMetrics(style).getMaxDecent()>>1; - } - - public int GetEmHeight(FontStyle style) { - return UnitsPerEm; - } - - public static FontFamily[] GetFamilies(Graphics graphics) { - if (graphics == null) { - throw new ArgumentNullException("graphics"); - } - return _installedFonts.Families; - } - - public override int GetHashCode() { - return Name.ToLower().GetHashCode(); - } - - public int GetLineSpacing(FontStyle style) { - return GetMetrics(style).getHeight()>>1; - } - - public string GetName(int language) { - CultureInfo culture = new CultureInfo(language, false); - //TBD: get java locale - return new awt.Font(_name, awt.Font.PLAIN, 1).getFamily(null); - } - - public bool IsStyleAvailable(FontStyle style) { - return (new Font(this, (float)(UnitsPerEm<<1), style, GraphicsUnit.World).Style & style) == style; - } - - public override string ToString() { - return string.Format("[{0}: Name={1}]", GetType().Name, Name); - } - - - - #region IDisposable Members - - public void Dispose() { - // TODO: Add FontFamily.Dispose implementation - } - - #endregion - } -} - diff --git a/mcs/class/System.Drawing/System.Drawing/FontStyle.cs b/mcs/class/System.Drawing/System.Drawing/FontStyle.cs deleted file mode 100644 index 60bb82f9a62..00000000000 --- a/mcs/class/System.Drawing/System.Drawing/FontStyle.cs +++ /dev/null @@ -1,44 +0,0 @@ -// -// System.Drawing.FontStyle.cs -// -// (C) 2001 Ximian, Inc. http://www.ximian.com -// Author: Dennis Hayes (dennish@raytek.com) -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - - -using System; -namespace System.Drawing -{ - [Flags] - [Serializable] - public enum FontStyle { - Regular = 0, - Bold = 1, - Italic = 2, - Underline = 4, - Strikeout = 8 - } -} diff --git a/mcs/class/System.Drawing/System.Drawing/Graphics.cs b/mcs/class/System.Drawing/System.Drawing/Graphics.cs deleted file mode 100644 index 42b107c18b4..00000000000 --- a/mcs/class/System.Drawing/System.Drawing/Graphics.cs +++ /dev/null @@ -1,1992 +0,0 @@ -// -// System.Drawing.Graphics.cs -// -// Authors: -// Gonzalo Paniagua Javier (gonzalo@ximian.com) (stubbed out) -// Alexandre Pigolkine(pigolkine@gmx.de) -// Jordi Mas i Hernandez (jordi@ximian.com) -// -// Copyright (C) 2003 Ximian, Inc. (http://www.ximian.com) -// -// Copyright (C) 2004-2005 Novell, Inc. (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System.Drawing.Drawing2D; -using System.Drawing.Imaging; -using System.Drawing.Text; -using System.ComponentModel; -using System.Runtime.InteropServices; -using System.Security.Permissions; -using System.Text; - -namespace System.Drawing -{ - [ComVisible(false)] - public sealed class Graphics : MarshalByRefObject, IDisposable - { - internal IntPtr nativeObject = IntPtr.Zero; - private bool disposed = false; - private static float defDpiX = 0; - private static float defDpiY = 0; - - [ComVisible(false)] - public delegate bool EnumerateMetafileProc (EmfPlusRecordType recordType, - int flags, - int dataSize, - IntPtr data, - PlayRecordCallback callbackData); - - [ComVisible (false)] - public delegate bool DrawImageAbort (IntPtr callbackData); - - private Graphics (IntPtr nativeGraphics) - { - nativeObject = nativeGraphics; - } - - ~Graphics () - { - Dispose (); - } - - static internal float systemDpiX { - get { - if (defDpiX == 0) { - Bitmap bmp = new Bitmap (1, 1); - Graphics g = Graphics.FromImage (bmp); - defDpiX = g.DpiX; - } - return defDpiX; - } - } - - static internal float systemDpiY { - get { - if (defDpiY == 0) { - Bitmap bmp = new Bitmap (1, 1); - Graphics g = Graphics.FromImage (bmp); - defDpiY = g.DpiY; - } - return defDpiY; - } - } - - internal IntPtr NativeObject { - get { - return nativeObject; - } - - set { - nativeObject = value; - } - } - - [MonoTODO] - public void AddMetafileComment (byte [] data) - { - throw new NotImplementedException (); - } - - - public GraphicsContainer BeginContainer () - { - int state; - Status status; - status = GDIPlus.GdipBeginContainer2 (nativeObject, out state); - GDIPlus.CheckStatus (status); - - return new GraphicsContainer(state); - } - - public GraphicsContainer BeginContainer (Rectangle dstrect, Rectangle srcrect, GraphicsUnit unit) - { - int state; - Status status; - status = GDIPlus.GdipBeginContainerI (nativeObject, dstrect, srcrect, unit, out state); - GDIPlus.CheckStatus (status); - - return new GraphicsContainer (state); - } - - - public GraphicsContainer BeginContainer (RectangleF dstrect, RectangleF srcrect, GraphicsUnit unit) - { - int state; - Status status; - status = GDIPlus.GdipBeginContainer (nativeObject, dstrect, srcrect, unit, out state); - GDIPlus.CheckStatus (status); - - return new GraphicsContainer (state); - } - - - public void Clear (Color color) - { - Status status; - status = GDIPlus.GdipGraphicsClear (nativeObject, color.ToArgb ()); - GDIPlus.CheckStatus (status); - } - - public void Dispose () - { - Status status; - if (! disposed) { - status = GDIPlus.GdipDeleteGraphics (nativeObject); - nativeObject = IntPtr.Zero; - GDIPlus.CheckStatus (status); - disposed = true; - } - } - - - public void DrawArc (Pen pen, Rectangle rect, float startAngle, float sweepAngle) - { - DrawArc (pen, rect.X, rect.Y, rect.Width, rect.Height, startAngle, sweepAngle); - } - - - public void DrawArc (Pen pen, RectangleF rect, float startAngle, float sweepAngle) - { - DrawArc (pen, rect.X, rect.Y, rect.Width, rect.Height, startAngle, sweepAngle); - } - - - public void DrawArc (Pen pen, float x, float y, float width, float height, float startAngle, float sweepAngle) - { - Status status; - status = GDIPlus.GdipDrawArc (nativeObject, pen.nativeObject, - x, y, width, height, startAngle, sweepAngle); - GDIPlus.CheckStatus (status); - } - - // Microsoft documentation states that the signature for this member should be - // public void DrawArc( Pen pen, int x, int y, int width, int height, int startAngle, - // int sweepAngle. However, GdipDrawArcI uses also float for the startAngle and sweepAngle params - public void DrawArc (Pen pen, int x, int y, int width, int height, int startAngle, int sweepAngle) - { - Status status; - status = GDIPlus.GdipDrawArcI (nativeObject, pen.nativeObject, - x, y, width, height, startAngle, sweepAngle); - GDIPlus.CheckStatus (status); - } - - public void DrawBezier (Pen pen, PointF pt1, PointF pt2, PointF pt3, PointF pt4) - { - Status status; - status = GDIPlus.GdipDrawBezier (nativeObject, pen.nativeObject, - pt1.X, pt1.Y, pt2.X, pt2.Y, pt3.X, - pt3.Y, pt4.X, pt4.Y); - GDIPlus.CheckStatus (status); - } - - public void DrawBezier (Pen pen, Point pt1, Point pt2, Point pt3, Point pt4) - { - Status status; - status = GDIPlus.GdipDrawBezierI (nativeObject, pen.nativeObject, - pt1.X, pt1.Y, pt2.X, pt2.Y, pt3.X, - pt3.Y, pt4.X, pt4.Y); - GDIPlus.CheckStatus (status); - } - - public void DrawBezier (Pen pen, float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4) - { - Status status; - status = GDIPlus.GdipDrawBezier (nativeObject, pen.nativeObject, x1, - y1, x2, y2, x3, y3, x4, y4); - GDIPlus.CheckStatus (status); - } - - public void DrawBeziers (Pen pen, Point [] points) - { - int length = points.Length; - Status status; - - if (length < 3) - return; - - for (int i = 0; i < length; i += 3) { - Point p1 = points [i]; - Point p2 = points [i + 1]; - Point p3 = points [i + 2]; - Point p4 = points [i + 3]; - - status = GDIPlus.GdipDrawBezier (nativeObject, - pen.nativeObject, - p1.X, p1.Y, p2.X, p2.Y, - p3.X, p3.Y, p4.X, p4.Y); - GDIPlus.CheckStatus (status); - } - } - - public void DrawBeziers (Pen pen, PointF [] points) - { - int length = points.Length; - Status status; - - if (length < 3) - return; - - for (int i = 0; i < length; i += 3) { - PointF p1 = points [i]; - PointF p2 = points [i + 1]; - PointF p3 = points [i + 2]; - PointF p4 = points [i + 3]; - - status = GDIPlus.GdipDrawBezier (nativeObject, - pen.nativeObject, - p1.X, p1.Y, p2.X, p2.Y, - p3.X, p3.Y, p4.X, p4.Y); - GDIPlus.CheckStatus (status); - } - } - - - public void DrawClosedCurve (Pen pen, PointF [] points) - { - Status status; - status = GDIPlus.GdipDrawClosedCurve (nativeObject, pen.nativeObject, points, points.Length); - GDIPlus.CheckStatus (status); - } - - public void DrawClosedCurve (Pen pen, Point [] points) - { - Status status; - status = GDIPlus.GdipDrawClosedCurveI (nativeObject, pen.nativeObject, points, points.Length); - GDIPlus.CheckStatus (status); - } - - public void DrawClosedCurve (Pen pen, Point [] points, float tension, FillMode fillmode) - { - Status status; - status = GDIPlus.GdipDrawClosedCurve2I (nativeObject, pen.nativeObject, points, points.Length, tension); - GDIPlus.CheckStatus (status); - } - - public void DrawClosedCurve (Pen pen, PointF [] points, float tension, FillMode fillmode) - { - Status status; - status = GDIPlus.GdipDrawClosedCurve2 (nativeObject, pen.nativeObject, points, points.Length, tension); - GDIPlus.CheckStatus (status); - } - - public void DrawCurve (Pen pen, Point [] points) - { - Status status; - status = GDIPlus.GdipDrawCurveI (nativeObject, pen.nativeObject, points, points.Length); - GDIPlus.CheckStatus (status); - } - - public void DrawCurve (Pen pen, PointF [] points) - { - Status status; - status = GDIPlus.GdipDrawCurve (nativeObject, pen.nativeObject, points, points.Length); - GDIPlus.CheckStatus (status); - } - - public void DrawCurve (Pen pen, PointF [] points, float tension) - { - Status status; - status = GDIPlus.GdipDrawCurve2 (nativeObject, pen.nativeObject, points, points.Length, tension); - GDIPlus.CheckStatus (status); - } - - public void DrawCurve (Pen pen, Point [] points, float tension) - { - Status status; - status = GDIPlus.GdipDrawCurve2I (nativeObject, pen.nativeObject, points, points.Length, tension); - GDIPlus.CheckStatus (status); - } - - - public void DrawCurve (Pen pen, PointF [] points, int offset, int numberOfSegments) - { - Status status; - status = GDIPlus.GdipDrawCurve3 (nativeObject, pen.nativeObject, - points, points.Length, offset, - numberOfSegments, 0.5f); - GDIPlus.CheckStatus (status); - } - - public void DrawCurve (Pen pen, Point [] points, int offset, int numberOfSegments, float tension) - { - Status status; - status = GDIPlus.GdipDrawCurve3I (nativeObject, pen.nativeObject, - points, points.Length, offset, - numberOfSegments, tension); - GDIPlus.CheckStatus (status); - } - - - public void DrawCurve (Pen pen, PointF [] points, int offset, int numberOfSegments, float tension) - { - Status status; - status = GDIPlus.GdipDrawCurve3 (nativeObject, pen.nativeObject, - points, points.Length, offset, - numberOfSegments, tension); - GDIPlus.CheckStatus (status); - } - - public void DrawEllipse (Pen pen, Rectangle rect) - { - DrawEllipse (pen, rect.X, rect.Y, rect.Width, rect.Height); - } - - public void DrawEllipse (Pen pen, RectangleF rect) - { - DrawEllipse (pen, rect.X, rect.Y, rect.Width, rect.Height); - } - - public void DrawEllipse (Pen pen, int x, int y, int width, int height) - { - Status status; - status = GDIPlus.GdipDrawEllipseI (nativeObject, pen.nativeObject, x, y, width, height); - GDIPlus.CheckStatus (status); - } - - public void DrawEllipse (Pen pen, float x, float y, float width, float height) - { - Status status = GDIPlus.GdipDrawEllipse (nativeObject, pen.nativeObject, x, y, width, height); - GDIPlus.CheckStatus (status); - } - - public void DrawIcon (Icon icon, Rectangle targetRect) - { - Image img = icon.ToBitmap (); - DrawImage (img, targetRect); - } - - public void DrawIcon (Icon icon, int x, int y) - { - Image img = icon.ToBitmap (); - DrawImage (img, x, y); - } - - public void DrawIconUnstretched (Icon icon, Rectangle targetRect) - { - Image img = icon.ToBitmap (); - DrawImageUnscaled (img, targetRect); - } - - public void DrawImage (Image image, RectangleF rect) - { - Status status = GDIPlus.GdipDrawImageRect(nativeObject, image.NativeObject, rect.X, rect.Y, rect.Width, rect.Height); - GDIPlus.CheckStatus (status); - } - - - public void DrawImage (Image image, PointF point) - { - Status status = GDIPlus.GdipDrawImage (nativeObject, image.NativeObject, point.X, point.Y); - GDIPlus.CheckStatus (status); - } - - - public void DrawImage (Image image, Point [] destPoints) - { - Status status = GDIPlus.GdipDrawImagePointsI (nativeObject, image.NativeObject, destPoints, destPoints.Length); - GDIPlus.CheckStatus (status); - } - - - public void DrawImage (Image image, Point point) - { - DrawImage (image, point.X, point.Y); - } - - - public void DrawImage (Image image, Rectangle rect) - { - DrawImage (image, rect.X, rect.Y, rect.Width, rect.Height); - } - - - public void DrawImage (Image image, PointF [] destPoints) - { - Status status = GDIPlus.GdipDrawImagePoints (nativeObject, image.NativeObject, destPoints, destPoints.Length); - GDIPlus.CheckStatus (status); - } - - - public void DrawImage (Image image, int x, int y) - { - Status status = GDIPlus.GdipDrawImageI (nativeObject, image.NativeObject, x, y); - GDIPlus.CheckStatus (status); - } - - - public void DrawImage (Image image, float x, float y) - { - Status status = GDIPlus.GdipDrawImage (nativeObject, image.NativeObject, x, y); - GDIPlus.CheckStatus (status); - } - - - public void DrawImage (Image image, Rectangle destRect, Rectangle srcRect, GraphicsUnit srcUnit) - { - Status status = GDIPlus.GdipDrawImageRectRectI (nativeObject, image.NativeObject, - destRect.X, destRect.Y, destRect.Width, destRect.Height, - srcRect.X, srcRect.Y, srcRect.Width, srcRect.Height, - srcUnit, IntPtr.Zero, null, IntPtr.Zero); - GDIPlus.CheckStatus (status); - } - - public void DrawImage (Image image, RectangleF destRect, RectangleF srcRect, GraphicsUnit srcUnit) - { - Status status = GDIPlus.GdipDrawImageRectRect (nativeObject, image.NativeObject, - destRect.X, destRect.Y, destRect.Width, destRect.Height, - srcRect.X, srcRect.Y, srcRect.Width, srcRect.Height, - srcUnit, IntPtr.Zero, null, IntPtr.Zero); - GDIPlus.CheckStatus (status); - } - - - public void DrawImage (Image image, Point [] destPoints, Rectangle srcRect, GraphicsUnit srcUnit) - { - Status status = GDIPlus.GdipDrawImagePointsRectI (nativeObject, image.NativeObject, - destPoints, destPoints.Length , srcRect.X, srcRect.Y, - srcRect.Width, srcRect.Height, srcUnit, IntPtr.Zero, - null, IntPtr.Zero); - GDIPlus.CheckStatus (status); - } - - - public void DrawImage (Image image, PointF [] destPoints, RectangleF srcRect, GraphicsUnit srcUnit) - { - - Status status = GDIPlus.GdipDrawImagePointsRect (nativeObject, image.NativeObject, - destPoints, destPoints.Length , srcRect.X, srcRect.Y, - srcRect.Width, srcRect.Height, srcUnit, IntPtr.Zero, - null, IntPtr.Zero); - GDIPlus.CheckStatus (status); - } - - - public void DrawImage (Image image, Point [] destPoints, Rectangle srcRect, GraphicsUnit srcUnit, - ImageAttributes imageAttr) - { - Status status = GDIPlus.GdipDrawImagePointsRectI (nativeObject, image.NativeObject, - destPoints, destPoints.Length , srcRect.X, srcRect.Y, - srcRect.Width, srcRect.Height, srcUnit, - imageAttr.NativeObject, null, IntPtr.Zero); - GDIPlus.CheckStatus (status); - } - - public void DrawImage (Image image, float x, float y, float width, float height) - { - Status status = GDIPlus.GdipDrawImageRect(nativeObject, image.NativeObject, x, y, - width, height); - GDIPlus.CheckStatus (status); - } - - - public void DrawImage (Image image, PointF [] destPoints, RectangleF srcRect, GraphicsUnit srcUnit, - ImageAttributes imageAttr) - { - Status status = GDIPlus.GdipDrawImagePointsRect (nativeObject, image.NativeObject, - destPoints, destPoints.Length , srcRect.X, srcRect.Y, - srcRect.Width, srcRect.Height, srcUnit, - imageAttr.NativeObject, null, IntPtr.Zero); - GDIPlus.CheckStatus (status); - } - - - public void DrawImage (Image image, int x, int y, Rectangle srcRect, GraphicsUnit srcUnit) - { - Status status = GDIPlus.GdipDrawImagePointRectI(nativeObject, image.NativeObject, x, y, srcRect.X, srcRect.Y, srcRect.Width, srcRect.Height, srcUnit); - GDIPlus.CheckStatus (status); - } - - public void DrawImage (Image image, int x, int y, int width, int height) - { - Status status = GDIPlus.GdipDrawImageRectI (nativeObject, image.nativeObject, x, y, width, height); - GDIPlus.CheckStatus (status); - } - - public void DrawImage (Image image, float x, float y, RectangleF srcRect, GraphicsUnit srcUnit) - { - Status status = GDIPlus.GdipDrawImagePointRect (nativeObject, image.nativeObject, x, y, srcRect.X, srcRect.Y, srcRect.Width, srcRect.Height, srcUnit); - GDIPlus.CheckStatus (status); - } - - - public void DrawImage (Image image, PointF [] destPoints, RectangleF srcRect, GraphicsUnit srcUnit, ImageAttributes imageAttr, DrawImageAbort callback) - { - Status status = GDIPlus.GdipDrawImagePointsRect (nativeObject, image.NativeObject, - destPoints, destPoints.Length , srcRect.X, srcRect.Y, - srcRect.Width, srcRect.Height, srcUnit, - imageAttr.NativeObject, callback, IntPtr.Zero); - GDIPlus.CheckStatus (status); - } - - - public void DrawImage (Image image, Point [] destPoints, Rectangle srcRect, GraphicsUnit srcUnit, ImageAttributes imageAttr, DrawImageAbort callback) - { - - Status status = GDIPlus.GdipDrawImagePointsRectI (nativeObject, image.NativeObject, - destPoints, destPoints.Length , srcRect.X, srcRect.Y, - srcRect.Width, srcRect.Height, srcUnit, - imageAttr.NativeObject, callback, IntPtr.Zero); - GDIPlus.CheckStatus (status); - } - - - public void DrawImage (Image image, Point [] destPoints, Rectangle srcRect, GraphicsUnit srcUnit, ImageAttributes imageAttr, DrawImageAbort callback, int callbackData) - { - - Status status = GDIPlus.GdipDrawImagePointsRectI (nativeObject, image.NativeObject, - destPoints, destPoints.Length , srcRect.X, srcRect.Y, - srcRect.Width, srcRect.Height, srcUnit, - imageAttr.NativeObject, callback, (IntPtr) callbackData); - GDIPlus.CheckStatus (status); - } - - - public void DrawImage (Image image, Rectangle destRect, float srcX, float srcY, float srcWidth, float srcHeight, GraphicsUnit srcUnit) - { - Status status = GDIPlus.GdipDrawImageRectRect (nativeObject, image.NativeObject, - destRect.X, destRect.Y, destRect.Width, destRect.Height, - srcX, srcY, srcWidth, srcHeight, srcUnit, IntPtr.Zero, - null, IntPtr.Zero); - GDIPlus.CheckStatus (status); - } - - public void DrawImage (Image image, PointF [] destPoints, RectangleF srcRect, GraphicsUnit srcUnit, ImageAttributes imageAttr, DrawImageAbort callback, int callbackData) - { - Status status = GDIPlus.GdipDrawImagePointsRect (nativeObject, image.NativeObject, - destPoints, destPoints.Length , srcRect.X, srcRect.Y, - srcRect.Width, srcRect.Height, srcUnit, - imageAttr.NativeObject, callback, (IntPtr) callbackData); - GDIPlus.CheckStatus (status); - } - - - public void DrawImage (Image image, Rectangle destRect, int srcX, int srcY, int srcWidth, int srcHeight, GraphicsUnit srcUnit) - { - Status status = GDIPlus.GdipDrawImageRectRectI (nativeObject, image.NativeObject, - destRect.X, destRect.Y, destRect.Width, destRect.Height, - srcX, srcY, srcWidth, srcHeight, srcUnit, IntPtr.Zero, - null, IntPtr.Zero); - GDIPlus.CheckStatus (status); - } - - - public void DrawImage (Image image, Rectangle destRect, float srcX, float srcY, float srcWidth, float srcHeight, GraphicsUnit srcUnit, ImageAttributes imageAttrs) - { - Status status = GDIPlus.GdipDrawImageRectRect (nativeObject, image.NativeObject, - destRect.X, destRect.Y, destRect.Width, destRect.Height, - srcX, srcY, srcWidth, srcHeight, srcUnit, - imageAttrs.NativeObject, null, IntPtr.Zero); - GDIPlus.CheckStatus (status); - } - - public void DrawImage (Image image, Rectangle destRect, int srcX, int srcY, int srcWidth, int srcHeight, GraphicsUnit srcUnit, ImageAttributes imageAttr) - { - Status status = GDIPlus.GdipDrawImageRectRectI (nativeObject, image.NativeObject, - destRect.X, destRect.Y, destRect.Width, - destRect.Height, srcX, srcY, srcWidth, srcHeight, - srcUnit, imageAttr.NativeObject, null, IntPtr.Zero); - GDIPlus.CheckStatus (status); - } - - public void DrawImage (Image image, Rectangle destRect, int srcX, int srcY, int srcWidth, int srcHeight, GraphicsUnit srcUnit, ImageAttributes imageAttr, DrawImageAbort callback) - { - Status status = GDIPlus.GdipDrawImageRectRectI (nativeObject, image.NativeObject, - destRect.X, destRect.Y, destRect.Width, - destRect.Height, srcX, srcY, srcWidth, srcHeight, - srcUnit, imageAttr.NativeObject, callback, - IntPtr.Zero); - GDIPlus.CheckStatus (status); - } - - public void DrawImage (Image image, Rectangle destRect, float srcX, float srcY, float srcWidth, float srcHeight, GraphicsUnit srcUnit, ImageAttributes imageAttr, DrawImageAbort callback) - { - Status status = GDIPlus.GdipDrawImageRectRect (nativeObject, image.NativeObject, - destRect.X, destRect.Y, destRect.Width, - destRect.Height, srcX, srcY, srcWidth, srcHeight, - srcUnit, imageAttr.NativeObject, - callback, IntPtr.Zero); - GDIPlus.CheckStatus (status); - } - - - public void DrawImage (Image image, Rectangle destRect, float srcX, float srcY, float srcWidth, float srcHeight, GraphicsUnit srcUnit, ImageAttributes imageAttr, DrawImageAbort callback, IntPtr callbackData) - { - Status status = GDIPlus.GdipDrawImageRectRect (nativeObject, image.NativeObject, - destRect.X, destRect.Y, destRect.Width, destRect.Height, - srcX, srcY, srcWidth, srcHeight, srcUnit, - imageAttr.NativeObject, callback, callbackData); - GDIPlus.CheckStatus (status); - } - - - public void DrawImage (Image image, Rectangle destRect, int srcX, int srcY, int srcWidth, int srcHeight, GraphicsUnit srcUnit, ImageAttributes imageAttr, DrawImageAbort callback, IntPtr callbackData) - { - Status status = GDIPlus.GdipDrawImageRectRect (nativeObject, image.NativeObject, - destRect.X, destRect.Y, destRect.Width, destRect.Height, - srcX, srcY, srcWidth, srcHeight, srcUnit, - imageAttr.NativeObject, callback, callbackData); - GDIPlus.CheckStatus (status); - } - - public void DrawImageUnscaled (Image image, Point point) - { - DrawImageUnscaled (image, point.X, point.Y); - } - - public void DrawImageUnscaled (Image image, Rectangle rect) - { - DrawImageUnscaled (image, rect.X, rect.Y, rect.Width, rect.Height); - } - - public void DrawImageUnscaled (Image image, int x, int y) - { - DrawImage (image, x, y, image.Width, image.Height); - } - - public void DrawImageUnscaled (Image image, int x, int y, int width, int height) - { - Image tmpImg = new Bitmap (width, height); - Graphics g = FromImage (tmpImg); - g.DrawImage (image, 0, 0, image.Width, image.Height); - this.DrawImage (tmpImg, x, y, width, height); - tmpImg.Dispose (); - g.Dispose (); - } - - public void DrawLine (Pen pen, PointF pt1, PointF pt2) - { - Status status = GDIPlus.GdipDrawLine (nativeObject, pen.nativeObject, - pt1.X, pt1.Y, pt2.X, pt2.Y); - GDIPlus.CheckStatus (status); - } - - public void DrawLine (Pen pen, Point pt1, Point pt2) - { - Status status = GDIPlus.GdipDrawLineI (nativeObject, pen.nativeObject, - pt1.X, pt1.Y, pt2.X, pt2.Y); - GDIPlus.CheckStatus (status); - } - - public void DrawLine (Pen pen, int x1, int y1, int x2, int y2) - { - Status status = GDIPlus.GdipDrawLineI (nativeObject, pen.nativeObject, x1, y1, x2, y2); - GDIPlus.CheckStatus (status); - } - - public void DrawLine (Pen pen, float x1, float y1, float x2, float y2) - { - Status status = GDIPlus.GdipDrawLine (nativeObject, pen.nativeObject, x1, y1, x2, y2); - GDIPlus.CheckStatus (status); - } - - public void DrawLines (Pen pen, PointF [] points) - { - Status status = GDIPlus.GdipDrawLines (nativeObject, pen.nativeObject, points, points.Length); - GDIPlus.CheckStatus (status); - } - - public void DrawLines (Pen pen, Point [] points) - { - Status status = GDIPlus.GdipDrawLinesI (nativeObject, pen.nativeObject, points, points.Length); - GDIPlus.CheckStatus (status); - } - - public void DrawPath (Pen pen, GraphicsPath path) - { - Status status = GDIPlus.GdipDrawPath (nativeObject, pen.nativeObject, path.nativePath); - GDIPlus.CheckStatus (status); - } - - public void DrawPie (Pen pen, Rectangle rect, float startAngle, float sweepAngle) - { - DrawPie (pen, rect.X, rect.Y, rect.Width, rect.Height, startAngle, sweepAngle); - } - - public void DrawPie (Pen pen, RectangleF rect, float startAngle, float sweepAngle) - { - DrawPie (pen, rect.X, rect.Y, rect.Width, rect.Height, startAngle, sweepAngle); - } - - public void DrawPie (Pen pen, float x, float y, float width, float height, float startAngle, float sweepAngle) - { - Status status = GDIPlus.GdipDrawPie (nativeObject, pen.nativeObject, x, y, width, height, startAngle, sweepAngle); - GDIPlus.CheckStatus (status); - } - - // Microsoft documentation states that the signature for this member should be - // public void DrawPie(Pen pen, int x, int y, int width, int height, int startAngle - // int sweepAngle. However, GdipDrawPieI uses also float for the startAngle and sweepAngle params - public void DrawPie (Pen pen, int x, int y, int width, int height, int startAngle, int sweepAngle) - { - Status status = GDIPlus.GdipDrawPieI (nativeObject, pen.nativeObject, x, y, width, height, startAngle, sweepAngle); - GDIPlus.CheckStatus (status); - } - - public void DrawPolygon (Pen pen, Point [] points) - { - Status status = GDIPlus.GdipDrawPolygonI (nativeObject, pen.nativeObject, points, points.Length); - GDIPlus.CheckStatus (status); - } - - public void DrawPolygon (Pen pen, PointF [] points) - { - Status status = GDIPlus.GdipDrawPolygon (nativeObject, pen.nativeObject, points, points.Length); - GDIPlus.CheckStatus (status); - } - - internal void DrawRectangle (Pen pen, RectangleF rect) - { - DrawRectangle (pen, rect.Left, rect.Top, rect.Width, rect.Height); - } - - public void DrawRectangle (Pen pen, Rectangle rect) - { - DrawRectangle (pen, rect.Left, rect.Top, rect.Width, rect.Height); - } - - public void DrawRectangle (Pen pen, float x, float y, float width, float height) - { - Status status = GDIPlus.GdipDrawRectangle (nativeObject, pen.nativeObject, x, y, width, height); - GDIPlus.CheckStatus (status); - } - - public void DrawRectangle (Pen pen, int x, int y, int width, int height) - { - Status status = GDIPlus.GdipDrawRectangleI (nativeObject, pen.nativeObject, x, y, width, height); - GDIPlus.CheckStatus (status); - } - - public void DrawRectangles (Pen pen, RectangleF [] rects) - { - Status status = GDIPlus.GdipDrawRectangles (nativeObject, pen.nativeObject, rects, rects.Length); - GDIPlus.CheckStatus (status); - } - - public void DrawRectangles (Pen pen, Rectangle [] rects) - { - Status status = GDIPlus.GdipDrawRectanglesI (nativeObject, pen.nativeObject, rects, rects.Length); - GDIPlus.CheckStatus (status); - } - - public void DrawString (string s, Font font, Brush brush, RectangleF layoutRectangle) - { - DrawString (s, font, brush, layoutRectangle, null); - } - - public void DrawString (string s, Font font, Brush brush, PointF point) - { - DrawString (s, font, brush, new RectangleF (point.X, point.Y, 0, 0), null); - } - - public void DrawString (string s, Font font, Brush brush, PointF point, StringFormat format) - { - DrawString(s, font, brush, new RectangleF(point.X, point.Y, 0, 0), format); - } - - public void DrawString (string s, Font font, Brush brush, float x, float y) - { - DrawString (s, font, brush, new RectangleF (x, y, 0, 0), null); - } - - public void DrawString (string s, Font font, Brush brush, float x, float y, StringFormat format) - { - DrawString (s, font, brush, new RectangleF(x, y, 0, 0), format); - } - - public void DrawString (string s, Font font, Brush brush, RectangleF layoutRectangle, StringFormat format) - { - if (font == null) - throw new ArgumentNullException ("font"); - if (brush == null) - throw new ArgumentNullException ("brush"); - if (s == null || s.Length == 0) - return; - - Status status = GDIPlus.GdipDrawString (nativeObject, s, s.Length, font.NativeObject, ref layoutRectangle, format != null ? format.NativeObject : IntPtr.Zero, brush.nativeObject); - GDIPlus.CheckStatus (status); - } - - public void EndContainer (GraphicsContainer container) - { - Status status = GDIPlus.GdipEndContainer(nativeObject, container.NativeObject); - GDIPlus.CheckStatus (status); - } - - [MonoTODO] - public void EnumerateMetafile (Metafile metafile, Point [] destPoints, EnumerateMetafileProc callback) - { - throw new NotImplementedException (); - } - - [MonoTODO] - public void EnumerateMetafile (Metafile metafile, RectangleF destRect, EnumerateMetafileProc callback) - { - throw new NotImplementedException (); - } - - [MonoTODO] - public void EnumerateMetafile (Metafile metafile, PointF [] destPoints, EnumerateMetafileProc callback) - { - throw new NotImplementedException (); - } - - [MonoTODO] - public void EnumerateMetafile (Metafile metafile, Rectangle destRect, EnumerateMetafileProc callback) - { - throw new NotImplementedException (); - } - - [MonoTODO] - public void EnumerateMetafile (Metafile metafile, Point destPoint, EnumerateMetafileProc callback) - { - throw new NotImplementedException (); - } - - [MonoTODO] - public void EnumerateMetafile (Metafile metafile, PointF destPoint, EnumerateMetafileProc callback) - { - throw new NotImplementedException (); - } - - [MonoTODO] - public void EnumerateMetafile (Metafile metafile, PointF destPoint, EnumerateMetafileProc callback, IntPtr callbackData) - { - throw new NotImplementedException (); - } - - [MonoTODO] - public void EnumerateMetafile (Metafile metafile, Rectangle destRect, EnumerateMetafileProc callback, IntPtr callbackData) - { - throw new NotImplementedException (); - } - - [MonoTODO] - public void EnumerateMetafile (Metafile metafile, PointF [] destPoints, EnumerateMetafileProc callback, IntPtr callbackData) - { - throw new NotImplementedException (); - } - - [MonoTODO] - public void EnumerateMetafile (Metafile metafile, Point destPoint, EnumerateMetafileProc callback, IntPtr callbackData) - { - throw new NotImplementedException (); - } - - [MonoTODO] - public void EnumerateMetafile (Metafile metafile, Point [] destPoints, EnumerateMetafileProc callback, IntPtr callbackData) - { - throw new NotImplementedException (); - } - - [MonoTODO] - public void EnumerateMetafile (Metafile metafile, RectangleF destRect, EnumerateMetafileProc callback, IntPtr callbackData) - { - throw new NotImplementedException (); - } - - [MonoTODO] - public void EnumerateMetafile (Metafile metafile, PointF destPoint, RectangleF srcRect, GraphicsUnit srcUnit, EnumerateMetafileProc callback) - { - throw new NotImplementedException (); - } - - [MonoTODO] - public void EnumerateMetafile (Metafile metafile, Point destPoint, Rectangle srcRect, GraphicsUnit srcUnit, EnumerateMetafileProc callback) - { - throw new NotImplementedException (); - } - - [MonoTODO] - public void EnumerateMetafile (Metafile metafile, PointF [] destPoints, RectangleF srcRect, GraphicsUnit srcUnit, EnumerateMetafileProc callback) - { - throw new NotImplementedException (); - } - - [MonoTODO] - public void EnumerateMetafile (Metafile metafile, Point [] destPoints, Rectangle srcRect, GraphicsUnit srcUnit, EnumerateMetafileProc callback) - { - throw new NotImplementedException (); - } - - [MonoTODO] - public void EnumerateMetafile (Metafile metafile, RectangleF destRect, RectangleF srcRect, GraphicsUnit srcUnit, EnumerateMetafileProc callback) - { - throw new NotImplementedException (); - } - - [MonoTODO] - public void EnumerateMetafile (Metafile metafile, Rectangle destRect, Rectangle srcRect, GraphicsUnit srcUnit, EnumerateMetafileProc callback) - { - throw new NotImplementedException (); - } - - [MonoTODO] - public void EnumerateMetafile (Metafile metafile, RectangleF destRect, EnumerateMetafileProc callback, IntPtr callbackData, ImageAttributes imageAttr) - { - throw new NotImplementedException (); - } - - [MonoTODO] - public void EnumerateMetafile (Metafile metafile, Point destPoint, EnumerateMetafileProc callback, IntPtr callbackData, ImageAttributes imageAttr) - { - throw new NotImplementedException (); - } - - [MonoTODO] - public void EnumerateMetafile (Metafile metafile, PointF destPoint, EnumerateMetafileProc callback, IntPtr callbackData, ImageAttributes imageAttr) - { - throw new NotImplementedException (); - } - - [MonoTODO] - public void EnumerateMetafile (Metafile metafile, Point [] destPoints, EnumerateMetafileProc callback, IntPtr callbackData, ImageAttributes imageAttr) - { - throw new NotImplementedException (); - } - - [MonoTODO] - public void EnumerateMetafile (Metafile metafile, PointF [] destPoints, EnumerateMetafileProc callback, IntPtr callbackData, ImageAttributes imageAttr) - { - throw new NotImplementedException (); - } - - [MonoTODO] - public void EnumerateMetafile (Metafile metafile, Rectangle destRect, EnumerateMetafileProc callback, IntPtr callbackData, ImageAttributes imageAttr) - { - throw new NotImplementedException (); - } - - [MonoTODO] - public void EnumerateMetafile (Metafile metafile, Rectangle destRect, Rectangle srcRect, GraphicsUnit srcUnit, EnumerateMetafileProc callback, IntPtr callbackData) - { - throw new NotImplementedException (); - } - - [MonoTODO] - public void EnumerateMetafile (Metafile metafile, PointF [] destPoints, RectangleF srcRect, GraphicsUnit srcUnit, EnumerateMetafileProc callback, IntPtr callbackData) - { - throw new NotImplementedException (); - } - - [MonoTODO] - public void EnumerateMetafile (Metafile metafile, RectangleF destRect, RectangleF srcRect, GraphicsUnit srcUnit, EnumerateMetafileProc callback, IntPtr callbackData) - { - throw new NotImplementedException (); - } - - [MonoTODO] - public void EnumerateMetafile (Metafile metafile, PointF destPoint, RectangleF srcRect, GraphicsUnit srcUnit, EnumerateMetafileProc callback, IntPtr callbackData) - { - throw new NotImplementedException (); - } - - [MonoTODO] - public void EnumerateMetafile (Metafile metafile, Point destPoint, Rectangle srcRect, GraphicsUnit srcUnit, EnumerateMetafileProc callback, IntPtr callbackData) - { - throw new NotImplementedException (); - } - - [MonoTODO] - public void EnumerateMetafile (Metafile metafile, Point [] destPoints, Rectangle srcRect, GraphicsUnit srcUnit, EnumerateMetafileProc callback, IntPtr callbackData) - { - throw new NotImplementedException (); - } - - [MonoTODO] - public void EnumerateMetafile (Metafile metafile, Point [] destPoints, Rectangle srcRect, GraphicsUnit unit, EnumerateMetafileProc callback, IntPtr callbackData, ImageAttributes imageAttr) - { - throw new NotImplementedException (); - } - - [MonoTODO] - public void EnumerateMetafile (Metafile metafile, Rectangle destRect, Rectangle srcRect, GraphicsUnit unit, EnumerateMetafileProc callback, IntPtr callbackData, ImageAttributes imageAttr) - { - throw new NotImplementedException (); - } - - [MonoTODO] - public void EnumerateMetafile (Metafile metafile, Point destPoint, Rectangle srcRect, GraphicsUnit unit, EnumerateMetafileProc callback, IntPtr callbackData, ImageAttributes imageAttr) - { - throw new NotImplementedException (); - } - - [MonoTODO] - public void EnumerateMetafile (Metafile metafile, RectangleF destRect, RectangleF srcRect, GraphicsUnit unit, EnumerateMetafileProc callback, IntPtr callbackData, ImageAttributes imageAttr) - { - throw new NotImplementedException (); - } - - [MonoTODO] - public void EnumerateMetafile (Metafile metafile, PointF [] destPoints, RectangleF srcRect, GraphicsUnit unit, EnumerateMetafileProc callback, IntPtr callbackData, ImageAttributes imageAttr) - { - throw new NotImplementedException (); - } - - [MonoTODO] - public void EnumerateMetafile (Metafile metafile, PointF destPoint, RectangleF srcRect, GraphicsUnit unit, EnumerateMetafileProc callback, IntPtr callbackData, ImageAttributes imageAttr) - { - throw new NotImplementedException (); - } - - public void ExcludeClip (Rectangle rect) - { - Status status = GDIPlus.GdipSetClipRectI (nativeObject, rect.X, rect.Y, rect.Width, rect.Height, CombineMode.Exclude); - GDIPlus.CheckStatus (status); - } - - public void ExcludeClip (Region region) - { - Status status = GDIPlus.GdipSetClipRegion (nativeObject, region.NativeObject, CombineMode.Exclude); - GDIPlus.CheckStatus (status); - } - - - public void FillClosedCurve (Brush brush, PointF [] points) - { - Status status = GDIPlus.GdipFillClosedCurve (nativeObject, brush.NativeObject, points, points.Length); - GDIPlus.CheckStatus (status); - } - - - public void FillClosedCurve (Brush brush, Point [] points) - { - Status status = GDIPlus.GdipFillClosedCurveI (nativeObject, brush.NativeObject, points, points.Length); - GDIPlus.CheckStatus (status); - } - - - public void FillClosedCurve (Brush brush, PointF [] points, FillMode fillmode) - { - FillClosedCurve (brush, points, fillmode, 0.5f); - } - - public void FillClosedCurve (Brush brush, Point [] points, FillMode fillmode) - { - FillClosedCurve (brush, points, fillmode, 0.5f); - } - - public void FillClosedCurve (Brush brush, PointF [] points, FillMode fillmode, float tension) - { - Status status = GDIPlus.GdipFillClosedCurve2 (nativeObject, brush.NativeObject, points, points.Length, tension, fillmode); - GDIPlus.CheckStatus (status); - } - - public void FillClosedCurve (Brush brush, Point [] points, FillMode fillmode, float tension) - { - Status status = GDIPlus.GdipFillClosedCurve2I (nativeObject, brush.NativeObject, points, points.Length, tension, fillmode); - GDIPlus.CheckStatus (status); - } - - public void FillEllipse (Brush brush, Rectangle rect) - { - FillEllipse (brush, rect.X, rect.Y, rect.Width, rect.Height); - } - - public void FillEllipse (Brush brush, RectangleF rect) - { - FillEllipse (brush, rect.X, rect.Y, rect.Width, rect.Height); - } - - public void FillEllipse (Brush brush, float x, float y, float width, float height) - { - Status status = GDIPlus.GdipFillEllipse (nativeObject, brush.nativeObject, x, y, width, height); - GDIPlus.CheckStatus (status); - } - - public void FillEllipse (Brush brush, int x, int y, int width, int height) - { - Status status = GDIPlus.GdipFillEllipseI (nativeObject, brush.nativeObject, x, y, width, height); - GDIPlus.CheckStatus (status); - } - - public void FillPath (Brush brush, GraphicsPath path) - { - Status status = GDIPlus.GdipFillPath (nativeObject, brush.NativeObject, path.NativeObject); - GDIPlus.CheckStatus (status); - } - - public void FillPie (Brush brush, Rectangle rect, float startAngle, float sweepAngle) - { - Status status = GDIPlus.GdipFillPie (nativeObject, brush.NativeObject, rect.X, rect.Y, rect.Width, rect.Height, startAngle, sweepAngle); - GDIPlus.CheckStatus (status); - } - - public void FillPie (Brush brush, int x, int y, int width, int height, int startAngle, int sweepAngle) - { - Status status = GDIPlus.GdipFillPieI (nativeObject, brush.NativeObject, x, y, width, height, startAngle, sweepAngle); - GDIPlus.CheckStatus (status); - } - - public void FillPie (Brush brush, float x, float y, float width, float height, float startAngle, float sweepAngle) - { - Status status = GDIPlus.GdipFillPie (nativeObject, brush.NativeObject, x, y, width, height, startAngle, sweepAngle); - GDIPlus.CheckStatus (status); - } - - public void FillPolygon (Brush brush, PointF [] points) - { - Status status = GDIPlus.GdipFillPolygon2 (nativeObject, brush.nativeObject, points, points.Length); - GDIPlus.CheckStatus (status); - } - - public void FillPolygon (Brush brush, Point [] points) - { - Status status = GDIPlus.GdipFillPolygon2I (nativeObject, brush.nativeObject, points, points.Length); - GDIPlus.CheckStatus (status); - } - - public void FillPolygon (Brush brush, Point [] points, FillMode fillMode) - { - Status status = GDIPlus.GdipFillPolygonI (nativeObject, brush.nativeObject, points, points.Length, fillMode); - GDIPlus.CheckStatus (status); - } - - public void FillPolygon (Brush brush, PointF [] points, FillMode fillMode) - { - Status status = GDIPlus.GdipFillPolygon (nativeObject, brush.nativeObject, points, points.Length, fillMode); - GDIPlus.CheckStatus (status); - } - - public void FillRectangle (Brush brush, RectangleF rect) - { - FillRectangle (brush, rect.Left, rect.Top, rect.Width, rect.Height); - } - - public void FillRectangle (Brush brush, Rectangle rect) - { - FillRectangle (brush, rect.Left, rect.Top, rect.Width, rect.Height); - } - - public void FillRectangle (Brush brush, int x, int y, int width, int height) - { - Status status = GDIPlus.GdipFillRectangleI (nativeObject, brush.nativeObject, x, y, width, height); - GDIPlus.CheckStatus (status); - } - - public void FillRectangle (Brush brush, float x, float y, float width, float height) - { - Status status = GDIPlus.GdipFillRectangle (nativeObject, brush.nativeObject, x, y, width, height); - GDIPlus.CheckStatus (status); - } - - public void FillRectangles (Brush brush, Rectangle [] rects) - { - Status status = GDIPlus.GdipFillRectanglesI (nativeObject, brush.nativeObject, rects, rects.Length); - GDIPlus.CheckStatus (status); - } - - public void FillRectangles (Brush brush, RectangleF [] rects) - { - Status status = GDIPlus.GdipFillRectangles (nativeObject, brush.nativeObject, rects, rects.Length); - GDIPlus.CheckStatus (status); - } - - - public void FillRegion (Brush brush, Region region) - { - Status status = GDIPlus.GdipFillRegion (nativeObject, brush.NativeObject, region.NativeObject); - GDIPlus.CheckStatus(status); - } - - - public void Flush () - { - Flush (FlushIntention.Flush); - } - - - public void Flush (FlushIntention intention) - { - Status status = GDIPlus.GdipFlush (nativeObject, intention); - GDIPlus.CheckStatus (status); - if (GDIPlus.UseQuartzDrawable || GDIPlus.UseCocoaDrawable) - Carbon.CGContextSynchronize (GDIPlus.Display); - } - - [EditorBrowsable (EditorBrowsableState.Advanced)] - public static Graphics FromHdc (IntPtr hdc) - { - IntPtr graphics; - Status status = GDIPlus.GdipCreateFromHDC (hdc, out graphics); - GDIPlus.CheckStatus (status); - return new Graphics (graphics); - } - - [MonoTODO] - [EditorBrowsable (EditorBrowsableState.Advanced)] - public static Graphics FromHdc (IntPtr hdc, IntPtr hdevice) - { - throw new NotImplementedException (); - } - - [EditorBrowsable (EditorBrowsableState.Advanced)] - [SecurityPermission (SecurityAction.LinkDemand, UnmanagedCode = true)] - public static Graphics FromHdcInternal (IntPtr hdc) - { - GDIPlus.Display = hdc; - return null; - } - - [EditorBrowsable (EditorBrowsableState.Advanced)] - public static Graphics FromHwnd (IntPtr hwnd) - { - IntPtr graphics; - - if (GDIPlus.UseCocoaDrawable) { - CarbonContext cgContext = Carbon.GetCGContextForNSView (hwnd); - GDIPlus.GdipCreateFromQuartz_macosx (cgContext.ctx, cgContext.width, cgContext.height, out graphics); - - GDIPlus.Display = cgContext.ctx; - return new Graphics (graphics); - } - if (GDIPlus.UseQuartzDrawable) { - CarbonContext cgContext = Carbon.GetCGContextForView (hwnd); - GDIPlus.GdipCreateFromQuartz_macosx (cgContext.ctx, cgContext.width, cgContext.height, out graphics); - - GDIPlus.Display = cgContext.ctx; - return new Graphics (graphics); - } - if (GDIPlus.UseX11Drawable) { - if (GDIPlus.Display == IntPtr.Zero) { - GDIPlus.Display = GDIPlus.XOpenDisplay (IntPtr.Zero); - } - - return FromXDrawable (hwnd, GDIPlus.Display); - - } - - Status status = GDIPlus.GdipCreateFromHWND (hwnd, out graphics); - GDIPlus.CheckStatus (status); - - return new Graphics (graphics); - } - - [EditorBrowsable (EditorBrowsableState.Advanced)] - [SecurityPermission (SecurityAction.LinkDemand, UnmanagedCode = true)] - public static Graphics FromHwndInternal (IntPtr hwnd) - { - return FromHwnd (hwnd); - } - - public static Graphics FromImage (Image image) - { - IntPtr graphics; - - if (image == null) - throw new ArgumentNullException (); - - Status status = GDIPlus.GdipGetImageGraphicsContext (image.nativeObject, out graphics); - GDIPlus.CheckStatus (status); - Graphics result = new Graphics (graphics); - - // check for Unix platforms - see FAQ for more details - // http://www.mono-project.com/FAQ:_Technical#How_to_detect_the_execution_platform_.3F - int platform = (int) Environment.OSVersion.Platform; - if ((platform == 4) || (platform == 128)) { - Rectangle rect = new Rectangle (0,0, image.Width, image.Height); - GDIPlus.GdipSetVisibleClip_linux (result.NativeObject, ref rect); - } - - return result; - } - - internal static Graphics FromXDrawable (IntPtr drawable, IntPtr display) - { - IntPtr graphics; - - Status s = GDIPlus.GdipCreateFromXDrawable_linux (drawable, display, out graphics); - GDIPlus.CheckStatus (s); - return new Graphics (graphics); - } - - [MonoTODO] - public static IntPtr GetHalftonePalette () - { - throw new NotImplementedException (); - } - - [EditorBrowsable (EditorBrowsableState.Advanced)] - public IntPtr GetHdc () - { - IntPtr hdc; - GDIPlus.CheckStatus (GDIPlus.GdipGetDC (this.nativeObject, out hdc)); - return hdc; - } - - - public Color GetNearestColor (Color color) - { - int argb; - - Status status = GDIPlus.GdipGetNearestColor (nativeObject, out argb); - GDIPlus.CheckStatus (status); - - return Color.FromArgb (argb); - } - - - public void IntersectClip (Region region) - { - Status status = GDIPlus.GdipSetClipRegion (nativeObject, region.NativeObject, CombineMode.Intersect); - GDIPlus.CheckStatus (status); - } - - public void IntersectClip (RectangleF rect) - { - Status status = GDIPlus.GdipSetClipRect (nativeObject, rect.X, rect.Y, rect.Width, rect.Height, CombineMode.Intersect); - GDIPlus.CheckStatus (status); - } - - public void IntersectClip (Rectangle rect) - { - Status status = GDIPlus.GdipSetClipRectI (nativeObject, rect.X, rect.Y, rect.Width, rect.Height, CombineMode.Intersect); - GDIPlus.CheckStatus (status); - } - - public bool IsVisible (Point point) - { - bool isVisible = false; - - Status status = GDIPlus.GdipIsVisiblePointI (nativeObject, point.X, point.Y, out isVisible); - GDIPlus.CheckStatus (status); - - return isVisible; - } - - - public bool IsVisible (RectangleF rect) - { - bool isVisible = false; - - Status status = GDIPlus.GdipIsVisibleRect (nativeObject, rect.X, rect.Y, rect.Width, rect.Height, out isVisible); - GDIPlus.CheckStatus (status); - - return isVisible; - } - - public bool IsVisible (PointF point) - { - bool isVisible = false; - - Status status = GDIPlus.GdipIsVisiblePoint (nativeObject, point.X, point.Y, out isVisible); - GDIPlus.CheckStatus (status); - - return isVisible; - } - - public bool IsVisible (Rectangle rect) - { - bool isVisible = false; - - Status status = GDIPlus.GdipIsVisibleRectI (nativeObject, rect.X, rect.Y, rect.Width, rect.Height, out isVisible); - GDIPlus.CheckStatus (status); - - return isVisible; - } - - public bool IsVisible (float x, float y) - { - return IsVisible (new PointF (x, y)); - } - - public bool IsVisible (int x, int y) - { - return IsVisible (new Point (x, y)); - } - - public bool IsVisible (float x, float y, float width, float height) - { - return IsVisible (new RectangleF (x, y, width, height)); - } - - - public bool IsVisible (int x, int y, int width, int height) - { - return IsVisible (new Rectangle (x, y, width, height)); - } - - - public Region [] MeasureCharacterRanges (string text, Font font, RectangleF layoutRect, StringFormat stringFormat) - { - Status status; - int regcount = stringFormat.GetMeasurableCharacterRangeCount (); - IntPtr[] native_regions = new IntPtr [regcount]; - Region[] regions = new Region [regcount]; - - for (int i = 0; i < regcount; i++) { - regions[i] = new Region (); - native_regions[i] = regions[i].NativeObject; - } - - status = GDIPlus.GdipMeasureCharacterRanges (nativeObject, text, text.Length, - font.NativeObject, ref layoutRect, stringFormat.NativeObject, - regcount, out native_regions[0]); - - GDIPlus.CheckStatus (status); - - return regions; - } - - - public SizeF MeasureString (string text, Font font) - { - return MeasureString (text, font, new Size (0, 0)); - } - - - public SizeF MeasureString (string text, Font font, SizeF layoutArea) - { - int charactersFitted, linesFilled; - RectangleF boundingBox = new RectangleF (); - RectangleF rect = new RectangleF (0, 0, layoutArea.Width, - layoutArea.Height); - - if (text == null || text.Length == 0) - return SizeF.Empty; - - if (font == null) - throw new ArgumentNullException ("font"); - - Status status = GDIPlus.GdipMeasureString (nativeObject, text, text.Length, - font.NativeObject, ref rect, - IntPtr.Zero, out boundingBox, - out charactersFitted, out linesFilled); - GDIPlus.CheckStatus (status); - - return new SizeF (boundingBox.Width, boundingBox.Height); - } - - - public SizeF MeasureString (string text, Font font, int width) - { - RectangleF boundingBox = new RectangleF (); - RectangleF rect = new RectangleF (0, 0, width, 999999); - int charactersFitted, linesFilled; - - if (text == null || text.Length == 0) - return SizeF.Empty; - - if (font == null) - throw new ArgumentNullException ("font"); - - Status status = GDIPlus.GdipMeasureString (nativeObject, text, text.Length, - font.NativeObject, ref rect, - IntPtr.Zero, out boundingBox, - out charactersFitted, out linesFilled); - GDIPlus.CheckStatus (status); - - return new SizeF (boundingBox.Width, boundingBox.Height); - } - - - public SizeF MeasureString (string text, Font font, SizeF layoutArea, - StringFormat stringFormat) - { - int charactersFitted, linesFilled; - return MeasureString (text, font, layoutArea, stringFormat, - out charactersFitted, out linesFilled); - } - - - public SizeF MeasureString (string text, Font font, int width, StringFormat format) - { - int charactersFitted, linesFilled; - return MeasureString (text, font, new SizeF (width, 999999), - format, out charactersFitted, out linesFilled); - } - - - public SizeF MeasureString (string text, Font font, PointF origin, - StringFormat stringFormat) - { - RectangleF boundingBox = new RectangleF (); - RectangleF rect = new RectangleF (origin.X, origin.Y, 0, 0); - int charactersFitted, linesFilled; - - if (text == null || text.Length == 0) - return SizeF.Empty; - - if (font == null) - throw new ArgumentNullException ("font"); - - if (stringFormat == null) - stringFormat = new StringFormat (); - - Status status = GDIPlus.GdipMeasureString (nativeObject, text, text.Length, - font.NativeObject, ref rect, - stringFormat.NativeObject, - out boundingBox, - out charactersFitted, - out linesFilled); - GDIPlus.CheckStatus (status); - - return new SizeF (boundingBox.Width, boundingBox.Height); - } - - - public SizeF MeasureString (string text, Font font, SizeF layoutArea, - StringFormat stringFormat, out int charactersFitted, - out int linesFilled) - { - RectangleF boundingBox = new RectangleF (); - RectangleF rect = new RectangleF (0, 0, layoutArea.Width, layoutArea.Height); - charactersFitted = 0; - linesFilled = 0; - - if (text == null || text.Length == 0) - return SizeF.Empty; - - if (font == null) - throw new ArgumentNullException ("font"); - - if (stringFormat == null) - stringFormat = new StringFormat (); - - Status status = GDIPlus.GdipMeasureString (nativeObject, text, text.Length, - font.NativeObject, ref rect, - stringFormat.NativeObject, - out boundingBox, - out charactersFitted, - out linesFilled); - GDIPlus.CheckStatus (status); - - return new SizeF (boundingBox.Width, boundingBox.Height); - } - - public void MultiplyTransform (Matrix matrix) - { - MultiplyTransform (matrix, MatrixOrder.Prepend); - } - - public void MultiplyTransform (Matrix matrix, MatrixOrder order) - { - Status status = GDIPlus.GdipMultiplyWorldTransform (nativeObject, - matrix.nativeMatrix, - order); - GDIPlus.CheckStatus (status); - } - - [EditorBrowsable (EditorBrowsableState.Advanced)] - public void ReleaseHdc (IntPtr hdc) - { - Status status = GDIPlus.GdipReleaseDC (nativeObject, hdc); - GDIPlus.CheckStatus (status); - } - - [MonoTODO] - [EditorBrowsable (EditorBrowsableState.Advanced)] - [SecurityPermission (SecurityAction.LinkDemand, UnmanagedCode = true)] - public void ReleaseHdcInternal (IntPtr hdc) - { - throw new NotImplementedException (); - } - - - public void ResetClip () - { - Status status = GDIPlus.GdipResetClip (nativeObject); - GDIPlus.CheckStatus (status); - } - - public void ResetTransform () - { - Status status = GDIPlus.GdipResetWorldTransform (nativeObject); - GDIPlus.CheckStatus (status); - } - - public void Restore (GraphicsState gstate) - { - Status status = GDIPlus.GdipRestoreGraphics (nativeObject, gstate.nativeState); - GDIPlus.CheckStatus (status); - } - - - public void RotateTransform (float angle) - { - RotateTransform (angle, MatrixOrder.Prepend); - } - - public void RotateTransform (float angle, MatrixOrder order) - { - - Status status = GDIPlus.GdipRotateWorldTransform (nativeObject, angle, order); - GDIPlus.CheckStatus (status); - } - - public GraphicsState Save () - { - uint saveState; - Status status = GDIPlus.GdipSaveGraphics (nativeObject, out saveState); - GDIPlus.CheckStatus (status); - - GraphicsState state = new GraphicsState (); - state.nativeState = saveState; - return state; - } - - public void ScaleTransform (float sx, float sy) - { - ScaleTransform (sx, sy, MatrixOrder.Prepend); - } - - public void ScaleTransform (float sx, float sy, MatrixOrder order) - { - Status status = GDIPlus.GdipScaleWorldTransform (nativeObject, sx, sy, order); - GDIPlus.CheckStatus (status); - } - - - public void SetClip (RectangleF rect) - { - SetClip (rect, CombineMode.Replace); - } - - - public void SetClip (GraphicsPath path) - { - SetClip (path, CombineMode.Replace); - } - - - public void SetClip (Rectangle rect) - { - SetClip (rect, CombineMode.Replace); - } - - - public void SetClip (Graphics g) - { - SetClip (g, CombineMode.Replace); - } - - - public void SetClip (Graphics g, CombineMode combineMode) - { - Status status = GDIPlus.GdipSetClipGraphics (nativeObject, g.NativeObject, combineMode); - GDIPlus.CheckStatus (status); - } - - - public void SetClip (Rectangle rect, CombineMode combineMode) - { - Status status = GDIPlus.GdipSetClipRectI (nativeObject, rect.X, rect.Y, rect.Width, rect.Height, combineMode); - GDIPlus.CheckStatus (status); - } - - - public void SetClip (RectangleF rect, CombineMode combineMode) - { - Status status = GDIPlus.GdipSetClipRect (nativeObject, rect.X, rect.Y, rect.Width, rect.Height, combineMode); - GDIPlus.CheckStatus (status); - } - - - public void SetClip (Region region, CombineMode combineMode) - { - Status status = GDIPlus.GdipSetClipRegion(nativeObject, region.NativeObject, combineMode); - GDIPlus.CheckStatus (status); - } - - - public void SetClip (GraphicsPath path, CombineMode combineMode) - { - Status status = GDIPlus.GdipSetClipPath (nativeObject, path.NativeObject, combineMode); - GDIPlus.CheckStatus (status); - } - - - public void TransformPoints (CoordinateSpace destSpace, CoordinateSpace srcSpace, PointF [] pts) - { - IntPtr ptrPt = GDIPlus.FromPointToUnManagedMemory (pts); - - Status status = GDIPlus.GdipTransformPoints (nativeObject, destSpace, srcSpace, ptrPt, pts.Length); - GDIPlus.CheckStatus (status); - - GDIPlus.FromUnManagedMemoryToPoint (ptrPt, pts); - } - - - public void TransformPoints (CoordinateSpace destSpace, CoordinateSpace srcSpace, Point [] pts) - { - IntPtr ptrPt = GDIPlus.FromPointToUnManagedMemoryI (pts); - - Status status = GDIPlus.GdipTransformPointsI (nativeObject, destSpace, srcSpace, ptrPt, pts.Length); - GDIPlus.CheckStatus (status); - - GDIPlus.FromUnManagedMemoryToPointI (ptrPt, pts); - } - - - public void TranslateClip (int dx, int dy) - { - Status status = GDIPlus.GdipTranslateClipI (nativeObject, dx, dy); - GDIPlus.CheckStatus (status); - } - - - public void TranslateClip (float dx, float dy) - { - Status status = GDIPlus.GdipTranslateClip (nativeObject, dx, dy); - GDIPlus.CheckStatus (status); - } - - public void TranslateTransform (float dx, float dy) - { - TranslateTransform (dx, dy, MatrixOrder.Prepend); - } - - - public void TranslateTransform (float dx, float dy, MatrixOrder order) - { - Status status = GDIPlus.GdipTranslateWorldTransform (nativeObject, dx, dy, order); - GDIPlus.CheckStatus (status); - } - - public Region Clip { - get { - Region reg = new Region(); - Status status = GDIPlus.GdipGetClip (nativeObject, reg.NativeObject); - GDIPlus.CheckStatus (status); - return reg; - } - set { - SetClip (value, CombineMode.Replace); - } - } - - public RectangleF ClipBounds { - get { - RectangleF rect = new RectangleF (); - Status status = GDIPlus.GdipGetClipBounds (nativeObject, out rect); - GDIPlus.CheckStatus (status); - return rect; - } - } - - public CompositingMode CompositingMode { - get { - CompositingMode mode; - Status status = GDIPlus.GdipGetCompositingMode (nativeObject, out mode); - GDIPlus.CheckStatus (status); - - return mode; - } - set { - Status status = GDIPlus.GdipSetCompositingMode (nativeObject, value); - GDIPlus.CheckStatus (status); - } - - } - - public CompositingQuality CompositingQuality { - get { - CompositingQuality quality; - - Status status = GDIPlus.GdipGetCompositingQuality (nativeObject, out quality); - GDIPlus.CheckStatus (status); - return quality; - } - set { - Status status = GDIPlus.GdipSetCompositingQuality (nativeObject, value); - GDIPlus.CheckStatus (status); - } - } - - public float DpiX { - get { - float x; - - Status status = GDIPlus.GdipGetDpiX (nativeObject, out x); - GDIPlus.CheckStatus (status); - return x; - } - } - - public float DpiY { - get { - float y; - - Status status = GDIPlus.GdipGetDpiY (nativeObject, out y); - GDIPlus.CheckStatus (status); - return y; - } - } - - public InterpolationMode InterpolationMode { - get { - InterpolationMode imode = InterpolationMode.Invalid; - Status status = GDIPlus.GdipGetInterpolationMode (nativeObject, out imode); - GDIPlus.CheckStatus (status); - return imode; - } - set { - Status status = GDIPlus.GdipSetInterpolationMode (nativeObject, value); - GDIPlus.CheckStatus (status); - } - } - - public bool IsClipEmpty { - get { - bool isEmpty = false; - - Status status = GDIPlus.GdipIsClipEmpty (nativeObject, out isEmpty); - GDIPlus.CheckStatus (status); - return isEmpty; - } - } - - public bool IsVisibleClipEmpty { - get { - bool isEmpty = false; - - Status status = GDIPlus.GdipIsVisibleClipEmpty (nativeObject, out isEmpty); - GDIPlus.CheckStatus (status); - return isEmpty; - } - } - - public float PageScale { - get { - float scale; - - Status status = GDIPlus.GdipGetPageScale (nativeObject, out scale); - GDIPlus.CheckStatus (status); - return scale; - } - set { - Status status = GDIPlus.GdipSetPageScale (nativeObject, value); - GDIPlus.CheckStatus (status); - } - } - - public GraphicsUnit PageUnit { - get { - GraphicsUnit unit; - - Status status = GDIPlus.GdipGetPageUnit (nativeObject, out unit); - GDIPlus.CheckStatus (status); - return unit; - } - set { - Status status = GDIPlus.GdipSetPageUnit (nativeObject, value); - GDIPlus.CheckStatus (status); - } - } - - public PixelOffsetMode PixelOffsetMode { - get { - PixelOffsetMode pixelOffset = PixelOffsetMode.Invalid; - - Status status = GDIPlus.GdipGetPixelOffsetMode (nativeObject, out pixelOffset); - GDIPlus.CheckStatus (status); - return pixelOffset; - } - set { - Status status = GDIPlus.GdipSetPixelOffsetMode (nativeObject, value); - GDIPlus.CheckStatus (status); - } - } - - public Point RenderingOrigin { - get { - int x, y; - Status status = GDIPlus.GdipGetRenderingOrigin (nativeObject, out x, out y); - GDIPlus.CheckStatus (status); - return new Point (x, y); - } - - set { - Status status = GDIPlus.GdipSetRenderingOrigin (nativeObject, value.X, value.Y); - GDIPlus.CheckStatus (status); - } - } - - public SmoothingMode SmoothingMode { - get { - SmoothingMode mode = SmoothingMode.Invalid; - - Status status = GDIPlus.GdipGetSmoothingMode (nativeObject, out mode); - GDIPlus.CheckStatus (status); - return mode; - } - - set { - Status status = GDIPlus.GdipSetSmoothingMode (nativeObject, value); - GDIPlus.CheckStatus (status); - } - } - - public int TextContrast { - get { - int contrast; - - Status status = GDIPlus.GdipGetTextContrast (nativeObject, out contrast); - GDIPlus.CheckStatus (status); - return contrast; - } - - set { - Status status = GDIPlus.GdipSetTextContrast (nativeObject, value); - GDIPlus.CheckStatus (status); - } - } - - public TextRenderingHint TextRenderingHint { - get { - TextRenderingHint hint; - - Status status = GDIPlus.GdipGetTextRenderingHint (nativeObject, out hint); - GDIPlus.CheckStatus (status); - return hint; - } - - set { - Status status = GDIPlus.GdipSetTextRenderingHint (nativeObject, value); - GDIPlus.CheckStatus (status); - } - } - - public Matrix Transform { - get { - Matrix matrix = new Matrix (); - Status status = GDIPlus.GdipGetWorldTransform (nativeObject, matrix.nativeMatrix); - GDIPlus.CheckStatus (status); - return matrix; - } - set { - Status status = GDIPlus.GdipSetWorldTransform (nativeObject, value.nativeMatrix); - GDIPlus.CheckStatus (status); - } - } - - public RectangleF VisibleClipBounds { - get { - RectangleF rect; - - Status status = GDIPlus.GdipGetVisibleClipBounds (nativeObject, out rect); - GDIPlus.CheckStatus (status); - return rect; - } - } - } -} - diff --git a/mcs/class/System.Drawing/System.Drawing/Graphics.jvm.cs b/mcs/class/System.Drawing/System.Drawing/Graphics.jvm.cs deleted file mode 100755 index 9d0fcd3d193..00000000000 --- a/mcs/class/System.Drawing/System.Drawing/Graphics.jvm.cs +++ /dev/null @@ -1,2525 +0,0 @@ -using System; -using System.Drawing.Drawing2D; -using System.Drawing.Imaging; -using System.Drawing.Text; -using System.ComponentModel; -using System.Collections; -using System.Runtime.InteropServices; -using System.Text; -using awt = java.awt; -using geom = java.awt.geom; - -namespace System.Drawing { - [ComVisible(false)] - public sealed class Graphics : MarshalByRefObject, IDisposable { - sealed class DummyStroke : awt.Stroke { - #region Stroke Members - - awt.Shape awt.Stroke.createStrokedShape(awt.Shape arg_0) { - throw new NotImplementedException("DummyStroke"); - } - - #endregion - } - - sealed class NormalizingPathIterator : geom.PathIterator { - - #region fields - - readonly geom.PathIterator _iter; - - const float norm = 0.5f; - const float rnd = (1.0f - norm); - float ax = 0.0f; - float ay = 0.0f; - - #endregion - - #region ctor - - public NormalizingPathIterator(geom.PathIterator iter) { - _iter = iter; - } - - #endregion - - #region methods - - static int GetIndex(int type) { - int index; - switch ((GraphicsPath.JPI)type) { - case GraphicsPath.JPI.SEG_CUBICTO: - index = 4; - break; - case GraphicsPath.JPI.SEG_QUADTO: - index = 2; - break; - case GraphicsPath.JPI.SEG_MOVETO: - case GraphicsPath.JPI.SEG_LINETO: - index = 0; - break; - case GraphicsPath.JPI.SEG_CLOSE: - default: - index = -1; - break; - } - - return index; - } - - #endregion - - #region PathIterator Members - - void geom.PathIterator.next() { - _iter.next(); - } - - bool geom.PathIterator.isDone() { - return _iter.isDone(); - } - - int geom.PathIterator.currentSegment(float[] point) { - int type = _iter.currentSegment(point); - - int index = GetIndex(type); - - if (index >= 0) { - float ox = point[index]; - float oy = point[index+1]; - float newax = (float) java.lang.Math.floor(ox + rnd) + norm; - float neway = (float) java.lang.Math.floor(oy + rnd) + norm; - point[index] = newax; - point[index+1] = neway; - newax -= ox; - neway -= oy; - switch ((GraphicsPath.JPI)type) { - case GraphicsPath.JPI.SEG_CUBICTO: - point[0] += ax; - point[1] += ay; - point[2] += newax; - point[3] += neway; - break; - case GraphicsPath.JPI.SEG_QUADTO: - point[0] += (newax + ax) / 2; - point[1] += (neway + ay) / 2; - break; - // case GraphicsPath.JPI.SEG_MOVETO: - // case GraphicsPath.JPI.SEG_LINETO: - // case GraphicsPath.JPI.SEG_CLOSE: - // break; - } - ax = newax; - ay = neway; - } - - return type; - } - - int geom.PathIterator.currentSegment(double[] point) { - int type = _iter.currentSegment(point); - - int index = GetIndex(type); - - if (index >= 0) { - float ox = (float)point[index]; - float oy = (float)point[index+1]; - float newax = (float)java.lang.Math.floor(ox + rnd) + norm; - float neway = (float)java.lang.Math.floor(oy + rnd) + norm; - point[index] = newax; - point[index+1] = neway; - newax -= ox; - neway -= oy; - switch ((GraphicsPath.JPI)type) { - case GraphicsPath.JPI.SEG_CUBICTO: - point[0] += ax; - point[1] += ay; - point[2] += newax; - point[3] += neway; - break; - case GraphicsPath.JPI.SEG_QUADTO: - point[0] += (newax + ax) / 2; - point[1] += (neway + ay) / 2; - break; - // case GraphicsPath.JPI.SEG_MOVETO: - // case GraphicsPath.JPI.SEG_LINETO: - // case GraphicsPath.JPI.SEG_CLOSE: - // break; - } - ax = newax; - ay = neway; - } - - return type; - } - - int geom.PathIterator.getWindingRule() { - return _iter.getWindingRule(); - } - - #endregion - - } - - - #region Variables - - readonly awt.Graphics2D _nativeObject; - PixelOffsetMode _pixelOffsetMode = PixelOffsetMode.Default; - int _textContrast = 4; - readonly Image _image; - - readonly Matrix _transform; - GraphicsUnit _pageUnit = GraphicsUnit.Display; - float _pageScale = 1.0f; - - readonly Region _clip; - readonly awt.Rectangle _windowRect; - - GraphicsState _nextGraphicsState = null; - - static readonly float [] _unitConversion = { - 1, // World - 1, // Display - 1, // Pixel - DefaultScreenResolution / 72.0f, // Point - DefaultScreenResolution, // Inch - DefaultScreenResolution / 300.0f,// Document - DefaultScreenResolution / 25.4f // Millimeter - }; - - static int _isHeadless; - static internal bool IsHeadless { - get { - if (_isHeadless == 0) { - bool isHeadless = awt.GraphicsEnvironment.isHeadless(); - if (!isHeadless) { - try { - awt.Toolkit.getDefaultToolkit(); - } - catch{ - isHeadless = true; - } - } - - _isHeadless = isHeadless ? 2 : 1; - } - - return _isHeadless > 1; - } - } - - #endregion - -#if INTPTR_SUPPORT - [ComVisible(false)] - public delegate bool EnumerateMetafileProc (EmfPlusRecordType recordType, - int flags, - int dataSize, - IntPtr data, - PlayRecordCallback callbackData); - [ComVisible (false)] - public delegate bool DrawImageAbort (IntPtr callbackData); -#endif - - #region Constr. and Destr. - private Graphics (Image image) { - _nativeObject = (awt.Graphics2D)image.NativeObject.CurrentImage.NativeImage.getGraphics(); - _image = image; - _transform = new Matrix (); - - NativeObject.setStroke(new DummyStroke()); - NativeObject.setRenderingHint(awt.RenderingHints.KEY_COLOR_RENDERING, awt.RenderingHints.VALUE_COLOR_RENDER_QUALITY); - - InterpolationMode = InterpolationMode.Bilinear; - - _windowRect = new awt.Rectangle(_image.Width, _image.Height); - _clip = new Region(); - } - - #endregion - - #region Internal Accessors - - static internal int DefaultScreenResolution { - get { - return IsHeadless ? 96 : - awt.Toolkit.getDefaultToolkit().getScreenResolution(); - } - } - - internal java.awt.Graphics2D NativeObject { - get { - return _nativeObject; - } - } - #endregion - - #region FromImage (static accessor) - public static Graphics FromImage (Image image) { - return new Graphics(image); - } - #endregion - - #region Workers [INTERNAL] - void InternalSetBrush(Brush b) { - java.awt.Graphics2D g = NativeObject; - g.setPaint (b); - SolidBrush sb = b as SolidBrush; - if(sb != null) { - g.setColor(sb.Color.NativeObject); - } - else if(b is LinearGradientBrush) { -#if DEBUG_GRADIENT_BRUSH - if(((LinearGradientBrush)b).dPoints != null) - { - PointF []pts = ((LinearGradientBrush)b).dPoints; - java.awt.Shape s = g.getClip(); - g.setClip(0,0,99999,99999); - g.setPaint(new java.awt.Color(255,0,0)); - g.drawLine((int)pts[0].X,(int)pts[0].Y,(int)pts[1].X,(int)pts[1].Y); - g.setPaint(new java.awt.Color(0,255,0)); - g.drawLine((int)pts[1].X,(int)pts[1].Y,(int)pts[2].X,(int)pts[2].Y); - g.setPaint(new java.awt.Color(255,0,0)); - g.drawLine((int)pts[2].X,(int)pts[2].Y,(int)pts[3].X,(int)pts[3].Y); - g.setPaint(new java.awt.Color(0,255,0)); - g.drawLine((int)pts[3].X,(int)pts[3].Y,(int)pts[0].X,(int)pts[0].Y); - - g.setClip(s); - } -#endif - } - } - - void DrawShape(Pen pen, awt.Shape shape) { - if (pen == null) - throw new ArgumentNullException("pen"); - - if (StrokeFactory.CanCreateAdvancedStroke) { - geom.AffineTransform oldT = NativeObject.getTransform(); - NativeObject.setTransform(Matrix.IdentityTransform.NativeObject); - - try { - geom.Area clip = _clip.NativeObject; - geom.AffineTransform t = GetFinalTransform(); - if (!oldT.isIdentity()) { - clip = (geom.Area)clip.clone(); - clip.transform(oldT); - - t = (geom.AffineTransform)t.clone(); - t.preConcatenate(oldT); - } - - double widthsquared = pen.GetSquaredTransformedWidth(t); - - bool antiAlias = (SmoothingMode == SmoothingMode.AntiAlias); - - bool thin = (widthsquared <= (antiAlias ? - AdvancedStroke.MinPenSizeAASquared : - AdvancedStroke.MinPenSizeSquared)); - - if (NeedsNormalization) { - - bool normThin = - widthsquared <= AdvancedStroke.MinPenSizeSquaredNorm; - - if (normThin) { - shape = GetNormalizedShape(shape, t); - shape = pen.GetNativeObject( - t, null, thin).createStrokedShape(shape); - } - else { - shape = pen.GetNativeObject(t, thin).createStrokedShape(shape); - shape = GetNormalizedShape(shape, null); - } - } - else { - shape = pen.GetNativeObject(t, thin).createStrokedShape(shape); - } - - FillScaledShape(pen.Brush, shape, clip); - } - finally { - NativeObject.setTransform(oldT); - } - } - else { - awt.Stroke oldStroke = NativeObject.getStroke(); - NativeObject.setStroke(pen.GetNativeObject(null, false)); - try { - awt.Paint oldPaint = NativeObject.getPaint(); - NativeObject.setPaint(pen.Brush); - try { - geom.AffineTransform oldT = NativeObject.getTransform(); - NativeObject.transform(GetFinalTransform()); - try { - shape = IntersectUserClip(shape); - NativeObject.draw(shape); - } - finally { - NativeObject.setTransform(oldT); - } - } - finally { - NativeObject.setPaint(oldPaint); - } - } - finally { - NativeObject.setStroke(oldStroke); - } - } - } - void FillShape(awt.Paint paint, awt.Shape shape) { - if (paint == null) - throw new ArgumentNullException("brush"); - - geom.AffineTransform oldT = null; - geom.Area clip = _clip.NativeObject; - if (NeedsNormalization) { - oldT = NativeObject.getTransform(); - geom.AffineTransform t = GetFinalTransform(); - if (!oldT.isIdentity()) { - t = (geom.AffineTransform)t.clone(); - t.preConcatenate(oldT); - clip = (geom.Area)clip.clone(); - clip.transform(oldT); - } - shape = GetNormalizedShape(shape, t); - } - else { - geom.AffineTransform t = GetFinalTransform(); - if (!t.isIdentity()) - shape = t.createTransformedShape(shape); - } - - if (oldT != null) - NativeObject.setTransform(Matrix.IdentityTransform.NativeObject); - - try { - FillScaledShape(paint, shape, clip); - } - finally { - if (oldT != null) - NativeObject.setTransform(oldT); - } - } - - bool NeedsNormalization { - get { - return PixelOffsetMode != PixelOffsetMode.Half && - PixelOffsetMode != PixelOffsetMode.HighQuality; - } - } - - static awt.Shape GetNormalizedShape(awt.Shape shape, geom.AffineTransform t) { - geom.PathIterator iter = new NormalizingPathIterator(shape.getPathIterator(t)); - - geom.GeneralPath path = new geom.GeneralPath(iter.getWindingRule()); - path.append(iter, false); - return path; - } - - void FillScaledShape(awt.Paint paint, awt.Shape shape, geom.Area clip) { - geom.Rectangle2D r = shape.getBounds2D(); - awt.Paint oldP = NativeObject.getPaint(); - NativeObject.setPaint(paint); - try { - shape = IntersectUserClip(shape, clip); - NativeObject.fill(shape); - } - finally { - NativeObject.setPaint(oldP); - } - } - - internal SizeF MeasureDraw (string s, Font font, Brush brush, RectangleF layoutRectangle, StringFormat format, bool fDraw) { - SizeF retVal = new SizeF(0,0); - awt.Graphics2D g = NativeObject; - - java.awt.Font fnt = font.NativeObject; - if(s != null && s.Length != 0 && fnt != null) { - float size = fnt.getSize(); - float wid = layoutRectangle.Width; - float hei = layoutRectangle.Height; - float x = layoutRectangle.X; - float y = layoutRectangle.Y; - java.text.AttributedString astr = new java.text.AttributedString(s); - astr.addAttribute(java.awt.font.TextAttribute.FONT, fnt); - java.text.AttributedCharacterIterator prg = astr.getIterator(); - java.awt.font.TextLayout textlayout = new java.awt.font.TextLayout(prg, g.getFontRenderContext()); - int prgStart = prg.getBeginIndex(); - int prgEnd = prg.getEndIndex(); - java.awt.font.LineBreakMeasurer lineMeasurer = new java.awt.font.LineBreakMeasurer( - prg, new java.awt.font.FontRenderContext(null, false, false)); - lineMeasurer.setPosition(prgStart); - float formatWidth = wid; - - //some vertical layout magic - should be reviewed - // if(format != null) - // { - // StringFormatFlags formatflag = format.FormatFlags; - // if(formatflag != StringFormatFlags.DirectionVertical) - // { - // if(size > (float)8 && wid > (float)13) - // formatWidth = wid - (float)12; - // if(formatflag == StringFormatFlags.DirectionRightToLeft && size == (float)6) - // formatWidth = wid - (float)10; - // } - // } - - //now calculate number of lines and full layout height - //this is required for LineAlignment calculations.... - int lines=0; - float layHeight=0; - float layPrevHeight=0; - float layWidth=0; - float drawPosY = y; - //bool fSkipLastLine = false; - java.awt.font.TextLayout layout; - java.awt.geom.Rectangle2D bnds = new java.awt.geom.Rectangle2D.Float(); - while(lineMeasurer.getPosition() < prgEnd) { - layout = lineMeasurer.nextLayout(formatWidth); - lines++; - bnds = bnds.createUnion(layout.getBounds()); - layPrevHeight = layHeight; - layHeight += layout.getDescent() + layout.getLeading() + layout.getAscent(); - float advance; - if((format != null) && - ((format.FormatFlags & StringFormatFlags.MeasureTrailingSpaces) != 0)) - advance = layout.getAdvance(); - else - advance = layout.getVisibleAdvance(); - if(layWidth < advance) - layWidth = advance; - if((format != null) && ((format.FormatFlags & StringFormatFlags.NoWrap) != 0)) - break; - } - //Overhanging parts of glyphs, and unwrapped text reaching outside - //the formatting rectangle are allowed to show. By default all text - //and glyph parts reaching outside the formatting rectangle are clipped. - if((lines == 1) && - (format != null) && - ((format.FormatFlags & StringFormatFlags.NoClip) != 0)) { - formatWidth = layWidth; - } - - //Only entire lines are laid out in the formatting rectangle. By default layout - //continues until the end of the text, or until no more lines are visible as a - //result of clipping, whichever comes first. Note that the default settings allow - //the last line to be partially obscured by a formatting rectangle that is not a - //whole multiple of the line height. To ensure that only whole lines are seen, specify - //this value and be careful to provide a formatting rectangle at least as tall as the - //height of one line. - if(format != null && ((format.FormatFlags & StringFormatFlags.LineLimit) != 0) && - layHeight > hei && layPrevHeight < hei) { - layHeight = layPrevHeight; - lines--; - } - - retVal.Height = layHeight; - retVal.Width = layWidth+size/2.5f; - if(!fDraw) - return retVal; - - InternalSetBrush(brush); - g.setRenderingHint(awt.RenderingHints.KEY_TEXT_ANTIALIASING, awt.RenderingHints.VALUE_TEXT_ANTIALIAS_ON); - - //end measurment - - //for draw we should probably update origins - - //Vertical... - if(format != null) { - StringAlignment align = format.LineAlignment; - if(align == StringAlignment.Center) { - drawPosY = y + (float)hei/2 - layHeight/2; - } - else if(align == StringAlignment.Far) { - drawPosY = (float)y + (float)hei - layHeight; - } - //in both cases if string is not fit - switch to near - if(drawPosY < y) - drawPosY = y; - } - - //Horisontal... on the fly - lineMeasurer.setPosition(prgStart); - float drawPosX = x; - for(int line = 0;line < lines /*lineMeasurer.getPosition() < prgEnd*/;line++, drawPosY += layout.getDescent() + layout.getLeading()) { - layout = lineMeasurer.nextLayout(formatWidth); - drawPosX = x + size / (float)5;//??? - drawPosY += layout.getAscent(); - if(format != null) { - float advance; - if((format.FormatFlags & StringFormatFlags.MeasureTrailingSpaces) != 0) - advance = layout.getAdvance(); - else - advance = layout.getVisibleAdvance(); - - if(format.Alignment == StringAlignment.Center) { - drawPosX = (float)((double)x + ((double)formatWidth)/2 - advance/2); - } - else if(format.Alignment == StringAlignment.Far) { - drawPosX = (float)(drawPosX + formatWidth) - advance; - } - if((format.FormatFlags & StringFormatFlags.DirectionVertical ) != 0) { - java.awt.geom.AffineTransform at1 = java.awt.geom.AffineTransform.getTranslateInstance( - drawPosX + size / (float)5, (drawPosY - layout.getAscent()) + size / (float)5); - - at1.rotate(Math.PI/2); - awt.Shape sha = textlayout.getOutline(at1); - geom.AffineTransform t = GetFinalTransform(); - if (!t.isIdentity()) - sha = t.createTransformedShape(sha); - //g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); - sha = IntersectUserClip(sha); - g.fill(sha); - continue; - } - if((format.FormatFlags & StringFormatFlags.DirectionRightToLeft) != 0) { - drawPosX = ((drawPosX + formatWidth) - advance) + (float)9; - IntersectScaledClipWithBase(_clip); - try { - layout.draw(g, drawPosX, drawPosY); - } - finally { - RestoreBaseClip(); - } - } - } - - geom.AffineTransform oldT = null; - geom.AffineTransform ft = GetFinalTransform(); - - //Draw current line - IntersectScaledClipWithBase(_clip); - try { - if (!ft.isIdentity()) { - oldT = NativeObject.getTransform(); - NativeObject.transform(ft); - } - layout.draw(g, drawPosX, drawPosY); - } - finally { - if (oldT != null) - NativeObject.setTransform(oldT); - RestoreBaseClip(); - } - } - } //not nulls - - return retVal; - } - #endregion - - #region Dispose - public void Dispose() { - NativeObject.dispose(); - } - #endregion - - #region Clear - public void Clear (Color color) { - FillScaledShape(color.NativeObject, _clip.NativeObject, null); - } - #endregion - - #region DrawArc - public void DrawArc (Pen pen, Rectangle rect, float startAngle, float sweepAngle) { - DrawArc (pen, - rect.X, - rect.Y, - rect.Width, - rect.Height, - startAngle, - sweepAngle); - } - - - public void DrawArc (Pen pen, RectangleF rect, float startAngle, float sweepAngle) { - DrawArc (pen, - rect.X, - rect.Y, - rect.Width, - rect.Height, - startAngle, - sweepAngle); - } - - public void DrawArc (Pen pen, int x, int y, int width, int height, int startAngle, int sweepAngle) { - DrawArc(pen, - (float)x, - (float)y, - (float)width, - (float)height, - (float)startAngle, - (float)sweepAngle); - } - - public void DrawArc (Pen pen, float x, float y, float width, float height, float startAngle, float sweepAngle) { - GraphicsPath path = new GraphicsPath(); - path.AddArc(x, y, width, height, startAngle, sweepAngle); - DrawPath(pen, path); - } - #endregion - - #region DrawBezier(s) - public void DrawBezier (Pen pen, PointF pt1, PointF pt2, PointF pt3, PointF pt4) { - DrawBezier(pen, pt1.X, pt1.Y, pt2.X, pt2.Y, pt3.X, pt3.Y, pt4.X, pt4.Y); - } - - public void DrawBezier (Pen pen, Point pt1, Point pt2, Point pt3, Point pt4) { - DrawBezier(pen, pt1.X, pt1.Y, pt2.X, pt2.Y, pt3.X, pt3.Y, pt4.X, pt4.Y); - } - - public void DrawBezier (Pen pen, float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4) { - geom.GeneralPath path = new geom.GeneralPath(); - path.moveTo(x1,y1); - path.curveTo(x2,y2,x3,y3,x4,y4); - DrawShape(pen, path); - } - - public void DrawBeziers (Pen pen, Point [] points) { - GraphicsPath path = new GraphicsPath(); - path.AddBeziers(points); - DrawPath(pen, path); - } - - public void DrawBeziers (Pen pen, PointF [] points) { - GraphicsPath path = new GraphicsPath(); - path.AddBeziers(points); - DrawPath(pen, path); - } - #endregion - - #region DrawClosedCurve - public void DrawClosedCurve (Pen pen, PointF [] points) { - DrawClosedCurve(pen, points, 0.5f, FillMode.Alternate); - } - - public void DrawClosedCurve (Pen pen, Point [] points) { - DrawClosedCurve(pen, points, 0.5f, FillMode.Alternate); - } - - public void DrawClosedCurve (Pen pen, Point [] points, float tension, FillMode fillmode) { - GraphicsPath path = new GraphicsPath(fillmode); - path.AddClosedCurve(points, tension); - DrawPath(pen, path); - } - - public void DrawClosedCurve (Pen pen, PointF [] points, float tension, FillMode fillmode) { - GraphicsPath path = new GraphicsPath(fillmode); - path.AddClosedCurve(points, tension); - DrawPath(pen, path); - } - #endregion - - #region DrawCurve - public void DrawCurve (Pen pen, Point [] points) { - DrawCurve(pen, points, 0.5f); - } - - public void DrawCurve (Pen pen, PointF [] points) { - DrawCurve(pen, points, 0.5f); - } - - public void DrawCurve (Pen pen, PointF [] points, float tension) { - DrawCurve(pen, points, 0, points.Length-1, tension); - } - - public void DrawCurve (Pen pen, Point [] points, float tension) { - DrawCurve(pen, points, 0, points.Length-1, tension); - } - - - public void DrawCurve (Pen pen, PointF [] points, int offset, int numberOfSegments) { - DrawCurve(pen, points, offset, numberOfSegments, 0.5f); - } - - public void DrawCurve (Pen pen, Point [] points, int offset, int numberOfSegments, float tension) { - GraphicsPath path = new GraphicsPath(); - path.AddCurve(points, offset, numberOfSegments, tension); - DrawPath(pen, path); - } - - - public void DrawCurve (Pen pen, PointF [] points, int offset, int numberOfSegments, float tension) { - GraphicsPath path = new GraphicsPath(); - path.AddCurve(points, offset, numberOfSegments, tension); - DrawPath(pen, path); - } - #endregion - - #region DrawEllipse - public void DrawEllipse (Pen pen, Rectangle rect) { - DrawEllipse (pen, rect.X, rect.Y, rect.Width, rect.Height); - } - - public void DrawEllipse (Pen pen, RectangleF rect) { - DrawEllipse (pen, rect.X, rect.Y, rect.Width, rect.Height); - } - - public void DrawEllipse (Pen pen, int x, int y, int width, int height) { - DrawEllipse(pen,(float)x,(float)y,(float)width,(float)height); - } - - public void DrawEllipse (Pen pen, float x, float y, float width, float height) { - DrawShape(pen, new geom.Ellipse2D.Float(x,y,width,height)); - } - #endregion - - #region DrawIcon - public void DrawIcon (Icon icon, Rectangle targetRect) { - Bitmap b = icon.ToBitmap (); - this.DrawImage (b, targetRect); - } - - public void DrawIcon (Icon icon, int x, int y) { - Bitmap b = icon.ToBitmap (); - this.DrawImage (b, x, y); - } - - public void DrawIconUnstretched (Icon icon, Rectangle targetRect) { - Bitmap b = icon.ToBitmap (); - this.DrawImageUnscaled (b, targetRect); - } - #endregion - - #region DrawImage - - public void DrawImage (Image image, Point point) { - DrawImage(image, point.X, point.Y); - } - - public void DrawImage (Image image, PointF point) { - DrawImage(image, point.X, point.Y); - } - - - public void DrawImage (Image image, Point [] destPoints) { - Matrix m = new Matrix(new Rectangle(0, 0, image.Width, image.Height), destPoints); - DrawImage(image, m); - } - - public void DrawImage (Image image, PointF [] destPoints) { - Matrix m = new Matrix(new RectangleF(0, 0, image.Width, image.Height), destPoints); - DrawImage(image, m); - } - - - public void DrawImage (Image image, Rectangle rect) { - DrawImage(image, rect.X, rect.Y, rect.Width, rect.Height); - } - - public void DrawImage (Image image, RectangleF rect) { - DrawImage(image, rect.X, rect.Y, rect.Width, rect.Height); - } - - - public void DrawImage (Image image, int x, int y) { - DrawImage(image, (float)x, (float)y); - } - - public void DrawImage (Image image, float x, float y) { - if ((image.HorizontalResolution != DpiX) || (image.VerticalResolution != DpiY)) - DrawImage( image, x, y, - (float)image.Width * (DpiX / image.HorizontalResolution), - (float)image.Height * (DpiY / image.VerticalResolution)); - else - DrawImage( image, x, y, (float)image.Width, (float)image.Height ); - } - - - public void DrawImage (Image image, Rectangle destRect, Rectangle srcRect, GraphicsUnit srcUnit) { - DrawImage( - image, - new Point [] { - new Point( destRect.X, destRect.Y), - new Point( destRect.X + destRect.Width, destRect.Y), - new Point( destRect.X, destRect.Y + destRect.Height)}, - srcRect, - srcUnit); - } - - public void DrawImage (Image image, RectangleF destRect, RectangleF srcRect, GraphicsUnit srcUnit) { - DrawImage( - image, - new PointF [] { - new PointF( destRect.X, destRect.Y), - new PointF( destRect.X + destRect.Width, destRect.Y), - new PointF( destRect.X, destRect.Y + destRect.Height)}, - srcRect, - srcUnit); - } - - - public void DrawImage (Image image, Point [] destPoints, Rectangle srcRect, GraphicsUnit srcUnit) { - DrawImage(image, destPoints, srcRect, srcUnit, null); - } - - public void DrawImage (Image image, PointF [] destPoints, RectangleF srcRect, GraphicsUnit srcUnit) { - DrawImage(image, destPoints, srcRect, srcUnit, null); - } - - - public void DrawImage (Image image, Point [] destPoints, Rectangle srcRect, GraphicsUnit srcUnit, ImageAttributes imageAttr) { - //TBD: ImageAttributes - if (srcUnit != GraphicsUnit.Pixel) - throw new NotImplementedException(); - // Like in .NET http://dotnet247.com/247reference/msgs/45/227979.aspx - - Matrix mx = new Matrix(srcRect, destPoints); - - Region region = new Region(srcRect); - region.Transform (mx); - - geom.AffineTransform t = _transform.NativeObject; - if (!t.isIdentity()) - region.NativeObject.transform(t); - region.Intersect(_clip); - - DrawImage(image, mx, region); - } - - public void DrawImage (Image image, PointF [] destPoints, RectangleF srcRect, GraphicsUnit srcUnit, ImageAttributes imageAttr) { - //TBD: ImageAttributes - if (srcUnit != GraphicsUnit.Pixel) - throw new NotImplementedException(); - // Like in .NET http://dotnet247.com/247reference/msgs/45/227979.aspx - - Matrix mx = new Matrix(srcRect, destPoints); - - Region region = new Region(srcRect); - region.Transform (mx); - - geom.AffineTransform t = GetFinalTransform(); - if (!t.isIdentity()) - region.NativeObject.transform(t); - region.Intersect(_clip); - - DrawImage(image, mx, region); - } - - - public void DrawImage (Image image, int x, int y, int width, int height) { - DrawImage(image, (float)x, (float)y, (float)width, (float)height); - } - - public void DrawImage (Image image, float x, float y, float width, float height) { - geom.Point2D.Float pt = new geom.Point2D.Float(x, y); - GetFinalTransform().transform(pt, pt); - - Matrix mx = new Matrix(); - mx.Translate((float)pt.getX(), (float)pt.getY()); - mx.Scale(width / (float)image.Width, height / (float)image.Height); - - DrawImage( image, mx ); - } - - - public void DrawImage (Image image, int x, int y, Rectangle srcRect, GraphicsUnit srcUnit) { - DrawImage(image, new Rectangle(x, y, srcRect.Width, srcRect.Height), srcRect, srcUnit); - } - - public void DrawImage (Image image, float x, float y, RectangleF srcRect, GraphicsUnit srcUnit) { - DrawImage(image, new RectangleF(x, y, srcRect.Width, srcRect.Height), srcRect, srcUnit); - } - - - public void DrawImage (Image image, Rectangle destRect, int srcX, int srcY, int srcWidth, int srcHeight, GraphicsUnit srcUnit) { - DrawImage(image, destRect, srcX, srcY, srcWidth, srcHeight, srcUnit, null); - } - - public void DrawImage (Image image, Rectangle destRect, float srcX, float srcY, float srcWidth, float srcHeight, GraphicsUnit srcUnit) { - DrawImage(image, destRect, srcX, srcY, srcWidth, srcHeight, srcUnit, null); - } - - - public void DrawImage (Image image, Rectangle destRect, int srcX, int srcY, int srcWidth, int srcHeight, GraphicsUnit srcUnit, ImageAttributes imageAttr) { - //TBD: attributes - DrawImage( - image, - destRect, - new Rectangle(srcX, srcY, srcWidth, srcHeight), - srcUnit); - } - - public void DrawImage (Image image, Rectangle destRect, float srcX, float srcY, float srcWidth, float srcHeight, GraphicsUnit srcUnit, ImageAttributes imageAttrs) { - //TBD: attributes - DrawImage( - image, - destRect, - new RectangleF(srcX, srcY, srcWidth, srcHeight), - srcUnit); - } - - - internal void DrawImage (Image image, Matrix m) { - DrawImage(image, m, null); - } - - internal void DrawImage (Image image, Matrix m, Region clip) { - if (clip == null) { - clip = new Region( new RectangleF( 0, 0, image.Width, image.Height ) ); - clip.Transform( m ); - } - clip.Intersect(_clip); - - geom.AffineTransform oldT = NativeObject.getTransform(); - // must set clip before the base transform is altered - if (NeedsNormalization) { - Matrix normMatrix = ComputeClipNormalization(clip.GetBounds(this)); - clip.Transform(normMatrix); - } - - IntersectScaledClipWithBase(clip); - - try { - NativeObject.transform(_transform.NativeObject); - - Matrix mm = ComputeImageNormalization(image, m); - NativeObject.drawImage(image.NativeObject.CurrentImage.NativeImage, mm.NativeObject, null); - } - finally { - NativeObject.setTransform(oldT); - RestoreBaseClip(); - } - } - - private static Matrix ComputeImageNormalization(Image img, Matrix m) { - if ( m.IsIdentity ) - return m; - - //m.Translate( -(m.Elements[0] + m.Elements[2]) / 2.0f, -(m.Elements[3] + m.Elements[1]) / 2.0f, MatrixOrder.Append); - m.Translate( - -(float)(m.NativeObject.getScaleX() + m.NativeObject.getShearX()) / 2.0f, - -(float)(m.NativeObject.getScaleY() + m.NativeObject.getShearY()) / 2.0f, MatrixOrder.Append); - - PointF [] p = new PointF[] { - new PointF( 0, 0 ), - new PointF( img.Width, 0 ), - new PointF( 0, img.Height )}; - - m.TransformPoints(p); - for (int i=0; i < p.Length; i++) { - p[i].X = (float)( p[i].X + 0.5f ); - p[i].Y = (float)( p[i].Y + 0.5f ); - } - - return new Matrix( new Rectangle(0, 0, img.Width, img.Height), p ); - } - private static Matrix ComputeClipNormalization(RectangleF rect) { - PointF [] p = new PointF[] { - new PointF( rect.X, rect.Y ), - new PointF( rect.X + rect.Width, rect.Y ), - new PointF( rect.X, rect.Y + rect.Height )}; - - for (int i=0; i < p.Length; i++) { - p[i].X = (float)Math.Round( p[i].X + 0.5f ) + 0.5f; - p[i].Y = (float)Math.Round( p[i].Y + 0.5f ) + 0.5f; - } - - return new Matrix( rect, p ); - } - - -#if INTPTR_SUPPORT - public void DrawImage (Image image, PointF [] destPoints, RectangleF srcRect, GraphicsUnit srcUnit, ImageAttributes imageAttr, DrawImageAbort callback) - { - throw new NotImplementedException(); - } - - - public void DrawImage (Image image, Point [] destPoints, Rectangle srcRect, GraphicsUnit srcUnit, ImageAttributes imageAttr, DrawImageAbort callback) - { - - throw new NotImplementedException(); - } - - - public void DrawImage (Image image, Point [] destPoints, Rectangle srcRect, GraphicsUnit srcUnit, ImageAttributes imageAttr, DrawImageAbort callback, int callbackData) - { - throw new NotImplementedException(); - } -#endif - -#if INTPTR_SUPPORT - public void DrawImage (Image image, PointF [] destPoints, RectangleF srcRect, GraphicsUnit srcUnit, ImageAttributes imageAttr, DrawImageAbort callback, int callbackData) - { - throw new NotImplementedException(); - } -#endif - -#if INTPTR_SUPPORT - public void DrawImage (Image image, Rectangle destRect, int srcX, int srcY, int srcWidth, int srcHeight, GraphicsUnit srcUnit, ImageAttributes imageAttr, DrawImageAbort callback) - { - //TBD:units,attributes, callback - java.awt.Graphics2D g = (java.awt.Graphics2D)nativeObject; - g.drawImage(image.NativeObject,destRect.X,destRect.Y,destRect.Width,destRect.Height,srcX,srcY,srcWidth,srcHeight,null); - } - - public void DrawImage (Image image, Rectangle destRect, float srcX, float srcY, float srcWidth, float srcHeight, GraphicsUnit srcUnit, ImageAttributes imageAttr, DrawImageAbort callback) - { - //TBD:units,attributes, callback - java.awt.Graphics2D g = (java.awt.Graphics2D)nativeObject; - g.drawImage(image.NativeObject, - (int)destRect.X, - (int)destRect.Y, - (int)destRect.Width, - (int)destRect.Height, - (int)srcX, - (int)srcY, - (int)srcWidth, - (int)srcHeight,null); - } - - public void DrawImage (Image image, Rectangle destRect, float srcX, float srcY, float srcWidth, float srcHeight, GraphicsUnit srcUnit, ImageAttributes imageAttr, DrawImageAbort callback, IntPtr callbackData) - { - //TBD:units,attributes, callback - java.awt.Graphics2D g = (java.awt.Graphics2D)nativeObject; - g.drawImage(image.NativeObject, - (int)destRect.X, - (int)destRect.Y, - (int)destRect.Width, - (int)destRect.Height, - (int)srcX, - (int)srcY, - (int)srcWidth, - (int)srcHeight,null); - } - - public void DrawImage (Image image, Rectangle destRect, int srcX, int srcY, int srcWidth, int srcHeight, GraphicsUnit srcUnit, ImageAttributes imageAttr, DrawImageAbort callback, IntPtr callbackData) - { - //TBD:units,attributes, callback - java.awt.Graphics2D g = (java.awt.Graphics2D)nativeObject; - g.drawImage(image.NativeObject, - destRect.X, - destRect.Y, - destRect.Width, - destRect.Height, - srcX, - srcY, - srcWidth, - srcHeight,null); - } -#endif - - public void DrawImageUnscaled (Image image, Point point) - { - DrawImageUnscaled (image, point.X, point.Y); - } - - public void DrawImageUnscaled (Image image, Rectangle rect) { - DrawImageUnscaled (image, rect.X, rect.Y, rect.Width, rect.Height); - } - - public void DrawImageUnscaled (Image image, int x, int y) { - DrawImage (image, x, y, image.Width, image.Height); - } - - public void DrawImageUnscaled (Image image, int x, int y, int width, int height) { - Image tmpImg = new Bitmap (width, height); - Graphics g = FromImage (tmpImg); - g.DrawImage (image, 0, 0, image.Width, image.Height); - this.DrawImage (tmpImg, x, y, width, height); - tmpImg.Dispose (); - g.Dispose (); - } - #endregion - - #region DrawLine - public void DrawLine (Pen pen, PointF pt1, PointF pt2) { - DrawLine(pen,pt1.X,pt1.Y,pt2.X,pt2.Y); - } - - public void DrawLine (Pen pen, Point pt1, Point pt2) { - DrawLine(pen,(float)pt1.X,(float)pt1.Y,(float)pt2.X,(float)pt2.Y); - } - - public void DrawLine (Pen pen, int x1, int y1, int x2, int y2) { - DrawLine(pen,(float)x1,(float)y1,(float)x2,(float)y2); - } - - public void DrawLine (Pen pen, float x1, float y1, float x2, float y2) { - DrawShape(pen, new geom.Line2D.Float(x1,y1,x2,y2)); - } - - public void DrawLines (Pen pen, PointF [] points) { - GraphicsPath path = new GraphicsPath(); - path.AddLines(points); - DrawShape(pen, path); - } - - public void DrawLines (Pen pen, Point [] points) { - GraphicsPath path = new GraphicsPath(); - path.AddLines(points); - DrawShape(pen, path); - } - #endregion - - #region DrawPath - public void DrawPath (Pen pen, GraphicsPath path) { - DrawShape(pen, path); - } - #endregion - - #region DrawPie - public void DrawPie (Pen pen, Rectangle rect, float startAngle, float sweepAngle) { - DrawPie (pen, rect.X, rect.Y, rect.Width, rect.Height, startAngle, sweepAngle); - } - - public void DrawPie (Pen pen, RectangleF rect, float startAngle, float sweepAngle) { - DrawPie (pen, rect.X, rect.Y, rect.Width, rect.Height, startAngle, sweepAngle); - } - - public void DrawPie (Pen pen, float x, float y, float width, float height, float startAngle, float sweepAngle) { - GraphicsPath path = new GraphicsPath(); - path.AddPie(x, y, width, height, startAngle, sweepAngle); - DrawPath(pen, path); - } - - public void DrawPie (Pen pen, int x, int y, int width, int height, int startAngle, int sweepAngle) { - DrawPie(pen,(float)x,(float)y,(float)width,(float)height,(float)startAngle,(float)sweepAngle); - } - #endregion - - #region DrawPolygon - public void DrawPolygon (Pen pen, Point [] points) { - GraphicsPath path = new GraphicsPath(); - path.AddPolygon(points); - DrawPath(pen, path); - } - - public void DrawPolygon (Pen pen, PointF [] points) { - GraphicsPath path = new GraphicsPath(); - path.AddPolygon(points); - DrawPath(pen, path); - } - #endregion - - #region DrawRectangle(s) - internal void DrawRectangle (Pen pen, RectangleF rect) { - DrawRectangle (pen, rect.Left, rect.Top, rect.Width, rect.Height); - } - - public void DrawRectangle (Pen pen, Rectangle rect) { - DrawRectangle (pen, rect.Left, rect.Top, rect.Width, rect.Height); - } - - public void DrawRectangle (Pen pen, float x, float y, float width, float height) { - DrawShape(pen, new geom.Rectangle2D.Float(x,y,width,height)); - } - - public void DrawRectangle (Pen pen, int x, int y, int width, int height) { - DrawRectangle (pen,(float) x,(float) y,(float) width,(float) height); - } - - public void DrawRectangles (Pen pen, RectangleF [] rects) { - foreach(RectangleF r in rects) - DrawRectangle (pen, r.Left, r.Top, r.Width, r.Height); - } - - public void DrawRectangles (Pen pen, Rectangle [] rects) { - foreach(Rectangle r in rects) - DrawRectangle (pen, r.Left, r.Top, r.Width, r.Height); - } - #endregion - - #region DrawString - public void DrawString (string s, Font font, Brush brush, RectangleF layoutRectangle) { - MeasureDraw(s,font,brush,layoutRectangle,null,true); - } - - public void DrawString (string s, Font font, Brush brush, PointF point) { - MeasureDraw(s,font,brush,new RectangleF(point.X,point.Y,99999f,99999f),null,true); - } - - public void DrawString (string s, Font font, Brush brush, PointF point, StringFormat format) { - MeasureDraw(s,font,brush,new RectangleF(point.X,point.Y,99999f,99999f),format,true); - } - - public void DrawString (string s, Font font, Brush brush, RectangleF layoutRectangle, StringFormat format) { - MeasureDraw(s,font,brush,layoutRectangle,format,true); - } - -#if false - public void DrawString (string s, Font font, Brush brush, RectangleF layoutRectangle, StringFormat format) - { - java.awt.Graphics2D g = (java.awt.Graphics2D)nativeObject; - //set - java.awt.Paint oldpaint = g.getPaint(); - g.setPaint(brush.NativeObject); - java.awt.Font oldfont = g.getFont(); - g.setFont(font.NativeObject); - java.awt.Shape oldb = g.getClip(); - g.setClip(new java.awt.geom.Rectangle2D.Float(layoutRectangle.X,layoutRectangle.Y,layoutRectangle.Width,layoutRectangle.Height)); - //draw - g.drawString(s,layoutRectangle.X,layoutRectangle.Y+layoutRectangle.Height); - //restore - g.setPaint(oldpaint); - g.setClip(oldb); - g.setFont(oldfont); - } -#endif - public void DrawString (string s, Font font, Brush brush, float x, float y) { - MeasureDraw(s,font,brush,new RectangleF(x,y,99999f,99999f),null,true); - } - - public void DrawString (string s, Font font, Brush brush, float x, float y, StringFormat format) { - MeasureDraw(s,font,brush,new RectangleF(x,y,99999f,99999f),format,true); - } - #endregion - - #region Container - - void PushGraphicsState(GraphicsState state) { - state.Next = _nextGraphicsState; - _nextGraphicsState = state; - } - - GraphicsState PopGraphicsState() { - GraphicsState state = _nextGraphicsState; - _nextGraphicsState = _nextGraphicsState.Next; - return state; - } - - bool ContainsGraphicsState(GraphicsState state) { - GraphicsState gs = _nextGraphicsState; - - while(gs != null) { - if (gs == state) - return true; - - gs = gs.Next; - } - - return false; - } - - public void EndContainer (GraphicsContainer container) { - Restore(container.StateObject); - } - - public GraphicsContainer BeginContainer () { - return new GraphicsContainer(Save(Matrix.IdentityTransform, true)); - } - - public GraphicsContainer BeginContainer (Rectangle dstrect, Rectangle srcrect, GraphicsUnit unit) { - Matrix containerTransfrom = - new Matrix( srcrect, - new Point [] { new Point (dstrect.X, dstrect.Y), - new Point (dstrect.X + dstrect.Width, dstrect.Y), - new Point (dstrect.X, dstrect.Y + dstrect.Height) }); - - float scale = 1/_unitConversion[ (int)unit ]; - containerTransfrom.Scale(scale, scale); - - return new GraphicsContainer(Save(containerTransfrom, true)); - } - - - public GraphicsContainer BeginContainer (RectangleF dstrect, RectangleF srcrect, GraphicsUnit unit) { - Matrix containerTransfrom = - new Matrix( srcrect, - new PointF [] { new PointF (dstrect.X, dstrect.Y), - new PointF (dstrect.X + dstrect.Width, dstrect.Y), - new PointF (dstrect.X, dstrect.Y + dstrect.Height) }); - - float scale = 1/_unitConversion[ (int)unit ]; - containerTransfrom.Scale(scale, scale); - - return new GraphicsContainer(Save(containerTransfrom, true)); - } - - GraphicsState Save(Matrix matrix, bool resetState) { - GraphicsState graphicsState = new GraphicsState(this, matrix, resetState); - - PushGraphicsState( graphicsState ); - return graphicsState; - } - - public GraphicsState Save () { - return Save(Matrix.IdentityTransform, false); - } - - public void Restore (GraphicsState graphicsState) { - if (ContainsGraphicsState(graphicsState)) { - GraphicsState gs = PopGraphicsState(); - while ( gs != graphicsState ) - gs = PopGraphicsState(); - - graphicsState.RestoreState(this); - } - } - - #endregion - - #region Metafiles Staff [TODO NotSupp] - public void AddMetafileComment (byte [] data) { - throw new NotImplementedException (); - } - -#if INTPTR_SUPPORT - public void EnumerateMetafile (Metafile metafile, Point [] destPoints, EnumerateMetafileProc callback) - { - throw new NotImplementedException (); - } - - public void EnumerateMetafile (Metafile metafile, RectangleF destRect, EnumerateMetafileProc callback) - { - throw new NotImplementedException (); - } - - public void EnumerateMetafile (Metafile metafile, PointF [] destPoints, EnumerateMetafileProc callback) - { - throw new NotImplementedException (); - } - - public void EnumerateMetafile (Metafile metafile, Rectangle destRect, EnumerateMetafileProc callback) - { - throw new NotImplementedException (); - } - - public void EnumerateMetafile (Metafile metafile, Point destPoint, EnumerateMetafileProc callback) - { - throw new NotImplementedException (); - } - - public void EnumerateMetafile (Metafile metafile, PointF destPoint, EnumerateMetafileProc callback) - { - throw new NotImplementedException (); - } - - public void EnumerateMetafile (Metafile metafile, PointF destPoint, EnumerateMetafileProc callback, IntPtr callbackData) - { - throw new NotImplementedException (); - } - - public void EnumerateMetafile (Metafile metafile, Rectangle destRect, EnumerateMetafileProc callback, IntPtr callbackData) - { - throw new NotImplementedException (); - } - - public void EnumerateMetafile (Metafile metafile, PointF [] destPoints, EnumerateMetafileProc callback, IntPtr callbackData) - { - throw new NotImplementedException (); - } - - public void EnumerateMetafile (Metafile metafile, Point destPoint, EnumerateMetafileProc callback, IntPtr callbackData) - { - throw new NotImplementedException (); - } - - public void EnumerateMetafile (Metafile metafile, Point [] destPoints, EnumerateMetafileProc callback, IntPtr callbackData) - { - throw new NotImplementedException (); - } - - public void EnumerateMetafile (Metafile metafile, RectangleF destRect, EnumerateMetafileProc callback, IntPtr callbackData) - { - throw new NotImplementedException (); - } - - public void EnumerateMetafile (Metafile metafile, PointF destPoint, RectangleF srcRect, GraphicsUnit srcUnit, EnumerateMetafileProc callback) - { - throw new NotImplementedException (); - } - - public void EnumerateMetafile (Metafile metafile, Point destPoint, Rectangle srcRect, GraphicsUnit srcUnit, EnumerateMetafileProc callback) - { - throw new NotImplementedException (); - } - - public void EnumerateMetafile (Metafile metafile, PointF [] destPoints, RectangleF srcRect, GraphicsUnit srcUnit, EnumerateMetafileProc callback) - { - throw new NotImplementedException (); - } - - public void EnumerateMetafile (Metafile metafile, Point [] destPoints, Rectangle srcRect, GraphicsUnit srcUnit, EnumerateMetafileProc callback) - { - throw new NotImplementedException (); - } - - public void EnumerateMetafile (Metafile metafile, RectangleF destRect, RectangleF srcRect, GraphicsUnit srcUnit, EnumerateMetafileProc callback) - { - throw new NotImplementedException (); - } - - public void EnumerateMetafile (Metafile metafile, Rectangle destRect, Rectangle srcRect, GraphicsUnit srcUnit, EnumerateMetafileProc callback) - { - throw new NotImplementedException (); - } - - public void EnumerateMetafile (Metafile metafile, RectangleF destRect, EnumerateMetafileProc callback, IntPtr callbackData, ImageAttributes imageAttr) - { - throw new NotImplementedException (); - } - - public void EnumerateMetafile (Metafile metafile, Point destPoint, EnumerateMetafileProc callback, IntPtr callbackData, ImageAttributes imageAttr) - { - throw new NotImplementedException (); - } - - public void EnumerateMetafile (Metafile metafile, PointF destPoint, EnumerateMetafileProc callback, IntPtr callbackData, ImageAttributes imageAttr) - { - throw new NotImplementedException (); - } - - public void EnumerateMetafile (Metafile metafile, Point [] destPoints, EnumerateMetafileProc callback, IntPtr callbackData, ImageAttributes imageAttr) - { - throw new NotImplementedException (); - } - - public void EnumerateMetafile (Metafile metafile, PointF [] destPoints, EnumerateMetafileProc callback, IntPtr callbackData, ImageAttributes imageAttr) - { - throw new NotImplementedException (); - } - - public void EnumerateMetafile (Metafile metafile, Rectangle destRect, EnumerateMetafileProc callback, IntPtr callbackData, ImageAttributes imageAttr) - { - throw new NotImplementedException (); - } - - public void EnumerateMetafile (Metafile metafile, Rectangle destRect, Rectangle srcRect, GraphicsUnit srcUnit, EnumerateMetafileProc callback, IntPtr callbackData) - { - throw new NotImplementedException (); - } - - public void EnumerateMetafile (Metafile metafile, PointF [] destPoints, RectangleF srcRect, GraphicsUnit srcUnit, EnumerateMetafileProc callback, IntPtr callbackData) - { - throw new NotImplementedException (); - } - - public void EnumerateMetafile (Metafile metafile, RectangleF destRect, RectangleF srcRect, GraphicsUnit srcUnit, EnumerateMetafileProc callback, IntPtr callbackData) - { - throw new NotImplementedException (); - } - - public void EnumerateMetafile (Metafile metafile, PointF destPoint, RectangleF srcRect, GraphicsUnit srcUnit, EnumerateMetafileProc callback, IntPtr callbackData) - { - throw new NotImplementedException (); - } - - public void EnumerateMetafile (Metafile metafile, Point destPoint, Rectangle srcRect, GraphicsUnit srcUnit, EnumerateMetafileProc callback, IntPtr callbackData) - { - throw new NotImplementedException (); - } - - public void EnumerateMetafile (Metafile metafile, Point [] destPoints, Rectangle srcRect, GraphicsUnit srcUnit, EnumerateMetafileProc callback, IntPtr callbackData) - { - throw new NotImplementedException (); - } - - public void EnumerateMetafile (Metafile metafile, Point [] destPoints, Rectangle srcRect, GraphicsUnit unit, EnumerateMetafileProc callback, IntPtr callbackData, ImageAttributes imageAttr) - { - throw new NotImplementedException (); - } - - public void EnumerateMetafile (Metafile metafile, Rectangle destRect, Rectangle srcRect, GraphicsUnit unit, EnumerateMetafileProc callback, IntPtr callbackData, ImageAttributes imageAttr) - { - throw new NotImplementedException (); - } - - public void EnumerateMetafile (Metafile metafile, Point destPoint, Rectangle srcRect, GraphicsUnit unit, EnumerateMetafileProc callback, IntPtr callbackData, ImageAttributes imageAttr) - { - throw new NotImplementedException (); - } - - public void EnumerateMetafile (Metafile metafile, RectangleF destRect, RectangleF srcRect, GraphicsUnit unit, EnumerateMetafileProc callback, IntPtr callbackData, ImageAttributes imageAttr) - { - throw new NotImplementedException (); - } - - public void EnumerateMetafile (Metafile metafile, PointF [] destPoints, RectangleF srcRect, GraphicsUnit unit, EnumerateMetafileProc callback, IntPtr callbackData, ImageAttributes imageAttr) - { - throw new NotImplementedException (); - } - - public void EnumerateMetafile (Metafile metafile, PointF destPoint, RectangleF srcRect, GraphicsUnit unit, EnumerateMetafileProc callback, IntPtr callbackData, ImageAttributes imageAttr) - { - throw new NotImplementedException (); - } -#endif - #endregion - - #region ExcludeClip - void ExcludeClip(geom.Area area) { - - geom.AffineTransform t = GetFinalTransform(); - if (!t.isIdentity()) { - area = (geom.Area)area.clone(); - area.transform(t); - } - - _clip.NativeObject.subtract(area); - } - - public void ExcludeClip (Rectangle rect) { - ExcludeClip(new geom.Area(rect.NativeObject)); - } - - public void ExcludeClip (Region region) { - if (region == null) - throw new ArgumentNullException("region"); - ExcludeClip(region.NativeObject); - } - #endregion - - #region FillClosedCurve - public void FillClosedCurve (Brush brush, PointF [] points) { - FillClosedCurve (brush, points, FillMode.Alternate); - } - - - public void FillClosedCurve (Brush brush, Point [] points) { - FillClosedCurve (brush, points, FillMode.Alternate); - } - - - public void FillClosedCurve (Brush brush, PointF [] points, FillMode fillmode) { - FillClosedCurve (brush, points, fillmode, 0.5f); - } - - public void FillClosedCurve (Brush brush, Point [] points, FillMode fillmode) { - FillClosedCurve (brush, points, fillmode, 0.5f); - } - - public void FillClosedCurve (Brush brush, PointF [] points, FillMode fillmode, float tension) { - GraphicsPath path = new GraphicsPath(fillmode); - path.AddClosedCurve(points, tension); - FillPath(brush, path); - } - - public void FillClosedCurve (Brush brush, Point [] points, FillMode fillmode, float tension) { - GraphicsPath path = new GraphicsPath(fillmode); - path.AddClosedCurve(points, tension); - FillPath(brush, path); - } - #endregion - - #region FillEllipse - public void FillEllipse (Brush brush, Rectangle rect) { - FillEllipse (brush, rect.X, rect.Y, rect.Width, rect.Height); - } - - public void FillEllipse (Brush brush, RectangleF rect) { - FillEllipse (brush, rect.X, rect.Y, rect.Width, rect.Height); - } - - public void FillEllipse (Brush brush, float x, float y, float width, float height) { - FillShape(brush,new java.awt.geom.Ellipse2D.Float(x,y,width,height)); - } - - public void FillEllipse (Brush brush, int x, int y, int width, int height) { - FillEllipse (brush,(float)x,(float)y,(float)width,(float)height); - } - #endregion - - #region FillPath - public void FillPath (Brush brush, GraphicsPath path) { - if (path == null) - throw new ArgumentNullException("path"); - - FillShape(brush,path); - } - #endregion - - #region FillPie - public void FillPie (Brush brush, Rectangle rect, float startAngle, float sweepAngle) { - FillPie(brush,(float)rect.X,(float)rect.Y,(float)rect.Width,(float)rect.Height,(float)startAngle,(float)sweepAngle); - } - - public void FillPie (Brush brush, int x, int y, int width, int height, int startAngle, int sweepAngle) { - FillPie(brush,(float)x,(float)y,(float)width,(float)height,(float)startAngle,(float)sweepAngle); - } - - public void FillPie (Brush brush, float x, float y, float width, float height, float startAngle, float sweepAngle) { - GraphicsPath path = new GraphicsPath(); - path.AddPie(x, y, width, height, startAngle, sweepAngle); - FillPath(brush, path); - } - #endregion - - #region FillPolygon - public void FillPolygon (Brush brush, PointF [] points) { - FillPolygon(brush, points, FillMode.Alternate); - } - - public void FillPolygon (Brush brush, Point [] points) { - FillPolygon(brush, points, FillMode.Alternate); - } - - public void FillPolygon (Brush brush, Point [] points, FillMode fillMode) { - GraphicsPath path = new GraphicsPath(fillMode); - path.AddPolygon(points); - FillPath(brush,path); - } - - public void FillPolygon (Brush brush, PointF [] points, FillMode fillMode) { - GraphicsPath path = new GraphicsPath(fillMode); - path.AddPolygon(points); - FillPath(brush,path); - } - #endregion - - #region FillRectangle - public void FillRectangle (Brush brush, RectangleF rect) { - FillRectangle (brush, rect.Left, rect.Top, rect.Width, rect.Height); - } - - public void FillRectangle (Brush brush, Rectangle rect) { - FillRectangle (brush, rect.Left, rect.Top, rect.Width, rect.Height); - } - - public void FillRectangle (Brush brush, int x, int y, int width, int height) { - FillRectangle(brush,(float)x,(float)y,(float)width,(float)height); - } - - public void FillRectangle (Brush brush, float x, float y, float width, float height) { - FillShape(brush,new java.awt.geom.Rectangle2D.Float(x,y,width,height)); - } - - public void FillRectangles (Brush brush, Rectangle [] rects) { - GraphicsPath path = new GraphicsPath(); - path.AddRectangles(rects); - FillPath(brush,path); - } - - public void FillRectangles (Brush brush, RectangleF [] rects) { - GraphicsPath path = new GraphicsPath(); - path.AddRectangles(rects); - FillPath(brush,path); - } - #endregion - - #region FillRegion - public void FillRegion (Brush brush, Region region) { - FillShape(brush,region); - } - - #endregion - - public void Flush () { - Flush (FlushIntention.Flush); - } - - - public void Flush (FlushIntention intention) { - if (_image != null) - _image.NativeObject.CurrentImage.NativeImage.flush(); - } - -#if INTPTR_SUPPORTED - [EditorBrowsable (EditorBrowsableState.Advanced)] - public void ReleaseHdc (IntPtr hdc) - { - throw new NotImplementedException(); - } - - [EditorBrowsable (EditorBrowsableState.Advanced)] - public void ReleaseHdcInternal (IntPtr hdc) - { - throw new NotImplementedException (); - } - - [EditorBrowsable (EditorBrowsableState.Advanced)] - public static Graphics FromHdc (IntPtr hdc) - { - throw new NotImplementedException(); - } - - [EditorBrowsable (EditorBrowsableState.Advanced)] - public static Graphics FromHdc (IntPtr hdc, IntPtr hdevice) - { - throw new NotImplementedException (); - } - - [EditorBrowsable (EditorBrowsableState.Advanced)] - public static Graphics FromHdcInternal (IntPtr hdc) - { - throw new NotImplementedException (); - } - - [EditorBrowsable (EditorBrowsableState.Advanced)] - public static Graphics FromHwnd (IntPtr hwnd) - { - throw new NotImplementedException(); - } - - [EditorBrowsable (EditorBrowsableState.Advanced)] - public static Graphics FromHwndInternal (IntPtr hwnd) - { - throw new NotImplementedException (); - } - - internal static Graphics FromXDrawable (IntPtr drawable, IntPtr display) - { - throw new NotImplementedException(); - } - - public static IntPtr GetHalftonePalette () - { - throw new NotImplementedException (); - } - - [EditorBrowsable (EditorBrowsableState.Advanced)] - public IntPtr GetHdc () - { - throw new NotImplementedException(); - } -#endif - - #region GetNearestColor [TODO] - public Color GetNearestColor (Color color) { - throw new NotImplementedException(); - } - #endregion - - #region IntersectClip - void IntersectClip (geom.Area area) { - - geom.AffineTransform t = GetFinalTransform(); - if (!t.isIdentity()) { - area = (geom.Area)area.clone(); - area.transform(t); - } - - _clip.NativeObject.intersect(area); - } - - public void IntersectClip (Region region) { - if (region == null) - throw new ArgumentNullException("region"); - - IntersectClip(region.NativeObject); - } - - public void IntersectClip (RectangleF rect) { - IntersectClip(new geom.Area(rect.NativeObject)); - } - - public void IntersectClip (Rectangle rect) { - IntersectClip(new geom.Area(rect.NativeObject)); - } - #endregion - - #region IsVisible - public bool IsVisible (Point point) { - return IsVisible(point.X,point.Y); - } - - - public bool IsVisible (RectangleF rect) { - return IsVisible ((float)rect.X,(float)rect.Y,(float)rect.Width,(float)rect.Height); - } - - public bool IsVisible (PointF point) { - return IsVisible(point.X,point.Y); - } - - public bool IsVisible (Rectangle rect) { - return IsVisible ((float)rect.X,(float)rect.Y,(float)rect.Width,(float)rect.Height); - } - - public bool IsVisible (float x, float y) { - double dx = x; - double dy = y; - geom.AffineTransform t = GetFinalTransform(); - if (!t.isIdentity()) { - double[] p = new double[] {dx, dy}; - t.transform(p, 0, p, 0, 1); - - dx = p[0]; - dy = p[1]; - } - if (!_clip.NativeObject.contains(dx, dy)) - return false; - - awt.Shape clip = NativeObject.getClip(); - if (clip == null) - return true; - - return clip.contains(dx, dy); - } - - public bool IsVisible (int x, int y) { - return IsVisible ((float)x,(float)y); - } - - public bool IsVisible (float x, float y, float width, float height) { - - geom.AffineTransform t = GetFinalTransform(); - geom.Rectangle2D r = new geom.Rectangle2D.Float(x, y, width, height); - - if (!t.isIdentity()) - r = t.createTransformedShape(r).getBounds2D(); - - return NativeObject.hitClip( - (int)(r.getX()+0.5), (int)(r.getY()+0.5), - (int)(r.getWidth()+0.5), (int)(r.getHeight()+0.5)) - && _clip.NativeObject.intersects(r); - } - - - public bool IsVisible (int x, int y, int width, int height) { - return IsVisible ((float)x,(float)y,(float)width,(float)height); - } - #endregion - - #region MeasureCharacterRanges [TODO] - public Region [] MeasureCharacterRanges (string text, Font font, RectangleF layoutRect, StringFormat stringFormat) { - throw new NotImplementedException(); - } - #endregion - - #region MeasureString [1 method still TODO] - public SizeF MeasureString (string text, Font font) { - return MeasureDraw(text,font,null,new RectangleF(0,0,99999f,99999f),null,false); - } - - - public SizeF MeasureString (string text, Font font, SizeF layoutArea) { - return MeasureDraw(text,font,null,new RectangleF(0,0,layoutArea.Width,layoutArea.Height),null,false); - } - - - public SizeF MeasureString (string text, Font font, int width) { - return MeasureDraw(text,font,null,new RectangleF(0,0,(float)width,99999f),null,false); - } - - - public SizeF MeasureString (string text, Font font, SizeF layoutArea, StringFormat format) { - return MeasureDraw(text,font,null,new RectangleF(0,0,layoutArea.Width,layoutArea.Height),format,false); - } - - - public SizeF MeasureString (string text, Font font, int width, StringFormat format) { - return MeasureDraw(text,font,null,new RectangleF(0,0,(float)width,99999f),format,false); - } - - - public SizeF MeasureString (string text, Font font, PointF origin, StringFormat format) { - //TBD: MeasureDraw still not dealing with clipping region of dc - return MeasureDraw(text,font,null,new RectangleF(origin.X,origin.Y,99999f,99999f),format,false); - } - - - public SizeF MeasureString (string text, Font font, SizeF layoutArea, StringFormat stringFormat, out int charactersFitted, out int linesFilled) { - //TBD: charcount - throw new NotImplementedException(); - } - #endregion - - #region MultiplyTransform - public void MultiplyTransform (Matrix matrix) { - MultiplyTransform (matrix, MatrixOrder.Prepend); - } - - public void MultiplyTransform (Matrix matrix, MatrixOrder order) { - ConcatenateTransform(matrix.NativeObject, order); - } - #endregion - - #region Reset (Clip and Transform) - public void ResetClip () { - _clip.MakeInfinite(); - } - - public void ResetTransform () { - _transform.Reset(); - } - #endregion - - #region RotateTransform - public void RotateTransform (float angle) { - RotateTransform (angle, MatrixOrder.Prepend); - } - - public void RotateTransform (float angle, MatrixOrder order) { - ConcatenateTransform( - geom.AffineTransform.getRotateInstance(java.lang.Math.toRadians(angle)), - order); - } - #endregion - - #region ScaleTransform - public void ScaleTransform (float sx, float sy) { - ScaleTransform (sx, sy, MatrixOrder.Prepend); - } - - public void ScaleTransform (float sx, float sy, MatrixOrder order) { - ConcatenateTransform( - geom.AffineTransform.getScaleInstance(sx, sy), - order); - } - #endregion - - #region SetClip [Must be reviewed - more abstraction needed] - public void SetClip (RectangleF rect) { - SetClip (rect, CombineMode.Replace); - } - - public void SetClip (GraphicsPath path) { - SetClip (path, CombineMode.Replace); - } - - public void SetClip (Rectangle rect) { - SetClip (rect, CombineMode.Replace); - } - - public void SetClip (Graphics g) { - SetClip (g, CombineMode.Replace); - } - - public void SetClip (Graphics g, CombineMode combineMode) { - if(g == null) - throw new NullReferenceException(); - - CombineClipArea(g._clip.NativeObject, combineMode); - } - - public void SetClip (Rectangle rect, CombineMode combineMode) { - SetClip(rect.X,rect.Y,rect.Width,rect.Height,combineMode); - } - public void SetClip (RectangleF rect, CombineMode combineMode) { - SetClip(rect.X,rect.Y,rect.Width,rect.Height,combineMode); - } - - public void SetClip (Region region, CombineMode combineMode) { - if(region == null) - throw new ArgumentNullException("region"); - - CombineClipArea((geom.Area)region.NativeObject.clone(),combineMode); - } - - public void SetClip (GraphicsPath path, CombineMode combineMode) { - if(path == null) - throw new ArgumentNullException("path"); - - CombineClipArea(new geom.Area(path.NativeObject), combineMode); - } - #endregion - - #region Clipping Staff [INTERNAL] - internal Region ScaledClip { - get { - return _clip.Clone(); - } - set { - _clip.NativeObject.reset(); - _clip.NativeObject.add(value.NativeObject); - } - } - internal void SetClip(float x,float y,float width,float height,CombineMode combineMode) { - CombineClipArea(new geom.Area( - new geom.Rectangle2D.Float(x,y,width,height)),combineMode); - } - - void CombineClipArea(geom.Area area, CombineMode combineMode) { - geom.AffineTransform t = GetFinalTransform(); - if (!t.isIdentity()) - area.transform(t); - if (combineMode == CombineMode.Replace) { - _clip.NativeObject.reset(); - _clip.NativeObject.add(area); - return; - } - - geom.Area curClip = _clip.NativeObject; - switch(combineMode) { - case CombineMode.Complement: - curClip.add(area); - break; - case CombineMode.Exclude: - curClip.subtract(area); - break; - case CombineMode.Intersect: - curClip.intersect(area); - break; - case CombineMode.Union: - curClip.add(area); - break; - case CombineMode.Xor: - curClip.exclusiveOr(area); - break; - default: - throw new ArgumentOutOfRangeException(); - } - } - - internal void IntersectScaledClipWithBase(awt.Shape clip) { - NativeObject.clip(clip); - } - - awt.Shape IntersectUserClip(awt.Shape shape, geom.Area clip) { - if (clip == null) - return shape; - - geom.Area area = new geom.Area(shape); - area.intersect(clip); - return area; - } - - awt.Shape IntersectUserClip(awt.Shape shape) { - return IntersectUserClip(shape, _clip.NativeObject); - } - - void RestoreBaseClip() { - if (_nextGraphicsState == null) { - NativeObject.setClip(null); - return; - } - - _nextGraphicsState.RestoreBaseClip(this); - } - - #endregion - - #region TransformPoints - public void TransformPoints (CoordinateSpace destSpace, CoordinateSpace srcSpace, PointF [] pts) { - //TBD:CoordinateSpace - java.awt.geom.AffineTransform tr = this.Transform.NativeObject; - float[] fpts = new float[2]; - for(int i = 0; i< pts.Length; i++) { - fpts[0] = pts[i].X; - fpts[1] = pts[i].Y; - tr.transform(fpts, 0, fpts, 0, 1); - pts[i].X = fpts[0]; - pts[i].Y = fpts[1]; - } - } - - public void TransformPoints (CoordinateSpace destSpace, CoordinateSpace srcSpace, Point [] pts) { - //TBD:CoordinateSpace - java.awt.geom.AffineTransform tr = this.Transform.NativeObject; - float[] fpts = new float[2]; - for(int i = 0; i< pts.Length; i++) { - fpts[0] = pts[i].X; - fpts[1] = pts[i].Y; - tr.transform(fpts, 0, fpts, 0, 1); - pts[i].X = (int)fpts[0]; - pts[i].Y = (int)fpts[1]; - } - } - #endregion - - #region TranslateClip - public void TranslateClip (int dx, int dy) { - TranslateClip((float)dx, (float)dy); - } - - - public void TranslateClip (float dx, float dy) { - double x = dx; - double y = dy; - geom.AffineTransform f = GetFinalTransform(); - - if (!f.isIdentity()) { - double[] p = new double[] {x, y}; - f.deltaTransform(p, 0, p, 0, 1); - - x = p[0]; - y = p[1]; - } - - // It seems .Net does exactly this... - x = Math.Floor(x+0.96875); - y = Math.Floor(y+0.96875); - - geom.AffineTransform t = geom.AffineTransform.getTranslateInstance(x, y); - - _clip.NativeObject.transform(t); - } - #endregion - - #region TranslateTransform - public void TranslateTransform (float dx, float dy) { - TranslateTransform (dx, dy, MatrixOrder.Prepend); - } - - - public void TranslateTransform (float dx, float dy, MatrixOrder order) { - ConcatenateTransform( - geom.AffineTransform.getTranslateInstance(dx, dy), - order); - } - #endregion - - #region Properties [Partial TODO] - public Region Clip { - get { - Region r = _clip.Clone(); - geom.AffineTransform t = GetFinalTransform(); - if (!t.isIdentity()) - r.NativeObject.transform(t.createInverse()); - - return r; - } - set { - SetClip (value, CombineMode.Replace); - } - } - - public RectangleF ClipBounds { - get { - awt.Shape shape = _clip.NativeObject; - if (shape == null) - shape = Region.InfiniteRegion.NativeObject; - - geom.RectangularShape r = shape.getBounds2D(); - geom.AffineTransform t = GetFinalTransform(); - if (!t.isIdentity()) { - geom.AffineTransform it = t.createInverse(); - r = it.createTransformedShape(r).getBounds2D(); - } - - return new RectangleF (r); - } - } - - public CompositingMode CompositingMode { - //TBD:check this carefully - get { - return (NativeObject.getComposite() == awt.AlphaComposite.SrcOver) ? - CompositingMode.SourceOver : CompositingMode.SourceCopy; - } - set { - NativeObject.setComposite( - (value == CompositingMode.SourceOver) ? - awt.AlphaComposite.SrcOver : awt.AlphaComposite.Src); - } - - } - - public CompositingQuality CompositingQuality { - get { - awt.RenderingHints hints = NativeObject.getRenderingHints(); - if(hints.containsKey(awt.RenderingHints.KEY_ALPHA_INTERPOLATION)) { - object value_ai = hints.get(awt.RenderingHints.KEY_ALPHA_INTERPOLATION); - - if (value_ai == awt.RenderingHints.VALUE_ALPHA_INTERPOLATION_SPEED) - return CompositingQuality.HighSpeed; - if (value_ai == awt.RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY) - return CompositingQuality.HighQuality; - if (value_ai == awt.RenderingHints.VALUE_ALPHA_INTERPOLATION_DEFAULT) - return CompositingQuality.Default; - } - - return CompositingQuality.Default; - - } - set { - awt.RenderingHints hints = NativeObject.getRenderingHints(); - switch (value) { - case CompositingQuality.AssumeLinear: - case CompositingQuality.Default: - case CompositingQuality.GammaCorrected: - hints.put(awt.RenderingHints.KEY_ALPHA_INTERPOLATION, - awt.RenderingHints.VALUE_ALPHA_INTERPOLATION_DEFAULT); - break; - case CompositingQuality.HighQuality: - hints.put(awt.RenderingHints.KEY_ALPHA_INTERPOLATION, - awt.RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY); - break; - case CompositingQuality.HighSpeed: - hints.put(awt.RenderingHints.KEY_ALPHA_INTERPOLATION, - awt.RenderingHints.VALUE_ALPHA_INTERPOLATION_SPEED); - break; -// case CompositingQuality.Invalid: -// if(hints.containsKey(awt.RenderingHints.KEY_ALPHA_INTERPOLATION)) -// hints.remove(awt.RenderingHints.KEY_ALPHA_INTERPOLATION); - } - - NativeObject.setRenderingHints(hints); - } - } - - public float DpiX { - get { - return DefaultScreenResolution; - } - } - - public float DpiY { - get { - //TBD: assume 72 (screen) for now - return DpiX; - } - } - - public InterpolationMode InterpolationMode { - get { - awt.RenderingHints hints = NativeObject.getRenderingHints(); - if(hints.containsKey(awt.RenderingHints.KEY_INTERPOLATION)) { - object value_i = hints.get(awt.RenderingHints.KEY_INTERPOLATION); - - if (value_i == awt.RenderingHints.VALUE_INTERPOLATION_BILINEAR) - return InterpolationMode.Bilinear; - if (value_i == awt.RenderingHints.VALUE_INTERPOLATION_BICUBIC) - return InterpolationMode.Bicubic; - if (value_i == awt.RenderingHints.VALUE_INTERPOLATION_NEAREST_NEIGHBOR) - return InterpolationMode.NearestNeighbor; - } - - return InterpolationMode.Default; - } - set { - awt.RenderingHints hints = NativeObject.getRenderingHints(); - - switch (value) { - case InterpolationMode.Bicubic: - case InterpolationMode.HighQualityBicubic: - case InterpolationMode.Low: - hints.put(awt.RenderingHints.KEY_INTERPOLATION, awt.RenderingHints.VALUE_INTERPOLATION_BICUBIC); - break; - case InterpolationMode.High: - case InterpolationMode.Bilinear: - case InterpolationMode.HighQualityBilinear: - hints.put(awt.RenderingHints.KEY_INTERPOLATION, awt.RenderingHints.VALUE_INTERPOLATION_BILINEAR); - break; - case InterpolationMode.Default: - if (hints.containsKey(awt.RenderingHints.KEY_INTERPOLATION)) - hints.remove(awt.RenderingHints.KEY_INTERPOLATION); - break; - case InterpolationMode.NearestNeighbor: - hints.put(awt.RenderingHints.KEY_INTERPOLATION, awt.RenderingHints.VALUE_INTERPOLATION_NEAREST_NEIGHBOR); - break; - case InterpolationMode.Invalid: - throw new ArgumentException(); - default: - throw new ArgumentOutOfRangeException(); - } - - NativeObject.setRenderingHints(hints); - } - } - - public bool IsClipEmpty { - get { - return _clip.IsEmpty(this); - } - } - - public bool IsVisibleClipEmpty { - get { - if (_clip.IsEmpty(this)) - return true; - - return VisibleClipBounds.IsEmpty; - } - } - - public float PageScale { - get { - return _pageScale; - } - set { - _pageScale = value; - } - } - - public GraphicsUnit PageUnit { - get { - return _pageUnit; - } - set { - _pageUnit = value; - } - } - - static internal geom.AffineTransform GetFinalTransform( - geom.AffineTransform transform, GraphicsUnit pageUnit, float pageScale) { - geom.AffineTransform t = null; - if (pageUnit != GraphicsUnit.Display) { - float scale = pageScale * _unitConversion[ (int)pageUnit ]; - if (Math.Abs(scale-1f) > float.Epsilon) - t = geom.AffineTransform.getScaleInstance(scale, scale); - } - - if (t != null) - t.concatenate(transform); - else - t = transform; - - return t; - } - - geom.AffineTransform GetFinalTransform() { - return GetFinalTransform(_transform.NativeObject, PageUnit, PageScale); - } - - public PixelOffsetMode PixelOffsetMode { - get { - return _pixelOffsetMode; - } - set { - _pixelOffsetMode = value; - } - } - - public Point RenderingOrigin { - get { - throw new NotImplementedException(); - } - set { - throw new NotImplementedException(); - } - } - - public SmoothingMode SmoothingMode { - get { - awt.RenderingHints hints = NativeObject.getRenderingHints(); - if(hints.containsKey(awt.RenderingHints.KEY_ANTIALIASING)) { - object value_aa = hints.get(awt.RenderingHints.KEY_ANTIALIASING); - if (value_aa == awt.RenderingHints.VALUE_ANTIALIAS_ON) { - if(hints.containsKey(awt.RenderingHints.KEY_RENDERING)) { - object value_render = hints.get(awt.RenderingHints.KEY_RENDERING); - if (value_render == awt.RenderingHints.VALUE_RENDER_QUALITY) - return SmoothingMode.HighQuality; - if (value_render == awt.RenderingHints.VALUE_RENDER_SPEED) - return SmoothingMode.HighSpeed; - } - - return SmoothingMode.AntiAlias; - } - - if (value_aa == awt.RenderingHints.VALUE_ANTIALIAS_DEFAULT) - return SmoothingMode.Default; - } - return SmoothingMode.None; - - } - - set { - awt.RenderingHints hints = NativeObject.getRenderingHints(); - - switch (value) { - case SmoothingMode.None: - if(hints.containsKey(awt.RenderingHints.KEY_ANTIALIASING)) - hints.remove(awt.RenderingHints.KEY_ANTIALIASING); - if(hints.containsKey(awt.RenderingHints.KEY_RENDERING)) - hints.remove(awt.RenderingHints.KEY_RENDERING); - break; - case SmoothingMode.AntiAlias: - hints.put(awt.RenderingHints.KEY_ANTIALIASING, awt.RenderingHints.VALUE_ANTIALIAS_ON); - break; - case SmoothingMode.HighQuality: - hints.put(awt.RenderingHints.KEY_RENDERING, awt.RenderingHints.VALUE_RENDER_QUALITY); - goto case SmoothingMode.AntiAlias; - case SmoothingMode.HighSpeed: - hints.put(awt.RenderingHints.KEY_RENDERING, awt.RenderingHints.VALUE_RENDER_SPEED); - goto case SmoothingMode.None; - case SmoothingMode.Default: - hints.put(awt.RenderingHints.KEY_RENDERING, awt.RenderingHints.VALUE_RENDER_DEFAULT); - goto case SmoothingMode.AntiAlias; - case SmoothingMode.Invalid: - throw new ArgumentException("Invalid parameter used."); - } - - NativeObject.setRenderingHints(hints); - } - } - - /// - /// Java does not have similar functionality - /// - public int TextContrast { - get { - return _textContrast; - } - - set { - _textContrast = value; - } - } - - public TextRenderingHint TextRenderingHint { - get { - awt.RenderingHints hints = NativeObject.getRenderingHints(); - if(hints.containsKey(java.awt.RenderingHints.KEY_TEXT_ANTIALIASING)) { - if(hints.get(java.awt.RenderingHints.KEY_TEXT_ANTIALIASING) == - java.awt.RenderingHints.VALUE_TEXT_ANTIALIAS_ON) - return TextRenderingHint.AntiAlias; - if(hints.get(java.awt.RenderingHints.KEY_TEXT_ANTIALIASING) == - java.awt.RenderingHints.VALUE_TEXT_ANTIALIAS_OFF) - return TextRenderingHint.SingleBitPerPixel; - } - return TextRenderingHint.SystemDefault; - } - - set { - // TODO implement - awt.RenderingHints hints = NativeObject.getRenderingHints(); - switch (value) { - case TextRenderingHint.AntiAlias: - case TextRenderingHint.AntiAliasGridFit: - case TextRenderingHint.ClearTypeGridFit: - case TextRenderingHint.SingleBitPerPixel: - case TextRenderingHint.SingleBitPerPixelGridFit: - case TextRenderingHint.SystemDefault: - break; - } - } - } - - public Matrix Transform { - get { - return _transform.Clone(); - } - set { - if (value == null) - throw new ArgumentNullException("matrix"); - - if (!value.IsInvertible) - throw new ArgumentException("Invalid parameter used."); - - value.CopyTo(_transform); - } - } - - internal Matrix BaseTransform { - get { - return new Matrix(NativeObject.getTransform()); - } - set { - NativeObject.setTransform(value.NativeObject); - } - } - - internal void PrependBaseTransform(geom.AffineTransform t) { - NativeObject.transform(t); - } - - internal awt.Shape VisibleShape { - get { - return _windowRect; - } - } - - public RectangleF VisibleClipBounds { - get { - if (_clip.IsEmpty(this)) - return RectangleF.Empty; - - geom.Rectangle2D r = _clip.NativeObject.getBounds2D(); - awt.Shape clip = NativeObject.getClip(); - geom.Rectangle2D clipBounds = (clip != null) ? clip.getBounds2D() : _windowRect; - geom.Rectangle2D.intersect(r, clipBounds, r); - geom.AffineTransform t = GetFinalTransform(); - if (!t.isIdentity()) { - geom.AffineTransform it = t.createInverse(); - r = it.createTransformedShape(r).getBounds2D(); - } - - return new RectangleF (r); - } - } - - void ConcatenateTransform(geom.AffineTransform transform, MatrixOrder order) { - geom.AffineTransform at = _transform.NativeObject; - Matrix.Multiply(at, transform, order); - } - #endregion - } -} - diff --git a/mcs/class/System.Drawing/System.Drawing/GraphicsUnit.cs b/mcs/class/System.Drawing/System.Drawing/GraphicsUnit.cs deleted file mode 100644 index 2210bdb2904..00000000000 --- a/mcs/class/System.Drawing/System.Drawing/GraphicsUnit.cs +++ /dev/null @@ -1,42 +0,0 @@ -// -// System.Drawing.GraphicsUnit.cs -// -// (C) 2001 Ximian, Inc. http://www.ximian.com -// Author: Dennis Hayes (dennish@raytek.com) -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; -namespace System.Drawing -{ - [Serializable] - public enum GraphicsUnit { - World = 0, - Display = 1, - Pixel = 2, - Point = 3, - Inch = 4, - Document = 5, - Millimeter = 6 - } -} diff --git a/mcs/class/System.Drawing/System.Drawing/Icon.cs b/mcs/class/System.Drawing/System.Drawing/Icon.cs deleted file mode 100644 index d943b6bfe7b..00000000000 --- a/mcs/class/System.Drawing/System.Drawing/Icon.cs +++ /dev/null @@ -1,555 +0,0 @@ -// -// System.Drawing.Icon.cs -// -// Authors: -// Dennis Hayes (dennish@Raytek.com) -// Andreas Nahr (ClassDevelopment@A-SoftTech.com) -// Sanjay Gupta (gsanjay@novell.com) -// -// Copyright (C) 2002 Ximian, Inc. http://www.ximian.com -// Copyright (C) 2004 Novell, Inc. http://www.novell.com -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; -using System.IO; -using System.Runtime.Serialization; -using System.Runtime.InteropServices; -using System.ComponentModel; - -namespace System.Drawing -{ - [Serializable] - [ComVisible (false)] - [Editor ("System.Drawing.Design.IconEditor, " + Consts.AssemblySystem_Drawing_Design, typeof (System.Drawing.Design.UITypeEditor))] - [TypeConverter(typeof(IconConverter))] - public sealed class Icon : MarshalByRefObject, ISerializable, ICloneable, IDisposable - { - [StructLayout(LayoutKind.Sequential)] - internal struct IconDirEntry { - internal byte width; // Width of icon - internal byte height; // Height of icon - internal byte colorCount; // colors in icon - internal byte reserved; // Reserved - internal ushort planes; // Color Planes - internal ushort bitCount; // Bits per pixel - internal uint bytesInRes; // bytes in resource - internal uint imageOffset; // position in file - }; - - [StructLayout(LayoutKind.Sequential)] - internal struct IconDir { - internal ushort idReserved; // Reserved - internal ushort idType; // resource type (1 for icons) - internal ushort idCount; // how many images? - internal IconDirEntry [] idEntries; // the entries for each image - }; - - [StructLayout(LayoutKind.Sequential)] - internal struct BitmapInfoHeader { - internal uint biSize; - internal int biWidth; - internal int biHeight; - internal ushort biPlanes; - internal ushort biBitCount; - internal uint biCompression; - internal uint biSizeImage; - internal int biXPelsPerMeter; - internal int biYPelsPerMeter; - internal uint biClrUsed; - internal uint biClrImportant; - }; - - [StructLayout(LayoutKind.Sequential)] - internal struct IconImage { - internal BitmapInfoHeader iconHeader; //image header - internal uint [] iconColors; //colors table - internal byte [] iconXOR; // bits for XOR mask - internal byte [] iconAND; //bits for AND mask - }; - - private Size iconSize; - private IntPtr winHandle = IntPtr.Zero; - private IconDir iconDir; - private ushort id; - private IconImage [] imageData; - bool destroyIcon = true; - - private Icon () - { - } - - [MonoTODO ("Implement fully")] - private Icon (IntPtr handle) - { - this.winHandle = handle; - - IconInfo ii; - GDIPlus.GetIconInfo (winHandle, out ii); - if (ii.IsIcon) { - // If this structure defines an icon, the hot spot is always in the center of the icon - iconSize = new Size (ii.xHotspot * 2, ii.yHotspot * 2); - } - else { - throw new NotImplementedException (); - } - - this.destroyIcon = false; - } - - public Icon (Icon original, int width, int height) : this (original, new Size(width, height)) - { - } - - public Icon (Icon original, Size size) - { - this.iconSize = size; - this.winHandle = original.winHandle; - this.iconDir = original.iconDir; - this.imageData = original.imageData; - - int count = iconDir.idCount; - bool sizeObtained = false; - for (int i=0; i= largestSize){ - largestSize = iconDir.idEntries [j].bytesInRes; - this.id = (ushort) j; - this.iconSize.Height = iconDir.idEntries [j].height; - this.iconSize.Width = iconDir.idEntries [j].width; - } - } - } - } - - public Icon (Stream stream) : this (stream, 32, 32) - { - } - - public Icon (Stream stream, int width, int height) - { - InitFromStreamWithSize (stream, width, height); - } - - public Icon (string fileName) : this (new FileStream (fileName, FileMode.Open)) - { - } - - public Icon (Type type, string resource) - { - using (Stream s = type.Assembly.GetManifestResourceStream (type, resource)) { - if (s == null) { - throw new FileNotFoundException ("Resource name was not found: `" + resource + "'"); - } - InitFromStreamWithSize (s, 32, 32); // 32x32 is default - } - } - - private Icon (SerializationInfo info, StreamingContext context) - { - MemoryStream dataStream = null; - int width=0; - int height=0; - foreach (SerializationEntry serEnum in info) { - if (String.Compare(serEnum.Name, "IconData", true) == 0) { - dataStream = new MemoryStream ((byte []) serEnum.Value); - } - if (String.Compare(serEnum.Name, "IconSize", true) == 0) { - Size iconSize = (Size) serEnum.Value; - width = iconSize.Width; - height = iconSize.Height; - } - } - if (dataStream != null && width != 0 && height != 0) { - dataStream.Seek (0, SeekOrigin.Begin); - InitFromStreamWithSize (dataStream, width, height); - } - } - - void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context) - { - MemoryStream ms = new MemoryStream (); - Save (ms); - info.AddValue ("IconSize", this.Size, typeof (Size)); - info.AddValue ("IconData", ms.ToArray ()); - } - - public void Dispose () - { - DisposeIcon (); - GC.SuppressFinalize(this); - } - - void DisposeIcon () - { - if (winHandle ==IntPtr.Zero) - return; - - if (destroyIcon) { - //TODO: will have to call some win32 icon stuff - winHandle = IntPtr.Zero; - } - } - - public object Clone () - { - return new Icon (this, this.Width, this.Height); - } - - public static Icon FromHandle (IntPtr handle) - { - if (handle == IntPtr.Zero) - throw new ArgumentException ("handle"); - - return new Icon (handle); - } - - public void Save (Stream outputStream) - { - if (iconDir.idEntries!=null){ - BinaryWriter bw = new BinaryWriter (outputStream); - //write icondir - bw.Write (iconDir.idReserved); - bw.Write (iconDir.idType); - ushort count = iconDir.idCount; - bw.Write (count); - - //now write iconDirEntries - for (int i=0; i<(int)count; i++){ - IconDirEntry ide = iconDir.idEntries [i]; - bw.Write (ide.width); - bw.Write (ide.height); - bw.Write (ide.colorCount); - bw.Write (ide.reserved); - bw.Write (ide.planes); - bw.Write (ide.bitCount); - bw.Write (ide.bytesInRes); - bw.Write (ide.imageOffset); - } - - //now write iconImage data - for (int i=0; i<(int)count; i++){ - BitmapInfoHeader bih = imageData [i].iconHeader; - bw.Write (bih.biSize); - bw.Write (bih.biWidth); - bw.Write (bih.biHeight); - bw.Write (bih.biPlanes); - bw.Write (bih.biBitCount); - bw.Write (bih.biCompression); - bw.Write (bih.biSizeImage); - bw.Write (bih.biXPelsPerMeter); - bw.Write (bih.biYPelsPerMeter); - bw.Write (bih.biClrUsed); - bw.Write (bih.biClrImportant); - - //now write color table - int colCount = imageData [i].iconColors.Length; - for (int j=0; j 0) { - Bitmap new_bmp; - - new_bmp = new Bitmap(stream); - bmp = new Bitmap(new_bmp, bih.biWidth, bih.biHeight/2); - new_bmp.Dispose(); - } else { - bmp = new Bitmap(stream); - } - - // This hack is so ugly, it's embarassing. - // But icons are small, so it should be ok for now - for (int y = 0; y < bih.biHeight/2; y++) { - for (int x = 0; x < bih.biWidth / 8; x++) { - for (int bit = 7; bit >= 0; bit--) { - if (((ii.iconAND[y * bih.biWidth / 8 +x] >> bit) & 1) != 0) { - bmp.SetPixel(x*8 + 7-bit, bih.biHeight/2 - y - 1, Color.Transparent); - } - } - } - } - - } catch (Exception e) { - throw e; - } finally { - writer.Close (); // closes the underlying stream as well - } - } else { - bmp = new Bitmap (32, 32); - } - - return bmp; - } - - public override string ToString () - { - //is this correct, this is what returned by .Net - return ""; - } - - [Browsable (false)] - public IntPtr Handle { - get { - return winHandle; - } - } - - [Browsable (false)] - public int Height { - get { - return iconSize.Height; - } - } - - public Size Size { - get { - return iconSize; - } - } - - [Browsable (false)] - public int Width { - get { - return iconSize.Width; - } - } - - ~Icon () - { - DisposeIcon (); - } - - private void InitFromStreamWithSize (Stream stream, int width, int height) - { - //read the icon header - if (stream == null || stream.Length == 0) - throw new System.ArgumentException ("The argument 'stream' must be a picture that can be used as a Icon", "stream"); - - BinaryReader reader = new BinaryReader (stream); - - //iconDir = new IconDir (); - iconDir.idReserved = reader.ReadUInt16(); - if (iconDir.idReserved != 0) //must be 0 - throw new System.ArgumentException ("Invalid Argument", "stream"); - - iconDir.idType = reader.ReadUInt16(); - if (iconDir.idType != 1) //must be 1 - throw new System.ArgumentException ("Invalid Argument", "stream"); - - ushort dirEntryCount = reader.ReadUInt16(); - iconDir.idCount = dirEntryCount; - iconDir.idEntries = new IconDirEntry [dirEntryCount]; - imageData = new IconImage [dirEntryCount]; - bool sizeObtained = false; - //now read in the IconDirEntry structures - for (int i=0; i= largestSize) { - largestSize = iconDir.idEntries [j].bytesInRes; - this.id = (ushort) j; - this.iconSize.Height = iconDir.idEntries [j].height; - this.iconSize.Width = iconDir.idEntries [j].width; - } - } - } - - //now read in the icon data - for (int j = 0; j>5)<<2); - - //Determine the XOR array Size - int xorSize = numBytesPerLine * iconHeight; - iidata.iconXOR = new byte [xorSize]; - for (int i=0; i= largestSize){ - largestSize = thisSize; - _bitmap = tmpBmp; - } - } - } - } - - private Icon () { - } - - internal Icon (Bitmap bitmap) { - _bitmap = bitmap; - } - - public Icon (Icon original, int width, int height) { - _bitmap = original._bitmap; - SelectSize (width, height); - } - - public Icon (Icon original, Size size) - :this (original, size.Width, size.Height) { - } - - public Icon (Stream stream) - : this (stream, 32, 32) { - } - - public Icon (Stream stream, int width, int height) - { - _bitmap = new Bitmap (stream, false, ImageFormat.Icon); - SelectSize (width, height); - } - - public Icon (string fileName) { - _bitmap = new Bitmap (fileName, false, ImageFormat.Icon); - } - - public Icon (Type type, string resource) - { - using (Stream s = type.Assembly.GetManifestResourceStream (resource)) { - if (s == null) - throw new FileNotFoundException ("Resource name was not found: `" + resource + "'"); - _bitmap = new Bitmap (s, false, ImageFormat.Icon); - } - } - - private Icon (SerializationInfo info, StreamingContext context) - { - //FIXME, need to check how MS stores Icon structure - //Will serialized form help - throw new NotImplementedException (); - } - #endregion - - void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context) - { - throw new NotImplementedException (); - } - - public void Dispose () - { -#if INTPTR_SUPPORT - if (winHandle!=IntPtr.Zero) - winHandle = IntPtr.Zero; -#endif - } - - public object Clone () - { - Icon newIcon = new Icon (); - newIcon._bitmap = (Bitmap)_bitmap.Clone (); - return newIcon; - } - -#if INTPTR_SUPPORT - public static Icon FromHandle (IntPtr handle) - { - throw new NotImplementedException (); - } -#endif - public void Save (Stream outputStream) { - _bitmap.Save (outputStream, System.Drawing.Imaging.ImageFormat.Icon); - } - - public Bitmap ToBitmap () { - return _bitmap; - } - - public override string ToString () - { - //is this correct, this is what returned by .Net - return ""; - } - -#if INTPTR_SUPPORT - [Browsable (false)] - public IntPtr Handle { - get { - return winHandle; - } - } -#endif - - [Browsable (false)] - public int Height { - get { - return _bitmap.Height; - } - } - - public Size Size { - get { - return _bitmap.Size; - } - } - - [Browsable (false)] - public int Width { - get { - return _bitmap.Width; - } - } - } -} diff --git a/mcs/class/System.Drawing/System.Drawing/IconConverter.cs b/mcs/class/System.Drawing/System.Drawing/IconConverter.cs deleted file mode 100644 index 52710cf7b03..00000000000 --- a/mcs/class/System.Drawing/System.Drawing/IconConverter.cs +++ /dev/null @@ -1,90 +0,0 @@ - // -// System.Drawing.IconConverter.cs -// -// Authors: -// Dennis Hayes (dennish@Raytek.com) -// Andreas Nahr (ClassDevelopment@A-SoftTech.com) -// Sanjay Gupta (gsanjay@novell.com) -// -// (C) 2002 Ximian, Inc -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; -using System.ComponentModel; -using System.Globalization; -using System.IO; - -namespace System.Drawing { - /// - /// Summary description for IconConverter. - /// - public class IconConverter : ExpandableObjectConverter - { - public IconConverter() - { - } - - public override bool CanConvertFrom (ITypeDescriptorContext context, Type srcType) - { - if (srcType == typeof (System.Byte[])) - return true; - else - return false; - } - - public override bool CanConvertTo (ITypeDescriptorContext context, Type destType) - { - if ((destType == typeof (System.Byte[])) || (destType == typeof (System.String))) - return true; - else - return false; - } - - public override object ConvertFrom (ITypeDescriptorContext context, CultureInfo culture, object val) - { - byte [] bytes = val as byte []; - if (bytes == null) - return base.ConvertFrom (context, culture, val); - - MemoryStream ms = new MemoryStream (bytes); - - return new Icon (ms); - } - - public override object ConvertTo (ITypeDescriptorContext context, CultureInfo culture, object val, Type destType ) - { - if ((val is Icon) && (destType == typeof (string))) - return val.ToString (); - else if (CanConvertTo (null, destType)) { - //came here means destType is byte array ; - MemoryStream ms = new MemoryStream (); - ((Icon)val).Save (ms); - return ms.GetBuffer (); - }else - return new NotSupportedException ("IconConverter can not convert from " + val.GetType ()); - } - } -} diff --git a/mcs/class/System.Drawing/System.Drawing/Image.cs b/mcs/class/System.Drawing/System.Drawing/Image.cs deleted file mode 100644 index 83edd59dcfa..00000000000 --- a/mcs/class/System.Drawing/System.Drawing/Image.cs +++ /dev/null @@ -1,774 +0,0 @@ -// -// System.Drawing.Image.cs -// -// Copyright (C) 2002 Ximian, Inc. http://www.ximian.com -// Copyright (C) 2004 Novell, Inc. http://www.novell.com -// -// Author: Christian Meyer (Christian.Meyer@cs.tum.edu) -// Alexandre Pigolkine (pigolkine@gmx.de) -// Jordi Mas i Hernandez (jordi@ximian.com) -// Sanjay Gupta (gsanjay@novell.com) -// Ravindra (rkumar@novell.com) -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; -using System.Runtime.Remoting; -using System.Runtime.Serialization; -using System.Runtime.InteropServices; -using System.ComponentModel; -using System.Drawing.Imaging; -using System.IO; -using System.Reflection; - -namespace System.Drawing -{ -[Serializable] -[ComVisible (true)] -[Editor ("System.Drawing.Design.ImageEditor, " + Consts.AssemblySystem_Drawing_Design, typeof (System.Drawing.Design.UITypeEditor))] -[TypeConverter (typeof(ImageConverter))] -[ImmutableObject (true)] -public abstract class Image : MarshalByRefObject, IDisposable , ICloneable, ISerializable -{ - public delegate bool GetThumbnailImageAbort(); - - internal IntPtr nativeObject = IntPtr.Zero; - - - // constructor - internal Image() - { - - } - - private Image (SerializationInfo info, StreamingContext context) - { - foreach (SerializationEntry serEnum in info) { - if (String.Compare(serEnum.Name, "Data", true) == 0) { - byte[] bytes = (byte[]) serEnum.Value; - - if (bytes != null) { - InitFromStream(new MemoryStream(bytes)); - } - } - } - } - - private static bool IsIndexedPixelFormat(PixelFormat pixfmt) - { - return ((pixfmt & PixelFormat.Indexed) != 0); - } - - - void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context) - { - MemoryStream ms = new MemoryStream (); - this.Save (ms, ImageFormat.Bmp); - info.AddValue ("Data", ms.ToArray ()); - } - - // public methods - // static - public static Image FromFile(string filename) - { - return FromFile (filename, false); - } - - public static Image FromFile(string filename, bool useEmbeddedColorManagement) - { - IntPtr imagePtr; - Status st; - - if (!File.Exists (filename)) - throw new FileNotFoundException (filename); - - if (useEmbeddedColorManagement) - st = GDIPlus.GdipLoadImageFromFileICM (filename, out imagePtr); - else - st = GDIPlus.GdipLoadImageFromFile (filename, out imagePtr); - - GDIPlus.CheckStatus (st); - return new Bitmap (imagePtr); - } - - public static Bitmap FromHbitmap(IntPtr hbitmap) - { - return FromHbitmap (hbitmap, IntPtr.Zero); - } - - public static Bitmap FromHbitmap(IntPtr hbitmap, IntPtr hpalette) - { - IntPtr imagePtr; - Status st; - - st = GDIPlus.GdipCreateBitmapFromHBITMAP (hbitmap, hpalette, out imagePtr); - - GDIPlus.CheckStatus (st); - return new Bitmap (imagePtr); - } - - public static Image FromStream (Stream stream) - { - return new Bitmap (stream); - } - - public static Image FromStream (Stream stream, bool useECM) - { - return new Bitmap (stream, useECM); - } - - public static int GetPixelFormatSize(PixelFormat pixfmt) - { - int result = 0; - switch (pixfmt) { - case PixelFormat.Format16bppArgb1555: - case PixelFormat.Format16bppGrayScale: - case PixelFormat.Format16bppRgb555: - case PixelFormat.Format16bppRgb565: - result = 16; - break; - case PixelFormat.Format1bppIndexed: - result = 1; - break; - case PixelFormat.Format24bppRgb: - result = 24; - break; - case PixelFormat.Format32bppArgb: - case PixelFormat.Format32bppPArgb: - case PixelFormat.Format32bppRgb: - result = 32; - break; - case PixelFormat.Format48bppRgb: - result = 48; - break; - case PixelFormat.Format4bppIndexed: - result = 4; - break; - case PixelFormat.Format64bppArgb: - case PixelFormat.Format64bppPArgb: - result = 64; - break; - case PixelFormat.Format8bppIndexed: - result = 8; - break; - } - return result; - } - - public static bool IsAlphaPixelFormat(PixelFormat pixfmt) - { - bool result = false; - switch (pixfmt) { - case PixelFormat.Format16bppArgb1555: - case PixelFormat.Format32bppArgb: - case PixelFormat.Format32bppPArgb: - case PixelFormat.Format64bppArgb: - case PixelFormat.Format64bppPArgb: - result = true; - break; - case PixelFormat.Format16bppGrayScale: - case PixelFormat.Format16bppRgb555: - case PixelFormat.Format16bppRgb565: - case PixelFormat.Format1bppIndexed: - case PixelFormat.Format24bppRgb: - case PixelFormat.Format32bppRgb: - case PixelFormat.Format48bppRgb: - case PixelFormat.Format4bppIndexed: - case PixelFormat.Format8bppIndexed: - result = false; - break; - } - return result; - } - - public static bool IsCanonicalPixelFormat (PixelFormat pixfmt) - { - return ((pixfmt & PixelFormat.Canonical) != 0); - } - - public static bool IsExtendedPixelFormat (PixelFormat pixfmt) - { - return ((pixfmt & PixelFormat.Extended) != 0); - } - - internal void InitFromStream (Stream stream) - { - IntPtr imagePtr; - Status st; - - // Seeking required - if (!stream.CanSeek) { - byte[] buffer = new byte[256]; - int index = 0; - int count; - - do { - if (buffer.Length < index + 256) { - byte[] newBuffer = new byte[buffer.Length * 2]; - Array.Copy(buffer, newBuffer, buffer.Length); - buffer = newBuffer; - } - count = stream.Read(buffer, index, 256); - index += count; - } - while (count != 0); - - stream = new MemoryStream(buffer, 0, index); - } - - // check for Unix platforms - see FAQ for more details - // http://www.mono-project.com/FAQ:_Technical#How_to_detect_the_execution_platform_.3F - int platform = (int) Environment.OSVersion.Platform; - if ((platform == 4) || (platform == 128)) { - // Unix, with libgdiplus - // We use a custom API for this, because there's no easy way - // to get the Stream down to libgdiplus. So, we wrap the stream - // with a set of delegates. - GDIPlus.GdiPlusStreamHelper sh = new GDIPlus.GdiPlusStreamHelper (stream); - - st = GDIPlus.GdipLoadImageFromDelegate_linux (sh.GetHeaderDelegate, sh.GetBytesDelegate, - sh.PutBytesDelegate, sh.SeekDelegate, sh.CloseDelegate, sh.SizeDelegate, out imagePtr); - } else { - // this is MS-land - st = GDIPlus.GdipLoadImageFromStream(new ComIStreamWrapper(stream), out imagePtr); - } - - GDIPlus.CheckStatus (st); - nativeObject = imagePtr; - } - - // non-static - public RectangleF GetBounds (ref GraphicsUnit pageUnit) - { - RectangleF source; - - Status status = GDIPlus.GdipGetImageBounds (nativeObject, out source, ref pageUnit); - GDIPlus.CheckStatus (status); - - return source; - } - - public EncoderParameters GetEncoderParameterList(Guid format) - { - Status status; - uint sz; - - status = GDIPlus.GdipGetEncoderParameterListSize (nativeObject, ref format, out sz); - GDIPlus.CheckStatus (status); - - IntPtr rawEPList = Marshal.AllocHGlobal ((int) sz); - EncoderParameters eps; - - try { - status = GDIPlus.GdipGetEncoderParameterList (nativeObject, ref format, sz, rawEPList); - eps = EncoderParameters.FromNativePtr (rawEPList); - GDIPlus.CheckStatus (status); - } catch { - Marshal.FreeHGlobal (rawEPList); - throw; - } - - Marshal.FreeHGlobal (rawEPList); - - return eps; - } - - public int GetFrameCount(FrameDimension dimension) - { - int count; - Guid guid = dimension.Guid; - Status status = GDIPlus.GdipImageGetFrameCount (nativeObject, ref guid, out count); - - GDIPlus.CheckStatus (status); - - return count; - - } - - public PropertyItem GetPropertyItem(int propid) - { - int propSize; - IntPtr property; - PropertyItem item = new PropertyItem (); - GdipPropertyItem gdipProperty = new GdipPropertyItem (); - Status status; - - status = GDIPlus.GdipGetPropertyItemSize (nativeObject, propid, - out propSize); - GDIPlus.CheckStatus (status); - - /* Get PropertyItem */ - property = Marshal.AllocHGlobal (propSize); - status = GDIPlus.GdipGetPropertyItem (nativeObject, propid, propSize, - property); - GDIPlus.CheckStatus (status); - gdipProperty = (GdipPropertyItem) Marshal.PtrToStructure ((IntPtr)property, - typeof (GdipPropertyItem)); - GdipPropertyItem.MarshalTo (gdipProperty, item); - - Marshal.FreeHGlobal (property); - return item; - } - - public Image GetThumbnailImage(int thumbWidth, int thumbHeight, Image.GetThumbnailImageAbort callback, IntPtr callbackData) - { - Status status; - Image ThumbNail; - Graphics g; - - ThumbNail=new Bitmap(thumbWidth, thumbHeight); - g=Graphics.FromImage(ThumbNail); - - status = GDIPlus.GdipDrawImageRectRectI(g.nativeObject, nativeObject, - 0, 0, thumbWidth, thumbHeight, - 0, 0, this.Width, this.Height, - GraphicsUnit.Pixel, IntPtr.Zero, null, IntPtr.Zero); - GDIPlus.CheckStatus (status); - g.Dispose(); - - return(ThumbNail); - } - - - public void RemovePropertyItem (int propid) - { - Status status = GDIPlus.GdipRemovePropertyItem (nativeObject, propid); - GDIPlus.CheckStatus (status); - } - - public void RotateFlip (RotateFlipType rotateFlipType) - { - Status status = GDIPlus.GdipImageRotateFlip (nativeObject, rotateFlipType); - GDIPlus.CheckStatus (status); - } - - internal ImageCodecInfo findEncoderForFormat (ImageFormat format) - { - ImageCodecInfo[] encoders = ImageCodecInfo.GetImageEncoders(); - ImageCodecInfo encoder = null; - - if (format.Guid.Equals (ImageFormat.MemoryBmp.Guid)) - format = ImageFormat.Bmp; - - /* Look for the right encoder for our format*/ - for (int i = 0; i < encoders.Length; i++) { - if (encoders[i].FormatID.Equals (format.Guid)) { - encoder = encoders[i]; - break; - } - } - - return encoder; - } - - public void Save (string filename) - { - Save (filename, RawFormat); - } - - public void Save(string filename, ImageFormat format) - { - ImageCodecInfo encoder = findEncoderForFormat (format); - - if (encoder == null) - throw new ArgumentException ("No codec available for format:" + format.Guid); - - Save (filename, encoder, null); - } - - public void Save(string filename, ImageCodecInfo encoder, EncoderParameters encoderParams) - { - Status st; - Guid guid = encoder.Clsid; - - if (encoderParams == null) { - st = GDIPlus.GdipSaveImageToFile (nativeObject, filename, ref guid, IntPtr.Zero); - } else { - IntPtr nativeEncoderParams = encoderParams.ToNativePtr (); - st = GDIPlus.GdipSaveImageToFile (nativeObject, filename, ref guid, nativeEncoderParams); - Marshal.FreeHGlobal (nativeEncoderParams); - } - - GDIPlus.CheckStatus (st); - } - - public void Save (Stream stream, ImageFormat format) - { - ImageCodecInfo encoder = findEncoderForFormat (format); - - if (encoder == null) - throw new ArgumentException ("No codec available for format:" + format.Guid); - - Save (stream, encoder, null); - } - - public void Save(Stream stream, ImageCodecInfo encoder, EncoderParameters encoderParams) - { - Status st; - IntPtr nativeEncoderParams; - Guid guid = encoder.Clsid; - - if (encoderParams == null) - nativeEncoderParams = IntPtr.Zero; - else - nativeEncoderParams = encoderParams.ToNativePtr (); - - try { - // check for Unix platforms - see FAQ for more details - // http://www.mono-project.com/FAQ:_Technical#How_to_detect_the_execution_platform_.3F - int platform = (int) Environment.OSVersion.Platform; - if ((platform == 4) || (platform == 128)) { - GDIPlus.GdiPlusStreamHelper sh = new GDIPlus.GdiPlusStreamHelper (stream); - st = GDIPlus.GdipSaveImageToDelegate_linux (nativeObject, sh.GetBytesDelegate, sh.PutBytesDelegate, - sh.SeekDelegate, sh.CloseDelegate, sh.SizeDelegate, ref guid, nativeEncoderParams); - } - else - st = GDIPlus.GdipSaveImageToStream(new HandleRef(this, nativeObject), new ComIStreamWrapper(stream), ref guid, new HandleRef(encoderParams, nativeEncoderParams)); - } - finally { - if (nativeEncoderParams != IntPtr.Zero) - Marshal.FreeHGlobal (nativeEncoderParams); - } - - GDIPlus.CheckStatus (st); - } - - public void SaveAdd (EncoderParameters encoderParams) - { - Status st; - - IntPtr nativeEncoderParams = encoderParams.ToNativePtr (); - st = GDIPlus.GdipSaveAdd (nativeObject, nativeEncoderParams); - Marshal.FreeHGlobal (nativeEncoderParams); - GDIPlus.CheckStatus (st); - } - - public void SaveAdd (Image image, EncoderParameters encoderParams) - { - Status st; - - IntPtr nativeEncoderParams = encoderParams.ToNativePtr (); - st = GDIPlus.GdipSaveAddImage (nativeObject, image.NativeObject, nativeEncoderParams); - Marshal.FreeHGlobal (nativeEncoderParams); - GDIPlus.CheckStatus (st); - } - - public int SelectActiveFrame(FrameDimension dimension, int frameIndex) - { - Guid guid = dimension.Guid; - Status st = GDIPlus.GdipImageSelectActiveFrame (nativeObject, ref guid, frameIndex); - - GDIPlus.CheckStatus (st); - - return frameIndex; - } - - public void SetPropertyItem(PropertyItem propitem) - { - IntPtr property; - int size = Marshal.SizeOf (typeof(GdipPropertyItem)); - property = Marshal.AllocHGlobal (size); - - Marshal.StructureToPtr (propitem, property, true); - Status status = GDIPlus.GdipSetPropertyItem (nativeObject, property); - GDIPlus.CheckStatus (status); - } - - // properties - [Browsable (false)] - public int Flags { - get { - int flags; - - Status status = GDIPlus.GdipGetImageFlags (nativeObject, out flags); - GDIPlus.CheckStatus (status); - return flags; - } - } - - [Browsable (false)] - public Guid[] FrameDimensionsList { - get { - uint found; - Status status = GDIPlus.GdipImageGetFrameDimensionsCount (nativeObject, out found); - GDIPlus.CheckStatus (status); - Guid [] guid = new Guid [found]; - status = GDIPlus.GdipImageGetFrameDimensionsList (nativeObject, guid, found); - GDIPlus.CheckStatus (status); - return guid; - } - } - - [DefaultValue (false)] - [Browsable (false)] - [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)] - public int Height { - get { - int height; - Status status = GDIPlus.GdipGetImageHeight (nativeObject, out height); - GDIPlus.CheckStatus (status); - - return height; - } - } - - public float HorizontalResolution { - get { - float resolution; - - Status status = GDIPlus.GdipGetImageHorizontalResolution (nativeObject, out resolution); - GDIPlus.CheckStatus (status); - - return resolution; - } - } - - [Browsable (false)] - public ColorPalette Palette { - get { - return retrieveGDIPalette(); - } - set { - storeGDIPalette(value); - } - } - - internal ColorPalette retrieveGDIPalette() - { - ColorPalette ret = new ColorPalette(); - if (!IsIndexedPixelFormat (PixelFormat)) { - return ret; - } - Status st; - int bytes; - - st = GDIPlus.GdipGetImagePaletteSize (nativeObject, out bytes); - GDIPlus.CheckStatus (st); - IntPtr palette_data = Marshal.AllocHGlobal (bytes); - try { - st = GDIPlus.GdipGetImagePalette (nativeObject, palette_data, bytes); - GDIPlus.CheckStatus (st); - ret.setFromGDIPalette (palette_data); - return ret; - } - - finally { - Marshal.FreeHGlobal (palette_data); - } - } - - internal void storeGDIPalette(ColorPalette palette) - { - if (palette == null) { - throw new ArgumentNullException("palette"); - } - IntPtr palette_data = palette.getGDIPalette(); - if (palette_data == IntPtr.Zero) { - return; - } - - try { - Status st = GDIPlus.GdipSetImagePalette (nativeObject, palette_data); - GDIPlus.CheckStatus (st); - } - - finally { - Marshal.FreeHGlobal(palette_data); - } - } - - - public SizeF PhysicalDimension { - get { - float width, height; - Status status = GDIPlus.GdipGetImageDimension (nativeObject, out width, out height); - GDIPlus.CheckStatus (status); - - return new SizeF (width, height); - } - } - - public PixelFormat PixelFormat { - get { - PixelFormat pixFormat; - Status status = GDIPlus.GdipGetImagePixelFormat (nativeObject, out pixFormat); - GDIPlus.CheckStatus (status); - - return pixFormat; - } - } - - [Browsable (false)] - public int[] PropertyIdList { - get { - uint propNumbers; - - Status status = GDIPlus.GdipGetPropertyCount (nativeObject, - out propNumbers); - GDIPlus.CheckStatus (status); - - int [] idList = new int [propNumbers]; - status = GDIPlus.GdipGetPropertyIdList (nativeObject, - propNumbers, idList); - GDIPlus.CheckStatus (status); - - return idList; - } - } - - [Browsable (false)] - public PropertyItem[] PropertyItems { - get { - int propNums, propsSize, propSize; - IntPtr properties, propPtr; - PropertyItem[] items; - GdipPropertyItem gdipProperty = new GdipPropertyItem (); - Status status; - - status = GDIPlus.GdipGetPropertySize (nativeObject, out propsSize, out propNums); - GDIPlus.CheckStatus (status); - - items = new PropertyItem [propNums]; - - if (propNums == 0) - return items; - - /* Get PropertyItem list*/ - properties = Marshal.AllocHGlobal (propsSize); - status = GDIPlus.GdipGetAllPropertyItems (nativeObject, propsSize, - propNums, properties); - GDIPlus.CheckStatus (status); - - propSize = Marshal.SizeOf (gdipProperty); - propPtr = properties; - - for (int i = 0; i < propNums; i++, propPtr = new IntPtr (propPtr.ToInt64 () + propSize)) - { - gdipProperty = (GdipPropertyItem) Marshal.PtrToStructure - (propPtr, typeof (GdipPropertyItem)); - items [i] = new PropertyItem (); - GdipPropertyItem.MarshalTo (gdipProperty, items [i]); - } - - Marshal.FreeHGlobal (properties); - return items; - } - } - - public ImageFormat RawFormat { - get { - Guid guid; - Status st = GDIPlus.GdipGetImageRawFormat (nativeObject, out guid); - - GDIPlus.CheckStatus (st); - return new ImageFormat (guid); - } - } - - public Size Size { - get { - return new Size(Width, Height); - } - } - - public float VerticalResolution { - get { - float resolution; - - Status status = GDIPlus.GdipGetImageVerticalResolution (nativeObject, out resolution); - GDIPlus.CheckStatus (status); - - return resolution; - } - } - - [DefaultValue (false)] - [Browsable (false)] - [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)] - public int Width { - get { - int width; - Status status = GDIPlus.GdipGetImageWidth (nativeObject, out width); - GDIPlus.CheckStatus (status); - - return width; - } - } - - internal IntPtr NativeObject{ - get{ - return nativeObject; - } - set { - nativeObject = value; - } - } - - public void Dispose () - { - Dispose (true); - System.GC.SuppressFinalize (this); - } - - ~Image () - { - Dispose (false); - } - - private void DisposeResources () - { - Status status = GDIPlus.GdipDisposeImage (nativeObject); - GDIPlus.CheckStatus (status); - } - - protected virtual void Dispose (bool disposing) - { - if (nativeObject != IntPtr.Zero){ - DisposeResources (); - nativeObject = IntPtr.Zero; - } - } - - public virtual object Clone() - { - - IntPtr newimage = IntPtr.Zero; - - if (!(this is Bitmap)) - throw new NotImplementedException (); - - Status status = GDIPlus.GdipCloneImage (NativeObject, out newimage); - GDIPlus.CheckStatus (status); - - if (this is Bitmap){ - return new Bitmap (newimage); - } - - throw new NotImplementedException (); - } - -} - -} diff --git a/mcs/class/System.Drawing/System.Drawing/Image.jvm.cs b/mcs/class/System.Drawing/System.Drawing/Image.jvm.cs deleted file mode 100644 index ceac4b03fc6..00000000000 --- a/mcs/class/System.Drawing/System.Drawing/Image.jvm.cs +++ /dev/null @@ -1,556 +0,0 @@ -// -// System.Drawing.Image.cs -// -// (C) 2002 Ximian, Inc. http://www.ximian.com -// Author: Christian Meyer (Christian.Meyer@cs.tum.edu) -// Alexandre Pigolkine (pigolkine@gmx.de) -// Jordi Mas i Hernandez (jordi@ximian.com) -// -namespace System.Drawing { - - using System; - using System.Runtime.Remoting; - using System.Runtime.Serialization; - using System.Runtime.InteropServices; - using System.ComponentModel; - using System.Drawing; - using System.Drawing.Imaging; - using System.IO; - using System.Xml; - using Mainsoft.Drawing.Imaging; - - using BufferedImage = java.awt.image.BufferedImage; - using java.io; - using javax.imageio; - using javax.imageio.stream; - using vmw.common; - using awt = java.awt; - using image = java.awt.image; - - public abstract class Image : MarshalByRefObject, IDisposable , ICloneable { - #region Vars - PlainImageCollection _nativeObject = new PlainImageCollection(); - protected int _flags = 0; - - //consider using Image[] to support many thumbnails per Image - #endregion - - #region flags enum - [Flags] - protected enum ImageFlags { - ImageFlagsNone = 0, - ImageFlagsScalable = 0x0001, - ImageFlagsHasAlpha = 0x0002, - ImageFlagsHasTranslucent = 0x0004, - ImageFlagsPartiallyScalable = 0x0008, - ImageFlagsColorSpaceRGB = 0x0010, - ImageFlagsColorSpaceCMYK = 0x0020, - ImageFlagsColorSpaceGRAY = 0x0040, - ImageFlagsColorSpaceYCBCR = 0x0080, - ImageFlagsColorSpaceYCCK = 0x0100, - ImageFlagsHasRealDPI = 0x1000, - ImageFlagsHasRealPixelSize = 0x2000, - ImageFlagsReadOnly = 0x00010000, - ImageFlagsCaching = 0x00020000 - } - #endregion - - #region Constructor - public void Dispose () { - } - - protected virtual void DisposeResources () { - } - - protected virtual void Dispose (bool disposing) { - } - - // Derived classes must call Initialize () when they use this constructor - protected Image () { - } - - protected Image (java.awt.Image nativeObject) : this(nativeObject, ImageFormat.MemoryBmp) { - } - - protected Image (java.awt.Image nativeObject, ImageFormat format) { - PlainImage pi = new PlainImage( nativeObject, null, format, 0, 0, FrameDimension.Page ); - Initialize( pi, false ); - } - - protected void Initialize (PlainImage pi, bool addToCollection) { - if (!addToCollection) - NativeObject.Clear(); - - NativeObject.Add( pi ); - } - - #endregion - - #region Internals - - internal PlainImageCollection NativeObject { - get { - return _nativeObject; - } - } - - internal PlainImage CurrentImage { - get { - return NativeObject.CurrentImage; - } - } - - #endregion - - #region FromFile - public static Image FromFile(string filename) { - //FIXME: check if it's not a metafile, throw NotImplementedException - return new Bitmap (filename); - } - - public static Image FromFile(string filename, bool useIcm) { - //FIXME: check if it's not a metafile, throw NotImplementedException - return new Bitmap (filename, useIcm); - } - #endregion - - #region GetThumbnailImageAbort - [Serializable] - public delegate bool GetThumbnailImageAbort(); - #endregion - - #region Clone - public virtual object Clone() { - throw new NotImplementedException ("Must be implemented in child class"); - } - #endregion - - // static - #region FromStream - public static Image FromStream (Stream stream) { - //FIXME: check if it's not a metafile, throw NotImplementedException - return new Bitmap (stream); - } - - public static Image FromStream (Stream stream, bool useIcm) { - //FIXME: check if it's not a metafile, throw NotImplementedException - return new Bitmap (stream, useIcm); - } - #endregion - - #region GetPixelFormatSize - public static int GetPixelFormatSize(PixelFormat pixfmt) { - - int result = 0; - switch (pixfmt) { - case PixelFormat.Format16bppArgb1555: - case PixelFormat.Format16bppGrayScale: - case PixelFormat.Format16bppRgb555: - case PixelFormat.Format16bppRgb565: - result = 16; - break; - case PixelFormat.Format1bppIndexed: - result = 1; - break; - case PixelFormat.Format24bppRgb: - result = 24; - break; - case PixelFormat.Format32bppArgb: - case PixelFormat.Format32bppPArgb: - case PixelFormat.Format32bppRgb: - result = 32; - break; - case PixelFormat.Format48bppRgb: - result = 48; - break; - case PixelFormat.Format4bppIndexed: - result = 4; - break; - case PixelFormat.Format64bppArgb: - case PixelFormat.Format64bppPArgb: - result = 64; - break; - case PixelFormat.Format8bppIndexed: - result = 8; - break; - } - return result; - } - #endregion - - #region IsAlphaPixelFormat - public static bool IsAlphaPixelFormat(PixelFormat pixfmt) { - return (pixfmt & PixelFormat.Alpha) != PixelFormat.Undefined; - } - #endregion - - #region IsCanonicalPixelFormat - // TBD: implement this - public static bool IsCanonicalPixelFormat (PixelFormat pixfmt) { - return (pixfmt & PixelFormat.Canonical) != PixelFormat.Undefined; - } - #endregion - - #region IsExtendedPixelFormat - // TBD: implement this - public static bool IsExtendedPixelFormat (PixelFormat pixfmt) { - return (pixfmt & PixelFormat.Extended) != PixelFormat.Undefined; - } - #endregion - - // non-static - #region GetBounds - public RectangleF GetBounds (ref GraphicsUnit pageUnit) { - pageUnit = GraphicsUnit.Pixel; //java.awt.Image always returns pixels - return new RectangleF((float)0,(float)0,(float)Width,(float)Height); - } - #endregion - - #region GetEncoderParameterList - // TBD: implement this - public EncoderParameters GetEncoderParameterList(Guid encoder) { - throw new NotImplementedException (); - } - #endregion - - #region GetFrameCount - public int GetFrameCount(FrameDimension dimension) { - // FALLBACK: now, only one dimension assigned for all frames - if (dimension.Guid != CurrentImage.Dimension.Guid) - throw new ArgumentException ("dimension"); - - return NativeObject.Count; - } - #endregion - - #region GetPropertyItem - // TBD: implement this - public PropertyItem GetPropertyItem(int propid) { - throw new NotImplementedException (); - } - #endregion - - #region RemovePropertyItem - // TBD: implement this - public void RemovePropertyItem (int propid) { - throw new NotImplementedException (); - } - #endregion - - #region RotateFlip - public void RotateFlip (RotateFlipType rotateFlipType) { - awt.geom.AffineTransform tx; - - if ( !(CurrentImage.NativeImage is image.BufferedImage) ) - // TBD: This implementation is for raster formats only - throw new NotImplementedException("Only raster formats are supported"); - - switch (rotateFlipType) { - case RotateFlipType.RotateNoneFlipNone : - return; - - case RotateFlipType.Rotate90FlipNone : - tx = awt.geom.AffineTransform.getRotateInstance(Math.PI / 2); - tx.translate( 0, -Height ); - break; - - case RotateFlipType.Rotate180FlipNone : - tx = awt.geom.AffineTransform.getScaleInstance(-1, -1); - tx.translate( -Width, -Height ); - break; - - case RotateFlipType.Rotate270FlipNone : - tx = awt.geom.AffineTransform.getRotateInstance(-Math.PI / 2); - tx.translate( -Width, 0 ); - break; - - case RotateFlipType.RotateNoneFlipX : - tx = awt.geom.AffineTransform.getScaleInstance(-1, 1); - tx.translate( -Width, 0 ); - break; - - case RotateFlipType.Rotate90FlipX : - tx = awt.geom.AffineTransform.getRotateInstance(Math.PI / 2); - tx.scale(1, -1); - break; - - case RotateFlipType.Rotate180FlipX : - tx = awt.geom.AffineTransform.getScaleInstance(1, -1); - tx.translate( 0, -Height ); - break; - - case RotateFlipType.Rotate270FlipX : - tx = awt.geom.AffineTransform.getRotateInstance(Math.PI / 2); - tx.scale(-1, 1); - tx.translate( -Width, -Height ); - break; - - default: - throw new ArgumentOutOfRangeException(); - } - image.AffineTransformOp op = new image.AffineTransformOp(tx, image.AffineTransformOp.TYPE_NEAREST_NEIGHBOR); - CurrentImage.NativeImage = op.filter((BufferedImage)CurrentImage.NativeImage, null); - } - #endregion - - #region Save - protected abstract void InternalSave (ImageOutputStream output, Guid clsid); - - public void Save (Stream stream, ImageCodecInfo encoder, EncoderParameters encoderParams) { - //TBD: implement encoderParams - java.io.OutputStream jos = vmw.common.IOUtils.ToOutputStream (stream); - MemoryCacheImageOutputStream output = new MemoryCacheImageOutputStream(jos); - - InternalSave (output, encoder.Clsid); - } - - public void Save(string filename, ImageCodecInfo encoder, EncoderParameters encoderParams) { - //TBD: implement encoderParams - java.io.File jf = vmw.common.IOUtils.getJavaFile (filename); - FileImageOutputStream output = new FileImageOutputStream (jf); - InternalSave (output, encoder.Clsid); - } - - public void Save (string filename) { - Save (filename, ImageFormat.Png); - } - - public void Save (Stream stream, ImageFormat format) { - Save (stream, ImageCodec.FindEncoder ( - ImageCodec.ImageFormatToClsid (format)), null); - } - - public void Save(string filename, ImageFormat format) { - Save (filename, ImageCodec.FindEncoder ( - ImageCodec.ImageFormatToClsid (format)), null); - } - #endregion - - #region SaveAdd - // TBD: implement this - public void SaveAdd(EncoderParameters encoderParams) { - throw new NotImplementedException (); - } - - public void SaveAdd(Image image, EncoderParameters encoderParams) { - throw new NotImplementedException (); - } - #endregion - - #region SelectActiveFrame - - // TBD: .Net does not load all frames at the initialization. New frames loaded by request. - public int SelectActiveFrame(FrameDimension dimension, int frameIndex) { - // FALLBACK: now, only one dimension assigned for all frames - if (dimension.Guid != CurrentImage.Dimension.Guid) - throw new ArgumentException ("dimension"); - - if (frameIndex < NativeObject.Count) - NativeObject.CurrentImageIndex = frameIndex; - - return frameIndex; - } - #endregion - - #region SetPropertyItem - // TBD: implement this - public void SetPropertyItem(PropertyItem propitem) { - throw new NotImplementedException (); - } - #endregion - - // properties - #region Flags - public int Flags { - // TDB: ImageFlagsScalable, ImageFlagsHasTranslucent, ImageFlagsPartiallyScalable, ImageFlagsCaching - get { - image.ColorModel colorModel = ((BufferedImage)CurrentImage.NativeImage).getColorModel(); - int t = colorModel.getColorSpace().getType(); - - if (t == awt.color.ColorSpace.TYPE_RGB) - _flags |= (int)ImageFlags.ImageFlagsColorSpaceRGB; - else if (t == awt.color.ColorSpace.TYPE_CMYK) - _flags |= (int)ImageFlags.ImageFlagsColorSpaceCMYK; - else if (t == awt.color.ColorSpace.TYPE_GRAY) - _flags |= (int)ImageFlags.ImageFlagsColorSpaceGRAY; - else if (t == awt.color.ColorSpace.TYPE_YCbCr) - _flags |= (int)ImageFlags.ImageFlagsColorSpaceYCBCR; - - if (colorModel.hasAlpha()) - _flags |= (int)ImageFlags.ImageFlagsHasAlpha; - - if ((CurrentImage.HorizontalResolution > 0) || (CurrentImage.VerticalResolution > 0)) - _flags |= (int)ImageFlags.ImageFlagsHasRealDPI; - - return _flags; - } - } - #endregion - - #region FrameDimensionsList - public Guid[] FrameDimensionsList { - // TBD: look over all frames and build array of dimensions - // FALLBACK: now, only one dimension assigned for all frames - get { - Guid [] dimList = new Guid[]{CurrentImage.Dimension.Guid}; - return dimList; - } - } - #endregion - - #region Height - public int Height { - get { - return CurrentImage.NativeImage.getHeight(null); - } - } - #endregion - - #region HorizontalResolution - public float HorizontalResolution { - get { - if (CurrentImage.HorizontalResolution == 0) - return Graphics.DefaultScreenResolution; - - return CurrentImage.HorizontalResolution; - } - } - #endregion - - #region ColorPalette - public ColorPalette Palette { - get { - if (!(CurrentImage.NativeImage is BufferedImage)) - // TBD: This implementation is for raster formats only - throw new NotImplementedException("Only raster formats are supported"); - - image.ColorModel colorModel = ((BufferedImage)CurrentImage.NativeImage).getColorModel(); - if (colorModel is image.IndexColorModel) { - - Color [] colors = new Color[ ((image.IndexColorModel)colorModel).getMapSize() ]; - for (int i=0; i - /// Summary description for ImageAnimator. - /// - /// - - public sealed class ImageAnimator - { - static Hashtable ht = new Hashtable (); - - private ImageAnimator () - { - // - // TODO: Add constructor logic here - // - } - - public static void Animate (Image img, EventHandler onFrameChangeHandler) - { - if (img == null) - throw new System.NullReferenceException ("Object reference not set to an instance of an object."); - - if (!ht.ContainsKey (img)) { - AnimateEventArgs evtArgs = new AnimateEventArgs (img); - WorkerThread WT = new WorkerThread(onFrameChangeHandler, evtArgs); - ThreadStart TS = new ThreadStart(WT.LoopHandler); - Thread thread = new Thread(TS); - thread.IsBackground = true; - evtArgs.RunThread = thread; - ht.Add (img, evtArgs); - - thread.Start(); - } - } - - public static bool CanAnimate (Image img) - { - //An image can animate if it has multiple frame in - //time based FrameDimension else return false - //Doubt what if the image has multiple frame in page - //based FrameDimension - if (img == null) - return false; - - //Need to check whether i can do this without iterating - //within the FrameDimensionsList, ie just call GetFrameCount - //with parameter FrameDimension.Time - Guid[] dimensionList = img.FrameDimensionsList; - int length = dimensionList.Length; - int frameCount; - for (int i=0; i 1) - return true; - } - } - - return false; - } - - public static void StopAnimate (Image img, EventHandler onFrameChangeHandler) - { - if (img == null) - throw new System.NullReferenceException ("Object reference not set to an instance of an object."); - - if (ht.ContainsKey (img)) { - AnimateEventArgs evtArgs = (AnimateEventArgs) ht [img]; - evtArgs.RunThread.Abort (); - ht.Remove (img); - } - } - - public static void UpdateFrames () - { - foreach (Image img in ht.Keys) { - UpdateFrames (img); - } - } - - public static void UpdateFrames (Image img) - { - if (img == null) - throw new System.NullReferenceException ("Object reference not set to an instance of an object."); - - if (ht.ContainsKey (img)){ - //Need a way to get the delay during animation - AnimateEventArgs evtArgs = (AnimateEventArgs) ht [img]; - if (evtArgs.ActiveFrameCount < evtArgs.FrameCount-1){ - evtArgs.ActiveFrameCount ++; - img.SelectActiveFrame (FrameDimension.Time, evtArgs.ActiveFrameCount); - } - else - evtArgs.ActiveFrameCount = 0; - ht [img] = evtArgs; - } - } - } - - class WorkerThread - { - private EventHandler frameChangeHandler; - private AnimateEventArgs animateEventArgs; - - public WorkerThread(EventHandler frmChgHandler, AnimateEventArgs aniEvtArgs) - { - frameChangeHandler = frmChgHandler; - animateEventArgs = aniEvtArgs; - } - - public void LoopHandler() - { - try - { - while (true) { - //Need a way to get the delay during animation - Thread.Sleep (100); - frameChangeHandler (null, animateEventArgs); - } - } - catch(ThreadAbortException) - { - //lets not bother ourselves with tae - //it will be thrown anyway - } - catch(Exception er) - { - throw er; - } - } - } -} diff --git a/mcs/class/System.Drawing/System.Drawing/ImageConverter.cs b/mcs/class/System.Drawing/System.Drawing/ImageConverter.cs deleted file mode 100644 index 3367e207fb1..00000000000 --- a/mcs/class/System.Drawing/System.Drawing/ImageConverter.cs +++ /dev/null @@ -1,101 +0,0 @@ -// -// System.Drawing.ImageConverter.cs -// -// Author: -// Dennis Hayes (dennish@Raytek.com) -// Sanjay Gupta (gsanjay@novell.com) -// -// (C) 2002 Ximian, Inc -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; -using System.ComponentModel; -using System.Globalization; -using System.IO; -using System.Drawing.Imaging; - -namespace System.Drawing -{ - /// - /// Summary description for ImageConverter. - /// - public class ImageConverter : TypeConverter - { - public ImageConverter () - { - } - - public override bool CanConvertFrom (ITypeDescriptorContext context, Type srcType) - { - if (srcType == typeof (System.Byte[])) - return true; - else - return false; - } - - public override bool CanConvertTo (ITypeDescriptorContext context, Type destType) - { - if ((destType == typeof (System.Byte[])) || (destType == typeof (System.String))) - return true; - else - return false; - } - - public override object ConvertFrom (ITypeDescriptorContext context, CultureInfo culture, object val) - { - byte [] bytes = val as byte []; - if (bytes == null) - return base.ConvertFrom (context, culture, val); - - MemoryStream ms = new MemoryStream (bytes); - - return Image.FromStream (ms); - } - - public override object ConvertTo (ITypeDescriptorContext context, CultureInfo culture, object val, Type destType ) - { - if ((val is System.Drawing.Image) && (destType == typeof (System.String))) - return val.ToString (); - else if (CanConvertTo (null, destType)){ - //came here means destType is byte array ; - MemoryStream ms = new MemoryStream (); - ((Image)val).Save (ms, ((Image)val).RawFormat); - return ms.GetBuffer (); - }else - return new NotSupportedException ("ImageConverter can not convert from " + val.GetType ()); - } - - public override PropertyDescriptorCollection GetProperties (ITypeDescriptorContext context, object val, Attribute[] attribs) - { - return TypeDescriptor.GetProperties (typeof (Image), attribs); - } - - public override bool GetPropertiesSupported (ITypeDescriptorContext context ) - { - return true; - } - } -} diff --git a/mcs/class/System.Drawing/System.Drawing/ImageFormatConverter.cs b/mcs/class/System.Drawing/System.Drawing/ImageFormatConverter.cs deleted file mode 100644 index 6100181ec82..00000000000 --- a/mcs/class/System.Drawing/System.Drawing/ImageFormatConverter.cs +++ /dev/null @@ -1,153 +0,0 @@ -// -// System.Drawing.ImageFormatConverter.cs -// -// Author: -// Dennis Hayes (dennish@Raytek.com) -// Sanjay Gupta (gsanjay@novell.com) -// -// (C) 2002 Ximian, Inc -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; -using System.ComponentModel; -using System.Globalization; -using System.Drawing.Imaging; -using System.ComponentModel.Design.Serialization; -using System.Reflection; - -namespace System.Drawing -{ - /// - /// Summary description for ImageFormatConverter. - /// - public class ImageFormatConverter : TypeConverter - { - public ImageFormatConverter () - { - } - - public override bool CanConvertFrom (ITypeDescriptorContext context, Type srcType) - { - if (srcType == typeof (string)) - return true; - - return base.CanConvertFrom (context, srcType); - } - - public override bool CanConvertTo (ITypeDescriptorContext context, Type destType) - { - if (destType == typeof (string)) - return true; - - if (destType == typeof (InstanceDescriptor)) - return true; - - return base.CanConvertTo (context, destType); - } - - public override object ConvertFrom (ITypeDescriptorContext context, CultureInfo culture, object val) - { - string strFormat = val as string; - if (strFormat == null) - return base.ConvertFrom (context, culture, val); - - if (strFormat.Equals (ImageFormat.Bmp.ToString ())) - return ImageFormat.Bmp; - else if (strFormat.Equals (ImageFormat.Emf.ToString ())) - return ImageFormat.Emf; - else if (strFormat.Equals (ImageFormat.Exif.ToString ())) - return ImageFormat.Exif; - else if (strFormat.Equals (ImageFormat.Gif.ToString ())) - return ImageFormat.Gif; - else if (strFormat.Equals (ImageFormat.Icon.ToString ())) - return ImageFormat.Icon; - else if (strFormat.Equals (ImageFormat.Jpeg.ToString ())) - return ImageFormat.Jpeg; - else if (strFormat.Equals (ImageFormat.MemoryBmp.ToString ())) - return ImageFormat.MemoryBmp; - else if (strFormat.Equals (ImageFormat.Png.ToString ())) - return ImageFormat.Png; - else if (strFormat.Equals (ImageFormat.Tiff.ToString ())) - return ImageFormat.Tiff; - else if (strFormat.Equals (ImageFormat.Wmf.ToString ())) - return ImageFormat.Wmf; - - return base.ConvertFrom (context, culture, val); - } - - public override object ConvertTo (ITypeDescriptorContext context, CultureInfo culture, object val, Type destType ) - { - if ((val is ImageFormat) && (destType == typeof (string))) - return val.ToString (); - - if (destType == typeof (InstanceDescriptor) && val is ImageFormat) { - ImageFormat c = (ImageFormat) val; - - string prop = null; - if (c.Guid.Equals (ImageFormat.Bmp.Guid)) - prop = "Bmp"; - else if (c.Guid.Equals (ImageFormat.Emf.Guid)) - prop = "Emf"; - else if (c.Guid.Equals (ImageFormat.Exif.Guid)) - prop = "Exif"; - else if (c.Guid.Equals (ImageFormat.Gif.Guid)) - prop = "Gif"; - else if (c.Guid.Equals (ImageFormat.Icon.Guid)) - prop = "Icon"; - else if (c.Guid.Equals (ImageFormat.Jpeg.Guid)) - prop = "Jpeg"; - else if (c.Guid.Equals (ImageFormat.MemoryBmp.Guid)) - prop = "MemoryBmp"; - else if (c.Guid.Equals (ImageFormat.Png.Guid)) - prop = "Png"; - else if (c.Guid.Equals (ImageFormat.Tiff.Guid)) - prop = "Tiff"; - else if (c.Guid.Equals (ImageFormat.Wmf.Guid)) - prop = "Wmf"; - - if (prop != null){ - return new InstanceDescriptor (typeof (ImageFormat).GetProperty (prop), null); - } else { - ConstructorInfo ctor = typeof(ImageFormat).GetConstructor (new Type[] {typeof(Guid)} ); - return new InstanceDescriptor (ctor, new object[] {c.Guid}); - } - } - - return base.ConvertTo (context, culture, val, destType); - } - - [MonoTODO ("Implement")] - public override StandardValuesCollection GetStandardValues (ITypeDescriptorContext context ) - { - throw new NotImplementedException (); - } - - public override bool GetStandardValuesSupported (ITypeDescriptorContext context ) - { - return false; - } - } -} diff --git a/mcs/class/System.Drawing/System.Drawing/KnownColor.cs b/mcs/class/System.Drawing/System.Drawing/KnownColor.cs deleted file mode 100644 index 405c4dbe25c..00000000000 --- a/mcs/class/System.Drawing/System.Drawing/KnownColor.cs +++ /dev/null @@ -1,206 +0,0 @@ -// -// System.Drawing.Color.cs -// -// (C) 2002 Dennis Hayes -// Author: -// Dennis Hayes (dennish@raytek.com) -// Ben Houston (ben@exocortex.org) -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; -namespace System.Drawing -{ - [Serializable] - public enum KnownColor { - ActiveBorder = 1, - ActiveCaption = 2, - ActiveCaptionText = 3, - AppWorkspace = 4, - Control = 5, - ControlDark = 6, - ControlDarkDark = 7, - ControlLight = 8, - ControlLightLight = 9, - ControlText = 10, - Desktop = 11, - GrayText = 12, - Highlight = 13, - HighlightText = 14, - HotTrack = 15, - InactiveBorder = 16, - InactiveCaption = 17, - InactiveCaptionText = 18, - Info = 19, - InfoText = 20, - Menu = 21, - MenuText = 22, - ScrollBar = 23, - Window = 24, - WindowFrame = 25, - WindowText = 26, - Transparent = 27, - AliceBlue = 28, - AntiqueWhite = 29, - Aqua = 30, - Aquamarine = 31, - Azure = 32, - Beige = 33, - Bisque = 34, - Black = 35, - BlanchedAlmond = 36, - Blue = 37, - BlueViolet = 38, - Brown = 39, - BurlyWood = 40, - CadetBlue = 41, - Chartreuse = 42, - Chocolate = 43, - Coral = 44, - CornflowerBlue = 45, - Cornsilk = 46, - Crimson = 47, - Cyan = 48, - DarkBlue = 49, - DarkCyan = 50, - DarkGoldenrod = 51, - DarkGray = 52, - DarkGreen = 53, - DarkKhaki = 54, - DarkMagenta = 55, - DarkOliveGreen = 56, - DarkOrange = 57, - DarkOrchid = 58, - DarkRed = 59, - DarkSalmon = 60, - DarkSeaGreen = 61, - DarkSlateBlue = 62, - DarkSlateGray = 63, - DarkTurquoise = 64, - DarkViolet = 65, - DeepPink = 66, - DeepSkyBlue = 67, - DimGray = 68, - DodgerBlue = 69, - Firebrick = 70, - FloralWhite = 71, - ForestGreen = 72, - Fuchsia = 73, - Gainsboro = 74, - GhostWhite = 75, - Gold = 76, - Goldenrod = 77, - Gray = 78, - Green = 79, - GreenYellow = 80, - Honeydew = 81, - HotPink = 82, - IndianRed = 83, - Indigo = 84, - Ivory = 85, - Khaki = 86, - Lavender = 87, - LavenderBlush = 88, - LawnGreen = 89, - LemonChiffon = 90, - LightBlue = 91, - LightCoral = 92, - LightCyan = 93, - LightGoldenrodYellow = 94, - LightGray = 95, - LightGreen = 96, - LightPink = 97, - LightSalmon = 98, - LightSeaGreen = 99, - LightSkyBlue = 100, - LightSlateGray = 101, - LightSteelBlue = 102, - LightYellow = 103, - Lime = 104, - LimeGreen = 105, - Linen = 106, - Magenta = 107, - Maroon = 108, - MediumAquamarine = 109, - MediumBlue = 110, - MediumOrchid = 111, - MediumPurple = 112, - MediumSeaGreen = 113, - MediumSlateBlue = 114, - MediumSpringGreen = 115, - MediumTurquoise = 116, - MediumVioletRed = 117, - MidnightBlue = 118, - MintCream = 119, - MistyRose = 120, - Moccasin = 121, - NavajoWhite = 122, - Navy = 123, - OldLace = 124, - Olive = 125, - OliveDrab = 126, - Orange = 127, - OrangeRed = 128, - Orchid = 129, - PaleGoldenrod = 130, - PaleGreen = 131, - PaleTurquoise = 132, - PaleVioletRed = 133, - PapayaWhip = 134, - PeachPuff = 135, - Peru = 136, - Pink = 137, - Plum = 138, - PowderBlue = 139, - Purple = 140, - Red = 141, - RosyBrown = 142, - RoyalBlue = 143, - SaddleBrown = 144, - Salmon = 145, - SandyBrown = 146, - SeaGreen = 147, - SeaShell = 148, - Sienna = 149, - Silver = 150, - SkyBlue = 151, - SlateBlue = 152, - SlateGray = 153, - Snow = 154, - SpringGreen = 155, - SteelBlue = 156, - Tan = 157, - Teal = 158, - Thistle = 159, - Tomato = 160, - Turquoise = 161, - Violet = 162, - Wheat = 163, - White = 164, - WhiteSmoke = 165, - Yellow = 166, - YellowGreen = 167 - } -} diff --git a/mcs/class/System.Drawing/System.Drawing/Pen.cs b/mcs/class/System.Drawing/System.Drawing/Pen.cs deleted file mode 100644 index 4d4db2e0d1b..00000000000 --- a/mcs/class/System.Drawing/System.Drawing/Pen.cs +++ /dev/null @@ -1,518 +0,0 @@ -// -// System.Drawing.Pen.cs -// -// Authors: -// Miguel de Icaza (miguel@ximian.com) -// Alexandre Pigolkine (pigolkine@gmx.de) -// Duncan Mak (duncan@ximian.com) -// Ravindra (rkumar@novell.com) -// -// Copyright (C) Ximian, Inc. http://www.ximian.com -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; -using System.Drawing.Drawing2D; -using System.Runtime.InteropServices; - -namespace System.Drawing -{ - public sealed class Pen : MarshalByRefObject, ICloneable, IDisposable - { - internal IntPtr nativeObject; - internal bool isModifiable = true; - internal Brush brush; - internal Color color; - private CustomLineCap startCap; - private CustomLineCap endCap; - - internal Pen (IntPtr p) - { - nativeObject = p; - } - - public Pen (Brush brush) : this (brush, 1.0F) - { - } - - public Pen (Color color) : this (color, 1.0F) - { - } - - public Pen (Brush brush, float width) - { - Status status = GDIPlus.GdipCreatePen2 (brush.nativeObject, width, Unit.UnitWorld, out nativeObject); - GDIPlus.CheckStatus (status); - - this.brush = brush; - } - - public Pen (Color color, float width) - { - Status status = GDIPlus.GdipCreatePen1 (color.ToArgb (), width, Unit.UnitWorld, out nativeObject); - GDIPlus.CheckStatus (status); - - this.color = color; - } - - // - // Properties - // - public PenAlignment Alignment { - get { - PenAlignment retval; - Status status = GDIPlus.GdipGetPenMode (nativeObject, out retval); - GDIPlus.CheckStatus (status); - return retval; - } - - set { - if (isModifiable) { - Status status = GDIPlus.GdipSetPenMode (nativeObject, value); - GDIPlus.CheckStatus (status); - } - else - throw new ArgumentException ("This Pen object can't be modified."); - - } - } - - public Brush Brush { - get { - return brush; - } - - set { - if (isModifiable) { - brush = value; - if (value is SolidBrush) { - Status status = GDIPlus.GdipSetPenBrushFill (nativeObject, value.nativeObject); - GDIPlus.CheckStatus (status); - color = ((SolidBrush) brush).Color; - status = GDIPlus.GdipSetPenColor (nativeObject, color.ToArgb ()); - GDIPlus.CheckStatus (status); - } - else { - // other brushes should clear the color property - Status status = GDIPlus.GdipSetPenBrushFill (nativeObject, value.nativeObject); - GDIPlus.CheckStatus (status); - status = GDIPlus.GdipSetPenColor (nativeObject, 0); - GDIPlus.CheckStatus (status); - color = Color.Empty; - } - } - else - throw new ArgumentException ("This Pen object can't be modified."); - } - } - - public Color Color { - get { - return color; - } - - set { - if (isModifiable) { - color = value; - Status status = GDIPlus.GdipSetPenColor (nativeObject, value.ToArgb ()); - GDIPlus.CheckStatus (status); - brush = new SolidBrush (color); - status = GDIPlus.GdipSetPenBrushFill (nativeObject, brush.nativeObject); - GDIPlus.CheckStatus (status); - } - else - throw new ArgumentException ("This Pen object can't be modified."); - } - } - - public float [] CompoundArray { - get { - int count; - Status status = GDIPlus.GdipGetPenCompoundCount (nativeObject, out count); - GDIPlus.CheckStatus (status); - - float [] compArray = new float [count]; - status = GDIPlus.GdipGetPenCompoundArray (nativeObject, compArray, count); - GDIPlus.CheckStatus (status); - - return compArray; - } - - set { - if (isModifiable) { - int length = value.Length; - if (length < 2) - throw new ArgumentException ("Invalid parameter."); - foreach (float val in value) - if (val < 0 || val > 1) - throw new ArgumentException ("Invalid parameter."); - - Status status = GDIPlus.GdipSetPenCompoundArray (nativeObject, value, value.Length); - GDIPlus.CheckStatus (status); - } - else - throw new ArgumentException ("This Pen object can't be modified."); - } - } - - public CustomLineCap CustomEndCap { - get { - return endCap; - } - - set { - if (isModifiable) { - Status status = GDIPlus.GdipSetPenCustomEndCap (nativeObject, value.nativeObject); - GDIPlus.CheckStatus (status); - endCap = value; - } - else - throw new ArgumentException ("This Pen object can't be modified."); - } - } - - public CustomLineCap CustomStartCap { - get { - return startCap; - } - - set { - if (isModifiable) { - Status status = GDIPlus.GdipSetPenCustomStartCap (nativeObject, value.nativeObject); - GDIPlus.CheckStatus (status); - startCap = value; - } - else - throw new ArgumentException ("This Pen object can't be modified."); - } - } - - public DashCap DashCap { - - get { - DashCap retval; - Status status = GDIPlus.GdipGetPenDashCap197819 (nativeObject, out retval); - GDIPlus.CheckStatus (status); - return retval; - } - - set { - if (isModifiable) { - Status status = GDIPlus.GdipSetPenDashCap197819 (nativeObject, value); - GDIPlus.CheckStatus (status); - } - else - throw new ArgumentException ("This Pen object can't be modified."); - } - } - - public float DashOffset { - - get { - float retval; - Status status = GDIPlus.GdipGetPenDashOffset (nativeObject, out retval); - GDIPlus.CheckStatus (status); - return retval; - } - - set { - if (isModifiable) { - Status status = GDIPlus.GdipSetPenDashOffset (nativeObject, value); - GDIPlus.CheckStatus (status); - } - else - throw new ArgumentException ("This Pen object can't be modified."); - } - } - - public float [] DashPattern { - get { - int count; - Status status = GDIPlus.GdipGetPenDashCount (nativeObject, out count); - GDIPlus.CheckStatus (status); - - float [] pattern = new float [count]; - status = GDIPlus.GdipGetPenDashArray (nativeObject, pattern, count); - GDIPlus.CheckStatus (status); - - return pattern; - } - - set { - if (isModifiable) { - int length = value.Length; - if (length == 0) - throw new ArgumentException ("Invalid parameter."); - foreach (float val in value) - if (val <= 0) - throw new ArgumentException ("Invalid parameter."); - Status status = GDIPlus.GdipSetPenDashArray (nativeObject, value, value.Length); - GDIPlus.CheckStatus (status); - } - else - throw new ArgumentException ("This Pen object can't be modified."); - } - } - - public DashStyle DashStyle { - get { - DashStyle retval; - Status status = GDIPlus.GdipGetPenDashStyle (nativeObject, out retval); - GDIPlus.CheckStatus (status); - return retval; - } - - set { - if (isModifiable) { - Status status = GDIPlus.GdipSetPenDashStyle (nativeObject, value); - GDIPlus.CheckStatus (status); - } - else - throw new ArgumentException ("This Pen object can't be modified."); - } - } - - public LineCap StartCap { - get { - LineCap retval; - Status status = GDIPlus.GdipGetPenStartCap (nativeObject, out retval); - GDIPlus.CheckStatus (status); - - return retval; - } - - set { - if (isModifiable) { - Status status = GDIPlus.GdipSetPenStartCap (nativeObject, value); - GDIPlus.CheckStatus (status); - } - else - throw new ArgumentException ("This Pen object can't be modified."); - } - } - - public LineCap EndCap { - get { - LineCap retval; - Status status = GDIPlus.GdipGetPenEndCap (nativeObject, out retval); - GDIPlus.CheckStatus (status); - - return retval; - } - - set { - if (isModifiable) { - Status status = GDIPlus.GdipSetPenEndCap (nativeObject, value); - GDIPlus.CheckStatus (status); - } - else - throw new ArgumentException ("This Pen object can't be modified."); - } - } - - public LineJoin LineJoin { - - get { - LineJoin result; - Status status = GDIPlus.GdipGetPenLineJoin (nativeObject, out result); - GDIPlus.CheckStatus (status); - return result; - } - - set { - if (isModifiable) { - Status status = GDIPlus.GdipSetPenLineJoin (nativeObject, value); - GDIPlus.CheckStatus (status); - } - else - throw new ArgumentException ("This Pen object can't be modified."); - } - - } - - public float MiterLimit { - - get { - float result; - Status status = GDIPlus.GdipGetPenMiterLimit (nativeObject, out result); - GDIPlus.CheckStatus (status); - return result; - } - - set { - if (isModifiable) { - Status status = GDIPlus.GdipSetPenMiterLimit (nativeObject, value); - GDIPlus.CheckStatus (status); - } - else - throw new ArgumentException ("This Pen object can't be modified."); - } - - } - - public PenType PenType { - get { - PenType type; - Status status = GDIPlus.GdipGetPenFillType (nativeObject, out type); - GDIPlus.CheckStatus (status); - - return type; - } - } - - public Matrix Transform { - - get { - Matrix matrix = new Matrix (); - Status status = GDIPlus.GdipGetPenTransform (nativeObject, matrix.nativeMatrix); - GDIPlus.CheckStatus (status); - - return matrix; - } - - set { - if (isModifiable) { - Status status = GDIPlus.GdipSetPenTransform (nativeObject, value.nativeMatrix); - GDIPlus.CheckStatus (status); - } - else - throw new ArgumentException ("This Pen object can't be modified."); - } - } - - public float Width { - get { - float f; - Status status = GDIPlus.GdipGetPenWidth (nativeObject, out f); - GDIPlus.CheckStatus (status); - return f; - } - set { - if (isModifiable) { - Status status = GDIPlus.GdipSetPenWidth (nativeObject, value); - GDIPlus.CheckStatus (status); - } - else - throw new ArgumentException ("This Pen object can't be modified."); - } - } - - public object Clone () - { - IntPtr ptr; - Status status = GDIPlus.GdipClonePen (nativeObject, out ptr); - GDIPlus.CheckStatus (status); - Pen p = new Pen (ptr); - p.brush = brush; - p.color = color; - p.startCap = startCap; - p.endCap = endCap; - - return p; - } - - public void Dispose () - { - Dispose (true); - System.GC.SuppressFinalize (this); - } - - private void Dispose (bool disposing) - { - if (disposing == true && isModifiable == false) { - throw new ArgumentException ("This Pen object can't be modified."); - } - - if (nativeObject != IntPtr.Zero) { - Status status = GDIPlus.GdipDeletePen (nativeObject); - GDIPlus.CheckStatus (status); - nativeObject = IntPtr.Zero; - } - } - - ~Pen () - { - Dispose (false); - } - - public void MultiplyTransform (Matrix matrix) - { - MultiplyTransform (matrix, MatrixOrder.Prepend); - } - - public void MultiplyTransform (Matrix matrix, MatrixOrder order) - { - Status status = GDIPlus.GdipMultiplyPenTransform (nativeObject, matrix.nativeMatrix, order); - GDIPlus.CheckStatus (status); - } - - public void ResetTransform () - { - Status status = GDIPlus.GdipResetPenTransform (nativeObject); - GDIPlus.CheckStatus (status); - } - - public void RotateTransform (float angle) - { - RotateTransform (angle, MatrixOrder.Prepend); - } - - public void RotateTransform (float angle, MatrixOrder order) - { - Status status = GDIPlus.GdipRotatePenTransform (nativeObject, angle, order); - GDIPlus.CheckStatus (status); - } - - public void ScaleTransform (float sx, float sy) - { - ScaleTransform (sx, sy, MatrixOrder.Prepend); - } - - public void ScaleTransform (float sx, float sy, MatrixOrder order) - { - Status status = GDIPlus.GdipScalePenTransform (nativeObject, sx, sy, order); - GDIPlus.CheckStatus (status); - } - - public void SetLineCap (LineCap startCap, LineCap endCap, DashCap dashCap) - { - if (isModifiable) { - Status status = GDIPlus.GdipSetPenLineCap197819 (nativeObject, startCap, endCap, dashCap); - GDIPlus.CheckStatus (status); - } - else - throw new ArgumentException ("This Pen object can't be modified."); - } - - public void TranslateTransform (float dx, float dy) - { - TranslateTransform (dx, dy, MatrixOrder.Prepend); - } - - public void TranslateTransform (float dx, float dy, MatrixOrder order) - { - Status status = GDIPlus.GdipTranslatePenTransform (nativeObject, dx, dy, order); - GDIPlus.CheckStatus (status); - } - } -} diff --git a/mcs/class/System.Drawing/System.Drawing/Pen.jvm.cs b/mcs/class/System.Drawing/System.Drawing/Pen.jvm.cs deleted file mode 100755 index d0b6fc585fe..00000000000 --- a/mcs/class/System.Drawing/System.Drawing/Pen.jvm.cs +++ /dev/null @@ -1,557 +0,0 @@ -// -// System.Drawing.Pen.cs -// -// Authors: -// Miguel de Icaza (miguel@ximian.com) -// Alexandre Pigolkine (pigolkine@gmx.de) -// Duncan Mak (duncan@ximian.com) -// Ravindra (rkumar@novell.com) -// -// (C) Ximian, Inc. http://www.ximian.com -// (C) Novell, Inc. http://www.novell.com -// - -using System; -using System.Drawing.Drawing2D; -using System.Runtime.InteropServices; - -using awt = java.awt; -using geom = java.awt.geom; - -namespace System.Drawing -{ - - public sealed class Pen : MarshalByRefObject, ICloneable, IDisposable, awt.Stroke - { - #region Member Vars - - static readonly float [] DASH_ARRAY = {4.0f,1.0f}; - static readonly float [] DASHDOT_ARRAY = {4.0f,1.0f,1.0f,1.0f}; - static readonly float [] DASHDOTDOT_ARRAY = {4.0f,1.0f,1.0f,1.0f,1.0f,1.0f}; - static readonly float [] DOT_ARRAY = {1.0f,1.0f}; - - internal bool isModifiable = true; - - Brush _brush; - DashStyle _dashStyle; - DashCap _dashCap; - LineCap _startCap; - LineCap _endCap; - - LineJoin _lineJoin; - - PenAlignment _alignment; - Matrix _transform; - float _width; - float _dashOffset; - float[] _dashPattern; - //float[] _compoundArray; - - float _miterLimit; - - #endregion - - #region Ctors. and Dtor - - public Pen (Brush brush) : this (brush, 1.0F) - {} - - public Pen (Color color) : this (color, 1.0F) - {} - - public Pen (Color color, float width) : this(new SolidBrush(color), width) - {} - - public Pen (Brush brush, float width) - { - _brush = (Brush)brush.Clone();; - _width = width; - _dashStyle = DashStyle.Solid; - _startCap = LineCap.Flat; - _dashCap = DashCap.Flat; - _endCap = LineCap.Flat; - _alignment = PenAlignment.Center; - _lineJoin = LineJoin.Miter; - _miterLimit = 10f; - _transform = new Matrix(); - } - #endregion - // - // Properties - // - #region Alignment [TODO] - public PenAlignment Alignment - { - get - { - return _alignment; - } - - set - { - EnsureModifiable(); - _alignment = value; - } - } - #endregion - - #region Brush - public Brush Brush - { - get - { - return _brush; - } - - set - { - EnsureModifiable(); - if (value == null) - throw new ArgumentNullException("brush"); - _brush = value; - } - } - #endregion - - #region Color - public Color Color - { - get - { - if(Brush is SolidBrush) - return ((SolidBrush)Brush).Color; - else if(Brush is HatchBrush) - return ((HatchBrush)Brush).ForegroundColor; - else - return Color.Empty; - } - - set - { - EnsureModifiable(); - _brush = new SolidBrush (value); - } - } - #endregion - - #region CompoundArray [TODO] - public float[] CompoundArray { - get { - throw new NotImplementedException (); - } - set { - throw new NotImplementedException (); - } - } - #endregion - - #region CustomEndCap [TODO] - public CustomLineCap CustomEndCap - { - get - { - throw new NotImplementedException (); - } - // do a check for isModifiable when implementing this property - set - { - throw new NotImplementedException (); - } - } - #endregion - - #region CustomStartCap [TODO] - public CustomLineCap CustomStartCap - { - - get - { - throw new NotImplementedException (); - } - - // do a check for isModifiable when implementing this property - set - { - throw new NotImplementedException (); - } - } - #endregion - - #region DashCap - public DashCap DashCap { - get { - return _dashCap; - } - - set { - EnsureModifiable(); - _dashCap = value; - } - } - #endregion - - #region DashOffset - public float DashOffset - { - - get - { - return _dashOffset; - } - - set - { - EnsureModifiable(); - _dashOffset = value; - } - } - #endregion - - #region DashPattern - - public float [] DashPattern - { - get - { - return _dashPattern; - } - - set - { - EnsureModifiable(); - - _dashPattern = value; - DashStyle = (_dashPattern == null) ? DashStyle.Solid : DashStyle.Custom; - } - } - #endregion - - #region DashStyle - public DashStyle DashStyle - { - get - { - return _dashStyle; - } - - set - { - EnsureModifiable(); - _dashStyle = value; - } - } - #endregion - - #region StartCap [TODO - now allways endcap] - - public LineCap StartCap { - get { - return _startCap; - } - - set { - EnsureModifiable(); - _startCap = value; - } - } - #endregion - - #region EndCap - public LineCap EndCap - { - get - { - return _endCap; - } - - set - { - EnsureModifiable(); - - _endCap = value; - } - } - #endregion - - #region LineJoin [partial TODO - missed styles] - public LineJoin LineJoin { - get { - return _lineJoin; - } - - set { - EnsureModifiable(); - _lineJoin = value; - } - } - - #endregion - - #region MiterLimit - public float MiterLimit - { - - get - { - return _miterLimit; - } - - set - { - EnsureModifiable(); - - _miterLimit = value; - } - - } - #endregion - - #region PenType - public PenType PenType - { - get - { - if (Brush is TextureBrush) - return PenType.TextureFill; - else if (Brush is HatchBrush) - return PenType.HatchFill; - else if (Brush is LinearGradientBrush) - return PenType.LinearGradient; - else if (Brush is PathGradientBrush) - return PenType.PathGradient; - else - return PenType.SolidColor; - } - } - #endregion - - #region Transform - public Matrix Transform - { - get - { - return _transform.Clone(); - } - - set - { - EnsureModifiable(); - - value.CopyTo(_transform); - } - } - #endregion - - #region Width - public float Width - { - get - { - return _width; - } - set - { - EnsureModifiable(); - - _width = value; - } - } - #endregion - - #region Clone - public object Clone () - { - Pen clone = (Pen)MemberwiseClone(); - if (clone._transform != null) - clone._transform = clone._transform.Clone(); - if (clone._dashPattern != null) - clone._dashPattern = (float[])clone._dashPattern.Clone(); - return clone; - } - #endregion - - #region Dispose - public void Dispose () - { - Dispose (true); - } - void Dispose (bool disposing) - { - if (!isModifiable && disposing) - throw new ArgumentException ("You may not change this Pen because it does not belong to you."); - // Restore the dtor if adding anything below - } - #endregion - - #region Transform Funcs - public void MultiplyTransform (Matrix matrix) - { - _transform.Multiply (matrix); - } - - public void MultiplyTransform (Matrix matrix, MatrixOrder order) - { - _transform.Multiply (matrix, order); - } - - public void ResetTransform () - { - _transform.Reset (); - } - - public void RotateTransform (float angle) - { - _transform.Rotate (angle); - } - - public void RotateTransform (float angle, MatrixOrder order) - { - _transform.Rotate (angle, order); - } - - public void ScaleTransform (float sx, float sy) - { - _transform.Scale (sx, sy); - } - - public void ScaleTransform (float sx, float sy, MatrixOrder order) - { - _transform.Scale (sx, sy, order); - } - - public void TranslateTransform (float dx, float dy) { - _transform.Translate (dx, dy); - } - - public void TranslateTransform (float dx, float dy, MatrixOrder order) { - _transform.Translate (dx, dy, order); - } - #endregion - - public void SetLineCap (LineCap startCap, LineCap endCap, DashCap dashCap) - { - StartCap = startCap; - DashCap = dashCap; - EndCap = endCap; - } - - void EnsureModifiable() { - if (!isModifiable) - throw new ArgumentException ("You may not change this Pen because it does not belong to you."); - } - - internal double GetSquaredTransformedWidth(geom.AffineTransform coordsTransform) { - geom.AffineTransform transform = _transform.NativeObject; - double A = transform.getScaleX(); // m00 - double B = transform.getShearY(); // m10 - double C = transform.getShearX(); // m01 - double D = transform.getScaleY(); // m11 - - double K = coordsTransform.getScaleX(); // m00 - double L = coordsTransform.getShearY(); // m10 - double M = coordsTransform.getShearX(); // m01 - double N = coordsTransform.getScaleY(); // m11 - - double AD = A*D, BC = B*C, KN = K*N, LM = L*M; - double KN_LM = KN-LM; - return Math.Abs(Width*Width * (AD*KN_LM - BC*KN_LM)); - } - - internal awt.Stroke GetNativeObject(geom.AffineTransform outputTransform, bool fitPen) { - return GetNativeObject(null, outputTransform, fitPen); - } - /// - /// - /// - /// transform which will be applied on the final shape - /// ensure the shape will wide enough to be visible - /// - internal awt.Stroke GetNativeObject(geom.AffineTransform penTransform, geom.AffineTransform outputTransform, bool fitPen) { - float[] dashPattern = null; - - switch (DashStyle) { - case DashStyle.Custom: - if (DashPattern != null) { - dashPattern = new float[DashPattern.Length]; - for(int i = 0; i < DashPattern.Length; i++) { - - if (EndCap == LineCap.Flat) - dashPattern[i] = DashPattern[i] * Width; - else { - if ((i & 1) == 0) - // remove the size of caps from the opaque parts - dashPattern[i] = (DashPattern[i] * Width) - Width; - else - // add the size of caps to the transparent parts - dashPattern[i] = (DashPattern[i] * Width) + Width; - } - } - } - break; - case DashStyle.Dash: - dashPattern = DASH_ARRAY; - break; - case DashStyle.DashDot: - dashPattern = DASHDOT_ARRAY; - break; - case DashStyle.DashDotDot: - dashPattern = DASHDOTDOT_ARRAY; - break; - - // default: - // case DashStyle.Solid: - // break; - } - - int join; - switch (LineJoin) { - case LineJoin.Bevel: - join = java.awt.BasicStroke.JOIN_BEVEL; - break; - default: - case LineJoin.Miter: - case LineJoin.MiterClipped: - join = java.awt.BasicStroke.JOIN_MITER; - break; - case LineJoin.Round: - join = java.awt.BasicStroke.JOIN_ROUND; - break; - } - - // We go by End cap for now. - int cap; - switch (EndCap) { - default: - case LineCap.Square: - case LineCap.SquareAnchor: - cap = awt.BasicStroke.CAP_SQUARE; - break; - case LineCap.Round: - case LineCap.RoundAnchor: - cap = awt.BasicStroke.CAP_ROUND; - break; - case LineCap.Flat: - cap = awt.BasicStroke.CAP_BUTT; - break; - } - - geom.AffineTransform penT = _transform.NativeObject; - if (penTransform != null && !penTransform.isIdentity()) { - penT = (geom.AffineTransform)penT.clone(); - penT.concatenate(penTransform); - } - - return StrokeFactory.CreateStroke(Width, cap, - join, MiterLimit, dashPattern, DashOffset, - penT, outputTransform, fitPen); - } - - #region Stroke Members - - awt.Shape awt.Stroke.createStrokedShape(awt.Shape arg_0) { - return GetNativeObject(null, false).createStrokedShape(arg_0); - } - - #endregion - } -} diff --git a/mcs/class/System.Drawing/System.Drawing/Pens.cs b/mcs/class/System.Drawing/System.Drawing/Pens.cs deleted file mode 100644 index 988c982163f..00000000000 --- a/mcs/class/System.Drawing/System.Drawing/Pens.cs +++ /dev/null @@ -1,1597 +0,0 @@ -// -// System.Drawing.Pens.cs -// -// Authors: -// Matt Stump (mstump@swfo.arizona.edu) -// Ravindra (rkumar@novell.com) -// Jordi Mas i Hernandez -// -// Copyright (C) 2002 Ximian, Inc. http://www.ximian.com -// Copyright (C) 2004-2005 Novell, Inc. http://www.novell.com -// - -// -// Copyright (C) 2004-2005 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; - -namespace System.Drawing -{ - public sealed class Pens - { - private static Pen aliceblue; - private static Pen antiquewhite; - private static Pen aqua; - private static Pen aquamarine; - private static Pen azure; - private static Pen beige; - private static Pen bisque; - private static Pen black; - private static Pen blanchedalmond; - private static Pen blue; - private static Pen blueviolet; - private static Pen brown; - private static Pen burlywood; - private static Pen cadetblue; - private static Pen chartreuse; - private static Pen chocolate; - private static Pen coral; - private static Pen cornflowerblue; - private static Pen cornsilk; - private static Pen crimson; - private static Pen cyan; - private static Pen darkblue; - private static Pen darkcyan; - private static Pen darkgoldenrod; - private static Pen darkgray; - private static Pen darkgreen; - private static Pen darkkhaki; - private static Pen darkmagenta; - private static Pen darkolivegreen; - private static Pen darkorange; - private static Pen darkorchid; - private static Pen darkred; - private static Pen darksalmon; - private static Pen darkseagreen; - private static Pen darkslateblue; - private static Pen darkslategray; - private static Pen darkturquoise; - private static Pen darkviolet; - private static Pen deeppink; - private static Pen deepskyblue; - private static Pen dimgray; - private static Pen dodgerblue; - private static Pen firebrick; - private static Pen floralwhite; - private static Pen forestgreen; - private static Pen fuchsia; - private static Pen gainsboro; - private static Pen ghostwhite; - private static Pen gold; - private static Pen goldenrod; - private static Pen gray; - private static Pen green; - private static Pen greenyellow; - private static Pen honeydew; - private static Pen hotpink; - private static Pen indianred; - private static Pen indigo; - private static Pen ivory; - private static Pen khaki; - private static Pen lavender; - private static Pen lavenderblush; - private static Pen lawngreen; - private static Pen lemonchiffon; - private static Pen lightblue; - private static Pen lightcoral; - private static Pen lightcyan; - private static Pen lightgoldenrodyellow; - private static Pen lightgray; - private static Pen lightgreen; - private static Pen lightpink; - private static Pen lightsalmon; - private static Pen lightseagreen; - private static Pen lightskyblue; - private static Pen lightslategray; - private static Pen lightsteelblue; - private static Pen lightyellow; - private static Pen lime; - private static Pen limegreen; - private static Pen linen; - private static Pen magenta; - private static Pen maroon; - private static Pen mediumaquamarine; - private static Pen mediumblue; - private static Pen mediumorchid; - private static Pen mediumpurple; - private static Pen mediumseagreen; - private static Pen mediumslateblue; - private static Pen mediumspringgreen; - private static Pen mediumturquoise; - private static Pen mediumvioletred; - private static Pen midnightblue; - private static Pen mintcream; - private static Pen mistyrose; - private static Pen moccasin; - private static Pen navajowhite; - private static Pen navy; - private static Pen oldlace; - private static Pen olive; - private static Pen olivedrab; - private static Pen orange; - private static Pen orangered; - private static Pen orchid; - private static Pen palegoldenrod; - private static Pen palegreen; - private static Pen paleturquoise; - private static Pen palevioletred; - private static Pen papayawhip; - private static Pen peachpuff; - private static Pen peru; - private static Pen pink; - private static Pen plum; - private static Pen powderblue; - private static Pen purple; - private static Pen red; - private static Pen rosybrown; - private static Pen royalblue; - private static Pen saddlebrown; - private static Pen salmon; - private static Pen sandybrown; - private static Pen seagreen; - private static Pen seashell; - private static Pen sienna; - private static Pen silver; - private static Pen skyblue; - private static Pen slateblue; - private static Pen slategray; - private static Pen snow; - private static Pen springgreen; - private static Pen steelblue; - private static Pen tan; - private static Pen teal; - private static Pen thistle; - private static Pen tomato; - private static Pen transparent; - private static Pen turquoise; - private static Pen violet; - private static Pen wheat; - private static Pen white; - private static Pen whitesmoke; - private static Pen yellow; - private static Pen yellowgreen; - - private Pens () { } - - public static Pen AliceBlue { - get { - if (aliceblue == null) { - aliceblue = new Pen (Color.AliceBlue); - aliceblue.isModifiable = false; - } - return aliceblue; - } - } - - public static Pen AntiqueWhite { - get { - if (antiquewhite == null) { - antiquewhite = new Pen (Color.AntiqueWhite); - antiquewhite.isModifiable = false; - } - return antiquewhite; - } - } - - public static Pen Aqua { - get { - if (aqua == null) { - aqua = new Pen (Color.Aqua); - aqua.isModifiable = false; - } - return aqua; - } - } - - public static Pen Aquamarine { - get { - if (aquamarine == null) { - aquamarine = new Pen (Color.Aquamarine); - aquamarine.isModifiable = false; - } - return aquamarine; - } - } - - public static Pen Azure { - get { - if (azure == null) { - azure = new Pen (Color.Azure); - azure.isModifiable = false; - } - return azure; - } - } - - public static Pen Beige { - get { - if (beige == null) { - beige = new Pen (Color.Beige); - beige.isModifiable = false; - } - return beige; - } - } - - public static Pen Bisque { - get { - if (bisque == null) { - bisque = new Pen (Color.Bisque); - bisque.isModifiable = false; - } - return bisque; - } - } - - public static Pen Black { - get { - if (black == null) { - black = new Pen (Color.Black); - black.isModifiable = false; - } - return black; - } - } - - public static Pen BlanchedAlmond { - get { - if (blanchedalmond == null) { - blanchedalmond = new Pen (Color.BlanchedAlmond); - blanchedalmond.isModifiable = false; - } - return blanchedalmond; - } - } - - public static Pen Blue { - get { - if (blue == null) { - blue = new Pen (Color.Blue); - blue.isModifiable = false; - } - return blue; - } - } - - public static Pen BlueViolet { - get { - if (blueviolet == null) { - blueviolet = new Pen (Color.BlueViolet); - blueviolet.isModifiable = false; - } - return blueviolet; - } - } - - public static Pen Brown { - get { - if (brown == null) { - brown = new Pen (Color.Brown); - brown.isModifiable = false; - } - return brown; - } - } - - public static Pen BurlyWood { - get { - if (burlywood == null) { - burlywood = new Pen (Color.BurlyWood); - burlywood.isModifiable = false; - } - return burlywood; - } - } - - public static Pen CadetBlue { - get { - if (cadetblue == null) { - cadetblue = new Pen (Color.CadetBlue); - cadetblue.isModifiable = false; - } - return cadetblue; - } - } - - public static Pen Chartreuse { - get { - if (chartreuse == null) { - chartreuse = new Pen (Color.Chartreuse); - chartreuse.isModifiable = false; - } - return chartreuse; - } - } - - public static Pen Chocolate { - get { - if (chocolate == null) { - chocolate = new Pen (Color.Chocolate); - chocolate.isModifiable = false; - } - return chocolate; - } - } - - public static Pen Coral { - get { - if (coral == null) { - coral = new Pen (Color.Coral); - coral.isModifiable = false; - } - return coral; - } - } - - public static Pen CornflowerBlue { - get { - if (cornflowerblue == null) { - cornflowerblue = new Pen (Color.CornflowerBlue); - cornflowerblue.isModifiable = false; - } - return cornflowerblue; - } - } - - public static Pen Cornsilk { - get { - if (cornsilk == null) { - cornsilk = new Pen (Color.Cornsilk); - cornsilk.isModifiable = false; - } - return cornsilk; - } - } - - public static Pen Crimson { - get { - if (crimson == null) { - crimson = new Pen (Color.Crimson); - crimson.isModifiable = false; - } - return crimson; - } - } - - public static Pen Cyan { - get { - if (cyan == null) { - cyan = new Pen (Color.Cyan); - cyan.isModifiable = false; - } - return cyan; - } - } - - public static Pen DarkBlue { - get { - if (darkblue == null) { - darkblue = new Pen (Color.DarkBlue); - darkblue.isModifiable = false; - } - return darkblue; - } - } - - public static Pen DarkCyan { - get { - if (darkcyan == null) { - darkcyan = new Pen (Color.DarkCyan); - darkcyan.isModifiable = false; - } - return darkcyan; - } - } - - public static Pen DarkGoldenrod { - get { - if (darkgoldenrod == null) { - darkgoldenrod = new Pen (Color.DarkGoldenrod); - darkgoldenrod.isModifiable = false; - } - return darkgoldenrod; - } - } - - public static Pen DarkGray { - get { - if (darkgray == null) { - darkgray = new Pen (Color.DarkGray); - darkgray.isModifiable = false; - } - return darkgray; - } - } - - public static Pen DarkGreen { - get { - if (darkgreen == null) { - darkgreen = new Pen (Color.DarkGreen); - darkgreen.isModifiable = false; - } - return darkgreen; - } - } - - public static Pen DarkKhaki { - get { - if (darkkhaki == null) { - darkkhaki = new Pen (Color.DarkKhaki); - darkkhaki.isModifiable = false; - } - return darkkhaki; - } - } - - public static Pen DarkMagenta { - get { - if (darkmagenta == null) { - darkmagenta = new Pen (Color.DarkMagenta); - darkmagenta.isModifiable = false; - } - return darkmagenta; - } - } - - public static Pen DarkOliveGreen { - get { - if (darkolivegreen == null) { - darkolivegreen = new Pen (Color.DarkOliveGreen); - darkolivegreen.isModifiable = false; - } - return darkolivegreen; - } - } - - public static Pen DarkOrange { - get { - if (darkorange == null) { - darkorange = new Pen (Color.DarkOrange); - darkorange.isModifiable = false; - } - return darkorange; - } - } - - public static Pen DarkOrchid { - get { - if (darkorchid == null) { - darkorchid = new Pen (Color.DarkOrchid); - darkorchid.isModifiable = false; - } - return darkorchid; - } - } - - public static Pen DarkRed { - get { - if (darkred == null) { - darkred = new Pen (Color.DarkRed); - darkred.isModifiable = false; - } - return darkred; - } - } - - public static Pen DarkSalmon { - get { - if (darksalmon == null) { - darksalmon = new Pen (Color.DarkSalmon); - darksalmon.isModifiable = false; - } - return darksalmon; - } - } - - public static Pen DarkSeaGreen { - get { - if (darkseagreen == null) { - darkseagreen = new Pen (Color.DarkSeaGreen); - darkseagreen.isModifiable = false; - } - return darkseagreen; - } - } - - public static Pen DarkSlateBlue { - get { - if (darkslateblue == null) { - darkslateblue = new Pen (Color.DarkSlateBlue); - darkslateblue.isModifiable = false; - } - return darkslateblue; - } - } - - public static Pen DarkSlateGray { - get { - if (darkslategray == null) { - darkslategray = new Pen (Color.DarkSlateGray); - darkslategray.isModifiable = false; - } - return darkslategray; - } - } - - public static Pen DarkTurquoise { - get { - if (darkturquoise == null) { - darkturquoise = new Pen (Color.DarkTurquoise); - darkturquoise.isModifiable = false; - } - return darkturquoise; - } - } - - public static Pen DarkViolet { - get { - if (darkviolet == null) { - darkviolet = new Pen (Color.DarkViolet); - darkviolet.isModifiable = false; - } - return darkviolet; - } - } - - public static Pen DeepPink { - get { - if (deeppink == null) { - deeppink = new Pen (Color.DeepPink); - deeppink.isModifiable = false; - } - return deeppink; - } - } - - public static Pen DeepSkyBlue { - get { - if (deepskyblue == null) { - deepskyblue = new Pen (Color.DeepSkyBlue); - deepskyblue.isModifiable = false; - } - return deepskyblue; - } - } - - public static Pen DimGray { - get { - if (dimgray == null) { - dimgray = new Pen (Color.DimGray); - dimgray.isModifiable = false; - } - return dimgray; - } - } - - public static Pen DodgerBlue { - get { - if (dodgerblue == null) { - dodgerblue = new Pen (Color.DodgerBlue); - dodgerblue.isModifiable = false; - } - return dodgerblue; - } - } - - public static Pen Firebrick { - get { - if (firebrick == null) { - firebrick = new Pen (Color.Firebrick); - firebrick.isModifiable = false; - } - return firebrick; - } - } - - public static Pen FloralWhite { - get { - if (floralwhite == null) { - floralwhite = new Pen (Color.FloralWhite); - floralwhite.isModifiable = false; - } - return floralwhite; - } - } - - public static Pen ForestGreen { - get { - if (forestgreen == null) { - forestgreen = new Pen (Color.ForestGreen); - forestgreen.isModifiable = false; - } - return forestgreen; - } - } - - public static Pen Fuchsia { - get { - if (fuchsia == null) { - fuchsia = new Pen (Color.Fuchsia); - fuchsia.isModifiable = false; - } - return fuchsia; - } - } - - public static Pen Gainsboro { - get { - if (gainsboro == null) { - gainsboro = new Pen (Color.Gainsboro); - gainsboro.isModifiable = false; - } - return gainsboro; - } - } - - public static Pen GhostWhite { - get { - if (ghostwhite == null) { - ghostwhite = new Pen (Color.GhostWhite); - ghostwhite.isModifiable = false; - } - return ghostwhite; - } - } - - public static Pen Gold { - get { - if (gold == null) { - gold = new Pen (Color.Gold); - gold.isModifiable = false; - } - return gold; - } - } - - public static Pen Goldenrod { - get { - if (goldenrod == null) { - goldenrod = new Pen (Color.Goldenrod); - goldenrod.isModifiable = false; - } - return goldenrod; - } - } - - public static Pen Gray { - get { - if (gray == null) { - gray = new Pen (Color.Gray); - gray.isModifiable = false; - } - return gray; - } - } - - public static Pen Green { - get { - if (green == null) { - green = new Pen (Color.Green); - green.isModifiable = false; - } - return green; - } - } - - public static Pen GreenYellow { - get { - if (greenyellow == null) { - greenyellow = new Pen (Color.GreenYellow); - greenyellow.isModifiable = false; - } - return greenyellow; - } - } - - public static Pen Honeydew { - get { - if (honeydew == null) { - honeydew = new Pen (Color.Honeydew); - honeydew.isModifiable = false; - } - return honeydew; - } - } - - public static Pen HotPink { - get { - if (hotpink == null) { - hotpink = new Pen (Color.HotPink); - hotpink.isModifiable = false; - } - return hotpink; - } - } - - public static Pen IndianRed { - get { - if (indianred == null) { - indianred = new Pen (Color.IndianRed); - indianred.isModifiable = false; - } - return indianred; - } - } - - public static Pen Indigo { - get { - if (indigo == null) { - indigo = new Pen (Color.Indigo); - indigo.isModifiable = false; - } - return indigo; - } - } - - public static Pen Ivory { - get { - if (ivory == null) { - ivory = new Pen (Color.Ivory); - ivory.isModifiable = false; - } - return ivory; - } - } - - public static Pen Khaki { - get { - if (khaki == null) { - khaki = new Pen (Color.Khaki); - khaki.isModifiable = false; - } - return khaki; - } - } - - public static Pen Lavender { - get { - if (lavender == null) { - lavender = new Pen (Color.Lavender); - lavender.isModifiable = false; - } - return lavender; - } - } - - public static Pen LavenderBlush { - get { - if (lavenderblush == null) { - lavenderblush = new Pen (Color.LavenderBlush); - lavenderblush.isModifiable = false; - } - return lavenderblush; - } - } - - public static Pen LawnGreen { - get { - if (lawngreen == null) { - lawngreen = new Pen (Color.LawnGreen); - lawngreen.isModifiable = false; - } - return lawngreen; - } - } - - public static Pen LemonChiffon { - get { - if (lemonchiffon == null) { - lemonchiffon = new Pen (Color.LemonChiffon); - lemonchiffon.isModifiable = false; - } - return lemonchiffon; - } - } - - public static Pen LightBlue { - get { - if (lightblue == null) { - lightblue = new Pen (Color.LightBlue); - lightblue.isModifiable = false; - } - return lightblue; - } - } - - public static Pen LightCoral { - get { - if (lightcoral == null) { - lightcoral = new Pen (Color.LightCoral); - lightcoral.isModifiable = false; - } - return lightcoral; - } - } - - public static Pen LightCyan { - get { - if (lightcyan == null) { - lightcyan = new Pen (Color.LightCyan); - lightcyan.isModifiable = false; - } - return lightcyan; - } - } - - public static Pen LightGoldenrodYellow { - get { - if (lightgoldenrodyellow == null) { - lightgoldenrodyellow = new Pen (Color.LightGoldenrodYellow); - lightgoldenrodyellow.isModifiable = false; - } - return lightgoldenrodyellow; - } - } - - public static Pen LightGray { - get { - if (lightgray == null) { - lightgray = new Pen (Color.LightGray); - lightgray.isModifiable = false; - } - return lightgray; - } - } - - public static Pen LightGreen { - get { - if (lightgreen == null) { - lightgreen = new Pen (Color.LightGreen); - lightgreen.isModifiable = false; - } - return lightgreen; - } - } - - public static Pen LightPink { - get { - if (lightpink == null) { - lightpink = new Pen (Color.LightPink); - lightpink.isModifiable = false; - } - return lightpink; - } - } - - public static Pen LightSalmon { - get { - if (lightsalmon == null) { - lightsalmon = new Pen (Color.LightSalmon); - lightsalmon.isModifiable = false; - } - return lightsalmon; - } - } - - public static Pen LightSeaGreen { - get { - if (lightseagreen == null) { - lightseagreen = new Pen (Color.LightSeaGreen); - lightseagreen.isModifiable = false; - } - return lightseagreen; - } - } - - public static Pen LightSkyBlue { - get { - if (lightskyblue == null) { - lightskyblue = new Pen (Color.LightSkyBlue); - lightskyblue.isModifiable = false; - } - return lightskyblue; - } - } - - public static Pen LightSlateGray { - get { - if (lightslategray == null) { - lightslategray = new Pen (Color.LightSlateGray); - lightslategray.isModifiable = false; - } - return lightslategray; - } - } - - public static Pen LightSteelBlue { - get { - if (lightsteelblue == null) { - lightsteelblue = new Pen (Color.LightSteelBlue); - lightsteelblue.isModifiable = false; - } - return lightsteelblue; - } - } - - public static Pen LightYellow { - get { - if (lightyellow == null) { - lightyellow = new Pen (Color.LightYellow); - lightyellow.isModifiable = false; - } - return lightyellow; - } - } - - public static Pen Lime { - get { - if (lime == null) { - lime = new Pen (Color.Lime); - lime.isModifiable = false; - } - return lime; - } - } - - public static Pen LimeGreen { - get { - if (limegreen == null) { - limegreen = new Pen (Color.LimeGreen); - limegreen.isModifiable = false; - } - return limegreen; - } - } - - public static Pen Linen { - get { - if (linen == null) { - linen = new Pen (Color.Linen); - linen.isModifiable = false; - } - return linen; - } - } - - public static Pen Magenta { - get { - if (magenta == null) { - magenta = new Pen (Color.Magenta); - magenta.isModifiable = false; - } - return magenta; - } - } - - public static Pen Maroon { - get { - if (maroon == null) { - maroon = new Pen (Color.Maroon); - maroon.isModifiable = false; - } - return maroon; - } - } - - public static Pen MediumAquamarine { - get { - if (mediumaquamarine == null) { - mediumaquamarine = new Pen (Color.MediumAquamarine); - mediumaquamarine.isModifiable = false; - } - return mediumaquamarine; - } - } - - public static Pen MediumBlue { - get { - if (mediumblue == null) { - mediumblue = new Pen (Color.MediumBlue); - mediumblue.isModifiable = false; - } - return mediumblue; - } - } - - public static Pen MediumOrchid { - get { - if (mediumorchid == null) { - mediumorchid = new Pen (Color.MediumOrchid); - mediumorchid.isModifiable = false; - } - return mediumorchid; - } - } - - public static Pen MediumPurple { - get { - if (mediumpurple == null) { - mediumpurple = new Pen (Color.MediumPurple); - mediumpurple.isModifiable = false; - } - return mediumpurple; - } - } - - public static Pen MediumSeaGreen { - get { - if (mediumseagreen == null) { - mediumseagreen = new Pen (Color.MediumSeaGreen); - mediumseagreen.isModifiable = false; - } - return mediumseagreen; - } - } - - public static Pen MediumSlateBlue { - get { - if (mediumslateblue == null) { - mediumslateblue = new Pen (Color.MediumSlateBlue); - mediumslateblue.isModifiable = false; - } - return mediumslateblue; - } - } - - public static Pen MediumSpringGreen { - get { - if (mediumspringgreen == null) { - mediumspringgreen = new Pen (Color.MediumSpringGreen); - mediumspringgreen.isModifiable = false; - } - return mediumspringgreen; - } - } - - public static Pen MediumTurquoise { - get { - if (mediumturquoise == null) { - mediumturquoise = new Pen (Color.MediumTurquoise); - mediumturquoise.isModifiable = false; - } - return mediumturquoise; - } - } - - public static Pen MediumVioletRed { - get { - if (mediumvioletred == null) { - mediumvioletred = new Pen (Color.MediumVioletRed); - mediumvioletred.isModifiable = false; - } - return mediumvioletred; - } - } - - public static Pen MidnightBlue { - get { - if (midnightblue == null) { - midnightblue = new Pen (Color.MidnightBlue); - midnightblue.isModifiable = false; - } - return midnightblue; - } - } - - public static Pen MintCream { - get { - if (mintcream == null) { - mintcream = new Pen (Color.MintCream); - mintcream.isModifiable = false; - } - return mintcream; - } - } - - public static Pen MistyRose { - get { - if (mistyrose == null) { - mistyrose = new Pen (Color.MistyRose); - mistyrose.isModifiable = false; - } - return mistyrose; - } - } - - public static Pen Moccasin { - get { - if (moccasin == null) { - moccasin = new Pen (Color.Moccasin); - moccasin.isModifiable = false; - } - return moccasin; - } - } - - public static Pen NavajoWhite { - get { - if (navajowhite == null) { - navajowhite = new Pen (Color.NavajoWhite); - navajowhite.isModifiable = false; - } - return navajowhite; - } - } - - public static Pen Navy { - get { - if (navy == null) { - navy = new Pen (Color.Navy); - navy.isModifiable = false; - } - return navy; - } - } - - public static Pen OldLace { - get { - if (oldlace == null) { - oldlace = new Pen (Color.OldLace); - oldlace.isModifiable = false; - } - return oldlace; - } - } - - public static Pen Olive { - get { - if (olive == null) { - olive = new Pen (Color.Olive); - olive.isModifiable = false; - } - return olive; - } - } - - public static Pen OliveDrab { - get { - if (olivedrab == null) { - olivedrab = new Pen (Color.OliveDrab); - olivedrab.isModifiable = false; - } - return olivedrab; - } - } - - public static Pen Orange { - get { - if (orange == null) { - orange = new Pen (Color.Orange); - orange.isModifiable = false; - } - return orange; - } - } - - public static Pen OrangeRed { - get { - if (orangered == null) { - orangered = new Pen (Color.OrangeRed); - orangered.isModifiable = false; - } - return orangered; - } - } - - public static Pen Orchid { - get { - if (orchid == null) { - orchid = new Pen (Color.Orchid); - orchid.isModifiable = false; - } - return orchid; - } - } - - public static Pen PaleGoldenrod { - get { - if (palegoldenrod == null) { - palegoldenrod = new Pen (Color.PaleGoldenrod); - palegoldenrod.isModifiable = false; - } - return palegoldenrod; - } - } - - public static Pen PaleGreen { - get { - if (palegreen == null) { - palegreen = new Pen (Color.PaleGreen); - palegreen.isModifiable = false; - } - return palegreen; - } - } - - public static Pen PaleTurquoise { - get { - if (paleturquoise == null) { - paleturquoise = new Pen (Color.PaleTurquoise); - paleturquoise.isModifiable = false; - } - return paleturquoise; - } - } - - public static Pen PaleVioletRed { - get { - if (palevioletred == null) { - palevioletred = new Pen (Color.PaleVioletRed); - palevioletred.isModifiable = false; - } - return palevioletred; - } - } - - public static Pen PapayaWhip { - get { - if (papayawhip == null) { - papayawhip = new Pen (Color.PapayaWhip); - papayawhip.isModifiable = false; - } - return papayawhip; - } - } - - public static Pen PeachPuff { - get { - if (peachpuff == null) { - peachpuff = new Pen (Color.PeachPuff); - peachpuff.isModifiable = false; - } - return peachpuff; - } - } - - public static Pen Peru { - get { - if (peru == null) { - peru = new Pen (Color.Peru); - peru.isModifiable = false; - } - return peru; - } - } - - public static Pen Pink { - get { - if (pink == null) { - pink = new Pen (Color.Pink); - pink.isModifiable = false; - } - return pink; - } - } - - public static Pen Plum { - get { - if (plum == null) { - plum = new Pen (Color.Plum); - plum.isModifiable = false; - } - return plum; - } - } - - public static Pen PowderBlue { - get { - if (powderblue == null) { - powderblue = new Pen (Color.PowderBlue); - powderblue.isModifiable = false; - } - return powderblue; - } - } - - public static Pen Purple { - get { - if (purple == null) { - purple = new Pen (Color.Purple); - purple.isModifiable = false; - } - return purple; - } - } - - public static Pen Red { - get { - if (red == null) { - red = new Pen (Color.Red); - red.isModifiable = false; - } - return red; - } - } - - public static Pen RosyBrown { - get { - if (rosybrown == null) { - rosybrown = new Pen (Color.RosyBrown); - rosybrown.isModifiable = false; - } - return rosybrown; - } - } - - public static Pen RoyalBlue { - get { - if (royalblue == null) { - royalblue = new Pen (Color.RoyalBlue); - royalblue.isModifiable = false; - } - return royalblue; - } - } - - public static Pen SaddleBrown { - get { - if (saddlebrown == null) { - saddlebrown = new Pen (Color.SaddleBrown); - saddlebrown.isModifiable = false; - } - return saddlebrown; - } - } - - public static Pen Salmon { - get { - if (salmon == null) { - salmon = new Pen (Color.Salmon); - salmon.isModifiable = false; - } - return salmon; - } - } - - public static Pen SandyBrown { - get { - if (sandybrown == null) { - sandybrown = new Pen (Color.SandyBrown); - sandybrown.isModifiable = false; - } - return sandybrown; - } - } - - public static Pen SeaGreen { - get { - if (seagreen == null) { - seagreen = new Pen (Color.SeaGreen); - seagreen.isModifiable = false; - } - return seagreen; - } - } - - public static Pen SeaShell { - get { - if (seashell == null) { - seashell = new Pen (Color.SeaShell); - seashell.isModifiable = false; - } - return seashell; - } - } - - public static Pen Sienna { - get { - if (sienna == null) { - sienna = new Pen (Color.Sienna); - sienna.isModifiable = false; - } - return sienna; - } - } - - public static Pen Silver { - get { - if (silver == null) { - silver = new Pen (Color.Silver); - silver.isModifiable = false; - } - return silver; - } - } - - public static Pen SkyBlue { - get { - if (skyblue == null) { - skyblue = new Pen (Color.SkyBlue); - skyblue.isModifiable = false; - } - return skyblue; - } - } - - public static Pen SlateBlue { - get { - if (slateblue == null) { - slateblue = new Pen (Color.SlateBlue); - slateblue.isModifiable = false; - } - return slateblue; - } - } - - public static Pen SlateGray { - get { - if (slategray == null) { - slategray = new Pen (Color.SlateGray); - slategray.isModifiable = false; - } - return slategray; - } - } - - public static Pen Snow { - get { - if (snow == null) { - snow = new Pen (Color.Snow); - snow.isModifiable = false; - } - return snow; - } - } - - public static Pen SpringGreen { - get { - if (springgreen == null) { - springgreen = new Pen (Color.SpringGreen); - springgreen.isModifiable = false; - } - return springgreen; - } - } - - public static Pen SteelBlue { - get { - if (steelblue == null) { - steelblue = new Pen (Color.SteelBlue); - steelblue.isModifiable = false; - } - return steelblue; - } - } - - public static Pen Tan { - get { - if (tan == null) { - tan = new Pen (Color.Tan); - tan.isModifiable = false; - } - return tan; - } - } - - public static Pen Teal { - get { - if (teal == null) { - teal = new Pen (Color.Teal); - teal.isModifiable = false; - } - return teal; - } - } - - public static Pen Thistle { - get { - if (thistle == null) { - thistle = new Pen (Color.Thistle); - thistle.isModifiable = false; - } - return thistle; - } - } - - public static Pen Tomato { - get { - if (tomato == null) { - tomato = new Pen (Color.Tomato); - tomato.isModifiable = false; - } - return tomato; - } - } - - public static Pen Transparent { - get { - if (transparent == null) { - transparent = new Pen (Color.Transparent); - transparent.isModifiable = false; - } - return transparent; - } - } - - public static Pen Turquoise { - get { - if (turquoise == null) { - turquoise = new Pen (Color.Turquoise); - turquoise.isModifiable = false; - } - return turquoise; - } - } - - public static Pen Violet { - get { - if (violet == null) { - violet = new Pen (Color.Violet); - violet.isModifiable = false; - } - return violet; - } - } - - public static Pen Wheat { - get { - if (wheat == null) { - wheat = new Pen (Color.Wheat); - wheat.isModifiable = false; - } - return wheat; - } - } - - public static Pen White { - get { - if (white == null) { - white = new Pen (Color.White); - white.isModifiable = false; - } - return white; - } - } - - public static Pen WhiteSmoke { - get { - if (whitesmoke == null) { - whitesmoke = new Pen (Color.WhiteSmoke); - whitesmoke.isModifiable = false; - } - return whitesmoke; - } - } - - public static Pen Yellow { - get { - if (yellow == null) { - yellow = new Pen (Color.Yellow); - yellow.isModifiable = false; - } - return yellow; - } - } - - public static Pen YellowGreen { - get { - if (yellowgreen == null) { - yellowgreen = new Pen (Color.YellowGreen); - yellowgreen.isModifiable = false; - } - return yellowgreen; - - } - } - } -} diff --git a/mcs/class/System.Drawing/System.Drawing/PlainImage.jvm.cs b/mcs/class/System.Drawing/System.Drawing/PlainImage.jvm.cs deleted file mode 100644 index 9bee3c9b335..00000000000 --- a/mcs/class/System.Drawing/System.Drawing/PlainImage.jvm.cs +++ /dev/null @@ -1,130 +0,0 @@ -using System; -using System.Drawing.Imaging; -using System.Xml; - -using Mainsoft.Drawing.Imaging; - -using awt = java.awt; -using java.awt.image; -using imageio = javax.imageio; - -namespace Mainsoft.Drawing.Imaging -{ - /// - /// Summary description for PlainImage. - /// - public class PlainImage : ICloneable { - - #region Members - - awt.Image _nativeObject; - awt.Image [] _thumbnails; - FrameDimension _dimension; - XmlDocument _metadata; - imageio.metadata.IIOMetadata _nativeMetadata; - ImageFormat _imageFormat; - - float _xResolution; - float _yResolution; - - - #endregion - - #region Constructors - - public PlainImage() { - } - - public PlainImage(awt.Image image, awt.Image [] thumbnails, ImageFormat format, float xRes, float yRes, FrameDimension dimension) { - _nativeObject = image; - _thumbnails = thumbnails; - _imageFormat = format; - - _xResolution = xRes; - _yResolution = yRes; - - _dimension = dimension; - } - - #endregion - - - private awt.Image NativeObject { - get { return _nativeObject; } - set { _nativeObject = value; } - } - - #region PlainImage properties - - public awt.Image NativeImage { - get { return NativeObject; } - set { NativeObject = value; } - } - - internal imageio.metadata.IIOMetadata NativeMetadata { - get { return _nativeMetadata; } - set { _nativeMetadata = value; } - } - - public XmlDocument Metadata { - get { return _metadata; } - set { _metadata = value; } - } - - public ImageFormat ImageFormat { - get { return _imageFormat; } - } - - public FrameDimension Dimension { - get { return _dimension; } - set { _dimension = value; } - } - - public awt.Image [] Thumbnails { - get { return _thumbnails; } - } - - public float HorizontalResolution { - get { return _xResolution; } - set { _xResolution = value; } - } - - public float VerticalResolution { - get { return _yResolution; } - set { _yResolution = value; } - } - - #endregion - - #region ICloneable members - - public object Clone() { - - awt.Image img = new BufferedImage( - ((BufferedImage)NativeObject).getColorModel(), - ((BufferedImage)NativeObject).copyData(null), - ((BufferedImage)NativeObject).isAlphaPremultiplied(), null); - - awt.Image [] th = null; - if (Thumbnails != null) { - th = new java.awt.Image[ Thumbnails.Length ]; - for (int i=0; i < Thumbnails.Length; i++) { - th[i] = new BufferedImage( - ((BufferedImage)Thumbnails[i]).getColorModel(), - ((BufferedImage)Thumbnails[i]).copyData(null), - ((BufferedImage)Thumbnails[i]).isAlphaPremultiplied(), null); - } - } - - return new PlainImage( - img, - th, - ImageFormat, - HorizontalResolution, - VerticalResolution, - Dimension ); - } - - #endregion - } -} diff --git a/mcs/class/System.Drawing/System.Drawing/PlainImageCollection.jvm.cs b/mcs/class/System.Drawing/System.Drawing/PlainImageCollection.jvm.cs deleted file mode 100644 index 1274948840f..00000000000 --- a/mcs/class/System.Drawing/System.Drawing/PlainImageCollection.jvm.cs +++ /dev/null @@ -1,101 +0,0 @@ -using System; -using System.Collections; - -namespace Mainsoft.Drawing.Imaging -{ - /// - /// Summary description for PlainImageCollection. - /// - public class PlainImageCollection : ICollection, IEnumerable - { - ArrayList collection = new ArrayList(); - int _position = 0; - - public PlainImageCollection() - { - // - // TODO: Add constructor logic here - // - } - - #region ICollection members - - public bool IsSynchronized { - get { - return collection.IsSynchronized; - } - } - - public int Count { - get { - return collection.Count; - } - } - - public void CopyTo(Array array, int index) { - collection.CopyTo(array, index); - } - - public object SyncRoot { - get { - return collection.SyncRoot; - } - } - - #endregion - - #region IEnumerable members - - public IEnumerator GetEnumerator() { - return collection.GetEnumerator(); - } - - #endregion - - #region Collection members - - public int Add(PlainImage plainImage) { - return collection.Add( plainImage ); - } - - public void Clear() { - collection.Clear(); - } - - public bool Contains(PlainImage plainImage) { - return collection.Contains(plainImage); - } - - public int IndexOf(PlainImage plainImage) { - return collection.IndexOf( plainImage ); - } - - public void Insert(int index, PlainImage value) { - collection.Insert( index, value ); - } - - public void Remove(PlainImage value) { - collection.Remove( value ); - } - - public void RemoveAt(int index) { - collection.RemoveAt( index ); - } - - public PlainImage this[int index] { - get { return (PlainImage) collection[ index ]; } - } - - public PlainImage CurrentImage { - get { return (PlainImage) collection[ _position ]; } - set { collection[ _position ] = value; } - } - - public int CurrentImageIndex { - get { return _position; } - set { _position = value; } - } - - #endregion - } -} diff --git a/mcs/class/System.Drawing/System.Drawing/Point.cs b/mcs/class/System.Drawing/System.Drawing/Point.cs deleted file mode 100644 index 9a9083cc285..00000000000 --- a/mcs/class/System.Drawing/System.Drawing/Point.cs +++ /dev/null @@ -1,371 +0,0 @@ -// -// System.Drawing.Point.cs -// -// Author: -// Mike Kestner (mkestner@speakeasy.net) -// -// Copyright (C) 2001 Mike Kestner -// Copyright (C) 2004 Novell, Inc. http://www.novell.com -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; -using System.Globalization; -using System.Runtime.InteropServices; -using System.ComponentModel; - -namespace System.Drawing -{ - [Serializable] - [ComVisible (true)] - [TypeConverter (typeof (PointConverter))] - public struct Point - { - // Private x and y coordinate fields. - private int x, y; - - // ----------------------- - // Public Shared Members - // ----------------------- - - /// - /// Empty Shared Field - /// - /// - /// - /// An uninitialized Point Structure. - /// - - public static readonly Point Empty; - - /// - /// Ceiling Shared Method - /// - /// - /// - /// Produces a Point structure from a PointF structure by - /// taking the ceiling of the X and Y properties. - /// - - public static Point Ceiling (PointF value) - { - int x, y; - checked { - x = (int) Math.Ceiling (value.X); - y = (int) Math.Ceiling (value.Y); - } - - return new Point (x, y); - } - - /// - /// Round Shared Method - /// - /// - /// - /// Produces a Point structure from a PointF structure by - /// rounding the X and Y properties. - /// - - public static Point Round (PointF value) - { - int x, y; - checked { - x = (int) Math.Round (value.X); - y = (int) Math.Round (value.Y); - } - - return new Point (x, y); - } - - /// - /// Truncate Shared Method - /// - /// - /// - /// Produces a Point structure from a PointF structure by - /// truncating the X and Y properties. - /// - - // LAMESPEC: Should this be floor, or a pure cast to int? - - public static Point Truncate (PointF value) - { - int x, y; - checked { - x = (int) value.X; - y = (int) value.Y; - } - - return new Point (x, y); - } - - /// - /// Addition Operator - /// - /// - /// - /// Translates a Point using the Width and Height - /// properties of the given Size. - /// - - public static Point operator + (Point pt, Size sz) - { - return new Point (pt.X + sz.Width, pt.Y + sz.Height); - } - - /// - /// Equality Operator - /// - /// - /// - /// Compares two Point objects. The return value is - /// based on the equivalence of the X and Y properties - /// of the two points. - /// - - public static bool operator == (Point pt_a, Point pt_b) - { - return ((pt_a.X == pt_b.X) && (pt_a.Y == pt_b.Y)); - } - - /// - /// Inequality Operator - /// - /// - /// - /// Compares two Point objects. The return value is - /// based on the equivalence of the X and Y properties - /// of the two points. - /// - - public static bool operator != (Point pt_a, Point pt_b) - { - return ((pt_a.X != pt_b.X) || (pt_a.Y != pt_b.Y)); - } - - /// - /// Subtraction Operator - /// - /// - /// - /// Translates a Point using the negation of the Width - /// and Height properties of the given Size. - /// - - public static Point operator - (Point pt, Size sz) - { - return new Point (pt.X - sz.Width, pt.Y - sz.Height); - } - - /// - /// Point to Size Conversion - /// - /// - /// - /// Returns a Size based on the Coordinates of a given - /// Point. Requires explicit cast. - /// - - public static explicit operator Size (Point pt) - { - return new Size (pt.X, pt.Y); - } - - /// - /// Point to PointF Conversion - /// - /// - /// - /// Creates a PointF based on the coordinates of a given - /// Point. No explicit cast is required. - /// - - public static implicit operator PointF (Point pt) - { - return new PointF (pt.X, pt.Y); - } - - - // ----------------------- - // Public Constructors - // ----------------------- - - /// - /// Point Constructor - /// - /// - /// - /// Creates a Point from an integer which holds the X - /// coordinate in the high order 16 bits and the Y - /// coordinate in the low order 16 bits. - /// - - public Point (int dw) - { - x = dw >> 16; - y = dw & 0xffff; - } - - /// - /// Point Constructor - /// - /// - /// - /// Creates a Point from a Size value. - /// - - public Point (Size sz) - { - x = sz.Width; - y = sz.Height; - } - - /// - /// Point Constructor - /// - /// - /// - /// Creates a Point from a specified x,y coordinate pair. - /// - - public Point (int x, int y) - { - this.x = x; - this.y = y; - } - - // ----------------------- - // Public Instance Members - // ----------------------- - - /// - /// IsEmpty Property - /// - /// - /// - /// Indicates if both X and Y are zero. - /// - - [Browsable (false)] - public bool IsEmpty { - get { - return ((x == 0) && (y == 0)); - } - } - - /// - /// X Property - /// - /// - /// - /// The X coordinate of the Point. - /// - - public int X { - get { - return x; - } - set { - x = value; - } - } - - /// - /// Y Property - /// - /// - /// - /// The Y coordinate of the Point. - /// - - public int Y { - get { - return y; - } - set { - y = value; - } - } - - /// - /// Equals Method - /// - /// - /// - /// Checks equivalence of this Point and another object. - /// - - public override bool Equals (object o) - { - if (!(o is Point)) - return false; - - return (this == (Point) o); - } - - /// - /// GetHashCode Method - /// - /// - /// - /// Calculates a hashing value. - /// - - public override int GetHashCode () - { - return x^y; - } - - /// - /// Offset Method - /// - /// - /// - /// Moves the Point a specified distance. - /// - - public void Offset (int dx, int dy) - { - x += dx; - y += dy; - } - - /// - /// ToString Method - /// - /// - /// - /// Formats the Point as a string in coordinate notation. - /// - - public override string ToString () - { - return string.Format ("{{X={0},Y={1}}}", x.ToString (CultureInfo.InvariantCulture), - y.ToString (CultureInfo.InvariantCulture)); - } - - } -} diff --git a/mcs/class/System.Drawing/System.Drawing/PointConverter.cs b/mcs/class/System.Drawing/System.Drawing/PointConverter.cs deleted file mode 100644 index 56b7ec0e99c..00000000000 --- a/mcs/class/System.Drawing/System.Drawing/PointConverter.cs +++ /dev/null @@ -1,144 +0,0 @@ -// -// System.Drawing.PointConverter.cs -// -// Authors: -// Dennis Hayes (dennish@Raytek.com) -// Ravindra (rkumar@novell.com) -// -// Copyright (C) 2002 Ximian, Inc. http://www.ximian.com -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; -using System.Collections; -using System.ComponentModel; -using System.Globalization; -using System.ComponentModel.Design.Serialization; -using System.Reflection; - -namespace System.Drawing -{ - /// - /// Summary description for PointConverter. - /// - public class PointConverter : TypeConverter - { - public PointConverter() { } - - public override bool CanConvertFrom (ITypeDescriptorContext context, - Type sourceType) - { - if (sourceType == typeof (string)) - return true; - - return base.CanConvertFrom (context, sourceType); - } - - public override bool CanConvertTo (ITypeDescriptorContext context, - Type destinationType) - { - if (destinationType == typeof (string)) - return true; - - if (destinationType == typeof (InstanceDescriptor)) - return true; - - return base.CanConvertTo (context, destinationType); - } - - public override object ConvertFrom (ITypeDescriptorContext context, - CultureInfo culture, - object value) - { - string s = value as string; - if (s == null) - return base.ConvertFrom (context, culture, value); - - string [] subs = s.Split (culture.TextInfo.ListSeparator.ToCharArray ()); - - Int32Converter converter = new Int32Converter (); - int[] numSubs = new int[subs.Length]; - for (int i = 0; i < numSubs.Length; i++) { - numSubs[i] = (int) converter.ConvertFromString (context, culture, subs[i]); - } - - if (subs.Length != 2) - throw new ArgumentException ("Failed to parse Text(" + s + ") expected text in the format \"x, y.\""); - - return new Point (numSubs[0], numSubs[1]); - } - - public override object ConvertTo (ITypeDescriptorContext context, - CultureInfo culture, - object value, - Type destinationType) - { - // LAMESPEC: "The default implementation calls the object's - // ToString method if the object is valid and if the destination - // type is string." MS does not behave as per the specs. - // Oh well, we have to be compatible with MS. - if ((destinationType == typeof (string)) && (value is Point)) - return ((Point) value).X.ToString(culture) + culture.TextInfo.ListSeparator - + " " + ((Point) value).Y.ToString(culture); - - if (destinationType == typeof (InstanceDescriptor) && value is Point) { - Point c = (Point)value; - ConstructorInfo ctor = typeof(Point).GetConstructor (new Type[] {typeof(int), typeof(int)} ); - return new InstanceDescriptor (ctor, new object[] {c.X, c.Y }); - } - - return base.ConvertTo (context, culture, value, destinationType); - } - - public override object CreateInstance (ITypeDescriptorContext context, - IDictionary propertyValues) - { - int x = (int) propertyValues ["X"]; - int y = (int) propertyValues ["Y"]; - - return new Point (x, y); - } - - - public override bool GetCreateInstanceSupported (ITypeDescriptorContext context) - { - return true; - } - - public override PropertyDescriptorCollection GetProperties ( - ITypeDescriptorContext context, - object value, Attribute[] attributes) - { - if (value is Point) - return TypeDescriptor.GetProperties (value, attributes); - - return base.GetProperties (context, value, attributes); - } - - public override bool GetPropertiesSupported (ITypeDescriptorContext context) - { - return true; - } - - } -} diff --git a/mcs/class/System.Drawing/System.Drawing/PointF.cs b/mcs/class/System.Drawing/System.Drawing/PointF.cs deleted file mode 100644 index 67d98af0f82..00000000000 --- a/mcs/class/System.Drawing/System.Drawing/PointF.cs +++ /dev/null @@ -1,234 +0,0 @@ -// -// System.Drawing.PointF.cs -// -// Author: -// Mike Kestner (mkestner@speakeasy.net) -// -// Copyright (C) 2001 Mike Kestner -// Copyright (C) 2004 Novell, Inc. http://www.novell.com -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; -using System.Globalization; -using System.Runtime.InteropServices; -using System.ComponentModel; - -namespace System.Drawing -{ - [Serializable] - [ComVisible (true)] - public struct PointF - { - // Private x and y coordinate fields. - private float x, y; - - // ----------------------- - // Public Shared Members - // ----------------------- - - /// - /// Empty Shared Field - /// - /// - /// - /// An uninitialized PointF Structure. - /// - - public static readonly PointF Empty; - - /// - /// Addition Operator - /// - /// - /// - /// Translates a PointF using the Width and Height - /// properties of the given Size. - /// - - public static PointF operator + (PointF pt, Size sz) - { - return new PointF (pt.X + sz.Width, pt.Y + sz.Height); - } - - /// - /// Equality Operator - /// - /// - /// - /// Compares two PointF objects. The return value is - /// based on the equivalence of the X and Y properties - /// of the two points. - /// - - public static bool operator == (PointF pt_a, PointF pt_b) - { - return ((pt_a.X == pt_b.X) && (pt_a.Y == pt_b.Y)); - } - - /// - /// Inequality Operator - /// - /// - /// - /// Compares two PointF objects. The return value is - /// based on the equivalence of the X and Y properties - /// of the two points. - /// - - public static bool operator != (PointF pt_a, PointF pt_b) - { - return ((pt_a.X != pt_b.X) || (pt_a.Y != pt_b.Y)); - } - - /// - /// Subtraction Operator - /// - /// - /// - /// Translates a PointF using the negation of the Width - /// and Height properties of the given Size. - /// - - public static PointF operator - (PointF pt, Size sz) - { - return new PointF (pt.X - sz.Width, pt.Y - sz.Height); - } - - // ----------------------- - // Public Constructor - // ----------------------- - - /// - /// PointF Constructor - /// - /// - /// - /// Creates a PointF from a specified x,y coordinate pair. - /// - - public PointF (float x, float y) - { - this.x = x; - this.y = y; - } - - // ----------------------- - // Public Instance Members - // ----------------------- - - /// - /// IsEmpty Property - /// - /// - /// - /// Indicates if both X and Y are zero. - /// - - [Browsable (false)] - public bool IsEmpty { - get { - return ((x == 0.0) && (y == 0.0)); - } - } - - /// - /// X Property - /// - /// - /// - /// The X coordinate of the PointF. - /// - - public float X { - get { - return x; - } - set { - x = value; - } - } - - /// - /// Y Property - /// - /// - /// - /// The Y coordinate of the PointF. - /// - - public float Y { - get { - return y; - } - set { - y = value; - } - } - - /// - /// Equals Method - /// - /// - /// - /// Checks equivalence of this PointF and another object. - /// - - public override bool Equals (object o) - { - if (!(o is PointF)) - return false; - - return (this == (PointF) o); - } - - /// - /// GetHashCode Method - /// - /// - /// - /// Calculates a hashing value. - /// - - public override int GetHashCode () - { - return (int) x ^ (int) y; - } - - /// - /// ToString Method - /// - /// - /// - /// Formats the PointF as a string in coordinate notation. - /// - - public override string ToString () - { - return String.Format ("{{X={0}, Y={1}}}", x.ToString (CultureInfo.CurrentCulture), - y.ToString (CultureInfo.CurrentCulture)); - } - } -} diff --git a/mcs/class/System.Drawing/System.Drawing/Rectangle.cs b/mcs/class/System.Drawing/System.Drawing/Rectangle.cs deleted file mode 100644 index 6b96fe4f4f9..00000000000 --- a/mcs/class/System.Drawing/System.Drawing/Rectangle.cs +++ /dev/null @@ -1,638 +0,0 @@ -// -// System.Drawing.Rectangle.cs -// -// Author: -// Mike Kestner (mkestner@speakeasy.net) -// -// Copyright (C) 2001 Mike Kestner -// Copyright (C) 2004 Novell, Inc. http://www.novell.com -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; -using System.Runtime.InteropServices; -using System.ComponentModel; - -namespace System.Drawing -{ - [Serializable] - [ComVisible (true)] - [TypeConverter (typeof (RectangleConverter))] - public struct Rectangle - { - private int x, y, width, height; - - /// - /// Empty Shared Field - /// - /// - /// - /// An uninitialized Rectangle Structure. - /// - - public static readonly Rectangle Empty; - -#if TARGET_JVM - internal java.awt.Rectangle NativeObject { - get { - return new java.awt.Rectangle(X,Y,Width,Height); - } - } -#endif - - /// - /// Ceiling Shared Method - /// - /// - /// - /// Produces a Rectangle structure from a RectangleF - /// structure by taking the ceiling of the X, Y, Width, - /// and Height properties. - /// - - public static Rectangle Ceiling (RectangleF value) - { - int x, y, w, h; - checked { - x = (int) Math.Ceiling (value.X); - y = (int) Math.Ceiling (value.Y); - w = (int) Math.Ceiling (value.Width); - h = (int) Math.Ceiling (value.Height); - } - - return new Rectangle (x, y, w, h); - } - - /// - /// FromLTRB Shared Method - /// - /// - /// - /// Produces a Rectangle structure from left, top, right, - /// and bottom coordinates. - /// - - public static Rectangle FromLTRB (int left, int top, - int right, int bottom) - { - return new Rectangle (left, top, right - left, - bottom - top); - } - - /// - /// Inflate Shared Method - /// - /// - /// - /// Produces a new Rectangle by inflating an existing - /// Rectangle by the specified coordinate values. - /// - - public static Rectangle Inflate (Rectangle rect, int x, int y) - { - Rectangle r = new Rectangle (rect.Location, rect.Size); - r.Inflate (x, y); - return r; - } - - /// - /// Inflate Method - /// - /// - /// - /// Inflates the Rectangle by a specified width and height. - /// - - public void Inflate (int width, int height) - { - Inflate (new Size (width, height)); - } - - /// - /// Inflate Method - /// - /// - /// - /// Inflates the Rectangle by a specified Size. - /// - - public void Inflate (Size sz) - { - x -= sz.Width; - y -= sz.Height; - Width += sz.Width * 2; - Height += sz.Height * 2; - } - - /// - /// Intersect Shared Method - /// - /// - /// - /// Produces a new Rectangle by intersecting 2 existing - /// Rectangles. Returns null if there is no intersection. - /// - - public static Rectangle Intersect (Rectangle r1, Rectangle r2) - { - // MS.NET returns a non-empty rectangle if the two rectangles - // touch each other - if (!r1.IntersectsWithInclusive (r2)) - return Empty; - - return Rectangle.FromLTRB ( - Math.Max (r1.Left, r2.Left), - Math.Max (r1.Top, r2.Top), - Math.Min (r1.Right, r2.Right), - Math.Min (r1.Bottom, r2.Bottom)); - } - - /// - /// Intersect Method - /// - /// - /// - /// Replaces the Rectangle with the intersection of itself - /// and another Rectangle. - /// - - public void Intersect (Rectangle r) - { - this = Rectangle.Intersect (this, r); - } - - /// - /// Round Shared Method - /// - /// - /// - /// Produces a Rectangle structure from a RectangleF by - /// rounding the X, Y, Width, and Height properties. - /// - - public static Rectangle Round (RectangleF value) - { - int x, y, w, h; - checked { - x = (int) Math.Round (value.X); - y = (int) Math.Round (value.Y); - w = (int) Math.Round (value.Width); - h = (int) Math.Round (value.Height); - } - - return new Rectangle (x, y, w, h); - } - - /// - /// Truncate Shared Method - /// - /// - /// - /// Produces a Rectangle structure from a RectangleF by - /// truncating the X, Y, Width, and Height properties. - /// - - // LAMESPEC: Should this be floor, or a pure cast to int? - - public static Rectangle Truncate (RectangleF value) - { - int x, y, w, h; - checked { - x = (int) value.X; - y = (int) value.Y; - w = (int) value.Width; - h = (int) value.Height; - } - - return new Rectangle (x, y, w, h); - } - - /// - /// Union Shared Method - /// - /// - /// - /// Produces a new Rectangle from the union of 2 existing - /// Rectangles. - /// - - public static Rectangle Union (Rectangle r1, Rectangle r2) - { - return FromLTRB (Math.Min (r1.Left, r2.Left), - Math.Min (r1.Top, r2.Top), - Math.Max (r1.Right, r2.Right), - Math.Max (r1.Bottom, r2.Bottom)); - } - - /// - /// Equality Operator - /// - /// - /// - /// Compares two Rectangle objects. The return value is - /// based on the equivalence of the Location and Size - /// properties of the two Rectangles. - /// - - public static bool operator == (Rectangle r1, Rectangle r2) - { - return ((r1.Location == r2.Location) && - (r1.Size == r2.Size)); - } - - /// - /// Inequality Operator - /// - /// - /// - /// Compares two Rectangle objects. The return value is - /// based on the equivalence of the Location and Size - /// properties of the two Rectangles. - /// - - public static bool operator != (Rectangle r1, Rectangle r2) - { - return ((r1.Location != r2.Location) || - (r1.Size != r2.Size)); - } - - - // ----------------------- - // Public Constructors - // ----------------------- - - /// - /// Rectangle Constructor - /// - /// - /// - /// Creates a Rectangle from Point and Size values. - /// - - public Rectangle (Point loc, Size sz) - { - x = loc.X; - y = loc.Y; - width = sz.Width; - height = sz.Height; - } - - /// - /// Rectangle Constructor - /// - /// - /// - /// Creates a Rectangle from a specified x,y location and - /// width and height values. - /// - - public Rectangle (int x, int y, int width, int height) - { - this.x = x; - this.y = y; - this.width = width; - this.height = height; - } - - - - /// - /// Bottom Property - /// - /// - /// - /// The Y coordinate of the bottom edge of the Rectangle. - /// Read only. - /// - - [Browsable (false)] - public int Bottom { - get { - return y + height; - } - } - - /// - /// Height Property - /// - /// - /// - /// The Height of the Rectangle. - /// - - public int Height { - get { - return height; - } - set { - height = value; - } - } - - /// - /// IsEmpty Property - /// - /// - /// - /// Indicates if the width or height are zero. Read only. - /// - [Browsable (false)] - public bool IsEmpty { - get { - return ((x == 0) && (y == 0) && (width == 0) && (height == 0)); - } - } - - /// - /// Left Property - /// - /// - /// - /// The X coordinate of the left edge of the Rectangle. - /// Read only. - /// - - [Browsable (false)] - public int Left { - get { - return X; - } - } - - /// - /// Location Property - /// - /// - /// - /// The Location of the top-left corner of the Rectangle. - /// - - [Browsable (false)] - public Point Location { - get { - return new Point (x, y); - } - set { - x = value.X; - y = value.Y; - } - } - - /// - /// Right Property - /// - /// - /// - /// The X coordinate of the right edge of the Rectangle. - /// Read only. - /// - - [Browsable (false)] - public int Right { - get { - return X + Width; - } - } - - /// - /// Size Property - /// - /// - /// - /// The Size of the Rectangle. - /// - - [Browsable (false)] - public Size Size { - get { - return new Size (Width, Height); - } - set { - Width = value.Width; - Height = value.Height; - } - } - - /// - /// Top Property - /// - /// - /// - /// The Y coordinate of the top edge of the Rectangle. - /// Read only. - /// - - [Browsable (false)] - public int Top { - get { - return y; - } - } - - /// - /// Width Property - /// - /// - /// - /// The Width of the Rectangle. - /// - - public int Width { - get { - return width; - } - set { - width = value; - } - } - - /// - /// X Property - /// - /// - /// - /// The X coordinate of the Rectangle. - /// - - public int X { - get { - return x; - } - set { - x = value; - } - } - - /// - /// Y Property - /// - /// - /// - /// The Y coordinate of the Rectangle. - /// - - public int Y { - get { - return y; - } - set { - y = value; - } - } - - /// - /// Contains Method - /// - /// - /// - /// Checks if an x,y coordinate lies within this Rectangle. - /// - - public bool Contains (int x, int y) - { - return ((x >= Left) && (x < Right) && - (y >= Top) && (y < Bottom)); - } - - /// - /// Contains Method - /// - /// - /// - /// Checks if a Point lies within this Rectangle. - /// - - public bool Contains (Point pt) - { - return Contains (pt.X, pt.Y); - } - - /// - /// Contains Method - /// - /// - /// - /// Checks if a Rectangle lies entirely within this - /// Rectangle. - /// - - public bool Contains (Rectangle rect) - { - return (rect == Intersect (this, rect)); - } - - /// - /// Equals Method - /// - /// - /// - /// Checks equivalence of this Rectangle and another object. - /// - - public override bool Equals (object o) - { - if (!(o is Rectangle)) - return false; - - return (this == (Rectangle) o); - } - - /// - /// GetHashCode Method - /// - /// - /// - /// Calculates a hashing value. - /// - - public override int GetHashCode () - { - return (height + width) ^ x + y; - } - - /// - /// IntersectsWith Method - /// - /// - /// - /// Checks if a Rectangle intersects with this one. - /// - - public bool IntersectsWith (Rectangle r) - { - return !((Left >= r.Right) || (Right <= r.Left) || - (Top >= r.Bottom) || (Bottom <= r.Top)); - } - - private bool IntersectsWithInclusive (Rectangle r) - { - return !((Left > r.Right) || (Right < r.Left) || - (Top > r.Bottom) || (Bottom < r.Top)); - } - - /// - /// Offset Method - /// - /// - /// - /// Moves the Rectangle a specified distance. - /// - - public void Offset (int dx, int dy) - { - x += dx; - y += dy; - } - - /// - /// Offset Method - /// - /// - /// - /// Moves the Rectangle a specified distance. - /// - - public void Offset (Point pt) - { - x += pt.X; - y += pt.Y; - } - - /// - /// ToString Method - /// - /// - /// - /// Formats the Rectangle as a string in (x,y,w,h) notation. - /// - - public override string ToString () - { - return String.Format ("{{X={0},Y={1},Width={2},Height={3}}}", - x, y, width, height); - } - - } -} diff --git a/mcs/class/System.Drawing/System.Drawing/RectangleConverter.cs b/mcs/class/System.Drawing/System.Drawing/RectangleConverter.cs deleted file mode 100644 index d7fffbe6e3d..00000000000 --- a/mcs/class/System.Drawing/System.Drawing/RectangleConverter.cs +++ /dev/null @@ -1,164 +0,0 @@ -// -// System.Drawing.RectangleConverter.cs -// -// Authors: -// Dennis Hayes (dennish@Raytek.com) -// Jordi Mas (jordi@ximian.com) -// Ravindra (rkumar@novell.com) -// -// Copyright (C) 2002 Ximian, Inc. http://www.ximian.com -// Copyright (C) 2004 Novell, Inc. http://www.novell.com -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; -using System.ComponentModel; -using System.Collections; -using System.Globalization; -using System.Text; -using System.ComponentModel.Design.Serialization; -using System.Reflection; - -namespace System.Drawing -{ - /// - /// Summary description for RectangleConverter. - /// - public class RectangleConverter : TypeConverter - { - public RectangleConverter () - { - } - - public override bool CanConvertFrom (ITypeDescriptorContext context, - Type sourceType) - { - if (sourceType == typeof (string)) - return true; - - return base.CanConvertFrom (context, sourceType); - } - - public override bool CanConvertTo (ITypeDescriptorContext context, - Type destinationType) - { - if (destinationType == typeof (string)) - return true; - - if (destinationType == typeof (InstanceDescriptor)) - return true; - - return base.CanConvertTo (context, destinationType); - } - - public override object ConvertFrom (ITypeDescriptorContext context, - CultureInfo culture, - object value) - { - string s = value as string; - if (s == null) - return base.ConvertFrom (context, culture, value); - - string [] subs = s.Split (culture.TextInfo.ListSeparator.ToCharArray ()); - - Int32Converter converter = new Int32Converter (); - int[] numSubs = new int[subs.Length]; - for (int i = 0; i < numSubs.Length; i++) { - numSubs[i] = (int) converter.ConvertFromString (context, culture, subs[i]); - } - - if (subs.Length != 4) - throw new ArgumentException ("Failed to parse Text(" + s + ") expected text in the format \"x,y,Width,Height.\""); - - return new Rectangle (numSubs[0], numSubs[1], numSubs[2], numSubs[3]); - } - - public override object ConvertTo (ITypeDescriptorContext context, - CultureInfo culture, - object value, - Type destinationType) - { - // LAMESPEC: "The default implementation calls the object's - // ToString method if the object is valid and if the destination - // type is string." MS does not behave as per the specs. - // Oh well, we have to be compatible with MS. - if ((destinationType == typeof (string)) && (value is Rectangle)) { - string separator = culture.TextInfo.ListSeparator; - Rectangle rect = (Rectangle) value; - StringBuilder sb = new StringBuilder (); - sb.Append (rect.X.ToString (culture)); - sb.Append (separator); - sb.Append (" "); - sb.Append (rect.Y.ToString (culture)); - sb.Append (separator); - sb.Append (" "); - sb.Append (rect.Width.ToString (culture)); - sb.Append (separator); - sb.Append (" "); - sb.Append (rect.Height.ToString (culture)); - return sb.ToString (); - } - - if (destinationType == typeof (InstanceDescriptor) && value is Rectangle) { - Rectangle c = (Rectangle) value; - ConstructorInfo ctor = typeof(Rectangle).GetConstructor (new Type[] {typeof(int), typeof(int), typeof(int), typeof(int)} ); - return new InstanceDescriptor (ctor, new object[] {c.X, c.Y, c.Width, c.Height}); - } - - return base.ConvertTo (context, culture, value, destinationType); - } - - public override object CreateInstance (ITypeDescriptorContext context, - IDictionary propertyValues) - { - int x = (int) propertyValues ["X"]; - int y = (int) propertyValues ["Y"]; - int width = (int) propertyValues ["Width"]; - int height = (int) propertyValues ["Height"]; - - return new Rectangle (x, y, width, height); - } - - public override bool GetCreateInstanceSupported (ITypeDescriptorContext context) - { - return true; - } - - public override PropertyDescriptorCollection GetProperties ( - ITypeDescriptorContext context, - object value, Attribute[] attributes) - { - if (value is Rectangle) - return TypeDescriptor.GetProperties (value, attributes); - - return base.GetProperties (context, value, attributes); - } - - public override bool GetPropertiesSupported (ITypeDescriptorContext context) - { - return true; - } - } -} diff --git a/mcs/class/System.Drawing/System.Drawing/RectangleF.cs b/mcs/class/System.Drawing/System.Drawing/RectangleF.cs deleted file mode 100644 index 3d34b67efdc..00000000000 --- a/mcs/class/System.Drawing/System.Drawing/RectangleF.cs +++ /dev/null @@ -1,580 +0,0 @@ -// -// System.Drawing.RectangleF.cs -// -// Author: -// Mike Kestner (mkestner@speakeasy.net) -// -// Copyright (C) 2001 Mike Kestner -// Copyright (C) 2004 Novell, Inc. http://www.novell.com -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; -using System.ComponentModel; - -namespace System.Drawing -{ - [Serializable] - public struct RectangleF - { - private float x, y, width, height; - - /// - /// Empty Shared Field - /// - /// - /// - /// An uninitialized RectangleF Structure. - /// - - public static readonly RectangleF Empty; - -#if TARGET_JVM - internal java.awt.geom.Rectangle2D NativeObject { - get { - return new java.awt.geom.Rectangle2D.Float(X,Y,Width,Height); - } - } -#endif - - /// - /// FromLTRB Shared Method - /// - /// - /// - /// Produces a RectangleF structure from left, top, right, - /// and bottom coordinates. - /// - - public static RectangleF FromLTRB (float left, float top, - float right, float bottom) - { - return new RectangleF (left, top, right - left, bottom - top); - } - - /// - /// Inflate Shared Method - /// - /// - /// - /// Produces a new RectangleF by inflating an existing - /// RectangleF by the specified coordinate values. - /// - - public static RectangleF Inflate (RectangleF r, - float x, float y) - { - RectangleF ir = new RectangleF (r.X, r.Y, r.Width, r.Height); - ir.Inflate (x, y); - return ir; - } - - /// - /// Inflate Method - /// - /// - /// - /// Inflates the RectangleF by a specified width and height. - /// - - public void Inflate (float width, float height) - { - Inflate (new SizeF (width, height)); - } - - /// - /// Inflate Method - /// - /// - /// - /// Inflates the RectangleF by a specified Size. - /// - - public void Inflate (SizeF sz) - { - x -= sz.Width; - y -= sz.Height; - width += sz.Width * 2; - height += sz.Height * 2; - } - - /// - /// Intersect Shared Method - /// - /// - /// - /// Produces a new RectangleF by intersecting 2 existing - /// RectangleFs. Returns null if there is no intersection. - /// - - public static RectangleF Intersect (RectangleF r1, - RectangleF r2) - { - if (!r1.IntersectsWith (r2)) - return Empty; - - return FromLTRB ( - Math.Max (r1.Left, r2.Left), - Math.Max (r1.Top, r2.Top), - Math.Min (r1.Right, r2.Right), - Math.Min (r1.Bottom, r2.Bottom)); - } - - /// - /// Intersect Method - /// - /// - /// - /// Replaces the RectangleF with the intersection of itself - /// and another RectangleF. - /// - - public void Intersect (RectangleF r) - { - this = RectangleF.Intersect (this, r); - } - - /// - /// Union Shared Method - /// - /// - /// - /// Produces a new RectangleF from the union of 2 existing - /// RectangleFs. - /// - - public static RectangleF Union (RectangleF r1, RectangleF r2) - { - return FromLTRB (Math.Min (r1.Left, r2.Left), - Math.Min (r1.Top, r2.Top), - Math.Max (r1.Right, r2.Right), - Math.Max (r1.Bottom, r2.Bottom)); - } - - /// - /// Equality Operator - /// - /// - /// - /// Compares two RectangleF objects. The return value is - /// based on the equivalence of the Location and Size - /// properties of the two RectangleFs. - /// - - public static bool operator == (RectangleF r1, RectangleF r2) - { - return (r1.X == r2.X) && (r1.Y == r2.Y) && - (r1.Width == r2.Width) && (r1.Height == r2.Height); - } - - /// - /// Inequality Operator - /// - /// - /// - /// Compares two RectangleF objects. The return value is - /// based on the equivalence of the Location and Size - /// properties of the two RectangleFs. - /// - - public static bool operator != (RectangleF r1, RectangleF r2) - { - return (r1.X != r2.X) && (r1.Y != r2.Y) && - (r1.Width != r2.Width) && (r1.Height != r2.Height); - } - - /// - /// Rectangle to RectangleF Conversion - /// - /// - /// - /// Converts a Rectangle object to a RectangleF. - /// - - public static implicit operator RectangleF (Rectangle r) - { - return new RectangleF (r.X, r.Y, r.Width, r.Height); - } - - - // ----------------------- - // Public Constructors - // ----------------------- - - /// - /// RectangleF Constructor - /// - /// - /// - /// Creates a RectangleF from PointF and SizeF values. - /// - - public RectangleF (PointF loc, SizeF sz) - { - x = loc.X; - y = loc.Y; - width = sz.Width; - height = sz.Height; - } - - /// - /// RectangleF Constructor - /// - /// - /// - /// Creates a RectangleF from a specified x,y location and - /// width and height values. - /// - - public RectangleF (float x, float y, float width, float height) - { - this.x = x; - this.y = y; - this.width = width; - this.height = height; - } - - -#if TARGET_JVM - internal RectangleF (java.awt.geom.RectangularShape r2d) { - this.x = (float) r2d.getX (); - this.y = (float) r2d.getY (); - this.width = (float) r2d.getWidth (); - this.height = (float) r2d.getHeight (); - } -#endif - - /// - /// Bottom Property - /// - /// - /// - /// The Y coordinate of the bottom edge of the RectangleF. - /// Read only. - /// - - [Browsable (false)] - public float Bottom { - get { - return Y + Height; - } - } - - /// - /// Height Property - /// - /// - /// - /// The Height of the RectangleF. - /// - - public float Height { - get { - return height; - } - set { - height = value; - } - } - - /// - /// IsEmpty Property - /// - /// - /// - /// Indicates if the width or height are zero. Read only. - /// - // - [Browsable (false)] - public bool IsEmpty { - get { - return (width == 0 || height == 0); - } - } - - /// - /// Left Property - /// - /// - /// - /// The X coordinate of the left edge of the RectangleF. - /// Read only. - /// - - [Browsable (false)] - public float Left { - get { - return X; - } - } - - /// - /// Location Property - /// - /// - /// - /// The Location of the top-left corner of the RectangleF. - /// - - [Browsable (false)] - public PointF Location { - get { - return new PointF (x, y); - } - set { - x = value.X; - y = value.Y; - } - } - - /// - /// Right Property - /// - /// - /// - /// The X coordinate of the right edge of the RectangleF. - /// Read only. - /// - - [Browsable (false)] - public float Right { - get { - return X + Width; - } - } - - /// - /// Size Property - /// - /// - /// - /// The Size of the RectangleF. - /// - - [Browsable (false)] - public SizeF Size { - get { - return new SizeF (width, height); - } - set { - width = value.Width; - height = value.Height; - } - } - - /// - /// Top Property - /// - /// - /// - /// The Y coordinate of the top edge of the RectangleF. - /// Read only. - /// - - [Browsable (false)] - public float Top { - get { - return Y; - } - } - - /// - /// Width Property - /// - /// - /// - /// The Width of the RectangleF. - /// - - public float Width { - get { - return width; - } - set { - width = value; - } - } - - /// - /// X Property - /// - /// - /// - /// The X coordinate of the RectangleF. - /// - - public float X { - get { - return x; - } - set { - x = value; - } - } - - /// - /// Y Property - /// - /// - /// - /// The Y coordinate of the RectangleF. - /// - - public float Y { - get { - return y; - } - set { - y = value; - } - } - - /// - /// Contains Method - /// - /// - /// - /// Checks if an x,y coordinate lies within this RectangleF. - /// - - public bool Contains (float x, float y) - { - return ((x >= Left) && (x < Right) && - (y >= Top) && (y < Bottom)); - } - - /// - /// Contains Method - /// - /// - /// - /// Checks if a Point lies within this RectangleF. - /// - - public bool Contains (PointF pt) - { - return Contains (pt.X, pt.Y); - } - - /// - /// Contains Method - /// - /// - /// - /// Checks if a RectangleF lies entirely within this - /// RectangleF. - /// - - public bool Contains (RectangleF rect) - { - return (rect == Intersect (this, rect)); - } - - /// - /// Equals Method - /// - /// - /// - /// Checks equivalence of this RectangleF and an object. - /// - - public override bool Equals (object o) - { - if (!(o is RectangleF)) - return false; - - return (this == (RectangleF) o); - } - - /// - /// GetHashCode Method - /// - /// - /// - /// Calculates a hashing value. - /// - - public override int GetHashCode () - { - return (int) (x + y + width + height); - } - - /// - /// IntersectsWith Method - /// - /// - /// - /// Checks if a RectangleF intersects with this one. - /// - - public bool IntersectsWith (RectangleF r) - { - return !((Left >= r.Right) || (Right <= r.Left) || - (Top >= r.Bottom) || (Bottom <= r.Top)); - } - - /// - /// Offset Method - /// - /// - /// - /// Moves the RectangleF a specified distance. - /// - - public void Offset (float dx, float dy) - { - X += dx; - Y += dy; - } - - /// - /// Offset Method - /// - /// - /// - /// Moves the RectangleF a specified distance. - /// - - public void Offset (PointF pt) - { - Offset(pt.X, pt.Y); - } - - /// - /// ToString Method - /// - /// - /// - /// Formats the RectangleF in (x,y,w,h) notation. - /// - - public override string ToString () - { - return String.Format ("{{X={0},Y={1},Width={2},Height={3}}}", - x, y, width, height); - } - - } -} diff --git a/mcs/class/System.Drawing/System.Drawing/Region.cs b/mcs/class/System.Drawing/System.Drawing/Region.cs deleted file mode 100644 index e307be96b1f..00000000000 --- a/mcs/class/System.Drawing/System.Drawing/Region.cs +++ /dev/null @@ -1,567 +0,0 @@ -// -// System.Drawing.Region.cs -// -// Author: -// Miguel de Icaza (miguel@ximian.com) -// Jordi Mas i Hernandez (jordi@ximian.com) -// -// Copyright (C) 2003 Ximian, Inc. http://www.ximian.com -// Copyright (C) 2004 Novell, Inc. http://www.novell.com -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; -using System.Drawing.Drawing2D; -using System.Runtime.InteropServices; - -namespace System.Drawing -{ - [ComVisible (false)] - public sealed class Region : MarshalByRefObject, IDisposable - { - private IntPtr nativeRegion = IntPtr.Zero; - - public Region() - { - Status status = GDIPlus.GdipCreateRegion (out nativeRegion); - GDIPlus.CheckStatus (status); - } - - internal Region(IntPtr native) - { - nativeRegion = native; - } - - - public Region (GraphicsPath path) - { - Status status = GDIPlus.GdipCreateRegionPath (path.NativeObject, out nativeRegion); - GDIPlus.CheckStatus (status); - } - - public Region (Rectangle rect) - { - Status status = GDIPlus.GdipCreateRegionRectI (ref rect, out nativeRegion); - GDIPlus.CheckStatus (status); - } - - public Region (RectangleF rect) - { - Status status = GDIPlus.GdipCreateRegionRect (ref rect, out nativeRegion); - GDIPlus.CheckStatus (status); - } - - [MonoTODO] - public Region (RegionData region_data) - { - throw new NotImplementedException (); - } - - // - // Union - // - - public void Union (GraphicsPath path) - { - Status status = GDIPlus.GdipCombineRegionPath (nativeRegion, path.NativeObject, CombineMode.Union); - GDIPlus.CheckStatus (status); - } - - - public void Union (Rectangle rect) - { - Status status = GDIPlus.GdipCombineRegionRectI (nativeRegion, ref rect, CombineMode.Union); - GDIPlus.CheckStatus (status); - } - - public void Union (RectangleF rect) - { - Status status = GDIPlus.GdipCombineRegionRect (nativeRegion, ref rect, CombineMode.Union); - GDIPlus.CheckStatus (status); - } - - public void Union (Region region) - { - Status status = GDIPlus.GdipCombineRegionRegion (nativeRegion, region.NativeObject, CombineMode.Union); - GDIPlus.CheckStatus (status); - } - - - // - // Intersect - // - public void Intersect (GraphicsPath path) - { - Status status = GDIPlus.GdipCombineRegionPath (nativeRegion, path.NativeObject, CombineMode.Intersect); - GDIPlus.CheckStatus (status); - } - - public void Intersect (Rectangle rect) - { - Status status = GDIPlus.GdipCombineRegionRectI (nativeRegion, ref rect, CombineMode.Intersect); - GDIPlus.CheckStatus (status); - } - - public void Intersect (RectangleF rect) - { - Status status = GDIPlus.GdipCombineRegionRect (nativeRegion, ref rect, CombineMode.Intersect); - GDIPlus.CheckStatus (status); - } - - public void Intersect (Region region) - { - Status status = GDIPlus.GdipCombineRegionRegion (nativeRegion, region.NativeObject, CombineMode.Intersect); - GDIPlus.CheckStatus (status); - } - - // - // Complement - // - public void Complement (GraphicsPath path) - { - Status status = GDIPlus.GdipCombineRegionPath (nativeRegion, path.NativeObject, CombineMode.Complement); - GDIPlus.CheckStatus (status); - } - - public void Complement (Rectangle rect) - { - Status status = GDIPlus.GdipCombineRegionRectI (nativeRegion, ref rect, CombineMode.Complement); - GDIPlus.CheckStatus (status); - } - - public void Complement (RectangleF rect) - { - Status status = GDIPlus.GdipCombineRegionRect (nativeRegion, ref rect, CombineMode.Complement); - GDIPlus.CheckStatus (status); - } - - public void Complement (Region region) - { - Status status = GDIPlus.GdipCombineRegionRegion (nativeRegion, region.NativeObject, CombineMode.Complement); - GDIPlus.CheckStatus (status); - } - - // - // Exclude - // - public void Exclude (GraphicsPath path) - { - Status status = GDIPlus.GdipCombineRegionPath (nativeRegion, path.NativeObject, CombineMode.Exclude); - GDIPlus.CheckStatus (status); - } - - public void Exclude (Rectangle rect) - { - Status status = GDIPlus.GdipCombineRegionRectI (nativeRegion, ref rect, CombineMode.Exclude); - GDIPlus.CheckStatus (status); - } - - public void Exclude (RectangleF rect) - { - Status status = GDIPlus.GdipCombineRegionRect (nativeRegion, ref rect, CombineMode.Exclude); - GDIPlus.CheckStatus (status); - } - - public void Exclude (Region region) - { - Status status = GDIPlus.GdipCombineRegionRegion (nativeRegion, region.NativeObject, CombineMode.Exclude); - GDIPlus.CheckStatus (status); - } - - // - // Xor - // - public void Xor (GraphicsPath path) - { - Status status = GDIPlus.GdipCombineRegionPath (nativeRegion, path.NativeObject, CombineMode.Xor); - GDIPlus.CheckStatus (status); - } - - public void Xor (Rectangle rect) - { - Status status = GDIPlus.GdipCombineRegionRectI (nativeRegion, ref rect, CombineMode.Xor); - GDIPlus.CheckStatus (status); - } - - public void Xor (RectangleF rect) - { - Status status = GDIPlus.GdipCombineRegionRect (nativeRegion, ref rect, CombineMode.Xor); - GDIPlus.CheckStatus (status); - } - - public void Xor (Region region) - { - Status status = GDIPlus.GdipCombineRegionRegion (nativeRegion, region.NativeObject, CombineMode.Xor); - GDIPlus.CheckStatus (status); - } - - // - // GetBounds - // - public RectangleF GetBounds (Graphics graphics) - { - RectangleF rect = new Rectangle(); - - Status status = GDIPlus.GdipGetRegionBounds (nativeRegion, graphics.NativeObject, ref rect); - GDIPlus.CheckStatus (status); - - return rect; - } - - // - // Translate - // - public void Translate (int dx, int dy) - { - Status status = GDIPlus.GdipTranslateRegionI (nativeRegion, dx, dy); - GDIPlus.CheckStatus (status); - } - - public void Translate (float dx, float dy) - { - Status status = GDIPlus.GdipTranslateRegion (nativeRegion, dx, dy); - GDIPlus.CheckStatus (status); - } - - // - // IsVisible - // - public bool IsVisible (int x, int y, Graphics g) - { - bool result; - - Status status = GDIPlus.GdipIsVisibleRegionPointI (nativeRegion, x, y, g.NativeObject, out result); - GDIPlus.CheckStatus (status); - - return result; - } - - public bool IsVisible (int x, int y, int width, int height) - { - bool result; - - Status status = GDIPlus.GdipIsVisibleRegionRectI (nativeRegion, x, y, - width, height, IntPtr.Zero, out result); - - GDIPlus.CheckStatus (status); - - return result; - } - - public bool IsVisible (int x, int y, int width, int height, Graphics g) - { - bool result; - - Status status = GDIPlus.GdipIsVisibleRegionRectI (nativeRegion, x, y, - width, height, g.NativeObject, out result); - - GDIPlus.CheckStatus (status); - - return result; - } - - public bool IsVisible (Point point) - { - bool result; - - Status status = GDIPlus.GdipIsVisibleRegionPointI (nativeRegion, point.X, point.Y, - IntPtr.Zero, out result); - - GDIPlus.CheckStatus (status); - - return result; - } - - public bool IsVisible (PointF point) - { - bool result; - - Status status = GDIPlus.GdipIsVisibleRegionPoint (nativeRegion, point.X, point.Y, - IntPtr.Zero, out result); - - GDIPlus.CheckStatus (status); - - return result; - } - - public bool IsVisible (Point point, Graphics g) - { - bool result; - - Status status = GDIPlus.GdipIsVisibleRegionPointI (nativeRegion, point.X, point.Y, - g.NativeObject, out result); - - GDIPlus.CheckStatus (status); - - return result; - } - - public bool IsVisible (PointF point, Graphics g) - { - bool result; - - Status status = GDIPlus.GdipIsVisibleRegionPoint (nativeRegion, point.X, point.Y, - g.NativeObject, out result); - - GDIPlus.CheckStatus (status); - - return result; - } - - public bool IsVisible (Rectangle rect) - { - bool result; - - Status status = GDIPlus.GdipIsVisibleRegionRectI (nativeRegion, rect.X, rect.Y, - rect.Width, rect.Height, IntPtr.Zero, out result); - - GDIPlus.CheckStatus (status); - - return result; - } - - public bool IsVisible (RectangleF rect) - { - bool result; - - Status status = GDIPlus.GdipIsVisibleRegionRect (nativeRegion, rect.X, rect.Y, - rect.Width, rect.Height, IntPtr.Zero, out result); - - GDIPlus.CheckStatus (status); - - return result; - } - - public bool IsVisible (Rectangle rect, Graphics g) - { - bool result; - - Status status = GDIPlus.GdipIsVisibleRegionRectI (nativeRegion, rect.X, rect.Y, - rect.Width, rect.Height, g.NativeObject, out result); - - GDIPlus.CheckStatus (status); - - return result; - } - - public bool IsVisible (RectangleF rect, Graphics g) - { - bool result; - - Status status = GDIPlus.GdipIsVisibleRegionRect (nativeRegion, rect.X, rect.Y, - rect.Width, rect.Height, g.NativeObject, out result); - - GDIPlus.CheckStatus (status); - - return result; - } - - public bool IsVisible (float x, float y) - { - bool result; - - Status status = GDIPlus.GdipIsVisibleRegionPoint (nativeRegion, x, y, IntPtr.Zero, out result); - GDIPlus.CheckStatus (status); - - return result; - } - - public bool IsVisible (float x, float y, Graphics g) - { - bool result; - - Status status = GDIPlus.GdipIsVisibleRegionPoint (nativeRegion, x, y, g.NativeObject, out result); - GDIPlus.CheckStatus (status); - - return result; - } - - public bool IsVisible (float x, float y, float width, float height) - { - bool result; - - Status status = GDIPlus.GdipIsVisibleRegionRect (nativeRegion, x, y, width, height, IntPtr.Zero, out result); - GDIPlus.CheckStatus (status); - - return result; - } - - public bool IsVisible (float x, float y, float width, float height, Graphics g) - { - bool result; - - Status status = GDIPlus.GdipIsVisibleRegionRect (nativeRegion, x, y, width, height, g.NativeObject, out result); - GDIPlus.CheckStatus (status); - - return result; - } - - - // - // Miscellaneous - // - - public bool IsEmpty(Graphics g) - { - bool result; - - Status status = GDIPlus.GdipIsEmptyRegion (nativeRegion, g.NativeObject, out result); - GDIPlus.CheckStatus (status); - - return result; - } - - public bool IsInfinite(Graphics g) - { - bool result; - - Status status = GDIPlus.GdipIsInfiniteRegion (nativeRegion, g.NativeObject, out result); - GDIPlus.CheckStatus (status); - - return result; - } - - public void MakeEmpty() - { - Status status = GDIPlus.GdipSetEmpty (nativeRegion); - GDIPlus.CheckStatus (status); - } - - public void MakeInfinite() - { - Status status = GDIPlus.GdipSetInfinite (nativeRegion); - GDIPlus.CheckStatus (status); - } - - public bool Equals(Region region, Graphics g) - { - bool result; - - Status status = GDIPlus.GdipIsEqualRegion (nativeRegion, region.NativeObject, - g.NativeObject, out result); - - GDIPlus.CheckStatus (status); - - return result; - } - - - public static Region FromHrgn(IntPtr hrgn) - { - return new Region (hrgn); - } - - - public IntPtr GetHrgn(Graphics g) - { - return nativeRegion; - } - - - public RegionData GetRegionData() - { - int size, filled; - - Status status = GDIPlus.GdipGetRegionDataSize (nativeRegion, out size); - GDIPlus.CheckStatus (status); - - byte[] buff = new byte [size]; - - status = GDIPlus.GdipGetRegionData (nativeRegion, buff, size, out filled); - GDIPlus.CheckStatus (status); - - RegionData rgndata = new RegionData(); - rgndata.Data = buff; - - return rgndata; - } - - - public RectangleF[] GetRegionScans(Matrix matrix) - { - int cnt; - - Status status = GDIPlus.GdipGetRegionScansCount (nativeRegion, out cnt, matrix.NativeObject); - GDIPlus.CheckStatus (status); - - if (cnt == 0) - return new RectangleF[0]; - - RectangleF[] rects = new RectangleF [cnt]; - int size = Marshal.SizeOf (rects[0]); - - IntPtr dest = Marshal.AllocHGlobal (size * cnt); - - status = GDIPlus.GdipGetRegionScans (nativeRegion, dest, out cnt, matrix.NativeObject); - GDIPlus.CheckStatus (status); - - GDIPlus.FromUnManagedMemoryToRectangles (dest, rects); - return rects; - } - - public void Transform(Matrix matrix) - { - Status status = GDIPlus.GdipTransformRegion (nativeRegion, matrix.NativeObject); - GDIPlus.CheckStatus (status); - } - - public Region Clone() - { - IntPtr cloned; - - Status status = GDIPlus.GdipCloneRegion (nativeRegion, out cloned); - GDIPlus.CheckStatus (status); - - return new Region (cloned); - } - - public void Dispose () - { - DisposeHandle (); - System.GC.SuppressFinalize (this); - } - - private void DisposeHandle () - { - if (nativeRegion != IntPtr.Zero) { - GDIPlus.GdipDeleteRegion (nativeRegion); - nativeRegion = IntPtr.Zero; - } - } - - ~Region () - { - DisposeHandle (); - } - - internal IntPtr NativeObject - { - get{ - return nativeRegion; - } - set { - nativeRegion = value; - } - } - - - } -} diff --git a/mcs/class/System.Drawing/System.Drawing/Region.jvm.cs b/mcs/class/System.Drawing/System.Drawing/Region.jvm.cs deleted file mode 100644 index 60e0230b1f0..00000000000 --- a/mcs/class/System.Drawing/System.Drawing/Region.jvm.cs +++ /dev/null @@ -1,386 +0,0 @@ - -using System; -using System.Drawing.Drawing2D; -using System.Runtime.InteropServices; - -using awt = java.awt; -using geom = java.awt.geom; - -namespace System.Drawing -{ - [ComVisible (false)] - public sealed class Region : BasicShape - { - #region Member Vars - internal static readonly Region InfiniteRegion = new Region(new Rectangle(-0x400000, -0x400000, 0x800000, 0x800000)); - #endregion - - #region Internals - internal geom.Area NativeObject - { - get - { - return (geom.Area)Shape; - } - } - #endregion - - #region Ctors. and Dtor - - - public Region() : this((geom.Area)InfiniteRegion.NativeObject.clone()) - { - } - - internal Region(geom.Area native) : base(native) - { - } - - - public Region (GraphicsPath path) : this(new geom.Area(path.NativeObject)) - { - } - - public Region (Rectangle rect) : this(new geom.Area(new awt.Rectangle(rect.X,rect.Y,rect.Width,rect.Height))) - { - } - - public Region (RectangleF rect) : this(new geom.Area(new geom.Rectangle2D.Float(rect.X,rect.Y,rect.Width,rect.Height))) - { - } - - public Region (RegionData region_data) : this((geom.Area)null) - { - throw new NotImplementedException (); - } - #endregion - - #region Union - public void Union (GraphicsPath path) - { - if (path == null) - throw new ArgumentNullException("path"); - NativeObject.add(new geom.Area(path.NativeObject)); - } - - - public void Union (Rectangle rect) - { - NativeObject.add(new geom.Area(new awt.Rectangle(rect.X,rect.Y,rect.Width,rect.Height))); - } - - public void Union (RectangleF rect) - { - NativeObject.add(new geom.Area(new geom.Rectangle2D.Float(rect.X,rect.Y,rect.Width,rect.Height))); - } - - public void Union (Region region) - { - if (region == null) - throw new ArgumentNullException("region"); - NativeObject.add(new geom.Area(region.NativeObject)); - } - #endregion - - #region Intersect - // - public void Intersect (GraphicsPath path) - { - if (path == null) - throw new ArgumentNullException("path"); - NativeObject.intersect(new geom.Area(path.NativeObject)); - } - - public void Intersect (Rectangle rect) - { - NativeObject.intersect(new geom.Area(new awt.Rectangle(rect.X,rect.Y,rect.Width,rect.Height))); - } - - public void Intersect (RectangleF rect) - { - NativeObject.intersect(new geom.Area(new geom.Rectangle2D.Float(rect.X,rect.Y,rect.Width,rect.Height))); - } - - public void Intersect (Region region) - { - if (region == null) - throw new ArgumentNullException("region"); - NativeObject.intersect(new geom.Area(region.NativeObject)); - } - #endregion - - #region Complement - // - public void Complement (GraphicsPath path) - { - if (path == null) - throw new ArgumentNullException("path"); - geom.Area a = new geom.Area(path.NativeObject); - a.subtract(NativeObject); - Shape = a; - } - - public void Complement (Rectangle rect) - { - geom.Area a = new geom.Area(new geom.Area(new awt.Rectangle(rect.X,rect.Y,rect.Width,rect.Height))); - a.subtract(NativeObject); - Shape = a; - } - - public void Complement (RectangleF rect) - { - geom.Area a = new geom.Area(new geom.Area(new geom.Rectangle2D.Float(rect.X,rect.Y,rect.Width,rect.Height))); - a.subtract(NativeObject); - Shape = a; - } - - public void Complement (Region region) - { - if (region == null) - throw new ArgumentNullException("region"); - geom.Area a = new geom.Area(region); - a.subtract(NativeObject); - Shape = a; - } - #endregion - - #region Exclude - // - public void Exclude (GraphicsPath path) - { - if (path == null) - throw new ArgumentNullException("path"); - NativeObject.subtract(new geom.Area(path.NativeObject)); - } - - public void Exclude (Rectangle rect) - { - NativeObject.subtract(new geom.Area(new awt.Rectangle(rect.X,rect.Y,rect.Width,rect.Height))); - } - - public void Exclude (RectangleF rect) - { - NativeObject.subtract(new geom.Area(new geom.Rectangle2D.Float(rect.X,rect.Y,rect.Width,rect.Height))); - } - - public void Exclude (Region region) - { - if (region == null) - throw new ArgumentNullException("region"); - NativeObject.subtract(region.NativeObject); - } - #endregion - - #region Xor - // - public void Xor (GraphicsPath path) - { - if (path == null) - throw new ArgumentNullException("path"); - NativeObject.exclusiveOr(new geom.Area(path.NativeObject)); - } - - public void Xor (Rectangle rect) - { - NativeObject.exclusiveOr(new geom.Area(new awt.Rectangle(rect.X,rect.Y,rect.Width,rect.Height))); - } - - public void Xor (RectangleF rect) - { - NativeObject.exclusiveOr(new geom.Area(new geom.Rectangle2D.Float(rect.X,rect.Y,rect.Width,rect.Height))); - } - - public void Xor (Region region) - { - if (region == null) - throw new ArgumentNullException("region"); - NativeObject.exclusiveOr(region.NativeObject); - } - #endregion - - #region GetBounds - // - public RectangleF GetBounds (Graphics graphics) - { - if (graphics == null) - throw new ArgumentNullException("graphics"); - geom.Rectangle2D r = NativeObject.getBounds2D(); - return new RectangleF((float)r.getX(),(float)r.getY(),(float)r.getWidth(),(float)r.getHeight()); - } - #endregion - - #region Translate - // - public void Translate (int dx, int dy) - { - NativeObject.transform(geom.AffineTransform.getTranslateInstance( - (float)dx, - (float)dy)); - } - - public void Translate (float dx, float dy) - { - NativeObject.transform(geom.AffineTransform.getTranslateInstance( - dx, - dy)); - } - #endregion - - #region IsVisible [TODO] - // - public bool IsVisible (int x, int y, Graphics g) - { - return IsVisible((float)x, (float)y, g); - } - - public bool IsVisible (int x, int y, int width, int height) - { - return IsVisible((float)x, (float)y, (float)width, (float)height); - } - - public bool IsVisible (int x, int y, int width, int height, Graphics g) - { - return IsVisible((float)x, (float)y, (float)width, (float)height, g); - } - - public bool IsVisible (Point point) - { - return IsVisible(point.X, point.Y); - } - - public bool IsVisible (PointF point) - { - return IsVisible(point.X, point.Y); - } - - public bool IsVisible (Point point, Graphics g) - { - return IsVisible(point.X, point.Y, g); - } - - public bool IsVisible (PointF point, Graphics g) - { - return IsVisible(point.X, point.Y, g); - } - - public bool IsVisible (Rectangle rect) - { - return IsVisible(rect.X, rect.Y, rect.Width, rect.Height); - } - - public bool IsVisible (RectangleF rect) - { - return IsVisible(rect.X, rect.Y, rect.Width, rect.Height); - } - - public bool IsVisible (Rectangle rect, Graphics g) - { - return IsVisible(rect.X, rect.Y, rect.Width, rect.Height, g); - } - - public bool IsVisible (RectangleF rect, Graphics g) - { - return IsVisible(rect.X, rect.Y, rect.Width, rect.Height, g); - } - - public bool IsVisible (float x, float y) - { - return NativeObject.contains(x,y); - } - - public bool IsVisible (float x, float y, Graphics g) - { - if (g == null) - throw new ArgumentNullException("graphics"); - return NativeObject.contains(x,y); - } - - public bool IsVisible (float x, float y, float width, float height) - { - return NativeObject.intersects(x,y,width,height); - } - - public bool IsVisible (float x, float y, float width, float height, Graphics g) - { - if (g == null) - throw new ArgumentNullException("graphics"); - return NativeObject.intersects(x,y,width,height); - } - #endregion - - #region IsEmpty - public bool IsEmpty(Graphics g) - { - if (g == null) - throw new ArgumentNullException("graphics"); - return NativeObject.isEmpty(); - } - #endregion - - #region IsInfinite - public bool IsInfinite(Graphics g) - { - if (g == null) - throw new ArgumentNullException("graphics"); - //probably too naive. - return NativeObject.equals(InfiniteRegion.NativeObject); - } - #endregion - - #region MakeEmpty - public void MakeEmpty() - { - NativeObject.reset(); - } - #endregion - - #region MakeInfinite - public void MakeInfinite() - { - Shape = (geom.Area)InfiniteRegion.NativeObject.clone(); - } - #endregion - - #region Equals - public bool Equals(Region region, Graphics g) - { - if (g == null) - throw new ArgumentNullException("graphics"); - return NativeObject.equals(region.NativeObject); - } - #endregion - - public RegionData GetRegionData() - { - throw new NotImplementedException(); - } - - - #region GetRegionScans [TODO] - public RectangleF[] GetRegionScans(Matrix matrix) - { - geom.Area area = NativeObject; - if (matrix !=null) - area = area.createTransformedArea (matrix.NativeObject); - //FIXME: return more exact result - return new RectangleF [] {new RectangleF (area.getBounds2D ())}; - } - #endregion - - #region Transform - public void Transform(Matrix matrix) - { - if (matrix == null) - throw new ArgumentNullException("matrix"); - NativeObject.transform(matrix.NativeObject); - } - #endregion - - #region Clone - public Region Clone() - { - return new Region((geom.Area)NativeObject.clone()); - } - #endregion - } -} diff --git a/mcs/class/System.Drawing/System.Drawing/RotateFlipType.cs b/mcs/class/System.Drawing/System.Drawing/RotateFlipType.cs deleted file mode 100644 index 9be021a7774..00000000000 --- a/mcs/class/System.Drawing/System.Drawing/RotateFlipType.cs +++ /dev/null @@ -1,53 +0,0 @@ -// -// System.Drawing.RotateFlipType .cs -// -// (C) 2001 Ximian, Inc. http://www.ximian.com -// Author: Dennis Hayes (dennish@raytek.com) -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; -namespace System.Drawing -{ - [Serializable] - public enum RotateFlipType { - RotateNoneFlipNone = 0, - Rotate180FlipXY = 0, - Rotate90FlipNone = 1, - Rotate270FlipXY = 1, - Rotate180FlipNone = 2, - RotateNoneFlipXY = 2, - Rotate270FlipNone = 3, - Rotate90FlipXY = 3, - RotateNoneFlipX = 4, - Rotate180FlipY = 4, - Rotate90FlipX = 5, - Rotate270FlipY = 5, - Rotate180FlipX = 6, - RotateNoneFlipY = 6, - Rotate270FlipX = 7, - Rotate90FlipY = 7, - } -} diff --git a/mcs/class/System.Drawing/System.Drawing/SRDescriptionAttribute.cs b/mcs/class/System.Drawing/System.Drawing/SRDescriptionAttribute.cs deleted file mode 100644 index ec279f7c232..00000000000 --- a/mcs/class/System.Drawing/System.Drawing/SRDescriptionAttribute.cs +++ /dev/null @@ -1,58 +0,0 @@ -// -// System.Drawing.SRDescriptionAttribute.cs -// -// Authors: -// Andreas Nahr (ClassDevelopment@A-SoftTech.com) -// -// (C) 2004 Andreas Nahr -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; -using System.ComponentModel; - -namespace System.Drawing -{ - [AttributeUsage(AttributeTargets.All)] - internal class SRDescriptionAttribute : DescriptionAttribute - { - private bool isReplaced = false; - - public SRDescriptionAttribute (string description) - : base (description) - { - } - - public override string Description { - get { - if (!isReplaced) { - isReplaced = true; - DescriptionValue = Locale.GetText (DescriptionValue); - } - return DescriptionValue; - } - } - } -} diff --git a/mcs/class/System.Drawing/System.Drawing/Size.cs b/mcs/class/System.Drawing/System.Drawing/Size.cs deleted file mode 100644 index 1760c92be3b..00000000000 --- a/mcs/class/System.Drawing/System.Drawing/Size.cs +++ /dev/null @@ -1,341 +0,0 @@ -// -// System.Drawing.Size.cs -// -// Author: -// Mike Kestner (mkestner@speakeasy.net) -// -// Copyright (C) 2001 Mike Kestner -// Copyright (C) 2004 Novell, Inc. http://www.novell.com -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; -using System.Runtime.Serialization; -using System.Runtime.InteropServices; -using System.ComponentModel; - -namespace System.Drawing -{ - [Serializable] - [ComVisible (true)] - [TypeConverter (typeof (SizeConverter))] - public struct Size - { - - // Private Height and width fields. - private int width, height; - - // ----------------------- - // Public Shared Members - // ----------------------- - - /// - /// Empty Shared Field - /// - /// - /// - /// An uninitialized Size Structure. - /// - - public static readonly Size Empty; - - /// - /// Ceiling Shared Method - /// - /// - /// - /// Produces a Size structure from a SizeF structure by - /// taking the ceiling of the Width and Height properties. - /// - - public static Size Ceiling (SizeF value) - { - int w, h; - checked { - w = (int) Math.Ceiling (value.Width); - h = (int) Math.Ceiling (value.Height); - } - - return new Size (w, h); - } - - /// - /// Round Shared Method - /// - /// - /// - /// Produces a Size structure from a SizeF structure by - /// rounding the Width and Height properties. - /// - - public static Size Round (SizeF value) - { - int w, h; - checked { - w = (int) Math.Round (value.Width); - h = (int) Math.Round (value.Height); - } - - return new Size (w, h); - } - - /// - /// Truncate Shared Method - /// - /// - /// - /// Produces a Size structure from a SizeF structure by - /// truncating the Width and Height properties. - /// - - public static Size Truncate (SizeF value) - { - int w, h; - checked { - w = (int) value.Width; - h = (int) value.Height; - } - - return new Size (w, h); - } - - /// - /// Addition Operator - /// - /// - /// - /// Addition of two Size structures. - /// - - public static Size operator + (Size sz1, Size sz2) - { - return new Size (sz1.Width + sz2.Width, - sz1.Height + sz2.Height); - } - - /// - /// Equality Operator - /// - /// - /// - /// Compares two Size objects. The return value is - /// based on the equivalence of the Width and Height - /// properties of the two Sizes. - /// - - public static bool operator == (Size sz_a, Size sz_b) - { - return ((sz_a.Width == sz_b.Width) && - (sz_a.Height == sz_b.Height)); - } - - /// - /// Inequality Operator - /// - /// - /// - /// Compares two Size objects. The return value is - /// based on the equivalence of the Width and Height - /// properties of the two Sizes. - /// - - public static bool operator != (Size sz_a, Size sz_b) - { - return ((sz_a.Width != sz_b.Width) || - (sz_a.Height != sz_b.Height)); - } - - /// - /// Subtraction Operator - /// - /// - /// - /// Subtracts two Size structures. - /// - - public static Size operator - (Size sz1, Size sz2) - { - return new Size (sz1.Width - sz2.Width, - sz1.Height - sz2.Height); - } - - /// - /// Size to Point Conversion - /// - /// - /// - /// Returns a Point based on the dimensions of a given - /// Size. Requires explicit cast. - /// - - public static explicit operator Point (Size sz) - { - return new Point (sz.Width, sz.Height); - } - - /// - /// Size to SizeF Conversion - /// - /// - /// - /// Creates a SizeF based on the dimensions of a given - /// Size. No explicit cast is required. - /// - - public static implicit operator SizeF (Size sz) - { - return new SizeF (sz.Width, sz.Height); - } - - - // ----------------------- - // Public Constructors - // ----------------------- - - /// - /// Size Constructor - /// - /// - /// - /// Creates a Size from a Point value. - /// - - public Size (Point pt) - { - width = pt.X; - height = pt.Y; - } - - /// - /// Size Constructor - /// - /// - /// - /// Creates a Size from specified dimensions. - /// - - public Size (int width, int height) - { - this.width = width; - this.height = height; - } - - // ----------------------- - // Public Instance Members - // ----------------------- - - /// - /// IsEmpty Property - /// - /// - /// - /// Indicates if both Width and Height are zero. - /// - - [Browsable (false)] - public bool IsEmpty { - get { - return ((width == 0) && (height == 0)); - } - } - - /// - /// Width Property - /// - /// - /// - /// The Width coordinate of the Size. - /// - - public int Width { - get { - return width; - } - set { - width = value; - } - } - - /// - /// Height Property - /// - /// - /// - /// The Height coordinate of the Size. - /// - - public int Height { - get { - return height; - } - set { - height = value; - } - } - - /// - /// Equals Method - /// - /// - /// - /// Checks equivalence of this Size and another object. - /// - - public override bool Equals (object o) - { - if (!(o is Size)) - return false; - - return (this == (Size) o); - } - - /// - /// GetHashCode Method - /// - /// - /// - /// Calculates a hashing value. - /// - - public override int GetHashCode () - { - return width^height; - } - - /// - /// ToString Method - /// - /// - /// - /// Formats the Size as a string in coordinate notation. - /// - - public override string ToString () - { - return String.Format ("{{Width={0}, Height={1}}}", width, height); - } - - } -} diff --git a/mcs/class/System.Drawing/System.Drawing/SizeConverter.cs b/mcs/class/System.Drawing/System.Drawing/SizeConverter.cs deleted file mode 100644 index 6b01d88f571..00000000000 --- a/mcs/class/System.Drawing/System.Drawing/SizeConverter.cs +++ /dev/null @@ -1,148 +0,0 @@ -// -// System.Drawing.SizeConverter.cs -// -// Authors: -// Dennis Hayes (dennish@Raytek.com) -// Gonzalo Paniagua Javier (gonzalo@ximian.com) -// Ravindra (rkumar@novell.com) -// -// Copyright (C) 2002 Ximian, Inc. http://www.ximian.com -// Copyright (C) 2003 Novell, Inc. http://www.novell.com -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; -using System.Collections; -using System.ComponentModel; -using System.Globalization; -using System.ComponentModel.Design.Serialization; -using System.Reflection; - -namespace System.Drawing -{ - /// - /// Summary description for SizeConverter. - /// - public class SizeConverter : TypeConverter - { - public SizeConverter() - { - } - - public override bool CanConvertFrom (ITypeDescriptorContext context, - Type sourceType) - { - if (sourceType == typeof (string)) - return true; - - return base.CanConvertFrom (context, sourceType); - } - - public override bool CanConvertTo (ITypeDescriptorContext context, - Type destinationType) - { - if (destinationType == typeof (string)) - return true; - - if (destinationType == typeof (InstanceDescriptor)) - return true; - - return base.CanConvertTo (context, destinationType); - } - - public override object ConvertFrom (ITypeDescriptorContext context, - CultureInfo culture, - object value) - { - string s = value as string; - if (s == null) - return base.ConvertFrom (context, culture, value); - - string[] subs = s.Split (culture.TextInfo.ListSeparator.ToCharArray ()); - - Int32Converter converter = new Int32Converter (); - int[] numSubs = new int[subs.Length]; - for (int i = 0; i < numSubs.Length; i++) { - numSubs[i] = (int) converter.ConvertFromString (context, culture, subs[i]); - } - - if (subs.Length != 2) - throw new ArgumentException ("Failed to parse Text(" + s + ") expected text in the format \"Width,Height.\""); - - return new Size (numSubs[0], numSubs[1]); - } - - public override object ConvertTo (ITypeDescriptorContext context, - CultureInfo culture, - object value, - Type destinationType) - { - // LAMESPEC: "The default implementation calls the ToString method - // of the object if the object is valid and if the destination - // type is string." MS does not behave as per the specs. - // Oh well, we have to be compatible with MS. - if ((destinationType == typeof (string)) && (value is Size)) - return ((Size) value).Width.ToString(culture) + culture.TextInfo.ListSeparator - + " " + ((Size) value).Height.ToString(culture); - - if (destinationType == typeof (InstanceDescriptor) && value is Size) { - Size s = (Size) value; - ConstructorInfo ctor = typeof(Size).GetConstructor (new Type[] {typeof(int), typeof(int)}); - return new InstanceDescriptor (ctor, new object[] {s.Width, s.Height}); - } - - return base.ConvertTo (context, culture, value, destinationType); - } - - public override object CreateInstance (ITypeDescriptorContext context, - IDictionary propertyValues) - { - int width = (int) propertyValues ["Width"]; - int height = (int) propertyValues ["Height"]; - - return new Size (width, height); - } - - public override bool GetCreateInstanceSupported (ITypeDescriptorContext context) - { - return true; - } - - public override PropertyDescriptorCollection GetProperties ( - ITypeDescriptorContext context, - object value, Attribute[] attributes) - { - if (value is Size) - return TypeDescriptor.GetProperties (value, attributes); - - return base.GetProperties (context, value, attributes); - } - - public override bool GetPropertiesSupported (ITypeDescriptorContext context) - { - return true; - } - } -} diff --git a/mcs/class/System.Drawing/System.Drawing/SizeF.cs b/mcs/class/System.Drawing/System.Drawing/SizeF.cs deleted file mode 100644 index bd673a29d9b..00000000000 --- a/mcs/class/System.Drawing/System.Drawing/SizeF.cs +++ /dev/null @@ -1,295 +0,0 @@ -// -// System.Drawing.SizeF.cs -// -// Author: -// Mike Kestner (mkestner@speakeasy.net) -// -// Copyright (C) 2001 Mike Kestner -// Copyright (C) 2004 Novell, Inc. http://www.novell.com -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; -using System.Globalization; -using System.Runtime.InteropServices; -using System.ComponentModel; - -namespace System.Drawing -{ - [Serializable] - [ComVisible (true)] - public struct SizeF - { - // Private height and width fields. - private float wd, ht; - - // ----------------------- - // Public Shared Members - // ----------------------- - - /// - /// Empty Shared Field - /// - /// - /// - /// An uninitialized SizeF Structure. - /// - - public static readonly SizeF Empty; - - /// - /// Addition Operator - /// - /// - /// - /// Addition of two SizeF structures. - /// - - public static SizeF operator + (SizeF sz1, SizeF sz2) - { - return new SizeF (sz1.Width + sz2.Width, - sz1.Height + sz2.Height); - } - - /// - /// Equality Operator - /// - /// - /// - /// Compares two SizeF objects. The return value is - /// based on the equivalence of the Width and Height - /// properties of the two Sizes. - /// - - public static bool operator == (SizeF sz_a, SizeF sz_b) - { - return ((sz_a.Width == sz_b.Width) && - (sz_a.Height == sz_b.Height)); - } - - /// - /// Inequality Operator - /// - /// - /// - /// Compares two SizeF objects. The return value is - /// based on the equivalence of the Width and Height - /// properties of the two Sizes. - /// - - public static bool operator != (SizeF sz_a, SizeF sz_b) - { - return ((sz_a.Width != sz_b.Width) || - (sz_a.Height != sz_b.Height)); - } - - /// - /// Subtraction Operator - /// - /// - /// - /// Subtracts two SizeF structures. - /// - - public static SizeF operator - (SizeF sz1, SizeF sz2) - { - return new SizeF (sz1.Width - sz2.Width, - sz1.Height - sz2.Height); - } - - /// - /// SizeF to PointF Conversion - /// - /// - /// - /// Returns a PointF based on the dimensions of a given - /// SizeF. Requires explicit cast. - /// - - public static explicit operator PointF (SizeF sz) - { - return new PointF (sz.Width, sz.Height); - } - - - // ----------------------- - // Public Constructors - // ----------------------- - - /// - /// SizeF Constructor - /// - /// - /// - /// Creates a SizeF from a PointF value. - /// - - public SizeF (PointF pt) - { - wd = pt.X; - ht = pt.Y; - } - - /// - /// SizeF Constructor - /// - /// - /// - /// Creates a SizeF from an existing SizeF value. - /// - - public SizeF (SizeF sz) - { - wd = sz.Width; - ht = sz.Height; - } - - /// - /// SizeF Constructor - /// - /// - /// - /// Creates a SizeF from specified dimensions. - /// - - public SizeF (float width, float height) - { - wd = width; - ht = height; - } - - // ----------------------- - // Public Instance Members - // ----------------------- - - /// - /// IsEmpty Property - /// - /// - /// - /// Indicates if both Width and Height are zero. - /// - - [Browsable (false)] - public bool IsEmpty { - get { - return ((wd == 0.0) && (ht == 0.0)); - } - } - - /// - /// Width Property - /// - /// - /// - /// The Width coordinate of the SizeF. - /// - - public float Width { - get { - return wd; - } - set { - wd = value; - } - } - - /// - /// Height Property - /// - /// - /// - /// The Height coordinate of the SizeF. - /// - - public float Height { - get { - return ht; - } - set { - ht = value; - } - } - - /// - /// Equals Method - /// - /// - /// - /// Checks equivalence of this SizeF and another object. - /// - - public override bool Equals (object o) - { - if (!(o is SizeF)) - return false; - - return (this == (SizeF) o); - } - - /// - /// GetHashCode Method - /// - /// - /// - /// Calculates a hashing value. - /// - - public override int GetHashCode () - { - return (int) wd ^ (int) ht; - } - - public PointF ToPointF () - { - return new PointF (wd, ht); - } - - public Size ToSize () - { - int w, h; - checked { - w = (int) wd; - h = (int) ht; - } - - return new Size (w, h); - } - - /// - /// ToString Method - /// - /// - /// - /// Formats the SizeF as a string in coordinate notation. - /// - - public override string ToString () - { - return string.Format ("{{Width={0}, Height={1}}}", wd.ToString (CultureInfo.CurrentCulture), - ht.ToString (CultureInfo.CurrentCulture)); - } - } -} diff --git a/mcs/class/System.Drawing/System.Drawing/SolidBrush.cs b/mcs/class/System.Drawing/System.Drawing/SolidBrush.cs deleted file mode 100644 index fbe2a763ecb..00000000000 --- a/mcs/class/System.Drawing/System.Drawing/SolidBrush.cs +++ /dev/null @@ -1,98 +0,0 @@ -// -// System.Drawing.SolidBrush.cs -// -// Author: -// Dennis Hayes (dennish@Raytek.com) -// Alexandre Pigolkine(pigolkine@gmx.de) -// Ravindra (rkumar@novell.com) -// -// (C) 2002 Ximian, Inc. -// (C) 2004 Novell, Inc. -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -using System; - -namespace System.Drawing -{ - public sealed class SolidBrush : Brush { - - internal bool isModifiable = true; - private Color color; - - internal SolidBrush (IntPtr ptr) - : base (ptr) - { - int val; - Status status = GDIPlus.GdipGetSolidFillColor (ptr, out val); - GDIPlus.CheckStatus (status); - color = Color.FromArgb (val); - } - - public SolidBrush (Color color) - { - this.color = color; - Status status = GDIPlus.GdipCreateSolidFill (color.ToArgb (), out nativeObject); - GDIPlus.CheckStatus (status); - } - - public Color Color { - get { - return color; - } - set { - if (isModifiable) { - color = value; - Status status = GDIPlus.GdipSetSolidFillColor (nativeObject, value.ToArgb ()); - GDIPlus.CheckStatus (status); - } - else - throw new ArgumentException ("This SolidBrush object can't be modified."); - } - } - - public override object Clone() - { - IntPtr clonePtr; - Status status = GDIPlus.GdipCloneBrush (nativeObject, out clonePtr); - GDIPlus.CheckStatus (status); - - SolidBrush clone = new SolidBrush (clonePtr); - clone.color = color; - - return clone; - - } - - protected override void Dispose (bool disposing) - { - if (disposing == true && isModifiable == false) { - throw new ArgumentException ("This SolidBrush object can't be modified."); - } - - base.Dispose (disposing); - } - } -} - diff --git a/mcs/class/System.Drawing/System.Drawing/SolidBrush.jvm.cs b/mcs/class/System.Drawing/System.Drawing/SolidBrush.jvm.cs deleted file mode 100644 index ed9a06f99be..00000000000 --- a/mcs/class/System.Drawing/System.Drawing/SolidBrush.jvm.cs +++ /dev/null @@ -1,77 +0,0 @@ -// -// System.Drawing.SolidBrush.cs -// -// Author: -// Dennis Hayes (dennish@Raytek.com) -// Alexandre Pigolkine(pigolkine@gmx.de) -// Ravindra (rkumar@novell.com) -// -// (C) 2002 Ximian, Inc. -// (C) 2004 Novell, Inc. -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -using System; -namespace System.Drawing -{ - public sealed class SolidBrush : Brush - { - internal bool isModifiable = true; - Color _color; - - protected override java.awt.Paint NativeObject { - get { - return _color.NativeObject; - } - } - - public SolidBrush (Color color) - { - _color = color; - } - - public Color Color { - get { - return _color; - } - set { - if (isModifiable) - _color = value; - else - throw new ArgumentException ("This SolidBrush object can't be modified."); - } - } - - public override object Clone() - { - return new SolidBrush(_color); - } - - protected override void Dispose (bool disposing) - { - if (!isModifiable && disposing) - throw new ArgumentException ("This SolidBrush object can't be modified."); - } - } -} diff --git a/mcs/class/System.Drawing/System.Drawing/StringAligment.cs b/mcs/class/System.Drawing/System.Drawing/StringAligment.cs deleted file mode 100644 index 61db3fbf608..00000000000 --- a/mcs/class/System.Drawing/System.Drawing/StringAligment.cs +++ /dev/null @@ -1,41 +0,0 @@ -// -// System.Drawing.StringAligment.cs -// -// (C) 2001 Ximian, Inc. http://www.ximian.com -// Author: Dennis Hayes (dennish@raytek.com) -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - - -using System; -namespace System.Drawing -{ - [Serializable] - public enum StringAlignment { - Near = 0, - Center = 1, - Far = 2 - } -} diff --git a/mcs/class/System.Drawing/System.Drawing/StringDigitSubstitute.cs b/mcs/class/System.Drawing/System.Drawing/StringDigitSubstitute.cs deleted file mode 100644 index 97f7c2b0c45..00000000000 --- a/mcs/class/System.Drawing/System.Drawing/StringDigitSubstitute.cs +++ /dev/null @@ -1,42 +0,0 @@ -// -// System.Drawing.StringDigitSubstitute.cs -// -// (C) 2001 Ximian, Inc. http://www.ximian.com -// Author: Dennis Hayes (dennish@raytek.com) -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - - -using System; -namespace System.Drawing -{ - [Serializable] - public enum StringDigitSubstitute { - User = 0, - None = 1, - National = 2, - Traditional = 3 - } -} diff --git a/mcs/class/System.Drawing/System.Drawing/StringFormat.cs b/mcs/class/System.Drawing/System.Drawing/StringFormat.cs deleted file mode 100644 index 1344cd2e25c..00000000000 --- a/mcs/class/System.Drawing/System.Drawing/StringFormat.cs +++ /dev/null @@ -1,291 +0,0 @@ -// -// System.Drawing.StringFormat.cs -// -// Authors: -// Dennis Hayes (dennish@Raytek.com) -// Miguel de Icaza (miguel@ximian.com) -// Jordi Mas i Hernandez (jordi@ximian.com) -// -// Copyright (C) 2002 Ximian, Inc (http://www.ximian.com) -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -using System; -using System.Drawing.Text; - -namespace System.Drawing -{ - /// - /// Summary description for StringFormat. - /// - public sealed class StringFormat : MarshalByRefObject, IDisposable, ICloneable - { - private static StringFormat genericDefault; - private IntPtr nativeStrFmt = IntPtr.Zero; - private int language = GDIPlus.LANG_NEUTRAL; - - public StringFormat() : this (0, GDIPlus.LANG_NEUTRAL) - { - - } - - public StringFormat(StringFormatFlags options, int lang) - { - Status status = GDIPlus.GdipCreateStringFormat (options, lang, out nativeStrFmt); - GDIPlus.CheckStatus (status); - - LineAlignment = StringAlignment.Near; - Alignment = StringAlignment.Near; - language = lang; - } - - internal StringFormat(IntPtr native) - { - nativeStrFmt = native; - } - - ~StringFormat () - { - Dispose (false); - } - - public void Dispose () - { - Dispose (true); - System.GC.SuppressFinalize (this); - } - - void Dispose (bool disposing) - { - if (nativeStrFmt != IntPtr.Zero) { - Status status = GDIPlus.GdipDeleteStringFormat (nativeStrFmt); - GDIPlus.CheckStatus (status); - - nativeStrFmt = IntPtr.Zero; - } - } - - public StringFormat (StringFormat source) - { - Status status = GDIPlus.GdipCloneStringFormat (source.NativeObject, out nativeStrFmt); - GDIPlus.CheckStatus (status); - } - - public StringFormat (StringFormatFlags flags) - { - Status status = GDIPlus.GdipCreateStringFormat (flags, GDIPlus.LANG_NEUTRAL, out nativeStrFmt); - GDIPlus.CheckStatus (status); - } - - public StringAlignment Alignment { - get { - StringAlignment align; - Status status = GDIPlus.GdipGetStringFormatAlign (nativeStrFmt, out align); - GDIPlus.CheckStatus (status); - - return align; - } - - set { - Status status = GDIPlus.GdipSetStringFormatAlign (nativeStrFmt, value); - GDIPlus.CheckStatus (status); - } - } - - public StringAlignment LineAlignment { - get { - StringAlignment align; - Status status = GDIPlus.GdipGetStringFormatLineAlign (nativeStrFmt, out align); - GDIPlus.CheckStatus (status); - - return align; - } - - set { - Status status = GDIPlus.GdipSetStringFormatLineAlign (nativeStrFmt, value); - GDIPlus.CheckStatus (status); - } - } - - public StringFormatFlags FormatFlags { - get { - StringFormatFlags flags; - Status status = GDIPlus.GdipGetStringFormatFlags (nativeStrFmt, out flags); - GDIPlus.CheckStatus (status); - - return flags; - } - - set { - Status status = GDIPlus.GdipSetStringFormatFlags (nativeStrFmt, value); - GDIPlus.CheckStatus (status); - } - } - - public HotkeyPrefix HotkeyPrefix { - get { - HotkeyPrefix hotkeyPrefix; - Status status = GDIPlus.GdipGetStringFormatHotkeyPrefix (nativeStrFmt, out hotkeyPrefix); - GDIPlus.CheckStatus (status); - - return hotkeyPrefix; - } - - set { - Status status = GDIPlus.GdipSetStringFormatHotkeyPrefix (nativeStrFmt, value); - GDIPlus.CheckStatus (status); - } - } - - - public StringTrimming Trimming { - get { - StringTrimming trimming; - Status status = GDIPlus.GdipGetStringFormatTrimming (nativeStrFmt, out trimming); - GDIPlus.CheckStatus (status); - return trimming; - } - - set { - Status status = GDIPlus.GdipSetStringFormatTrimming (nativeStrFmt, value); - GDIPlus.CheckStatus (status); - } - } - - public static StringFormat GenericDefault { - get { - IntPtr ptr; - - Status status = GDIPlus.GdipStringFormatGetGenericDefault (out ptr); - GDIPlus.CheckStatus (status); - - return new StringFormat (ptr); - - } - } - - - public int DigitSubstitutionLanguage { - get{ - return language; - } - } - - - public static StringFormat GenericTypographic { - get { - - IntPtr ptr; - - Status status = GDIPlus.GdipStringFormatGetGenericTypographic (out ptr); - GDIPlus.CheckStatus (status); - - return new StringFormat (ptr); - } - } - - public StringDigitSubstitute DigitSubstitutionMethod { - get { - StringDigitSubstitute substitute; - - Status status = GDIPlus.GdipGetStringFormatDigitSubstitution(nativeStrFmt, language, out substitute); - GDIPlus.CheckStatus (status); - - return substitute; - } - } - - - public void SetMeasurableCharacterRanges (CharacterRange [] range) - { - Status status = GDIPlus.GdipSetStringFormatMeasurableCharacterRanges (nativeStrFmt, - range.Length, range); - - GDIPlus.CheckStatus (status); - } - - internal int GetMeasurableCharacterRangeCount () - { - int cnt; - Status status = GDIPlus.GdipGetStringFormatMeasurableCharacterRangeCount (nativeStrFmt, out cnt); - - GDIPlus.CheckStatus (status); - return cnt; - } - - public object Clone() - { - IntPtr native; - - Status status = GDIPlus.GdipCloneStringFormat (nativeStrFmt, out native); - GDIPlus.CheckStatus (status); - - return new StringFormat (native); - } - - public override string ToString() - { - return "[StringFormat, FormatFlags=" + this.FormatFlags.ToString() + "]"; - } - - internal IntPtr NativeObject - { - get{ - return nativeStrFmt; - } - set { - nativeStrFmt = value; - } - } - - public void SetTabStops(float firstTabOffset, float[] tabStops) - { - Status status = GDIPlus.GdipSetStringFormatTabStops(nativeStrFmt, firstTabOffset, tabStops.Length, tabStops); - GDIPlus.CheckStatus (status); - } - - public void SetDigitSubstitution(int language, StringDigitSubstitute substitute) - { - Status status = GDIPlus.GdipSetStringFormatDigitSubstitution(nativeStrFmt, this.language, substitute); - GDIPlus.CheckStatus (status); - } - - public float[] GetTabStops(out float firstTabOffset) - { - int count = 0; - firstTabOffset = 0; - - Status status = GDIPlus.GdipGetStringFormatTabStopCount(nativeStrFmt, out count); - GDIPlus.CheckStatus (status); - - float[] tabStops = new float[count]; - - if (count != 0) { - status = GDIPlus.GdipGetStringFormatTabStops(nativeStrFmt, count, out firstTabOffset, tabStops); - GDIPlus.CheckStatus (status); - } - - return tabStops; - } - - } -} diff --git a/mcs/class/System.Drawing/System.Drawing/StringFormat.jvm.cs b/mcs/class/System.Drawing/System.Drawing/StringFormat.jvm.cs deleted file mode 100644 index 10b08625cf3..00000000000 --- a/mcs/class/System.Drawing/System.Drawing/StringFormat.jvm.cs +++ /dev/null @@ -1,234 +0,0 @@ -// -// System.Drawing.StringFormat.cs -// -// Authors: -// Dennis Hayes (dennish@Raytek.com) -// Miguel de Icaza (miguel@ximian.com) -// Jordi Mas i Hernandez (jordi@ximian.com) -// -// Copyright (C) 2002 Ximian, Inc (http://www.ximian.com) -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -using System; -using System.Drawing.Text; - -namespace System.Drawing -{ - /// - /// Summary description for StringFormat. - /// - public sealed class StringFormat : IDisposable, ICloneable - { - private static StringFormat genericDefault; - private int language = 0; - internal CharacterRange [] CharRanges; - - //local storage - internal StringAlignment alignment; - internal StringAlignment linealignment; - internal HotkeyPrefix prefix; - internal StringFormatFlags flags; - internal StringDigitSubstitute subst; - internal StringTrimming trimming; - internal float firstTabOffset; - internal float [] tabStops; - - public StringFormat() - { - - } - - public StringFormat(StringFormatFlags options, int lang) - { - flags = options; - LineAlignment = StringAlignment.Near; - Alignment = StringAlignment.Near; - language = lang; - } - - public StringFormat(StringFormatFlags options):this(options,0) - { - } - -// ~StringFormat() -// { -// Dispose (); -// } - - public void Dispose() - { - } - - - public StringFormat (StringFormat source) - { - Alignment = source.Alignment; - LineAlignment = source.LineAlignment; - HotkeyPrefix = source.HotkeyPrefix; - subst = source.subst; - flags = source.flags; - } - - - public StringAlignment Alignment - { - get - { - return alignment; - } - - set - { - alignment = value; - } - } - - public StringAlignment LineAlignment - { - get - { - return linealignment; - } - set - { - linealignment = value; - } - } - - public StringFormatFlags FormatFlags - { - get - { - return flags; - } - - set - { - flags = value; - } - } - - public HotkeyPrefix HotkeyPrefix - { - get - { - return prefix; - } - - set - { - prefix = value; - } - } - - - public StringTrimming Trimming - { - get - { - return trimming; - } - - set - { - trimming = value; - } - } - - public static StringFormat GenericDefault - { - get - { - return genericDefault; - } - } - - - public int DigitSubstitutionLanguage - { - get - { - return language; - } - } - - - public static StringFormat GenericTypographic - { - get - { - throw new NotImplementedException(); - } - } - - public StringDigitSubstitute DigitSubstitutionMethod - { - get - { - return subst; - } - } - - - public void SetMeasurableCharacterRanges (CharacterRange [] range) - { - CharRanges=(CharacterRange [])range.Clone(); - } - - internal CharacterRange [] GetCharRanges - { - get - { - return(CharRanges); - } - } - - public object Clone() - { - throw new NotImplementedException(); - } - - public override string ToString() - { - return "[StringFormat, FormatFlags=" + this.FormatFlags.ToString() + "]"; - } - - public void SetTabStops(float firstTabOffset, float[] tabStops) - { - this.firstTabOffset = firstTabOffset; - this.tabStops = tabStops; - } - - public void SetDigitSubstitution(int language, StringDigitSubstitute substitute) - { - subst = substitute; - } - - public float[] GetTabStops(out float firstTabOffset) - { - firstTabOffset = this.firstTabOffset; - return this.tabStops; - } - - } -} diff --git a/mcs/class/System.Drawing/System.Drawing/StringFormatFlags.cs b/mcs/class/System.Drawing/System.Drawing/StringFormatFlags.cs deleted file mode 100644 index 5cf2bf57406..00000000000 --- a/mcs/class/System.Drawing/System.Drawing/StringFormatFlags.cs +++ /dev/null @@ -1,48 +0,0 @@ -// -// System.Drawing.StringFormatFlags.cs -// -// (C) 2001 Ximian, Inc. http://www.ximian.com -// Author: Dennis Hayes (dennish@raytek.com) -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - - -using System; -namespace System.Drawing -{ - [Flags] - [Serializable] - public enum StringFormatFlags { - DirectionRightToLeft = 0x0001, - DirectionVertical = 0x0002, - FitBlackBox = 0x0004, - DisplayFormatControl = 0x0020, - NoFontFallback = 0x0400, - MeasureTrailingSpaces = 0x0800, - NoWrap = 0x1000, - LineLimit = 0x2000, - NoClip = 0x4000 - } -} diff --git a/mcs/class/System.Drawing/System.Drawing/StringTrimming.cs b/mcs/class/System.Drawing/System.Drawing/StringTrimming.cs deleted file mode 100644 index 45cf2de1f4e..00000000000 --- a/mcs/class/System.Drawing/System.Drawing/StringTrimming.cs +++ /dev/null @@ -1,44 +0,0 @@ -// -// System.Drawing.StringTrimming.cs -// -// (C) 2001 Ximian, Inc. http://www.ximian.com -// Author: Dennis Hayes (dennish@raytek.com) -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - - -using System; -namespace System.Drawing -{ - [Serializable] - public enum StringTrimming { - None = 0, - Character = 1, - Word = 2, - EllipsisCharacter = 3, - EllipsisWord = 4, - EllipsisPath = 5 - } -} diff --git a/mcs/class/System.Drawing/System.Drawing/StringUnit.cs b/mcs/class/System.Drawing/System.Drawing/StringUnit.cs deleted file mode 100644 index 645f21155d7..00000000000 --- a/mcs/class/System.Drawing/System.Drawing/StringUnit.cs +++ /dev/null @@ -1,46 +0,0 @@ -// -// System.Drawing.StringUnit.cs -// -// (C) 2001 Ximian, Inc. http://www.ximian.com -// Author: Dennis Hayes (dennish@raytek.com) -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - - -using System; -namespace System.Drawing -{ - [Serializable] - public enum StringUnit{ - World = 0x00, - Display = 0x01, - Pixel = 0x02, - Point = 0x03, - Inch = 0x04, - Document = 0x05, - Millimeter = 0x06, - Em = 0x20 - } -} diff --git a/mcs/class/System.Drawing/System.Drawing/StrokeFactory.jvm.cs b/mcs/class/System.Drawing/System.Drawing/StrokeFactory.jvm.cs deleted file mode 100755 index 6882dc68e46..00000000000 --- a/mcs/class/System.Drawing/System.Drawing/StrokeFactory.jvm.cs +++ /dev/null @@ -1,63 +0,0 @@ -using System; -using awt = java.awt; -using geom = java.awt.geom; - -namespace System.Drawing { - internal sealed class StrokeFactory { - - StrokeFactory() {} - - interface StrokeCreator { - awt.Stroke Create(float width, int cap, int join, float miterlimit, - float[] dash, float dash_phase, geom.AffineTransform penTransform, - geom.AffineTransform outputTransform, bool fitPen); - } - - sealed class AdvancedCreator : StrokeCreator { - #region StrokeCreator Members - - public awt.Stroke Create(float width, int cap, int join, float miterlimit, float[] dash, float dash_phase, geom.AffineTransform penTransform, - geom.AffineTransform outputTransform, bool fitPen) { - return new System.Drawing.AdvancedStroke(width, cap, join, miterlimit, dash, dash_phase, penTransform, outputTransform, fitPen); - } - - #endregion - } - - sealed class DefaultCreator : StrokeCreator { - #region StrokeCreator Members - - public awt.Stroke Create(float width, int cap, int join, float miterlimit, float[] dash, float dash_phase, geom.AffineTransform penTransform, - geom.AffineTransform outputTransform, bool fitPen) { - return new awt.BasicStroke(width, cap, join, miterlimit, dash, dash_phase); - } - - #endregion - } - - static readonly StrokeCreator Creator; - static StrokeFactory() { - try { - Type type = typeof(System.Drawing.AdvancedStroke); - Activator.CreateInstance(type); - Creator = new AdvancedCreator(); - } - catch{ - Creator = new DefaultCreator(); - } - } - - static public bool CanCreateAdvancedStroke { - get { - return !(Creator is DefaultCreator); - } - } - - static public awt.Stroke CreateStroke(float width, int cap, int join, float miterlimit, - float[] dash, float dash_phase, geom.AffineTransform penTransform, - geom.AffineTransform outputTransform, bool fitPen) { - - return Creator.Create(width, cap, join, miterlimit, dash, dash_phase, penTransform, outputTransform, fitPen); - } - } -} \ No newline at end of file diff --git a/mcs/class/System.Drawing/System.Drawing/SystemBrushes.cs b/mcs/class/System.Drawing/System.Drawing/SystemBrushes.cs deleted file mode 100644 index 5bb00ff29ca..00000000000 --- a/mcs/class/System.Drawing/System.Drawing/SystemBrushes.cs +++ /dev/null @@ -1,314 +0,0 @@ -// -// System.Drawing.SystemBrushes.cs -// -// Authors: -// Dennis Hayes (dennish@Raytek.com) -// Ravindra (rkumar@novell.com) -// -// Copyright (C) 2002 Ximian, Inc. http://www.ximian.com -// Copyright (C) 2004 Novell, Inc. http://www.novell.com -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; - -namespace System.Drawing -{ - /// - /// Summary description for SystemBrushes. - /// - public sealed class SystemBrushes - { - static SolidBrush active_border; - static SolidBrush active_caption; - static SolidBrush active_caption_text; - static SolidBrush app_workspace; - static SolidBrush control; - static SolidBrush control_dark; - static SolidBrush control_dark_dark; - static SolidBrush control_light; - static SolidBrush control_light_light; - static SolidBrush control_text; - static SolidBrush desktop; - static SolidBrush highlight; - static SolidBrush highlight_text; - static SolidBrush hot_track; - static SolidBrush inactive_border; - static SolidBrush inactive_caption; - static SolidBrush info; - static SolidBrush menu; - static SolidBrush scroll_bar; - static SolidBrush window; - static SolidBrush window_text; - - private SystemBrushes() { } - - public static Brush ActiveBorder - { - get { - if (active_border == null) { - active_border = new SolidBrush (SystemColors.ActiveBorder); - active_border.isModifiable = false; - } - - return active_border; - } - } - - public static Brush ActiveCaption - { - get { - if (active_caption == null) { - active_caption = new SolidBrush (SystemColors.ActiveCaption); - active_caption.isModifiable = false; - } - - return active_caption; - } - } - - public static Brush ActiveCaptionText - { - get { - if (active_caption_text == null) { - active_caption_text = new SolidBrush (SystemColors.ActiveCaptionText); - active_caption_text.isModifiable = false; - } - - return active_caption_text; - } - } - - public static Brush AppWorkspace - { - get { - if (app_workspace == null) { - app_workspace = new SolidBrush (SystemColors.AppWorkspace); - app_workspace.isModifiable = false; - } - - return app_workspace; - } - } - - public static Brush Control { - get { - if (control == null) { - control = new SolidBrush (SystemColors.Control); - control.isModifiable = false; - } - - return control; - } - } - - public static Brush ControlLight { - get { - if (control_light == null) { - control_light = new SolidBrush (SystemColors.ControlLight); - control_light.isModifiable = false; - } - - return control_light; - } - } - - public static Brush ControlLightLight { - get { - if (control_light_light == null) { - control_light_light = new SolidBrush (SystemColors.ControlLightLight); - control_light_light.isModifiable = false; - } - - return control_light_light; - } - } - - public static Brush ControlDark { - get { - if (control_dark == null) { - control_dark = new SolidBrush (SystemColors.ControlDark); - control_dark.isModifiable = false; - } - - return control_dark; - } - } - - public static Brush ControlDarkDark { - get { - if (control_dark_dark == null) { - control_dark_dark = new SolidBrush (SystemColors.ControlDarkDark); - control_dark_dark.isModifiable = false; - } - - return control_dark_dark; - } - } - - public static Brush ControlText { - get { - if (control_text == null) { - control_text = new SolidBrush (SystemColors.ControlText); - control_text.isModifiable = false; - } - - return control_text; - } - } - - public static Brush Highlight { - get { - if (highlight == null) { - highlight = new SolidBrush (SystemColors.Highlight); - highlight.isModifiable = false; - } - - return highlight; - } - } - - public static Brush HighlightText { - get { - if (highlight_text == null) { - highlight_text = new SolidBrush (SystemColors.HighlightText); - highlight_text.isModifiable = false; - } - - return highlight_text; - } - } - - public static Brush Window { - get { - if (window == null) { - window = new SolidBrush (SystemColors.Window); - window.isModifiable = false; - } - - return window; - } - } - public static Brush WindowText { - get { - if (window_text == null) { - window_text = new SolidBrush (SystemColors.WindowText); - window_text.isModifiable = false; - } - - return window_text; - } - } - - public static Brush InactiveBorder { - get { - if (inactive_border == null) { - inactive_border = new SolidBrush (SystemColors.InactiveBorder); - inactive_border.isModifiable = false; - } - - return inactive_border; - } - } - - public static Brush Desktop { - get { - if (desktop == null) { - desktop = new SolidBrush (SystemColors.Desktop); - desktop.isModifiable = false; - } - - return desktop; - } - } - - public static Brush HotTrack { - get { - if (hot_track == null) { - hot_track = new SolidBrush (SystemColors.HotTrack); - hot_track.isModifiable = false; - } - - return hot_track; - } - } - - public static Brush InactiveCaption { - get { - if (inactive_caption == null) { - inactive_caption = new SolidBrush (SystemColors.InactiveCaption); - inactive_caption.isModifiable = false; - } - - return inactive_caption; - } - } - - public static Brush Info { - get { - if (info == null) { - info = new SolidBrush (SystemColors.Info); - info.isModifiable = false; - } - - return info; - } - } - - public static Brush Menu { - get { - if (menu == null) { - menu = new SolidBrush (SystemColors.Menu); - menu.isModifiable = false; - } - - return menu; - } - } - - public static Brush ScrollBar { - get { - if (scroll_bar == null) { - scroll_bar = new SolidBrush (SystemColors.ScrollBar); - scroll_bar.isModifiable = false; - } - - return scroll_bar; - } - } - - public static Brush FromSystemColor (Color c) - { - if (c.IsSystemColor) { - SolidBrush newBrush = new SolidBrush (c); - newBrush.isModifiable = false; - return newBrush; - } - - String message = String.Format ("The color {0} is not a system color.", c); - throw new ArgumentException (message); - } - } -} diff --git a/mcs/class/System.Drawing/System.Drawing/SystemColors.cs b/mcs/class/System.Drawing/System.Drawing/SystemColors.cs deleted file mode 100644 index 86d1b45e66b..00000000000 --- a/mcs/class/System.Drawing/System.Drawing/SystemColors.cs +++ /dev/null @@ -1,228 +0,0 @@ -// -// System.Drawing.SystemColors.cs -// -// Authors: -// Gonzalo Paniagua Javier (gonzalo@ximian.com) -// -// (C) 2002 Ximian, Inc (http://www.ximian.com) -// -// Generated using a slightly modified version of the program listed inside comments -// in Color.cs -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -namespace System.Drawing { - - public sealed class SystemColors - { - - private SystemColors () - { - } - - static public Color ActiveBorder - { - get { - return Color.FromArgbSystem (255, 131, 153, 177, "ActiveBorder", KnownColor.ActiveBorder); - } - } - - static public Color ActiveCaption - { - get { - return Color.FromArgbSystem (255, 79, 101, 125, "ActiveCaption", KnownColor.ActiveCaption); - } - } - - static public Color ActiveCaptionText - { - get { - return Color.FromArgbSystem (255, 255, 255, 255, "ActiveCaptionText", KnownColor.ActiveCaptionText); - } - } - - static public Color AppWorkspace - { - get { - return Color.FromArgbSystem (255, 128, 128, 128, "AppWorkspace", KnownColor.AppWorkspace); - } - } - - static public Color Control - { - get { - return Color.FromArgbSystem (255, 192, 192, 192, "Control", KnownColor.Control); - } - } - - static public Color ControlDark - { - get { - return Color.FromArgbSystem (255, 79, 101, 125, "ControlDark", KnownColor.ControlDark); - } - } - - static public Color ControlDarkDark - { - get { - return Color.FromArgbSystem (255, 0, 0, 0, "ControlDarkDark", KnownColor.ControlDarkDark); - } - } - - static public Color ControlLight - { - get { - return Color.FromArgbSystem (255, 131, 153, 177, "ControlLight", KnownColor.ControlLight); - } - } - - static public Color ControlLightLight - { - get { - return Color.FromArgbSystem (255, 193, 204, 217, "ControlLightLight", KnownColor.ControlLightLight); - } - } - - static public Color ControlText - { - get { - return Color.FromArgbSystem (255, 0, 0, 0, "ControlText", KnownColor.ControlText); - } - } - - static public Color Desktop - { - get { - return Color.FromArgbSystem (255, 0, 0, 0, "Desktop", KnownColor.Desktop); - } - } - - static public Color GrayText - { - get { - return Color.FromArgbSystem (255, 79, 101, 125, "GrayText", KnownColor.GrayText); - } - } - - static public Color Highlight - { - get { - return Color.FromArgbSystem (255, 0, 0, 128, "Highlight", KnownColor.Highlight); - } - } - - static public Color HighlightText - { - get { - return Color.FromArgbSystem (255, 255, 255, 255, "HighlightText", KnownColor.HighlightText); - } - } - - static public Color HotTrack - { - get { - return Color.FromArgbSystem (255, 0, 0, 255, "HotTrack", KnownColor.HotTrack); - } - } - - static public Color InactiveBorder - { - get { - return Color.FromArgbSystem (255, 131, 153, 177, "InactiveBorder", KnownColor.InactiveBorder); - } - } - - static public Color InactiveCaption - { - get { - return Color.FromArgbSystem (255, 128, 128, 128, "InactiveCaption", KnownColor.InactiveCaption); - } - } - - static public Color InactiveCaptionText - { - get { - return Color.FromArgbSystem (255, 193, 204, 217, "InactiveCaptionText", KnownColor.InactiveCaptionText); - } - } - - static public Color Info - { - get { - return Color.FromArgbSystem (255, 255, 255, 255, "Info", KnownColor.Info); - } - } - - static public Color InfoText - { - get { - return Color.FromArgbSystem (255, 0, 0, 0, "InfoText", KnownColor.InfoText); - } - } - - static public Color Menu - { - get { - return Color.FromArgbSystem (255, 131, 153, 177, "Menu", KnownColor.Menu); - } - } - - static public Color MenuText - { - get { - return Color.FromArgbSystem (255, 0, 0, 0, "MenuText", KnownColor.MenuText); - } - } - - static public Color ScrollBar - { - get { - return Color.FromArgbSystem (255, 193, 204, 217, "ScrollBar", KnownColor.ScrollBar); - } - } - - static public Color Window - { - get { - return Color.FromArgbSystem (255, 255, 255, 255, "Window", KnownColor.Window); - } - } - - static public Color WindowFrame - { - get { - return Color.FromArgbSystem (255, 0, 0, 0, "WindowFrame", KnownColor.WindowFrame); - } - } - - static public Color WindowText - { - get { - return Color.FromArgbSystem (255, 0, 0, 0, "WindowText", KnownColor.WindowText); - } - } - } -} - diff --git a/mcs/class/System.Drawing/System.Drawing/SystemColors.jvm.cs b/mcs/class/System.Drawing/System.Drawing/SystemColors.jvm.cs deleted file mode 100755 index 3c47123330d..00000000000 --- a/mcs/class/System.Drawing/System.Drawing/SystemColors.jvm.cs +++ /dev/null @@ -1,296 +0,0 @@ -// -// System.Drawing.SystemColors.cs -// -// Authors: -// Andrew Skiba (andrews@mainsoft.com) -// Konstantin Triger (kostat@mainsoft.com) -// -// Copyright (C) 2005 Mainsoft Corporation (http://www.mainsoft.com) -// - -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using awt = java.awt; -namespace System.Drawing { - - public sealed class SystemColors - { - static readonly Color[] SystemColorsCache; - - private SystemColors (){} - - static SystemColors () - { - SystemColorsCache = new Color[27]; //enough for all system color indices - - if (Graphics.IsHeadless) { - SystemColorsCache[(int)KnownColor.ActiveBorder] = Color.FromArgbSystem (255, 212, 208, 200, "ActiveBorder", KnownColor.ActiveBorder); - SystemColorsCache[(int)KnownColor.ActiveCaption] = Color.FromArgbSystem (255, 10, 36, 106, "ActiveCaption", KnownColor.ActiveCaption); - SystemColorsCache[(int)KnownColor.ActiveCaptionText] = Color.FromArgbSystem (255, 255, 255, 255, "ActiveCaptionText", KnownColor.ActiveCaptionText); - //TODO: find a more close approximation - SystemColorsCache[(int)KnownColor.AppWorkspace] = Color.FromArgbSystem (255, 128, 128, 128, "AppWorkspace", KnownColor.AppWorkspace); - SystemColorsCache[(int)KnownColor.Control] = Color.FromArgbSystem (255, 212, 208, 200, "Control", KnownColor.Control); - SystemColorsCache[(int)KnownColor.ControlDark] = Color.FromArgbSystem (255, 128, 128, 128, "ControlDark", KnownColor.ControlDark); - SystemColorsCache[(int)KnownColor.ControlDarkDark] = Color.FromArgbSystem (255, 64, 64, 64, "ControlDarkDark", KnownColor.ControlDarkDark); - SystemColorsCache[(int)KnownColor.ControlLight] = Color.FromArgbSystem (255, 212, 208, 200, "ControlLight", KnownColor.ControlLight); - SystemColorsCache[(int)KnownColor.ControlLightLight] = Color.FromArgbSystem (255, 255, 255, 255, "ControlLightLight", KnownColor.ControlLightLight); - SystemColorsCache[(int)KnownColor.ControlText] = Color.FromArgbSystem (255, 0, 0, 0, "ControlText", KnownColor.ControlText); - SystemColorsCache[(int)KnownColor.Desktop] = Color.FromArgbSystem (255, 58, 110, 165, "Desktop", KnownColor.Desktop); - SystemColorsCache[(int)KnownColor.GrayText] = Color.FromArgbSystem (255, 128, 128, 128, "GrayText", KnownColor.GrayText); - SystemColorsCache[(int)KnownColor.Highlight] = Color.FromArgbSystem (255, 10, 36, 106, "Highlight", KnownColor.Highlight); - SystemColorsCache[(int)KnownColor.HighlightText] = Color.FromArgbSystem (255, 255, 255, 255, "HighlightText", KnownColor.HighlightText); - //TODO: find a more close approximation - SystemColorsCache[(int)KnownColor.HotTrack] = Color.FromArgbSystem (255, 0, 0, 128, "HotTrack", KnownColor.HotTrack); - SystemColorsCache[(int)KnownColor.InactiveBorder] = Color.FromArgbSystem (255, 212, 208, 200, "InactiveBorder", KnownColor.InactiveBorder); - SystemColorsCache[(int)KnownColor.InactiveCaption] = Color.FromArgbSystem (255, 128, 128, 128, "InactiveCaption", KnownColor.InactiveCaption); - SystemColorsCache[(int)KnownColor.InactiveCaptionText] = Color.FromArgbSystem (255, 212, 208, 200, "InactiveCaptionText", KnownColor.InactiveCaptionText); - SystemColorsCache[(int)KnownColor.Info] = Color.FromArgbSystem (255, 255, 255, 225, "Info", KnownColor.Info); - SystemColorsCache[(int)KnownColor.InfoText] = Color.FromArgbSystem (255, 0, 0, 0, "InfoText", KnownColor.InfoText); - SystemColorsCache[(int)KnownColor.Menu] = Color.FromArgbSystem (255, 212, 208, 200, "Menu", KnownColor.Menu); - SystemColorsCache[(int)KnownColor.MenuText] = Color.FromArgbSystem (255, 0, 0, 0, "MenuText", KnownColor.MenuText); - SystemColorsCache[(int)KnownColor.ScrollBar] = Color.FromArgbSystem (255, 212, 208, 200, "ScrollBar", KnownColor.ScrollBar); - SystemColorsCache[(int)KnownColor.Window] = Color.FromArgbSystem (255, 255, 255, 255, "Window", KnownColor.Window); - SystemColorsCache[(int)KnownColor.WindowFrame] = Color.FromArgbSystem (255, 0, 0, 0, "WindowFrame", KnownColor.WindowFrame); - SystemColorsCache[(int)KnownColor.WindowText] = Color.FromArgbSystem (255, 0, 0, 0, "WindowText", KnownColor.WindowText); - } - else { - SystemColorsCache[(int)KnownColor.ActiveBorder] = FromNativeColor (awt.SystemColor.activeCaptionBorder, "ActiveBorder", KnownColor.ActiveBorder); - SystemColorsCache[(int)KnownColor.ActiveCaption] = FromNativeColor (awt.SystemColor.activeCaption, "ActiveCaption", KnownColor.ActiveCaption); - SystemColorsCache[(int)KnownColor.ActiveCaptionText] = FromNativeColor (awt.SystemColor.activeCaptionText, "ActiveCaptionText", KnownColor.ActiveCaptionText); - //TODO: find a more close approximation - SystemColorsCache[(int)KnownColor.AppWorkspace] = FromNativeColor (awt.SystemColor.desktop, "AppWorkspace", KnownColor.AppWorkspace); - SystemColorsCache[(int)KnownColor.Control] = FromNativeColor (awt.SystemColor.control, "Control", KnownColor.Control); - SystemColorsCache[(int)KnownColor.ControlDark] = FromNativeColor (awt.SystemColor.controlShadow, "ControlDark", KnownColor.ControlDark); - SystemColorsCache[(int)KnownColor.ControlDarkDark] = FromNativeColor (awt.SystemColor.controlDkShadow, "ControlDarkDark", KnownColor.ControlDarkDark); - SystemColorsCache[(int)KnownColor.ControlLight] = FromNativeColor (awt.SystemColor.controlHighlight, "ControlLight", KnownColor.ControlLight); - SystemColorsCache[(int)KnownColor.ControlLightLight] = FromNativeColor (awt.SystemColor.controlLtHighlight, "ControlLightLight", KnownColor.ControlLightLight); - SystemColorsCache[(int)KnownColor.ControlText] = FromNativeColor (awt.SystemColor.controlText, "ControlText", KnownColor.ControlText); - SystemColorsCache[(int)KnownColor.Desktop] = FromNativeColor (awt.SystemColor.desktop, "Desktop", KnownColor.Desktop); - SystemColorsCache[(int)KnownColor.GrayText] = FromNativeColor (awt.SystemColor.textInactiveText, "GrayText", KnownColor.GrayText); - SystemColorsCache[(int)KnownColor.Highlight] = FromNativeColor (awt.SystemColor.textHighlight, "Highlight", KnownColor.Highlight); - SystemColorsCache[(int)KnownColor.HighlightText] = FromNativeColor (awt.SystemColor.textHighlightText, "HighlightText", KnownColor.HighlightText); - //TODO: find a more close approximation - SystemColorsCache[(int)KnownColor.HotTrack] = FromNativeColor (awt.SystemColor.textText, "HotTrack", KnownColor.HotTrack); - SystemColorsCache[(int)KnownColor.InactiveBorder] = FromNativeColor (awt.SystemColor.inactiveCaptionBorder, "InactiveBorder", KnownColor.InactiveBorder); - SystemColorsCache[(int)KnownColor.InactiveCaption] = FromNativeColor (awt.SystemColor.inactiveCaption, "InactiveCaption", KnownColor.InactiveCaption); - SystemColorsCache[(int)KnownColor.InactiveCaptionText] = FromNativeColor (awt.SystemColor.inactiveCaptionText, "InactiveCaptionText", KnownColor.InactiveCaptionText); - SystemColorsCache[(int)KnownColor.Info] = FromNativeColor (awt.SystemColor.info, "Info", KnownColor.Info); - SystemColorsCache[(int)KnownColor.InfoText] = FromNativeColor (awt.SystemColor.infoText, "InfoText", KnownColor.InfoText); - SystemColorsCache[(int)KnownColor.Menu] = FromNativeColor (awt.SystemColor.menu, "Menu", KnownColor.Menu); - SystemColorsCache[(int)KnownColor.MenuText] = FromNativeColor (awt.SystemColor.menuText, "MenuText", KnownColor.MenuText); - SystemColorsCache[(int)KnownColor.ScrollBar] = FromNativeColor (awt.SystemColor.scrollbar, "ScrollBar", KnownColor.ScrollBar); - SystemColorsCache[(int)KnownColor.Window] = FromNativeColor (awt.SystemColor.window, "Window", KnownColor.Window); - SystemColorsCache[(int)KnownColor.WindowFrame] = FromNativeColor (awt.SystemColor.windowBorder, "WindowFrame", KnownColor.WindowFrame); - SystemColorsCache[(int)KnownColor.WindowText] = FromNativeColor (awt.SystemColor.windowText, "WindowText", KnownColor.WindowText); - } - } - - static private Color FromNativeColor ( - awt.Color awtColor, string name, KnownColor knownColor) { - return Color.FromArgbSystem (awtColor.getAlpha(), - awtColor.getRed(), awtColor.getGreen(), awtColor.getBlue(), - name, knownColor); - } - - static public Color ActiveBorder - { - get { - return SystemColorsCache[(int)KnownColor.ActiveBorder]; - } - } - - static public Color ActiveCaption - { - get { - return SystemColorsCache[(int)KnownColor.ActiveCaption]; - } - } - - static public Color ActiveCaptionText - { - get { - return SystemColorsCache[(int)KnownColor.ActiveCaptionText]; - } - } - - static public Color AppWorkspace - { - get { - return SystemColorsCache[(int)KnownColor.AppWorkspace]; - } - } - - static public Color Control - { - get { - return SystemColorsCache[(int)KnownColor.Control]; - } - } - - static public Color ControlDark - { - get { - return SystemColorsCache[(int)KnownColor.ControlDark]; - } - } - - static public Color ControlDarkDark - { - get { - return SystemColorsCache[(int)KnownColor.ControlDarkDark]; - } - } - - static public Color ControlLight - { - get { - return SystemColorsCache[(int)KnownColor.ControlLight]; - } - } - - static public Color ControlLightLight - { - get { - return SystemColorsCache[(int)KnownColor.ControlLightLight]; - } - } - - static public Color ControlText - { - get { - return SystemColorsCache[(int)KnownColor.ControlText]; - } - } - - static public Color Desktop - { - get { - return SystemColorsCache[(int)KnownColor.Desktop]; - } - } - - static public Color GrayText - { - get { - return SystemColorsCache[(int)KnownColor.GrayText]; - } - } - - static public Color Highlight - { - get { - return SystemColorsCache[(int)KnownColor.Highlight]; - } - } - - static public Color HighlightText - { - get { - return SystemColorsCache[(int)KnownColor.HighlightText]; - } - } - - static public Color HotTrack - { - get { - return SystemColorsCache[(int)KnownColor.HotTrack]; - } - } - - static public Color InactiveBorder - { - get { - return SystemColorsCache[(int)KnownColor.InactiveBorder]; - } - } - - static public Color InactiveCaption - { - get { - return SystemColorsCache[(int)KnownColor.InactiveCaption]; - } - } - - static public Color InactiveCaptionText - { - get { - return SystemColorsCache[(int)KnownColor.InactiveCaptionText]; - } - } - - static public Color Info - { - get { - return SystemColorsCache[(int)KnownColor.Info]; - } - } - - static public Color InfoText - { - get { - return SystemColorsCache[(int)KnownColor.InfoText]; - } - } - - static public Color Menu - { - get { - return SystemColorsCache[(int)KnownColor.Menu]; - } - } - - static public Color MenuText - { - get { - return SystemColorsCache[(int)KnownColor.MenuText]; - } - } - - static public Color ScrollBar - { - get { - return SystemColorsCache[(int)KnownColor.ScrollBar]; - } - } - - static public Color Window - { - get { - return SystemColorsCache[(int)KnownColor.Window]; - } - } - - static public Color WindowFrame - { - get { - return SystemColorsCache[(int)KnownColor.WindowFrame]; - } - } - - static public Color WindowText - { - get { - return SystemColorsCache[(int)KnownColor.WindowText]; - } - } - } -} diff --git a/mcs/class/System.Drawing/System.Drawing/SystemIcons.cs b/mcs/class/System.Drawing/System.Drawing/SystemIcons.cs deleted file mode 100644 index 04f9fbc03b8..00000000000 --- a/mcs/class/System.Drawing/System.Drawing/SystemIcons.cs +++ /dev/null @@ -1,61 +0,0 @@ -// -// System.Drawing.SystemIcons.cs -// -// Authors: -// Dennis Hayes (dennish@Raytek.com) -// Andreas Nahr (ClassDevelopment@A-SoftTech.com) -// -// (C) 2002 Ximian, Inc -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; - -namespace System.Drawing -{ - [MonoTODO ("not implemented")] - public sealed class SystemIcons - { - private SystemIcons() - { - } - - public static Icon Application { get { return LoadIcon();} } - public static Icon Asterisk { get { return LoadIcon();} } - public static Icon Error { get { return LoadIcon();} } - public static Icon Exclamation { get { return LoadIcon();} } - public static Icon Hand { get { return LoadIcon();} } - public static Icon Information { get { return LoadIcon();} } - public static Icon Question { get { return LoadIcon();} } - public static Icon Warning { get { return LoadIcon();} } - public static Icon WinLogo { get { return LoadIcon();} } - - [MonoTODO] - private static Icon LoadIcon () - { - return null; - } - } -} diff --git a/mcs/class/System.Drawing/System.Drawing/SystemIcons.jvm.cs b/mcs/class/System.Drawing/System.Drawing/SystemIcons.jvm.cs deleted file mode 100644 index 67052078a03..00000000000 --- a/mcs/class/System.Drawing/System.Drawing/SystemIcons.jvm.cs +++ /dev/null @@ -1,106 +0,0 @@ -// -// System.Drawing.SystemIcons.cs -// -// Authors: -// Vladimir Krasnov (vladimirk@mainsoft.com) -// -// Copyright (C) 2005 Mainsoft Corporation (http://www.mainsoft.com) -// - -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; -using System.IO; -using System.Configuration; -using System.Collections; -using System.Collections.Specialized; - -namespace System.Drawing -{ - public sealed class SystemIcons - { - private static readonly string SYSTEM_ICONS = "IconsResource"; - - private SystemIcons() - { - } - - public static Icon Application { get { return LoadIcon("Application");} } - public static Icon Asterisk { get { return LoadIcon("Asterisk");} } - public static Icon Error { get { return LoadIcon("Error");} } - public static Icon Exclamation { get { return LoadIcon("Exclamation");} } - public static Icon Hand { get { return LoadIcon("Hand");} } - public static Icon Information { get { return LoadIcon("Information");} } - public static Icon Question { get { return LoadIcon("Question");} } - public static Icon Warning { get { return LoadIcon("Warning");} } - public static Icon WinLogo { get { return LoadIcon("WinLogo");} } - - private static Icon LoadIcon (string iconName) - { - Hashtable systemIcons = (Hashtable)AppDomain.CurrentDomain.GetData("SYSTEM_ICONS"); - - if (systemIcons == null) - { - systemIcons = LoadSystemIconsFromResource(); - AppDomain.CurrentDomain.SetData(SYSTEM_ICONS, systemIcons); - } - - return (Icon)systemIcons[iconName]; - } - - private static Hashtable LoadSystemIconsFromResource() - { - string [] iconNames = { - "Application", "Asterisk", "Error", - "Exclamation", "Hand", "Information", - "Question", "Warning", "WinLogo" - }; - - NameValueCollection config = (NameValueCollection) ConfigurationSettings.GetConfig ("system.drawing/icons"); - Hashtable icons = new Hashtable(9); - - for (int i = 0; i < iconNames.Length; i++) - icons.Add(iconNames[i], LoadIconFromResource( config[ iconNames[i] ] )); - - return icons; - } - - private static Icon LoadIconFromResource(string iconName) - { - Stream s; - try - { - java.lang.ClassLoader cl = (java.lang.ClassLoader) - AppDomain.CurrentDomain.GetData("GH_ContextClassLoader"); - if (cl == null) - return null; - java.io.InputStream inputStream = cl.getResourceAsStream(iconName); - s = (Stream)vmw.common.IOUtils.getStream(inputStream); - } - catch (Exception e) - { - return null; - } - return new Icon(new Bitmap(s)); - } - } -} diff --git a/mcs/class/System.Drawing/System.Drawing/SystemPens.cs b/mcs/class/System.Drawing/System.Drawing/SystemPens.cs deleted file mode 100644 index da21a80510b..00000000000 --- a/mcs/class/System.Drawing/System.Drawing/SystemPens.cs +++ /dev/null @@ -1,236 +0,0 @@ -// -// System.Drawing.SystemPens.cs -// -// Authors: -// Miguel de Icaza (miguel@ximian.com) -// Ravindra (rkumar@novell.com) -// -// Copyright (C) 2003-2004 Novell, Inc. http://www.novell.com -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; - -namespace System.Drawing -{ - public sealed class SystemPens - { - static private Pen active_caption_text; - static private Pen control; - static private Pen control_dark; - static private Pen control_dark_dark; - static private Pen control_light; - static private Pen control_light_light; - static private Pen control_text; - static private Pen gray_text; - static private Pen highlight; - static private Pen highlight_text; - static private Pen inactive_caption_text; - static private Pen info_text; - static private Pen menu_text; - static private Pen window_frame; - static private Pen window_text; - - private SystemPens () { } - - public static Pen ActiveCaptionText { - get { - if (active_caption_text == null) { - active_caption_text = new Pen (SystemColors.ActiveCaptionText); - active_caption_text.isModifiable = false; - } - - return active_caption_text; - } - } - - public static Pen Control { - get { - if (control == null) { - control = new Pen (SystemColors.Control); - control.isModifiable = false; - } - - return control; - } - } - - public static Pen ControlDark { - get { - if (control_dark == null) { - control_dark = new Pen (SystemColors.ControlDark); - control_dark.isModifiable = false; - } - - return control_dark; - } - } - - public static Pen ControlDarkDark { - get { - if (control_dark_dark == null) { - control_dark_dark = new Pen (SystemColors.ControlDarkDark); - control_dark_dark.isModifiable = false; - } - - return control_dark_dark; - } - } - - public static Pen ControlLight { - get { - if (control_light == null) { - control_light = new Pen (SystemColors.ControlLight); - control_light.isModifiable = false; - } - - return control_light; - } - } - - public static Pen ControlLightLight { - get { - if (control_light_light == null) { - control_light_light = new Pen (SystemColors.ControlLightLight); - control_light_light.isModifiable = false; - } - - return control_light_light; - } - } - - public static Pen ControlText { - get { - if (control_text == null) { - control_text = new Pen (SystemColors.ControlText); - control_text.isModifiable = false; - } - - return control_text; - } - } - - public static Pen GrayText { - get { - if (gray_text == null) { - gray_text = new Pen (SystemColors.GrayText); - gray_text.isModifiable = false; - } - - return gray_text; - } - } - - public static Pen Highlight { - get { - if (highlight == null) { - highlight = new Pen (SystemColors.Highlight); - highlight.isModifiable = false; - } - - return highlight; - } - } - - public static Pen HighlightText { - get { - if (highlight_text == null) { - highlight_text = new Pen (SystemColors.HighlightText); - highlight_text.isModifiable = false; - } - - return highlight_text; - } - } - - public static Pen InactiveCaptionText { - get { - if (inactive_caption_text == null) { - inactive_caption_text = new Pen (SystemColors.InactiveCaptionText); - inactive_caption_text.isModifiable = false; - } - - return inactive_caption_text; - } - } - - public static Pen InfoText { - get { - if (info_text == null) { - info_text = new Pen (SystemColors.InfoText); - info_text.isModifiable = false; - } - - return info_text; - } - } - - public static Pen MenuText { - get { - if (menu_text == null) { - menu_text = new Pen (SystemColors.MenuText); - menu_text.isModifiable = false; - } - - return menu_text; - } - } - - public static Pen WindowFrame { - get { - if (window_frame == null) { - window_frame = new Pen (SystemColors.WindowFrame); - window_frame.isModifiable = false; - } - - return window_frame; - } - } - - public static Pen WindowText { - get { - if (window_text == null) { - window_text = new Pen (SystemColors.WindowText); - window_text.isModifiable = false; - } - - return window_text; - } - } - - public static Pen FromSystemColor (Color c) - { - if (c.IsSystemColor) { - Pen newPen = new Pen (c); - newPen.isModifiable = false; - return newPen; - } - - String message = String.Format ("The color {0} is not a system color.", c); - throw new ArgumentException (message); - } - - } -} diff --git a/mcs/class/System.Drawing/System.Drawing/TextureBrush.cs b/mcs/class/System.Drawing/System.Drawing/TextureBrush.cs deleted file mode 100644 index efd5cbc8399..00000000000 --- a/mcs/class/System.Drawing/System.Drawing/TextureBrush.cs +++ /dev/null @@ -1,214 +0,0 @@ -// -// System.Drawing.TextureBrush.cs -// -// Author: -// Dennis Hayes (dennish@Raytek.com) -// Ravindra (rkumar@novell.com) -// -// (C) 2002 Ximian, Inc -// (C) 2004 Novell, Inc. -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; -using System.Drawing.Drawing2D; -using System.Drawing.Imaging; - -namespace System.Drawing -{ - /// - /// Summary description for TextureBrush. - /// - public sealed class TextureBrush : Brush - { - private Image image; - - internal TextureBrush (IntPtr ptr) : base (ptr) - { - // get image from IntPtr - // image could be Bitmap or Metafile - image = Image; - } - - public TextureBrush (Image image) : this (image, WrapMode.Tile) - { - } - - public TextureBrush (Image image, Rectangle dstRect) - { - this.image = image; - Status status = GDIPlus.GdipCreateTextureIAI (image.nativeObject, IntPtr.Zero, dstRect.X, dstRect.Y, dstRect.Width, dstRect.Height, out nativeObject); - GDIPlus.CheckStatus (status); - } - - public TextureBrush (Image image, RectangleF dstRect) - { - this.image = image; - Status status = GDIPlus.GdipCreateTextureIA (image.nativeObject, IntPtr.Zero, dstRect.X, dstRect.Y, dstRect.Width, dstRect.Height, out nativeObject); - GDIPlus.CheckStatus (status); - } - - public TextureBrush (Image image, WrapMode wrapMode) - { - this.image = image; - Status status = GDIPlus.GdipCreateTexture (image.nativeObject, wrapMode, out nativeObject); - GDIPlus.CheckStatus (status); - } - - public TextureBrush (Image image, Rectangle dstRect, ImageAttributes imageAttr) - { - this.image = image; - Status status = GDIPlus.GdipCreateTextureIAI (image.nativeObject, imageAttr.NativeObject, dstRect.X, dstRect.Y, dstRect.Width, dstRect.Height, out nativeObject); - GDIPlus.CheckStatus (status); - } - - public TextureBrush (Image image, RectangleF dstRect, ImageAttributes imageAttr) - { - this.image = image; - Status status = GDIPlus.GdipCreateTextureIA (image.nativeObject, imageAttr.NativeObject, dstRect.X, dstRect.Y, dstRect.Width, dstRect.Height, out nativeObject); - GDIPlus.CheckStatus (status); - } - - public TextureBrush (Image image, WrapMode wrapMode, Rectangle dstRect) - { - this.image = image; - Status status = GDIPlus.GdipCreateTexture2I (image.nativeObject, wrapMode, dstRect.X, dstRect.Y, dstRect.Width, dstRect.Height, out nativeObject); - GDIPlus.CheckStatus (status); - } - - public TextureBrush (Image image, WrapMode wrapMode, RectangleF dstRect) - { - this.image = image; - Status status = GDIPlus.GdipCreateTexture2 (image.nativeObject, wrapMode, dstRect.X, dstRect.Y, dstRect.Width, dstRect.Height, out nativeObject); - GDIPlus.CheckStatus (status); - } - - // properties - - public Image Image { - get { - if (image == null) { - IntPtr img; - Status status = GDIPlus.GdipGetTextureImage (nativeObject, out img); - GDIPlus.CheckStatus (status); - image = new Bitmap (img); - } - return image; - } - } - - public Matrix Transform { - get { - Matrix matrix = new Matrix (); - Status status = GDIPlus.GdipGetTextureTransform (nativeObject, matrix.nativeMatrix); - GDIPlus.CheckStatus (status); - - return matrix; - } - set { - Status status = GDIPlus.GdipSetTextureTransform (nativeObject, value.nativeMatrix); - GDIPlus.CheckStatus (status); - } - } - - public WrapMode WrapMode { - get { - WrapMode mode = WrapMode.Tile; - Status status = GDIPlus.GdipGetTextureWrapMode (nativeObject, out mode); - GDIPlus.CheckStatus (status); - return mode; - } - set { - Status status = GDIPlus.GdipSetTextureWrapMode (nativeObject, value); - GDIPlus.CheckStatus (status); - } - } - - // public methods - - public override object Clone () - { - IntPtr clonePtr; - Status status = GDIPlus.GdipCloneBrush (nativeObject, out clonePtr); - GDIPlus.CheckStatus (status); - - TextureBrush clone = new TextureBrush (clonePtr); - if (image != null) - clone.image = (Image) image.Clone (); - - return clone; - } - - public void MultiplyTransform (Matrix matrix) - { - MultiplyTransform (matrix, MatrixOrder.Prepend); - } - - public void MultiplyTransform (Matrix matrix, MatrixOrder order) - { - Status status = GDIPlus.GdipMultiplyTextureTransform (nativeObject, matrix.nativeMatrix, order); - GDIPlus.CheckStatus (status); - } - - public void ResetTransform () - { - Status status = GDIPlus.GdipResetTextureTransform (nativeObject); - GDIPlus.CheckStatus (status); - } - - public void RotateTransform (float angle) - { - RotateTransform (angle, MatrixOrder.Prepend); - } - - public void RotateTransform (float angle, MatrixOrder order) - { - Status status = GDIPlus.GdipRotateTextureTransform (nativeObject, angle, order); - GDIPlus.CheckStatus (status); - } - - public void ScaleTransform (float sx, float sy) - { - ScaleTransform (sx, sy, MatrixOrder.Prepend); - } - - public void ScaleTransform (float sx, float sy, MatrixOrder order) - { - Status status = GDIPlus.GdipScaleTextureTransform (nativeObject, sx, sy, order); - GDIPlus.CheckStatus (status); - } - - public void TranslateTransform (float dx, float dy) - { - TranslateTransform (dx, dy, MatrixOrder.Prepend); - } - - public void TranslateTransform (float dx, float dy, MatrixOrder order) - { - Status status = GDIPlus.GdipTranslateTextureTransform (nativeObject, dx, dy, order); - GDIPlus.CheckStatus (status); - } - } -} diff --git a/mcs/class/System.Drawing/System.Drawing/TextureBrush.jvm.cs b/mcs/class/System.Drawing/System.Drawing/TextureBrush.jvm.cs deleted file mode 100644 index 6872f116a4c..00000000000 --- a/mcs/class/System.Drawing/System.Drawing/TextureBrush.jvm.cs +++ /dev/null @@ -1,195 +0,0 @@ -// -// System.Drawing.TextureBrush.cs -// -// Author: -// Dennis Hayes (dennish@Raytek.com) -// Ravindra (rkumar@novell.com) -// -// (C) 2002 Ximian, Inc -// (C) 2004 Novell, Inc. -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; -using System.Drawing.Drawing2D; -using System.Drawing.Imaging; - -using awt = java.awt; -using geom = java.awt.geom; -using image = java.awt.image; - -namespace System.Drawing -{ - /// - /// Summary description for TextureBrush. - /// - public sealed class TextureBrush : Brush - { - awt.TexturePaint _nativeObject; - - protected override java.awt.Paint NativeObject { - get { - return _nativeObject; - } - } - - - WrapMode _wrapMode; - - TextureBrush (awt.TexturePaint ptr) - { - _nativeObject = ptr; - } - - public TextureBrush (Image image) : this (image, WrapMode.Tile) - { - } - - public TextureBrush (Image image, Rectangle dstRect) - { - } - - public TextureBrush (Image image, RectangleF dstRect) - { - // FIXME: check if not metafile - _nativeObject = new awt.TexturePaint((image.BufferedImage)image.NativeObject.CurrentImage.NativeImage, - new geom.Rectangle2D.Float((float)dstRect.X,(float)dstRect.Y,(float)dstRect.Width, - (float)dstRect.Height)); - } - - public TextureBrush (Image image, WrapMode wrapMode) - { - // FIXME: check if not metafile - // TBD: WRAP MODE - _nativeObject = new awt.TexturePaint((image.BufferedImage)image.NativeObject.CurrentImage.NativeImage, - new geom.Rectangle2D.Float(0,0,1,1)); - } - - public TextureBrush (Image image, Rectangle dstRect, ImageAttributes imageAttr) - { - throw new NotImplementedException(); - } - - public TextureBrush (Image image, RectangleF dstRect, ImageAttributes imageAttr) - { - throw new NotImplementedException(); - } - - public TextureBrush (Image image, WrapMode wrapMode, Rectangle dstRect) - { - // FIXME: check if not metafile - // TBD:WRAP MODE - _nativeObject = new awt.TexturePaint((image.BufferedImage)image.NativeObject.CurrentImage.NativeImage, - new geom.Rectangle2D.Float ((float)dstRect.X,(float)dstRect.Y,(float)dstRect.Width,(float)dstRect.Height)); - } - - public TextureBrush (Image image, WrapMode wrapMode, RectangleF dstRect) - { - // FIXME: check if not metafile - //TBD:WRAP MODE - _nativeObject = new awt.TexturePaint((image.BufferedImage)image.NativeObject.CurrentImage.NativeImage, - new geom.Rectangle2D.Float((float)dstRect.X,(float)dstRect.Y,(float)dstRect.Width, - (float)dstRect.Height)); - } - - // properties - public Image Image { - get { - return Image.ImageFromNativeImage(((awt.TexturePaint)NativeObject).getImage(), - ImageFormat.Bmp); - } - } - - public Matrix Transform { - get { - throw new NotImplementedException(); - } - set { - throw new NotImplementedException(); - } - } - - public WrapMode WrapMode { - get { - return _wrapMode; - } - set { - _wrapMode = value; - } - } - - // public methods - - public override object Clone () - { - throw new NotImplementedException(); - } - - public void MultiplyTransform (Matrix matrix) - { - MultiplyTransform (matrix, MatrixOrder.Prepend); - } - - public void MultiplyTransform (Matrix matrix, MatrixOrder order) - { - throw new NotImplementedException(); - } - - public void ResetTransform () - { - throw new NotImplementedException(); - } - - public void RotateTransform (float angle) - { - RotateTransform (angle, MatrixOrder.Prepend); - } - - public void RotateTransform (float angle, MatrixOrder order) - { - throw new NotImplementedException(); - } - - public void ScaleTransform (float sx, float sy) - { - ScaleTransform (sx, sy, MatrixOrder.Prepend); - } - - public void ScaleTransform (float sx, float sy, MatrixOrder order) - { - throw new NotImplementedException(); - } - - public void TranslateTransform (float dx, float dy) - { - TranslateTransform (dx, dy, MatrixOrder.Prepend); - } - - public void TranslateTransform (float dx, float dy, MatrixOrder order) - { - throw new NotImplementedException(); - } - } -} diff --git a/mcs/class/System.Drawing/System.Drawing/ToolboxBitmapAttribute.cs b/mcs/class/System.Drawing/System.Drawing/ToolboxBitmapAttribute.cs deleted file mode 100644 index 9737b48e1dc..00000000000 --- a/mcs/class/System.Drawing/System.Drawing/ToolboxBitmapAttribute.cs +++ /dev/null @@ -1,139 +0,0 @@ -// -// System.Drawing.ToolboxBitmapAttribute.cs -// -// Authors: -// Dennis Hayes (dennish@Raytek.com) -// Andreas Nahr (ClassDevelopment@A-SoftTech.com) -// -// Copyright (C) 2002 Ximian, Inc. http://www.ximian.com -// Copyright (C) 2004 Novell, Inc. http://www.novell.com -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; - -namespace System.Drawing -{ - [AttributeUsage (AttributeTargets.Class)] - public class ToolboxBitmapAttribute : Attribute - { - private Image smallImage = null; - private Image bigImage = null; - public static readonly ToolboxBitmapAttribute Default = new ToolboxBitmapAttribute(); - - private ToolboxBitmapAttribute () - { - } - - public ToolboxBitmapAttribute (string imageFile) - { - } - - public ToolboxBitmapAttribute (Type t) - { - smallImage = GetImageFromResource (t, null, false); - } - - public ToolboxBitmapAttribute (Type t, string name) - { - smallImage = GetImageFromResource (t, name, false); - } - - public override bool Equals (object value) - { - if (!(value is ToolboxBitmapAttribute)) - return false; - if (value == this) - return true; - return ((ToolboxBitmapAttribute) value).smallImage == this.smallImage; - } - - public override int GetHashCode () - { - return (smallImage.GetHashCode () ^ bigImage.GetHashCode ()); - } - - public Image GetImage (object component) - { - return GetImage (component.GetType(), null, false); - } - - public Image GetImage (object component, bool large) - { - return GetImage (component.GetType(), null, large); - } - - public Image GetImage (Type type) - { - return GetImage (type, null, false); - } - - public Image GetImage (Type type, bool large) - { - return GetImage (type, null, large); - } - - public Image GetImage (Type type, string imgName, bool large) - { - if (smallImage == null) - smallImage = GetImageFromResource (type, imgName, false); - - if (large) { - if (bigImage == null) - bigImage = new Bitmap (smallImage, 32, 32); - return bigImage; - } - else - return smallImage; - } - - public static Image GetImageFromResource (Type t, string imageName, bool large) - { - Bitmap bitmap; - if (imageName == null) - imageName = t.Name + ".bmp"; - - try { - using (System.IO.Stream s = t.Assembly.GetManifestResourceStream (t.Namespace + "." + imageName)){ - if (s == null) { - return null; - } else { - bitmap = new Bitmap (s, false); - } - } - - //FIXME: thrown too easily - //if (bitmap.Width != 16 || bitmap.Height != 16) - // throw new Exception ("ToolboxBitmap must be 16x16 pixels"); - - if (large) - return new Bitmap (bitmap, 32, 32); - return bitmap; - } catch { - return null; - } - } - } -} diff --git a/mcs/class/System.Drawing/System.Drawing/carbonFunctions.cs b/mcs/class/System.Drawing/System.Drawing/carbonFunctions.cs deleted file mode 100644 index 40e36825b70..00000000000 --- a/mcs/class/System.Drawing/System.Drawing/carbonFunctions.cs +++ /dev/null @@ -1,149 +0,0 @@ -// -// System.Drawing.carbonFunctions.cs -// -// Authors: -// Geoff Norton (gnorton@customerdna.com> -// -// Copyright (C) 2004 Novell, Inc. (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System.Runtime.InteropServices; -using System.Security; - -namespace System.Drawing { - - [SuppressUnmanagedCodeSecurity] - internal class Carbon { - - internal static CarbonContext GetCGContextForNSView (IntPtr hwnd) { - IntPtr cgContext = IntPtr.Zero; - - cgContext = objc_msgSend (objc_msgSend (objc_getClass ("NSGraphicsContext"), sel_registerName ("currentContext")), sel_registerName ("graphicsPort")); - HIRect rect = new HIRect (); - objc_msgSend_stret (ref rect, hwnd, sel_registerName ("bounds")); - return new CarbonContext (cgContext, (int)rect.size.width, (int)rect.size.height); - } - internal static CarbonContext GetCGContextForView (IntPtr hwnd) { - IntPtr cgContext = IntPtr.Zero; - // Grab the window we're in - IntPtr window = Carbon.GetControlOwner (hwnd); - // Get the port of the window - IntPtr port = Carbon.GetWindowPort (window); - // Create a CGContext ref - Carbon.CreateCGContextForPort (port, ref cgContext); - - // Get the bounds of the window - QRect wBounds = new QRect (); - Carbon.GetWindowBounds (window, 32, ref wBounds); - - // Get the bounds of the view - HIRect vBounds = new HIRect (); - Carbon.HIViewGetBounds (hwnd, ref vBounds); - - // Convert the view local bounds to window coordinates - Carbon.HIViewConvertRect (ref vBounds, hwnd, IntPtr.Zero); - Carbon.CGContextTranslateCTM (cgContext, vBounds.origin.x, (wBounds.bottom-wBounds.top)-(vBounds.origin.y+vBounds.size.height)); - /* FIXME: Do we need this or is it inherintly clipped */ - HIRect rcClip = new HIRect (); - rcClip.origin.x = 0; - rcClip.origin.y = 0; - rcClip.size.width = vBounds.size.width; - rcClip.size.height = vBounds.size.height; - Carbon.CGContextClipToRect (cgContext, rcClip); - return new CarbonContext (cgContext, (int)vBounds.size.width, (int)vBounds.size.height); - } - #region Cocoa Methods - [DllImport("libobjc.dylib")] - public static extern IntPtr objc_getClass(string className); - [DllImport("libobjc.dylib")] - public static extern IntPtr objc_msgSend(IntPtr basePtr, IntPtr selector, string argument); - [DllImport("libobjc.dylib")] - public static extern IntPtr objc_msgSend(IntPtr basePtr, IntPtr selector); - [DllImport("libobjc.dylib")] - public static extern void objc_msgSend_stret(ref HIRect arect, IntPtr basePtr, IntPtr selector); - [DllImport("libobjc.dylib")] - public static extern IntPtr sel_registerName(string selectorName); - #endregion - - [DllImport("/System/Library/Frameworks/Carbon.framework/Versions/Current/Carbon")] - internal static extern int HIViewGetBounds (IntPtr vHnd, ref HIRect r); - [DllImport("/System/Library/Frameworks/Carbon.framework/Versions/Current/Carbon")] - internal static extern int HIViewConvertRect (ref HIRect r, IntPtr a, IntPtr b); - - [DllImport ("/System/Library/Frameworks/Carbon.framework/Versions/Current/Carbon")] - internal static extern IntPtr GetControlOwner (IntPtr aView); - - [DllImport("/System/Library/Frameworks/Carbon.framework/Versions/Current/Carbon")] - internal static extern int GetWindowBounds (IntPtr wHnd, uint reg, ref QRect rect); - [DllImport ("/System/Library/Frameworks/Carbon.framework/Versions/Current/Carbon")] - internal static extern IntPtr GetWindowPort (IntPtr hWnd); - [DllImport ("/System/Library/Frameworks/Carbon.framework/Versions/Current/Carbon")] - internal static extern int CGContextClipToRect (IntPtr cgContext, HIRect clip); - [DllImport ("/System/Library/Frameworks/Carbon.framework/Versions/Current/Carbon")] - internal static extern void CreateCGContextForPort (IntPtr port, ref IntPtr cgc); - [DllImport ("/System/Library/Frameworks/Carbon.framework/Versions/Current/Carbon")] - internal static extern void CGContextTranslateCTM (IntPtr cgc, double tx, double ty); - [DllImport ("/System/Library/Frameworks/Carbon.framework/Versions/Current/Carbon")] - internal static extern void CGContextScaleCTM (IntPtr cgc, double x, double y); - [DllImport ("/System/Library/Frameworks/Carbon.framework/Versions/Current/Carbon")] - internal static extern void CGContextFlush (IntPtr cgc); - [DllImport ("/System/Library/Frameworks/Carbon.framework/Versions/Current/Carbon")] - internal static extern void CGContextSynchronize (IntPtr cgc); - } - - internal struct CGSize { - public float width; - public float height; - } - - internal struct CGPoint { - public float x; - public float y; - } - - internal struct HIRect { - public CGPoint origin; - public CGSize size; - } - - internal struct QRect - { - public short top; - public short left; - public short bottom; - public short right; - } - - internal struct CarbonContext - { - public IntPtr ctx; - public int width; - public int height; - - public CarbonContext (IntPtr ctx, int width, int height) - { - this.ctx = ctx; - this.width = width; - this.height = height; - } - } -} diff --git a/mcs/class/System.Drawing/System.Drawing/gdipEnums.cs b/mcs/class/System.Drawing/System.Drawing/gdipEnums.cs deleted file mode 100644 index d108f93cfca..00000000000 --- a/mcs/class/System.Drawing/System.Drawing/gdipEnums.cs +++ /dev/null @@ -1,87 +0,0 @@ -// -// System.Drawing.gdipEnums.cs -// -// Author: -// Alexandre Pigolkine (pigolkine@gmx.de) -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -using System; - -namespace System.Drawing { - /// - /// GDI+ API enumerations - /// - - #region Status - internal enum Status { - Ok = 0, - GenericError = 1, - InvalidParameter = 2, - OutOfMemory = 3, - ObjectBusy = 4, - InsufficientBuffer = 5, - NotImplemented = 6, - Win32Error = 7, - WrongState = 8, - Aborted = 9, - FileNotFound = 10, - ValueOverflow = 11, - AccessDenied = 12, - UnknownImageFormat = 13, - FontFamilyNotFound = 14, - FontStyleNotFound = 15, - NotTrueTypeFont = 16, - UnsupportedGdiplusVersion = 17, - GdiplusNotInitialized = 18, - PropertyNotFound = 19, - PropertyNotSupported = 20, - ProfileNotFound = 21 - } - #endregion - - #region Unit - internal enum Unit - { - UnitWorld = 0, - UnitDisplay = 1, - UnitPixel = 2, - UnitPoint = 3, - UnitInch = 4, - UnitDocument = 5, - UnitMillimeter = 6 - }; - #endregion - - #region BrushType - internal enum BrushType { - BrushTypeSolidColor = 0, - BrushTypeHatchFill = 1, - BrushTypeTextureFill = 2, - BrushTypePathGradient = 3, - BrushTypeLinearGradient = 4 - } - #endregion - -} diff --git a/mcs/class/System.Drawing/System.Drawing/gdipFunctions.cs b/mcs/class/System.Drawing/System.Drawing/gdipFunctions.cs deleted file mode 100644 index a8a80ddc13b..00000000000 --- a/mcs/class/System.Drawing/System.Drawing/gdipFunctions.cs +++ /dev/null @@ -1,1759 +0,0 @@ -// -// System.Drawing.gdipFunctions.cs -// -// Authors: -// Alexandre Pigolkine (pigolkine@gmx.de) -// Jordi Mas i Hernandez (jordi@ximian.com) -// Sanjay Gupta (gsanjay@novell.com) -// Ravindra (rkumar@novell.com) -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; -using System.IO; -using System.Runtime.InteropServices; -using System.Text; -using System.Drawing.Drawing2D; -using System.Drawing.Imaging; -using System.Drawing.Text; -using System.Security; -#if NET_2_0 -using System.Runtime.InteropServices.ComTypes; -#else -using IStream = System.Runtime.InteropServices.UCOMIStream; -#endif - -namespace System.Drawing -{ - /// - /// GDI+ API Functions - /// - [SuppressUnmanagedCodeSecurity] - internal class GDIPlus - { - public const int FACESIZE = 32; - public const int LANG_NEUTRAL = 0; - public static IntPtr Display = IntPtr.Zero; - public static bool UseX11Drawable; - public static bool UseQuartzDrawable = (Environment.GetEnvironmentVariable ("MONO_MWF_USE_QUARTZ_BACKEND") != null); - public static bool UseCocoaDrawable = (Environment.GetEnvironmentVariable ("MONO_GDIP_USE_COCOA_BACKEND") != null); - - #region gdiplus.dll functions - - // startup / shutdown - [DllImport("gdiplus.dll")] - static internal extern Status GdiplusStartup(ref ulong token, ref GdiplusStartupInput input, ref GdiplusStartupOutput output); - [DllImport("gdiplus.dll")] - static internal extern void GdiplusShutdown(ref ulong token); - - static ulong GdiPlusToken; - - static void ProcessExit (object sender, EventArgs e) - { - // Called all pending objects and claim any pending handle before - // shutting down - GC.Collect (); - GC.WaitForPendingFinalizers (); - GdiplusShutdown (ref GdiPlusToken); - - if (UseX11Drawable && Display != IntPtr.Zero) { - XCloseDisplay (Display); - } - - } - - static GDIPlus () - { - // check for Unix platforms - see FAQ for more details - // http://www.mono-project.com/FAQ:_Technical#How_to_detect_the_execution_platform_.3F - int platform = (int) Environment.OSVersion.Platform; - UseX11Drawable = ((platform == 4) || (platform == 128)); - - GdiplusStartupInput input = GdiplusStartupInput.MakeGdiplusStartupInput(); - GdiplusStartupOutput output = GdiplusStartupOutput.MakeGdiplusStartupOutput(); - GdiplusStartup (ref GdiPlusToken, ref input, ref output); - AppDomain.CurrentDomain.ProcessExit += new EventHandler (ProcessExit); - } - - // Copies a Ptr to an array of Points and releases the memory - static public void FromUnManagedMemoryToPointI(IntPtr prt, Point [] pts) - { - int nPointSize = Marshal.SizeOf(pts[0]); - IntPtr pos = prt; - for (int i=0; i 0 && buf != IntPtr.Zero) { - Marshal.Copy (start_buf, 0, (IntPtr) (buf.ToInt64()), bytesRead); - } - - start_buf_pos = 0; - start_buf_len = bytesRead; - - return bytesRead; - } - - public StreamGetHeaderDelegate GetHeaderDelegate { - get { - if (stream != null && stream.CanRead) { - if (sghd == null) { - sghd = new StreamGetHeaderDelegate (StreamGetHeaderImpl); - } - return sghd; - } - return null; - } - } - - public int StreamGetBytesImpl (IntPtr buf, int bufsz, bool peek) - { - if (buf == IntPtr.Zero && peek) { - return -1; - } - - byte[] managedBuf = new byte[bufsz]; - int bytesRead = 0; - long streamPosition = 0; - - if (bufsz > 0) { - if (stream.CanSeek) { - streamPosition = stream.Position; - } - if (start_buf_len > 0) { - if (start_buf_len > bufsz) { - Array.Copy(start_buf, start_buf_pos, managedBuf, 0, bufsz); - start_buf_pos += bufsz; - start_buf_len -= bufsz; - bytesRead = bufsz; - bufsz = 0; - } else { - // this is easy - Array.Copy(start_buf, start_buf_pos, managedBuf, 0, start_buf_len); - bufsz -= start_buf_len; - bytesRead = start_buf_len; - start_buf_len = 0; - } - } - - if (bufsz > 0) { - try { - bytesRead += stream.Read (managedBuf, bytesRead, bufsz); - } catch (IOException) { - return -1; - } - } - - if (bytesRead > 0 && buf != IntPtr.Zero) { - Marshal.Copy (managedBuf, 0, (IntPtr) (buf.ToInt64()), bytesRead); - } - - if (!stream.CanSeek && (bufsz == 10) && peek) { - // Special 'hack' to support peeking of the type for gdi+ on non-seekable streams - } - - if (peek) { - if (stream.CanSeek) { - // If we are peeking bytes, then go back to original position before peeking - stream.Seek (streamPosition, SeekOrigin.Begin); - } else { - throw new NotSupportedException(); - } - } - } - - return bytesRead; - } - - public StreamGetBytesDelegate GetBytesDelegate { - get { - if (stream != null && stream.CanRead) { - if (sgbd == null) { - sgbd = new StreamGetBytesDelegate (StreamGetBytesImpl); - } - return sgbd; - } - return null; - } - } - - public long StreamSeekImpl (int offset, int whence) - { - long retOffset; - if (whence == 0) { - retOffset = stream.Seek ((long) offset, SeekOrigin.Begin); - } else if (whence == 1) { - retOffset = stream.Seek ((long) offset, SeekOrigin.Current); - } else if (whence == 2) { - retOffset = stream.Seek ((long) offset, SeekOrigin.End); - } else { - retOffset = -1; - } - - return retOffset; - } - - public StreamSeekDelegate SeekDelegate { - get { - if (stream != null && stream.CanSeek) { - if (skd == null) { - skd = new StreamSeekDelegate (StreamSeekImpl); - } - return skd; - } - return null; - } - } - - public int StreamPutBytesImpl (IntPtr buf, int bufsz) - { - byte[] managedBuf = new byte[bufsz]; - Marshal.Copy (buf, managedBuf, 0, bufsz); - stream.Write (managedBuf, 0, bufsz); - return bufsz; - } - - public StreamPutBytesDelegate PutBytesDelegate { - get { - if (stream != null && stream.CanWrite) { - if (spbd == null) { - spbd = new StreamPutBytesDelegate (StreamPutBytesImpl); - } - return spbd; - } - return null; - } - } - - public void StreamCloseImpl () - { - stream.Close (); - } - - public StreamCloseDelegate CloseDelegate { - get { - if (stream != null) { - if (scd == null) { - scd = new StreamCloseDelegate (StreamCloseImpl); - } - return scd; - } - return null; - } - } - - public long StreamSizeImpl () - { - return stream.Length; - } - - public StreamSizeDelegate SizeDelegate { - get { - if (stream != null) { - if (ssd == null) { - ssd = new StreamSizeDelegate (StreamSizeImpl); - } - return ssd; - } - return null; - } - } - - } - - /* Mac only function calls */ - [DllImport("gdiplus.dll")] - internal static extern Status GdipCreateFromQuartz_macosx (IntPtr cgref, int width, int height, out IntPtr graphics); - - /* Linux only function calls*/ - [DllImport("gdiplus.dll")] - internal static extern Status GdipSetVisibleClip_linux (IntPtr graphics, ref Rectangle rect); - - [DllImport("gdiplus.dll")] - internal static extern Status GdipCreateFromXDrawable_linux (IntPtr drawable, IntPtr display, out IntPtr graphics); - - // Stream functions for non-Win32 (libgdiplus specific( - [DllImport("gdiplus.dll")] - static internal extern Status GdipLoadImageFromDelegate_linux ( StreamGetHeaderDelegate getHeader, StreamGetBytesDelegate getBytes, StreamPutBytesDelegate putBytes, - StreamSeekDelegate doSeek, StreamCloseDelegate close, StreamSizeDelegate size, out IntPtr image); - [DllImport("gdiplus.dll")] - static internal extern Status GdipSaveImageToDelegate_linux ( IntPtr image, StreamGetBytesDelegate getBytes, StreamPutBytesDelegate putBytes, - StreamSeekDelegate doSeek, StreamCloseDelegate close, StreamSizeDelegate size, ref Guid encoderClsID, IntPtr encoderParameters ); - -#endregion - } -} diff --git a/mcs/class/System.Drawing/System.Drawing/gdipStructs.cs b/mcs/class/System.Drawing/System.Drawing/gdipStructs.cs deleted file mode 100644 index ae45de148bd..00000000000 --- a/mcs/class/System.Drawing/System.Drawing/gdipStructs.cs +++ /dev/null @@ -1,181 +0,0 @@ -// -// System.Drawing.gdipStructs.cs -// -// Author: -// Alexandre Pigolkine (pigolkine@gmx.de) -// Jordi Mas (jordi@ximian.com) -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; -using System.Runtime.InteropServices; -using System.Text; -using System.Drawing.Imaging; -using System.Drawing; - -namespace System.Drawing -{ - [StructLayout(LayoutKind.Sequential)] - internal struct GdiplusStartupInput - { - uint GdiplusVersion; - IntPtr DebugEventCallback; - int SuppressBackgroundThread; - int SuppressExternalCodecs; - - internal static GdiplusStartupInput MakeGdiplusStartupInput () - { - GdiplusStartupInput result = new GdiplusStartupInput (); - result.GdiplusVersion = 1; - result.DebugEventCallback = IntPtr.Zero; - result.SuppressBackgroundThread = 0; - result.SuppressExternalCodecs = 0; - return result; - } - } - - [StructLayout(LayoutKind.Sequential)] - internal struct GdiplusStartupOutput - { - internal IntPtr NotificationHook; - internal IntPtr NotificationUnhook; - - internal static GdiplusStartupOutput MakeGdiplusStartupOutput () - { - GdiplusStartupOutput result = new GdiplusStartupOutput (); - result.NotificationHook = result.NotificationUnhook = IntPtr.Zero; - return result; - } - } - - - [StructLayout(LayoutKind.Sequential)] - internal struct GdiColorPalette - { - internal int Flags; // Palette flags - internal int Count; // Number of color entries - } - - [StructLayout(LayoutKind.Sequential)] - internal struct GdiColorMap - { - internal int from; - internal int to; - } - - [StructLayout(LayoutKind.Sequential, CharSet=CharSet.Ansi)] - internal struct LOGFONTA - { - internal int lfHeight; - internal uint lfWidth; - internal uint lfEscapement; - internal uint lfOrientation; - internal uint lfWeight; - internal byte lfItalic; - internal byte lfUnderline; - internal byte lfStrikeOut; - internal byte lfCharSet; - internal byte lfOutPrecision; - internal byte lfClipPrecision; - internal byte lfQuality; - internal byte lfPitchAndFamily; - [MarshalAs(UnmanagedType.ByValTStr, SizeConst=32)] - internal string lfFaceName; - } - - [StructLayout(LayoutKind.Sequential, CharSet=CharSet.Unicode)] - internal struct GdipImageCodecInfo /*Size 76 bytes*/ - { - internal Guid Clsid; - internal Guid FormatID; - internal IntPtr CodecName; - internal IntPtr DllName; - internal IntPtr FormatDescription; - internal IntPtr FilenameExtension; - internal IntPtr MimeType; - internal ImageCodecFlags Flags; - internal int Version; - internal int SigCount; - internal int SigSize; - IntPtr SigPattern; - IntPtr SigMask; - - internal static void MarshalTo (GdipImageCodecInfo gdipcodec, ImageCodecInfo codec) - { - codec.CodecName = Marshal.PtrToStringUni (gdipcodec.CodecName); - codec.DllName = Marshal.PtrToStringUni (gdipcodec.DllName); - codec.FormatDescription = Marshal.PtrToStringUni (gdipcodec.FormatDescription); - codec.FilenameExtension = Marshal.PtrToStringUni (gdipcodec.FilenameExtension); - codec.MimeType = Marshal.PtrToStringUni (gdipcodec.MimeType); - codec.Clsid = gdipcodec.Clsid; - codec.FormatID = gdipcodec.FormatID; - codec.Flags = gdipcodec.Flags; - codec.Version = gdipcodec.Version; - } - } - - [StructLayout(LayoutKind.Sequential)] - internal struct GdipEncoderParameter { - internal Guid guid; - internal uint numberOfValues; - internal EncoderParameterValueType type; - internal IntPtr value; - } - - [StructLayout(LayoutKind.Sequential)] - internal struct GdipPropertyItem - { - internal int id; - internal int len; - internal short type; - internal IntPtr value; - - internal static void MarshalTo (GdipPropertyItem gdipProp, PropertyItem prop) - { - prop.Id = gdipProp.id; - prop.Len = gdipProp.len; - prop.Type = gdipProp.type; - prop.Value = new byte [gdipProp.len]; - Marshal.Copy (gdipProp.value, prop.Value, 0, gdipProp.len); - } - } - - [StructLayout(LayoutKind.Sequential)] - internal struct IconInfo - { - int fIcon; - public int xHotspot; - public int yHotspot; - IntPtr hbmMask; - IntPtr hbmColor; - - public bool IsIcon { - get { - return fIcon == 1; - } - } - } -} - diff --git a/mcs/class/System.Drawing/System.Drawing_test.dll.sources b/mcs/class/System.Drawing/System.Drawing_test.dll.sources deleted file mode 100644 index e4a51043a85..00000000000 --- a/mcs/class/System.Drawing/System.Drawing_test.dll.sources +++ /dev/null @@ -1,47 +0,0 @@ -System.Drawing/ColorTranslator.cs -System.Drawing/ColorConverter.cs -System.Drawing/TestBitmap.cs -System.Drawing/TestBrushes.cs -System.Drawing/TestColor.cs -System.Drawing/TestFont.cs -System.Drawing/TestGraphics.cs -System.Drawing/TestImage.cs -System.Drawing/TestPens.cs -System.Drawing/TestPoint.cs -System.Drawing/TestPointConverter.cs -System.Drawing/TestPointF.cs -System.Drawing/TestRectangle.cs -System.Drawing/TestRectangleConverter.cs -System.Drawing/TestRectangleF.cs -System.Drawing/TestSize.cs -System.Drawing/TestSizeConverter.cs -System.Drawing/TestSizeF.cs -System.Drawing/TestStringFormat.cs -System.Drawing/TestSystemBrushes.cs -System.Drawing/TestSystemPens.cs -System.Drawing/TestImageConverter.cs -System.Drawing/TestImageFormatConverter.cs -System.Drawing/TestIconConverter.cs -System.Drawing/TestIcon.cs -System.Drawing.Drawing2D/TestBlend.cs -System.Drawing.Drawing2D/TestColorBlend.cs -System.Drawing.Drawing2D/TestHatchBrush.cs -System.Drawing.Drawing2D/TestMatrix.cs -System.Drawing/TestRegion.cs -System.Drawing.Imaging/TestImageCodecInfo.cs -System.Drawing.Imaging/TestBmpCodec.cs -System.Drawing.Imaging/TestJpegCodec.cs -System.Drawing.Imaging/TestColorMatrix.cs -System.Drawing.Imaging/TestImageAttributes.cs -System.Drawing.Printing/PrintingPermissionAttributeTest.cs -System.Drawing.Printing/PrintingPermissionTest.cs -System.Drawing/BitmapCas.cs -System.Drawing/GraphicsCas.cs -System.Drawing.Design/CategoryNameCollectionCas.cs -System.Drawing.Design/PaintValueEventArgsCas.cs -System.Drawing.Design/PropertyValueUIItemCas.cs -System.Drawing.Design/ToolboxComponentsCreatedEventArgsCas.cs -System.Drawing.Design/ToolboxComponentsCreatingEventArgsCas.cs -System.Drawing.Design/ToolboxItemCas.cs -System.Drawing.Design/ToolboxItemCollectionCas.cs -System.Drawing.Design/UITypeEditorCas.cs diff --git a/mcs/class/System.Drawing/Test/ChangeLog b/mcs/class/System.Drawing/Test/ChangeLog deleted file mode 100644 index 23dd6ba37d7..00000000000 --- a/mcs/class/System.Drawing/Test/ChangeLog +++ /dev/null @@ -1,28 +0,0 @@ -2005-09-06 Boris Kirzner - - * Test.dotnet.csproj, Test.vmwcsproj: Added GraphicsPathIterator.cs. - -2005-08-16 Andrew Skiba - - * Test.dotnet.csproj, Test.vmwcsproj: Embed Bitmap1.png, add Bitmap1.bmp - -2005-08-10 Boris Kirzner - * Test.dotnet.csproj, Test.vmwcsproj: Added GraphicsPath.cs. - -2005-08-09 Andrew Skiba - - * Test.dotnet.csproj, Test.vmcsproj: add ColorConverter.cs and ColorTranslator.cs - -2005-08-08 Andrew Skiba - * Test.dotnet.csproj, Test.vmcsproj: move these projects from DrawingTest/Test and include Mono tests in addition to Mainsoft tests. - -2004-03-17 Ravindra - * System.Drawing.Drawing2D: Created repository for tests of - this namespace. - * System.Drawing.Imaging: Created repository for tests of - this namespace. - * System.Drawing.Printing: Created repository for tests of - this namespace. - * System.Drawing.Text: Created repository for tests of this - namespace. - * ChangeLog: Added. diff --git a/mcs/class/System.Drawing/Test/DrawingTest/ChangeLog b/mcs/class/System.Drawing/Test/DrawingTest/ChangeLog deleted file mode 100644 index 786c4d865ac..00000000000 --- a/mcs/class/System.Drawing/Test/DrawingTest/ChangeLog +++ /dev/null @@ -1,20 +0,0 @@ -2005-08-08 Andrew Skiba - - * System.Drawing.Test.dotnet.sln, System.Drawing.Test.sln: move projects to the parent dir - so it's easy to include Mono tests - -2005-08-04 Andrew Skiba - - * Test/Test.dotnet.csproj, System.Drawing.Test.dotnet.sln, - DrawingTestHelper/DrawingTestHelper.csproj: Project builds on dotnet - -2005-08-04 Andrew Skiba - - * Test/Test.vmwcsproj, Test/Test.dotnet.csproj, System.Drawing.Test.dotnet.sln, - Exocortex.DSP/src/Exocortex.DSP.v1.J2EE.vmwcsproj, System.Drawing.Test.sln, - DrawingTestHelper/DrawingTestHelper_java.vmwcsproj, - DrawingTestHelper/DrawingTestHelper.csproj: Projects builds on GH - -2005-08-04 Andrew Skiba - - Initial commit diff --git a/mcs/class/System.Drawing/Test/DrawingTest/DrawingTestHelper/AssemblyInfo.cs b/mcs/class/System.Drawing/Test/DrawingTest/DrawingTestHelper/AssemblyInfo.cs deleted file mode 100644 index 177a4f0e70a..00000000000 --- a/mcs/class/System.Drawing/Test/DrawingTest/DrawingTestHelper/AssemblyInfo.cs +++ /dev/null @@ -1,58 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; - -// -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -// -[assembly: AssemblyTitle("")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("")] -[assembly: AssemblyCopyright("")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: - -[assembly: AssemblyVersion("1.0.*")] - -// -// In order to sign your assembly you must specify a key to use. Refer to the -// Microsoft .NET Framework documentation for more information on assembly signing. -// -// Use the attributes below to control which key is used for signing. -// -// Notes: -// (*) If no key is specified, the assembly is not signed. -// (*) KeyName refers to a key that has been installed in the Crypto Service -// Provider (CSP) on your machine. KeyFile refers to a file which contains -// a key. -// (*) If the KeyFile and the KeyName values are both specified, the -// following processing occurs: -// (1) If the KeyName can be found in the CSP, that key is used. -// (2) If the KeyName does not exist and the KeyFile does exist, the key -// in the KeyFile is installed into the CSP and used. -// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility. -// When specifying the KeyFile, the location of the KeyFile should be -// relative to the project output directory which is -// %Project Directory%\obj\. For example, if your KeyFile is -// located in the project directory, you would specify the AssemblyKeyFile -// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")] -// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework -// documentation for more information on this. -// -[assembly: AssemblyDelaySign(false)] -[assembly: AssemblyKeyFile("")] -[assembly: AssemblyKeyName("")] diff --git a/mcs/class/System.Drawing/Test/DrawingTest/DrawingTestHelper/ChangeLog b/mcs/class/System.Drawing/Test/DrawingTest/DrawingTestHelper/ChangeLog deleted file mode 100644 index f162ebb2e61..00000000000 --- a/mcs/class/System.Drawing/Test/DrawingTest/DrawingTestHelper/ChangeLog +++ /dev/null @@ -1,29 +0,0 @@ -2005-09-20 Vladimir Krasnov - - * DrawingTest.cs: Added Pixel Distance comparer PDCompare() - * Added PDComparer.cs - -2005-09-06 Boris Kirzner - - * DrawingTest.cs: bug fix. - -2005-08-16 Vladimir Krasnov - - * DrawingTest.cs: Added special tolerance feature - fixed compare() - fixed constructor - -2005-08-16 Vladimir Krasnov - - * DrawingTest.cs: fixed JavaDrawingTest.CalculateSHA1() - -2005-08-08 Andrew Skiba - - * DrawingTestHelper.cs: fix ambiguity between System.Math and java.lang.Math - -2005-08-07 Andrew Skiba - - * DrawingTest.cs: add nunit assert to Compare functions - * DrawingTestHelper_java.vmwcsproj, DrawingTestHelper.csproj: add nunit.framework - reference - diff --git a/mcs/class/System.Drawing/Test/DrawingTest/DrawingTestHelper/DrawingTest.cs b/mcs/class/System.Drawing/Test/DrawingTest/DrawingTestHelper/DrawingTest.cs deleted file mode 100644 index f5504625c92..00000000000 --- a/mcs/class/System.Drawing/Test/DrawingTest/DrawingTestHelper/DrawingTest.cs +++ /dev/null @@ -1,652 +0,0 @@ -using System; -using System.Drawing; -using System.Diagnostics; -using System.IO; -using System.Text; -using Exocortex.DSP; -using System.Reflection; -using System.Xml.Serialization; -using System.Collections; -using System.Security.Cryptography; - -#if TARGET_JVM -using awt = java.awt; -using javax.imageio; -using java.lang; -using java.security; -using java.awt.image; -#else -using System.Windows.Forms; -using System.Drawing.Imaging; -using System.Runtime.InteropServices; -#endif - -using NUnit.Framework; - -namespace DrawingTestHelper -{ - #region Results serialization classes - public sealed class ExpectedResult { - public ExpectedResult(){} - public ExpectedResult(string testName, double norm) { - TestName = testName; - Norm = norm; - } - public string TestName; - public double Norm; - } - - public sealed class ExpectedResults { - [XmlArrayItem(typeof(ExpectedResult))] - public ArrayList Tests = new ArrayList(); - } - - public sealed class ExpectedResultsHash { - Hashtable _hash; - ExpectedResults _suite; - - public ExpectedResultsHash () { - try { - using (StreamReader s = new StreamReader (FileName)) { - _suite = (ExpectedResults)TestSuiteSerializer.Deserialize(s); - } - } - catch { - _suite = new ExpectedResults (); - } - _hash = new Hashtable(_suite.Tests.Count); - foreach (ExpectedResult res in _suite.Tests) - _hash[res.TestName] = res.Norm; - } - - public const string FileName = "ExpectedResults.xml"; - public readonly static XmlSerializer TestSuiteSerializer = new XmlSerializer(typeof(ExpectedResults)); - - public double GetNorm(string testName) { - object res = _hash[testName]; - if (res != null) - return (double)res; - return double.NaN; - } - - public void WriteNorm (string testName, double myNorm) { - if (_hash.Contains (testName)) { - for (int i = 0; i < _suite.Tests.Count; i++) { - ExpectedResult cur = (ExpectedResult) _suite.Tests[i]; - if (cur.TestName == testName) { - cur.Norm = myNorm; - break; - } - } - } - else - _suite.Tests.Add(new ExpectedResult(testName, myNorm)); - - _hash[testName] = myNorm; - using(StreamWriter w = new StreamWriter(FileName)) - TestSuiteSerializer.Serialize(w, _suite); - } - } - - public sealed class CachedResult { - public CachedResult (){} - public CachedResult (string testName, string sha1, double norm) { - TestName = testName; - SHA1 = sha1; - Norm = norm; - DateTime = DateTime.Now; - } - - public string TestName; - public string SHA1; - public double Norm; - public DateTime DateTime; - } - - public sealed class CachedResults { - [XmlArrayItem(typeof(CachedResult))] - public ArrayList Tests = new ArrayList(); - } - - public class Cache { - Hashtable _hash; - CachedResults _results; - -#if TARGET_JVM - public const string FileName = "CachedResults.xml"; - public const string NewFileName = "NewCachedResults.xml"; -#else - public const string FileName = "dotnet.CachedResults.xml"; - public const string NewFileName = "dotnet.NewCachedResults.xml"; -#endif - public readonly static XmlSerializer TestSuiteSerializer = - new XmlSerializer(typeof(CachedResults)); - - public Cache () { - try { - using (StreamReader r = new StreamReader(FileName)) - _results = (CachedResults)TestSuiteSerializer.Deserialize(r); - } - catch { - _results = new CachedResults (); - } - - _hash = new Hashtable(_results.Tests.Count); - foreach (CachedResult res in _results.Tests) - _hash[res.SHA1] = res.Norm; - } - - public double GetNorm (string sha1) { - if (_hash.ContainsKey (sha1)) - return (double)_hash[sha1]; - else - return double.NaN; - } - - public void Add (string testName, string sha1, double norm) { - if (_hash.ContainsKey (sha1)) - throw new ArgumentException ("This SHA1 is already in the cache", "sha1"); - - _results.Tests.Add (new CachedResult(testName, sha1, norm)); - _hash.Add (sha1, norm); - - using(StreamWriter w = new StreamWriter(NewFileName)) - TestSuiteSerializer.Serialize(w, _results); - } - } - #endregion - - /// - /// Summary description for DrawingTest. - /// - public abstract class DrawingTest { - - public const float DEFAULT_FLOAT_TOLERANCE = 1e-5f; - public const int DEFAULT_IMAGE_TOLERANCE = 2; - - Graphics _graphics; - protected Bitmap _bitmap; - static string _callingFunction; - //static int _counter; - static Hashtable _mpFuncCount = new Hashtable(); - static bool _showForms = false; - static bool _createResults = true; - protected string _ownerClass = ""; - protected Hashtable _specialTolerance = null; - - protected readonly static ExpectedResultsHash ExpectedResults = new ExpectedResultsHash (); - protected readonly static Cache cache = new Cache (); - - public Graphics Graphics {get {return _graphics;}} - public Bitmap Bitmap {get { return _bitmap; }} - - public Hashtable SpecialTolerance - { - get {return _specialTolerance;} - set {_specialTolerance = value;} - } - - public string OwnerClass - { - get {return _ownerClass;} - set {_ownerClass = value;} - } - - public static bool ShowForms - { - get {return _showForms;} - set {_showForms = value;} - } - - public static bool CreateResults { - get {return _createResults;} - set {_createResults = value;} - } - - protected DrawingTest() {} - - private void Init (int width, int height) { - Init (new Bitmap (width, height)); - } - - private void Init (Bitmap bitmap) { - _bitmap = bitmap; - _graphics = Graphics.FromImage (_bitmap); - } - - protected abstract string DetermineCallingFunction (); - - protected interface IMyForm { - void Show (); - } - - protected abstract IMyForm CreateForm (string title); - - public void Show () { - CheckCounter (); - if (!ShowForms) - return; - IMyForm form = CreateForm(_callingFunction + _mpFuncCount[_callingFunction]); - form.Show (); - } - - static protected string TestName { - get { - return _callingFunction + ":" + _mpFuncCount[_callingFunction]/* + ".dat"*/; - } - } - - #region GetImageFFTArray - private static ComplexF[] GetImageFFTArray(Bitmap bitmap) { - float scale = 1F / (float) System.Math.Sqrt(bitmap.Width * bitmap.Height); - ComplexF[] data = new ComplexF [bitmap.Width * bitmap.Height * 4]; - - int offset = 0; - for( int y = 0; y < bitmap.Height; y ++ ) - for( int x = 0; x < bitmap.Width; x ++ ) { - Color c = bitmap.GetPixel (x, y); - float s = 1F; - if( (( x + y ) & 0x1 ) != 0 ) { - s = -1F; - } - - data [offset++] = new ComplexF( c.A * s / 256F, 0); - data [offset++] = new ComplexF( c.R * s / -256F, 0); - data [offset++] = new ComplexF( c.G * s / 256F, 0); - data [offset++] = new ComplexF( c.B * s / -256F, 0); - } - - - Fourier.FFT3( data, 4, bitmap.Width, bitmap.Height, FourierDirection.Forward ); - - for( int i = 0; i < data.Length; i ++ ) { - data[i] *= scale; - } - - return data; - } - #endregion - - abstract public string CalculateSHA1 (); - - public static double CalculateNorm (Bitmap bitmap) { - ComplexF[] matrix = GetImageFFTArray(bitmap); - - double norm = 0; - int size_x = 4; //ARGB values - int size_y = bitmap.Width; - int size_z = bitmap.Height; - for (int x=1; x<=size_x; x++) { - double norm_y = 0; - for (int y=1; y<=size_y; y++) { - double norm_z = 0; - for (int z=1; z<=size_z; z++) { - ComplexF cur = matrix[(size_x-x)+size_x*(size_y-y)+size_x*size_y*(size_z-z)]; - norm_z += cur.GetModulusSquared ();// * z; - } - norm_y += norm_z;// * y; - } - norm += norm_y;// * x; - } - return norm; - } - - public double GetNorm () { - string sha1 = CalculateSHA1 (); - - double norm = cache.GetNorm (sha1); - if (double.IsNaN (norm)) { - norm = CalculateNorm (_bitmap); - cache.Add (TestName, sha1, norm); - //_bitmap.Save(TestName.Replace(":", "_")); - } - return norm; - } - - protected abstract double GetExpectedNorm (double myNorm); - - private void CheckCounter () { - string callFunc = DetermineCallingFunction (); - _callingFunction = callFunc; - if (!_mpFuncCount.Contains(_callingFunction)) { - - _mpFuncCount[_callingFunction] = 1; - } - else { - int counter = (int)_mpFuncCount[_callingFunction]; - counter ++; - _mpFuncCount[_callingFunction] = counter; - } - } - - public static void AssertAlmostEqual (float expected, float actual) - { - AssertAlmostEqual (expected, actual, DEFAULT_FLOAT_TOLERANCE); - } - - public static void AssertAlmostEqual (float expected, float actual, float tolerance) - { - string msg = String.Format("\nExpected : {0} \nActual : {1}",expected.ToString(),actual.ToString()); - AssertAlmostEqual (expected, actual, tolerance, msg); - } - - private static void AssertAlmostEqual (float expected, float actual, float tolerance, string message) - { - float error = System.Math.Abs ((expected - actual) / (expected + actual + float.Epsilon)); - Assert.IsTrue (error < tolerance, message); - } - - public static void AssertAlmostEqual (PointF expected, PointF actual) - { - string msg = String.Format("\nExpected : {0} \n Actual : {1}",expected.ToString(),actual.ToString()); - AssertAlmostEqual (expected.X, actual.X, DEFAULT_FLOAT_TOLERANCE, msg); - AssertAlmostEqual (expected.Y, actual.Y, DEFAULT_FLOAT_TOLERANCE, msg); - } - - /// - /// Checks that the given bitmap norm is similar to expected - /// - /// tolerance in percents (0..100) - /// - /// - public bool Compare (double tolerance) { - CheckCounter (); - - double error = CompareToExpectedInternal()*100; - - if (SpecialTolerance != null) - return error <= GetSpecialTolerance(TestName); - - return error <= tolerance; - } - - public bool PDCompare (double tolerance) { - Bitmap ri = GetReferenceImage(TestName); - if (ri == null) - return true; - - double error = PDComparer.Compare(ri, _bitmap); - return error <= tolerance; - } - - public bool Compare () { - CheckCounter (); - - double error = CompareToExpectedInternal()*100; - - if (SpecialTolerance != null) - return error <= GetSpecialTolerance(TestName); - - return error <= DEFAULT_IMAGE_TOLERANCE; - } - - public bool PDCompare () { - Bitmap ri = GetReferenceImage(TestName); - if (ri == null) - return true; - - double error = PDComparer.Compare(ri, _bitmap); - return error <= DEFAULT_IMAGE_TOLERANCE; - } - - protected abstract Bitmap GetReferenceImage(string testName); - - protected double GetSpecialTolerance(string testName) { - try { - string shortTestName = testName.Substring( testName.LastIndexOf(".") + 1 ); - object o = SpecialTolerance[shortTestName]; - if (o == null) - return DEFAULT_IMAGE_TOLERANCE; - - return Convert.ToDouble(o); - } - catch (System.Exception) { - return DEFAULT_IMAGE_TOLERANCE; - } - } - - public void AssertCompare () { - CheckCounter (); - Assert.IsTrue ((CompareToExpectedInternal () * 100) < DEFAULT_IMAGE_TOLERANCE); - } - - public void AssertCompare (double tolerance) { - CheckCounter (); - Assert.IsTrue ((CompareToExpectedInternal () * 100) < tolerance); - } - - public double CompareToExpected () { - CheckCounter (); - return CompareToExpectedInternal (); - } - - double CompareToExpectedInternal () { - if (ShowForms) - return 0; - - double norm = GetNorm (); - double expNorm = GetExpectedNorm (norm); - return System.Math.Abs (norm-expNorm)/(norm+expNorm+double.Epsilon); - } - - public static DrawingTest Create (int width, int height) { - return Create(width, height, "GraphicsFixture"); - } - public static DrawingTest Create (int width, int height, string ownerClass) { - DrawingTest test; -#if TARGET_JVM - test = new JavaDrawingTest (); -#else - test = new NetDrawingTest (); -#endif - test.Init (width, height); - test.OwnerClass = ownerClass; - return test; - } - } - -#if TARGET_JVM - internal class JavaDrawingTest:DrawingTest { - java.awt.image.BufferedImage _image; - java.awt.image.BufferedImage Image { - get { - if (_image != null) - return _image; - Type imageType = typeof (Bitmap); - PropertyInfo [] props = imageType.GetProperties ( - BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly); - - PropertyInfo prop = null; - foreach (PropertyInfo p in props) { - if (p.Name == "NativeObject") - if (p.PropertyType == typeof(java.awt.image.BufferedImage)) - prop = p; - } - - MethodInfo method = prop.GetGetMethod (true); - _image = (java.awt.image.BufferedImage) method.Invoke (_bitmap, new object [0]); - return _image; - } - } - - public JavaDrawingTest () {} - - protected override double GetExpectedNorm (double myNorm) { - return ExpectedResults.GetNorm(TestName); - } - - protected override Bitmap GetReferenceImage(string testName) { - try{ - string dotNetResultsFolder = @"..\Debug\"; - string fileName = dotNetResultsFolder + testName.Replace(":", "_") + ".png"; - return new Bitmap(fileName); - } - catch(System.Exception e) { - throw new System.Exception("Error creating .Net reference image"); - } - } - - private class JavaForm:java.awt.Dialog,IMyForm { - class EventListener : java.awt.@event.WindowListener { - #region WindowListener Members - - public void windowOpened(java.awt.@event.WindowEvent arg_0) { - // TODO: Add ttt.windowOpened implementation - } - - public void windowActivated(java.awt.@event.WindowEvent arg_0) { - // TODO: Add ttt.windowActivated implementation - } - - public void windowClosed(java.awt.@event.WindowEvent arg_0) { - // TODO: Add ttt.windowClosed implementation - } - - public void windowDeiconified(java.awt.@event.WindowEvent arg_0) { - // TODO: Add ttt.windowDeiconified implementation - } - - public void windowIconified(java.awt.@event.WindowEvent arg_0) { - // TODO: Add ttt.windowIconified implementation - } - - public void windowClosing(java.awt.@event.WindowEvent arg_0) { - // TODO: Add ttt.windowClosing implementation - java.awt.Window w = arg_0.getWindow(); - java.awt.Window par = w.getOwner (); - w.dispose(); - par.dispose (); - } - - public void windowDeactivated(java.awt.@event.WindowEvent arg_0) { - // TODO: Add ttt.windowDeactivated implementation - } - - #endregion - } - - java.awt.Image _image; - Size _s; - - public JavaForm (string title, java.awt.Image anImage, Size s) - : base(new java.awt.Frame(), title, true) { - _image = anImage; - _s = s; - - addWindowListener(new EventListener()); - } - public override void paint (java.awt.Graphics g) { - base.paint (g); - awt.Insets insets = this.getInsets (); - g.drawImage (_image, insets.left, insets.top, null); - } - void IMyForm.Show () { - awt.Insets insets = this.getInsets (); - base.setSize (_s.Width + insets.left + insets.right, - _s.Width + insets.top + insets.bottom); - this.show (); - //save the image - //ImageIO.write((java.awt.image.RenderedImage)_image, "png", new java.io.File("test.java.png")); - } - } - - protected override IMyForm CreateForm(string title) { - return new JavaForm (title, Image, _bitmap.Size); - } - - protected override string DetermineCallingFunction() { - System.Exception e = new System.Exception (); - java.lang.Class c = vmw.common.TypeUtils.ToClass (e); - java.lang.reflect.Method m = c.getMethod ("getStackTrace", - new java.lang.Class [0]); - java.lang.StackTraceElement [] els = (java.lang.StackTraceElement []) - m.invoke (e, new object [0]); - java.lang.StackTraceElement el = els [4]; - return el.getClassName () + "." + _ownerClass + "." + el.getMethodName (); - } - - public override string CalculateSHA1() { - MessageDigest md = MessageDigest.getInstance ("SHA"); - DataBufferInt dbi = (DataBufferInt) Image.getRaster ().getDataBuffer (); - for (int i=0; i>8) & 0xFF)); - md.update ((sbyte) ((x>>16) & 0xFF)); - md.update ((sbyte) ((x>>24) & 0xFF)); - } - } - byte [] resdata = (byte[])vmw.common.TypeUtils.ToByteArray(md.digest()); - return Convert.ToBase64String (resdata); - } - } -#else - internal class NetDrawingTest:DrawingTest { - public NetDrawingTest () {} - - protected override double GetExpectedNorm (double myNorm) { - if (CreateResults) - ExpectedResults.WriteNorm (TestName, myNorm); - - return myNorm; - } - - protected override Bitmap GetReferenceImage(string testName) { - try{ - string fileName = testName.Replace(":", "_") + ".png"; - _bitmap.Save( fileName ); - return null; - } - catch(System.Exception e) { - throw new System.Exception("Error creating .Net reference image"); - } - } - - private class NetForm:Form,IMyForm { - Image image; - public NetForm(string title, Image anImage):base() { - base.Text = title; - image = anImage; - } - protected override void OnPaint(PaintEventArgs e) { - e.Graphics.DrawImageUnscaled (image, 0, 0); - } - void IMyForm.Show () { - this.Size = image.Size; - this.ShowDialog (); - this.image.Save("test.net.png"); - } - } - protected override IMyForm CreateForm(string title) { - return new NetForm (title, _bitmap); - } - - protected override string DetermineCallingFunction() { - StackFrame sf = new StackFrame (3, true); - MethodBase mb = sf.GetMethod (); - - string name = mb.DeclaringType.FullName + "." + _ownerClass + "." + mb.Name; - return name; - } - - public override string CalculateSHA1() { - Rectangle r = new Rectangle(0, 0, _bitmap.Width, _bitmap.Height); - - BitmapData data = _bitmap.LockBits (r, ImageLockMode.ReadOnly, - _bitmap.PixelFormat); - int dataSize = data.Stride * data.Height; - byte [] bdata = new byte [dataSize]; - Marshal.Copy (data.Scan0, bdata, 0, dataSize); - _bitmap.UnlockBits (data); - - SHA1 sha1 = new SHA1CryptoServiceProvider (); - byte [] resdata = sha1.ComputeHash (bdata); - return Convert.ToBase64String (resdata); - } - - } -#endif - -} diff --git a/mcs/class/System.Drawing/Test/DrawingTest/DrawingTestHelper/DrawingTestHelper.csproj b/mcs/class/System.Drawing/Test/DrawingTest/DrawingTestHelper/DrawingTestHelper.csproj deleted file mode 100644 index ad091ca114e..00000000000 --- a/mcs/class/System.Drawing/Test/DrawingTest/DrawingTestHelper/DrawingTestHelper.csproj +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/mcs/class/System.Drawing/Test/DrawingTest/DrawingTestHelper/DrawingTestHelper_java.vmwcsproj b/mcs/class/System.Drawing/Test/DrawingTest/DrawingTestHelper/DrawingTestHelper_java.vmwcsproj deleted file mode 100644 index 2bce100e959..00000000000 --- a/mcs/class/System.Drawing/Test/DrawingTest/DrawingTestHelper/DrawingTestHelper_java.vmwcsproj +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/mcs/class/System.Drawing/Test/DrawingTest/DrawingTestHelper/Makefile b/mcs/class/System.Drawing/Test/DrawingTest/DrawingTestHelper/Makefile deleted file mode 100644 index dd4551c6398..00000000000 --- a/mcs/class/System.Drawing/Test/DrawingTest/DrawingTestHelper/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -MCS=mcs -sources=AssemblyInfo.cs DrawingTest.cs -EXOCORTEX=Exocortex.DSP.dll - -DrawingTestHelper.dll: $(sources) $(EXOCORTEX) - $(MCS) -t:library $(sources) -r:System.Windows.Forms -r:System.Drawing -r:$(EXOCORTEX) -r:nunit.framework -out:DrawingTestHelper.dll - -$(EXOCORTEX): - cd ../Exocortex.DSP/ && make - cp ../Exocortex.DSP/*.dll . diff --git a/mcs/class/System.Drawing/Test/DrawingTest/DrawingTestHelper/PDComparer.cs b/mcs/class/System.Drawing/Test/DrawingTest/DrawingTestHelper/PDComparer.cs deleted file mode 100644 index 689a1298f49..00000000000 --- a/mcs/class/System.Drawing/Test/DrawingTest/DrawingTestHelper/PDComparer.cs +++ /dev/null @@ -1,109 +0,0 @@ -using System; -using System.Drawing; -using System.Collections; - -namespace DrawingTestHelper -{ - /// - /// Summary description for PDComparer. - /// - public class PDComparer - { - static int SearchRectSize = 10; - static double [,] ltDistances = new double[SearchRectSize,SearchRectSize]; - - - static PDComparer() - { - for (int x = 0; x < SearchRectSize; x++) - for (int y = 0; y < SearchRectSize; y++) - { - ltDistances[x,y] = Math.Sqrt(x*x + y*y); - } - } - - public PDComparer() - { - } - - public static double Compare(Bitmap b1, Bitmap b2) - { - Point [] shapePoints = GetPointFromImage(b1); - double [] pointsDistance = new double[ shapePoints.Length ]; - - for (int i = 0; i < shapePoints.Length; i++) - { - pointsDistance[i] = DistanceToClosestPoint( shapePoints[i], b2 ); - } - - return Max( pointsDistance ); - } - - private static double DistanceToClosestPoint(Point p, Bitmap b) - { - if (IsPixelExist( b.GetPixel(p.X, p.Y) )) - return 0; - - Rectangle r = new Rectangle( - p.X - SearchRectSize / 2, - p.Y - SearchRectSize / 2, - SearchRectSize, - SearchRectSize); - - double min_distance = SearchRectSize; - - for (int x = r.X; x < r.X + SearchRectSize; x++) - for (int y = r.Y; y < r.Y + SearchRectSize; y++) - if ((x < b.Width) && (y < b.Height) && (x >= 0) && (y >= 0)) - { - if ( IsPixelExist( b.GetPixel(x, y) ) ) - { - double d = CalculateDistance(p.X, p.Y, x, y); - if (d < min_distance) - min_distance = d; - } - } - - return min_distance; - } - - private static double CalculateDistance(Point a, Point b) - { - return CalculateDistance(a.X, a.Y, b.X, b.Y); - } - - private static double CalculateDistance(int x1, int y1, int x2, int y2) - { - int delta_x = Math.Abs(x2 - x1); - int delta_y = Math.Abs(y2 - y1); - return ltDistances[delta_x, delta_y]; - } - - private static double Max(double [] a) - { - double max = 0; - - for (int i = 0; i < a.Length; i++) - if (a[i] > max) - max = a[i]; - return max; - } - - private static Point [] GetPointFromImage(Bitmap b) - { - ArrayList points = new ArrayList(); - - for(int x = 0; x < b.Width; x++) - for(int y = 0; y < b.Height; y++) - if (IsPixelExist ( b.GetPixel(x, y) )) - points.Add( new Point(x, y) ); - - return (Point [])points.ToArray( typeof(Point) ); - } - - private static bool IsPixelExist(Color c) - { - return c.A > 0; - } - } -} diff --git a/mcs/class/System.Drawing/Test/DrawingTest/Exocortex.DSP/Makefile b/mcs/class/System.Drawing/Test/DrawingTest/Exocortex.DSP/Makefile deleted file mode 100644 index d2a62000721..00000000000 --- a/mcs/class/System.Drawing/Test/DrawingTest/Exocortex.DSP/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -MCS=mcs -sources=src/AssemblyInfo.cs src/Complex.cs src/ComplexArray.cs src/ComplexF.cs src/ComplexMath.cs src/ComplexStats.cs src/Fourier.cs src/FourierDirection.cs - -.SUFFIXES: .cs .exe .dll - -all: Exocortex.DSP.dll - -Exocortex.DSP.dll: $(sources) - $(MCS) -t:library $(sources) -out:Exocortex.DSP.dll - diff --git a/mcs/class/System.Drawing/Test/DrawingTest/Exocortex.DSP/doc/Exocortex.DSP.xml b/mcs/class/System.Drawing/Test/DrawingTest/Exocortex.DSP/doc/Exocortex.DSP.xml deleted file mode 100644 index 71e0cf22a6c..00000000000 --- a/mcs/class/System.Drawing/Test/DrawingTest/Exocortex.DSP/doc/Exocortex.DSP.xml +++ /dev/null @@ -1,1124 +0,0 @@ - - - - Exocortex.DSP.v1 - - - - -

A double-precision complex number representation.

-
-
- - - The real component of the complex number - - - - - The imaginary component of the complex number - - - - - Create a complex number from a real and an imaginary component - - - - - - - Create a complex number based on an existing complex number - - - - - - Create a complex number from a real and an imaginary component - - - - - - - - Create a complex number from a modulus (length) and an argument (radian) - - - - - - - - Clone the complex number - - - - - - The modulus (length) of the complex number - - - - - - The squared modulus (length^2) of the complex number - - - - - - The argument (radians) of the complex number - - - - - - Get the conjugate of the complex number - - - - - - Scale the complex number to 1. - - - - - Convert to a from double precision complex number to a single precison complex number - - - - - - - Convert from a single precision real number to a complex number - - - - - - - Convert from a single precision complex to a real number - - - - - - - Are these two complex numbers equivalent? - - - - - - - - Are these two complex numbers different? - - - - - - - - Get the hash code of the complex number - - - - - - Is this complex number equivalent to another object? - - - - - - - Compare to other complex numbers or real numbers - - - - - - - This operator doesn't do much. :-) - - - - - - - Negate the complex number - - - - - - - Add a complex number to a real - - - - - - - - Add a real to a complex number - - - - - - - - Add to complex numbers - - - - - - - - Subtract a real from a complex number - - - - - - - - Subtract a complex number from a real - - - - - - - - Subtract two complex numbers - - - - - - - - Multiply a complex number by a real - - - - - - - - Multiply a real by a complex number - - - - - - - - Multiply two complex numbers together - - - - - - - - Divide a complex number by a real number - - - - - - - - Divide a complex number by a complex number - - - - - - - - Parse a complex representation in this fashion: "( %f, %f )" - - - - - - - Get the string representation - - - - - - Determine whether two complex numbers are almost (i.e. within the tolerance) equivalent. - - - - - - - - - Represents zero - - - - - Represents the result of sqrt( -1 ) - - - - - Represents the largest possible value of Complex. - - - - - Represents the smallest possible value of Complex. - - - - -

A set of array utilities for complex number arrays

-
-
- - - Clamp length (modulus) of the elements in the complex array - - - - - - - - Clamp elements in the complex array to range [minimum,maximum] - - - - - - - - Clamp elements in the complex array to real unit range (i.e. [0,1]) - - - - - - Shift (offset) the elements in the array - - - - - - - Shift (offset) the elements in the array - - - - - - - Get the range of element lengths - - - - - - - - Get the range of element lengths - - - - - - - - Determine whether the elements in the two arrays are the same - - - - - - - - - Determine whether the elements in the two arrays are the same - - - - - - - - - Add a specific value to each element in the array - - - - - - - Add a specific value to each element in the array - - - - - - - Add a specific value to each element in the array - - - - - - - Add a specific value to each element in the array - - - - - - - Multiply each element in the array by a specific value - - - - - - - Multiply each element in the array by a specific value - - - - - - - - - Multiply each element in the array by a specific value - - - - - - - Multiply each element in the array by a specific value - - - - - - - - - Multiply each element in the array by a specific value - - - - - - - Multiply each element in the array by a specific value - - - - - - - - - Multiply each element in the array by a specific value - - - - - - - Multiply each element in the array by a specific value - - - - - - - - - Multiply each element in target array with corresponding element in rhs array - - - - - - - Multiply each element in lhs array with corresponding element in rhs array and - put product in result array - - - - - - - - Multiply each element in target array with corresponding element in rhs array - - - - - - - Multiply each element in lhs array with corresponding element in rhs array and - put product in result array - - - - - - - - Divide each element in target array with corresponding element in rhs array - - - - - - - Divide each element in lhs array with corresponding element in rhs array and - put product in result array - - - - - - - - Divide each element in target array with corresponding element in rhs array - - - - - - - Divide each element in lhs array with corresponding element in rhs array and - put product in result array - - - - - - - - Copy an array - - - - - - - Copy an array - - - - - - - Reverse the elements in the array - - - - - - Scale and offset the elements in the array so that the - overall range is [0, 1] - - - - - - Scale and offset the elements in the array so that the - overall range is [0, 1] - - - - - - Invert each element in the array - - - - - - Invert each element in the array - - - - - -

A single-precision complex number representation.

-
-
- - - The real component of the complex number - - - - - The imaginary component of the complex number - - - - - Create a complex number from a real and an imaginary component - - - - - - - Create a complex number based on an existing complex number - - - - - - Create a complex number from a real and an imaginary component - - - - - - - - Create a complex number from a modulus (length) and an argument (radian) - - - - - - - - Clone the complex number - - - - - - The modulus (length) of the complex number - - - - - - The squared modulus (length^2) of the complex number - - - - - - The argument (radians) of the complex number - - - - - - Get the conjugate of the complex number - - - - - - Scale the complex number to 1. - - - - - Convert to a from double precision complex number to a single precison complex number - - - - - - - Convert from a single precision real number to a complex number - - - - - - - Convert from a single precision complex to a real number - - - - - - - Are these two complex numbers equivalent? - - - - - - - - Are these two complex numbers different? - - - - - - - - Get the hash code of the complex number - - - - - - Is this complex number equivalent to another object? - - - - - - - Compare to other complex numbers or real numbers - - - - - - - This operator doesn't do much. :-) - - - - - - - Negate the complex number - - - - - - - Add a complex number to a real - - - - - - - - Add a real to a complex number - - - - - - - - Add to complex numbers - - - - - - - - Subtract a real from a complex number - - - - - - - - Subtract a complex number from a real - - - - - - - - Subtract two complex numbers - - - - - - - - Multiply a complex number by a real - - - - - - - - Multiply a real by a complex number - - - - - - - - Multiply two complex numbers together - - - - - - - - Divide a complex number by a real number - - - - - - - - Divide a complex number by a complex number - - - - - - - - Parse a complex representation in this fashion: "( %f, %f )" - - - - - - - Get the string representation - - - - - - Determine whether two complex numbers are almost (i.e. within the tolerance) equivalent. - - - - - - - - - Represents zero - - - - - Represents the result of sqrt( -1 ) - - - - - Represents the largest possible value of ComplexF. - - - - - Represents the smallest possible value of ComplexF. - - - - -

Various mathematical functions for complex numbers.

-
-
- - - Swap two complex numbers - - - - - - - Swap two complex numbers - - - - - - - Calculate the square root of a complex number - - - - - - - Calculate the square root of a complex number - - - - - - - Calculate the power of a complex number - - - - - - - - Calculate the power of a complex number - - - - - - - -

A set of statistical utilities for complex number arrays

-
-
- - - Calculate the sum - - - - - - - Calculate the sum - - - - - - - Calculate the sum of squares - - - - - - - Calculate the sum of squares - - - - - - - Calculate the mean (average) - - - - - - - Calculate the mean (average) - - - - - - - Calculate the variance - - - - - - - Calculate the variance - - - - - - - Calculate the standard deviation - - - - - - - Calculate the standard deviation - - - - - - - Calculate the root mean squared (RMS) error between two sets of data. - - - - - - - - Calculate the root mean squared (RMS) error between two sets of data. - - - - - - - -

Static functions for doing various Fourier Operations.

-
-
- - - Compute a 1D fast Fourier transform of a dataset of complex numbers (as pairs of float's). - - - - - - - - Compute a 1D fast Fourier transform of a dataset of complex numbers (as pairs of float's). - - - - - - - - Compute a 1D fast Fourier transform of a dataset of complex numbers. - - - - - - - - Compute a 1D fast Fourier transform of a dataset of complex numbers. - - - - - - - - Compute a 1D fast Fourier transform of a dataset of complex numbers. - - - - - - - Compute a 1D fast Fourier transform of a dataset of complex numbers. - - - - - - - - Compute a 1D fast Fourier transform of a dataset of complex numbers. - - - - - - - - Compute a 1D real-symmetric fast fourier transform. - - - - - - - Compute a 1D real-symmetric fast fourier transform. - - - - - - - - Compute a 2D fast fourier transform on a data set of complex numbers (represented as pairs of floats) - - - - - - - - - Compute a 2D fast fourier transform on a data set of complex numbers - - - - - - - - - Compute a 2D fast fourier transform on a data set of complex numbers - - - - - - - - - Compute a 3D fast fourier transform on a data set of complex numbers - - - - - - - - - - Compute a 3D fast fourier transform on a data set of complex numbers - - - - - - - - - -

The direction of the fourier transform.

-
-
- - - Forward direction. Usually in reference to moving from temporal - representation to frequency representation - - - - - Backward direction. Usually in reference to moving from frequency - representation to temporal representation - - -
-
diff --git a/mcs/class/System.Drawing/Test/DrawingTest/Exocortex.DSP/src/AssemblyInfo.cs b/mcs/class/System.Drawing/Test/DrawingTest/Exocortex.DSP/src/AssemblyInfo.cs deleted file mode 100644 index 177a4f0e70a..00000000000 --- a/mcs/class/System.Drawing/Test/DrawingTest/Exocortex.DSP/src/AssemblyInfo.cs +++ /dev/null @@ -1,58 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; - -// -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -// -[assembly: AssemblyTitle("")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("")] -[assembly: AssemblyCopyright("")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: - -[assembly: AssemblyVersion("1.0.*")] - -// -// In order to sign your assembly you must specify a key to use. Refer to the -// Microsoft .NET Framework documentation for more information on assembly signing. -// -// Use the attributes below to control which key is used for signing. -// -// Notes: -// (*) If no key is specified, the assembly is not signed. -// (*) KeyName refers to a key that has been installed in the Crypto Service -// Provider (CSP) on your machine. KeyFile refers to a file which contains -// a key. -// (*) If the KeyFile and the KeyName values are both specified, the -// following processing occurs: -// (1) If the KeyName can be found in the CSP, that key is used. -// (2) If the KeyName does not exist and the KeyFile does exist, the key -// in the KeyFile is installed into the CSP and used. -// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility. -// When specifying the KeyFile, the location of the KeyFile should be -// relative to the project output directory which is -// %Project Directory%\obj\. For example, if your KeyFile is -// located in the project directory, you would specify the AssemblyKeyFile -// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")] -// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework -// documentation for more information on this. -// -[assembly: AssemblyDelaySign(false)] -[assembly: AssemblyKeyFile("")] -[assembly: AssemblyKeyName("")] diff --git a/mcs/class/System.Drawing/Test/DrawingTest/Exocortex.DSP/src/Complex.cs b/mcs/class/System.Drawing/Test/DrawingTest/Exocortex.DSP/src/Complex.cs deleted file mode 100644 index 349d2108dc2..00000000000 --- a/mcs/class/System.Drawing/Test/DrawingTest/Exocortex.DSP/src/Complex.cs +++ /dev/null @@ -1,527 +0,0 @@ -/* - * BSD Licence: - * Copyright (c) 2001, 2002 Ben Houston [ ben@exocortex.org ] - * Exocortex Technologies [ www.exocortex.org ] - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH - * DAMAGE. - */ - -using System; -using System.Diagnostics; -using System.Runtime.InteropServices; - - -namespace Exocortex.DSP { - - // Comments? Questions? Bugs? Tell Ben Houston at ben@exocortex.org - // Version: May 4, 2002 - - /// - ///

A double-precision complex number representation.

- ///
- [StructLayout(LayoutKind.Sequential)] - public struct Complex : IComparable, ICloneable { - - //----------------------------------------------------------------------------------- - //----------------------------------------------------------------------------------- - - /// - /// The real component of the complex number - /// - public double Re; - - /// - /// The imaginary component of the complex number - /// - public double Im; - - //----------------------------------------------------------------------------------- - //----------------------------------------------------------------------------------- - - /// - /// Create a complex number from a real and an imaginary component - /// - /// - /// - public Complex( double real, double imaginary ) { - this.Re = (double) real; - this.Im = (double) imaginary; - } - - /// - /// Create a complex number based on an existing complex number - /// - /// - public Complex( Complex c ) { - this.Re = c.Re; - this.Im = c.Im; - } - - /// - /// Create a complex number from a real and an imaginary component - /// - /// - /// - /// - static public Complex FromRealImaginary( double real, double imaginary ) { - Complex c; - c.Re = (double) real; - c.Im = (double) imaginary; - return c; - } - - /// - /// Create a complex number from a modulus (length) and an argument (radian) - /// - /// - /// - /// - static public Complex FromModulusArgument( double modulus, double argument ) { - Complex c; - c.Re = (double)( modulus * System.Math.Cos( argument ) ); - c.Im = (double)( modulus * System.Math.Sin( argument ) ); - return c; - } - - //----------------------------------------------------------------------------------- - //----------------------------------------------------------------------------------- - - object ICloneable.Clone() { - return new Complex( this ); - } - /// - /// Clone the complex number - /// - /// - public Complex Clone() { - return new Complex( this ); - } - - //----------------------------------------------------------------------------------- - //----------------------------------------------------------------------------------- - - /// - /// The modulus (length) of the complex number - /// - /// - public double GetModulus() { - double x = this.Re; - double y = this.Im; - return (double) Math.Sqrt( x*x + y*y ); - } - - /// - /// The squared modulus (length^2) of the complex number - /// - /// - public double GetModulusSquared() { - double x = this.Re; - double y = this.Im; - return (double) x*x + y*y; - } - - /// - /// The argument (radians) of the complex number - /// - /// - public double GetArgument() { - return (double) Math.Atan2( this.Im, this.Re ); - } - - //----------------------------------------------------------------------------------- - - /// - /// Get the conjugate of the complex number - /// - /// - public Complex GetConjugate() { - return FromRealImaginary( this.Re, -this.Im ); - } - - //----------------------------------------------------------------------------------- - - /// - /// Scale the complex number to 1. - /// - public void Normalize() { - double modulus = this.GetModulus(); - if( modulus == 0 ) { - throw new DivideByZeroException( "Can not normalize a complex number that is zero." ); - } - this.Re = (double)( this.Re / modulus ); - this.Im = (double)( this.Im / modulus ); - } - - //----------------------------------------------------------------------------------- - //----------------------------------------------------------------------------------- - - /// - /// Convert to a from double precision complex number to a single precison complex number - /// - /// - /// - public static explicit operator Complex ( ComplexF cF ) { - Complex c; - c.Re = (double) cF.Re; - c.Im = (double) cF.Im; - return c; - } - - /// - /// Convert from a single precision real number to a complex number - /// - /// - /// - public static explicit operator Complex ( double d ) { - Complex c; - c.Re = (double) d; - c.Im = (double) 0; - return c; - } - - /// - /// Convert from a single precision complex to a real number - /// - /// - /// - public static explicit operator double ( Complex c ) { - return (double) c.Re; - } - - //----------------------------------------------------------------------------------- - //----------------------------------------------------------------------------------- - - /// - /// Are these two complex numbers equivalent? - /// - /// - /// - /// - public static bool operator==( Complex a, Complex b ) { - return ( a.Re == b.Re ) && ( a.Im == b.Im ); - } - - /// - /// Are these two complex numbers different? - /// - /// - /// - /// - public static bool operator!=( Complex a, Complex b ) { - return ( a.Re != b.Re ) || ( a.Im != b.Im ); - } - - /// - /// Get the hash code of the complex number - /// - /// - public override int GetHashCode() { - return ( this.Re.GetHashCode() ^ this.Im.GetHashCode() ); - } - - /// - /// Is this complex number equivalent to another object? - /// - /// - /// - public override bool Equals( object o ) { - if( o is Complex ) { - Complex c = (Complex) o; - return ( this == c ); - } - return false; - } - - //----------------------------------------------------------------------------------- - //----------------------------------------------------------------------------------- - - /// - /// Compare to other complex numbers or real numbers - /// - /// - /// - public int CompareTo( object o ) { - if( o == null ) { - return 1; // null sorts before current - } - if( o is Complex ) { - return this.GetModulus().CompareTo( ((Complex)o).GetModulus() ); - } - if( o is double ) { - return this.GetModulus().CompareTo( (double)o ); - } - if( o is ComplexF ) { - return this.GetModulus().CompareTo( ((ComplexF)o).GetModulus() ); - } - if( o is float ) { - return this.GetModulus().CompareTo( (float)o ); - } - throw new ArgumentException(); - } - - //----------------------------------------------------------------------------------- - //----------------------------------------------------------------------------------- - - /// - /// This operator doesn't do much. :-) - /// - /// - /// - public static Complex operator+( Complex a ) { - return a; - } - - /// - /// Negate the complex number - /// - /// - /// - public static Complex operator-( Complex a ) { - a.Re = -a.Re; - a.Im = -a.Im; - return a; - } - - /// - /// Add a complex number to a real - /// - /// - /// - /// - public static Complex operator+( Complex a, double f ) { - a.Re = (double)( a.Re + f ); - return a; - } - - /// - /// Add a real to a complex number - /// - /// - /// - /// - public static Complex operator+( double f, Complex a ) { - a.Re = (double)( a.Re + f ); - return a; - } - - /// - /// Add to complex numbers - /// - /// - /// - /// - public static Complex operator+( Complex a, Complex b ) { - a.Re = a.Re + b.Re; - a.Im = a.Im + b.Im; - return a; - } - - /// - /// Subtract a real from a complex number - /// - /// - /// - /// - public static Complex operator-( Complex a, double f ) { - a.Re = (double)( a.Re - f ); - return a; - } - - /// - /// Subtract a complex number from a real - /// - /// - /// - /// - public static Complex operator-( double f, Complex a ) { - a.Re = (float)( f - a.Re ); - a.Im = (float)( 0 - a.Im ); - return a; - } - - /// - /// Subtract two complex numbers - /// - /// - /// - /// - public static Complex operator-( Complex a, Complex b ) { - a.Re = a.Re - b.Re; - a.Im = a.Im - b.Im; - return a; - } - - /// - /// Multiply a complex number by a real - /// - /// - /// - /// - public static Complex operator*( Complex a, double f ) { - a.Re = (double)( a.Re * f ); - a.Im = (double)( a.Im * f ); - return a; - } - - /// - /// Multiply a real by a complex number - /// - /// - /// - /// - public static Complex operator*( double f, Complex a ) { - a.Re = (double)( a.Re * f ); - a.Im = (double)( a.Im * f ); - - return a; - } - - /// - /// Multiply two complex numbers together - /// - /// - /// - /// - public static Complex operator*( Complex a, Complex b ) { - // (x + yi)(u + vi) = (xu – yv) + (xv + yu)i. - double x = a.Re, y = a.Im; - double u = b.Re, v = b.Im; - - a.Re = (double)( x*u - y*v ); - a.Im = (double)( x*v + y*u ); - - return a; - } - - /// - /// Divide a complex number by a real number - /// - /// - /// - /// - public static Complex operator/( Complex a, double f ) { - if( f == 0 ) { - throw new DivideByZeroException(); - } - - a.Re = (double)( a.Re / f ); - a.Im = (double)( a.Im / f ); - - return a; - } - - /// - /// Divide a complex number by a complex number - /// - /// - /// - /// - public static Complex operator/( Complex a, Complex b ) { - double x = a.Re, y = a.Im; - double u = b.Re, v = b.Im; - double denom = u*u + v*v; - - if( denom == 0 ) { - throw new DivideByZeroException(); - } - - a.Re = (double)( ( x*u + y*v ) / denom ); - a.Im = (double)( ( y*u - x*v ) / denom ); - - return a; - } - - /// - /// Parse a complex representation in this fashion: "( %f, %f )" - /// - /// - /// - static public Complex Parse( string s ) { - throw new NotImplementedException( "Complex Complex.Parse( string s ) is not implemented." ); - } - - /// - /// Get the string representation - /// - /// - public override string ToString() { - return String.Format( "( {0}, {1}i )", this.Re, this.Im ); - } - - //----------------------------------------------------------------------------------- - //----------------------------------------------------------------------------------- - - /// - /// Determine whether two complex numbers are almost (i.e. within the tolerance) equivalent. - /// - /// - /// - /// - /// - static public bool IsEqual( Complex a, Complex b, double tolerance ) { - return - ( Math.Abs( a.Re - b.Re ) < tolerance ) && - ( Math.Abs( a.Im - b.Im ) < tolerance ); - - } - - //---------------------------------------------------------------------------------- - //---------------------------------------------------------------------------------- - - /// - /// Represents zero - /// - static public Complex Zero { - get { return new Complex( 0, 0 ); } - } - - /// - /// Represents the result of sqrt( -1 ) - /// - static public Complex I { - get { return new Complex( 0, 1 ); } - } - - /// - /// Represents the largest possible value of Complex. - /// - static public Complex MaxValue { - get { return new Complex( double.MaxValue, double.MaxValue ); } - } - - /// - /// Represents the smallest possible value of Complex. - /// - static public Complex MinValue { - get { return new Complex( double.MinValue, double.MinValue ); } - } - - - //---------------------------------------------------------------------------------- - //---------------------------------------------------------------------------------- - } - -} diff --git a/mcs/class/System.Drawing/Test/DrawingTest/Exocortex.DSP/src/ComplexArray.cs b/mcs/class/System.Drawing/Test/DrawingTest/Exocortex.DSP/src/ComplexArray.cs deleted file mode 100644 index 4c2dcfa8bc8..00000000000 --- a/mcs/class/System.Drawing/Test/DrawingTest/Exocortex.DSP/src/ComplexArray.cs +++ /dev/null @@ -1,682 +0,0 @@ -/* - * BSD Licence: - * Copyright (c) 2001, 2002 Ben Houston [ ben@exocortex.org ] - * Exocortex Technologies [ www.exocortex.org ] - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH - * DAMAGE. - */ - - -using System; -using System.Diagnostics; -using Exocortex.DSP; - -namespace Exocortex.DSP { - - // Comments? Questions? Bugs? Tell Ben Houston at ben@exocortex.org - // Version: May 4, 2002 - - /// - ///

A set of array utilities for complex number arrays

- ///
- public class ComplexArray { - - //--------------------------------------------------------------------------------------------- - - private ComplexArray() { - } - - //--------------------------------------------------------------------------------------------- - - /// - /// Clamp length (modulus) of the elements in the complex array - /// - /// - /// - /// - static public void ClampLength( Complex[] array, double fMinimum, double fMaximum ) { - for( int i = 0; i < array.Length; i ++ ) { - array[i] = Complex.FromModulusArgument( Math.Max( fMinimum, Math.Min( fMaximum, array[i].GetModulus() ) ), array[i].GetArgument() ); - } - } - - /// - /// Clamp elements in the complex array to range [minimum,maximum] - /// - /// - /// - /// - static public void Clamp( Complex[] array, Complex minimum, Complex maximum ) { - for( int i = 0; i < array.Length; i ++ ) { - array[i].Re = Math.Min( Math.Max( array[ i ].Re, minimum.Re ), maximum.Re ); - array[i].Im = Math.Min( Math.Max( array[ i ].Re, minimum.Im ), maximum.Im ); - } - } - - /// - /// Clamp elements in the complex array to real unit range (i.e. [0,1]) - /// - /// - static public void ClampToRealUnit( Complex[] array ) { - for( int i = 0; i < array.Length; i ++ ) { - array[i].Re = Math.Min( Math.Max( array[i].Re, 0 ), 1 ); - array[i].Im = 0; - } - } - - //--------------------------------------------------------------------------------------------- - - static private bool _workspaceFLocked = false; - static private ComplexF[] _workspaceF = new ComplexF[ 0 ]; - - static private void LockWorkspaceF( int length, ref ComplexF[] workspace ) { - Debug.Assert( _workspaceFLocked == false ); - _workspaceFLocked = true; - if( length >= _workspaceF.Length ) { - _workspaceF = new ComplexF[ length ]; - } - workspace = _workspaceF; - } - static private void UnlockWorkspaceF( ref ComplexF[] workspace ) { - Debug.Assert( _workspaceF == workspace ); - Debug.Assert( _workspaceFLocked == true ); - _workspaceFLocked = false; - workspace = null; - } - - //--------------------------------------------------------------------------------------------- - - /// - /// Shift (offset) the elements in the array - /// - /// - /// - static public void Shift( Complex[] array, int offset ) { - Debug.Assert( array != null ); - Debug.Assert( offset >= 0 ); - Debug.Assert( offset < array.Length ); - - if( offset == 0 ) { - return; - } - - int length = array.Length; - Complex[] temp = new Complex[ length ]; - - for( int i = 0; i < length; i ++ ) { - temp[ ( i + offset ) % length ] = array[ i ]; - } - for( int i = 0; i < length; i ++ ) { - array[ i ] = temp[ i ]; - } - } - - /// - /// Shift (offset) the elements in the array - /// - /// - /// - static public void Shift( ComplexF[] array, int offset ) { - Debug.Assert( array != null ); - Debug.Assert( offset >= 0 ); - Debug.Assert( offset < array.Length ); - - if( offset == 0 ) { - return; - } - - int length = array.Length; - ComplexF[] workspace = null; - ComplexArray.LockWorkspaceF( length, ref workspace ); - - for( int i = 0; i < length; i ++ ) { - workspace[ ( i + offset ) % length ] = array[ i ]; - } - for( int i = 0; i < length; i ++ ) { - array[ i ] = workspace[ i ]; - } - - ComplexArray.UnlockWorkspaceF( ref workspace ); - } - - //--------------------------------------------------------------------------------------------- - - /// - /// Get the range of element lengths - /// - /// - /// - /// - static public void GetLengthRange( Complex[] array, ref double minimum, ref double maximum ) { - minimum = +double.MaxValue; - maximum = -double.MaxValue; - for( int i = 0; i < array.Length; i ++ ) { - double temp = array[i].GetModulus(); - minimum = Math.Min( temp, minimum ); - maximum = Math.Max( temp, maximum ); - } - } - /// - /// Get the range of element lengths - /// - /// - /// - /// - static public void GetLengthRange( ComplexF[] array, ref float minimum, ref float maximum ) { - minimum = +float.MaxValue; - maximum = -float.MaxValue; - for( int i = 0; i < array.Length; i ++ ) { - float temp = array[i].GetModulus(); - minimum = Math.Min( temp, minimum ); - maximum = Math.Max( temp, maximum ); - } - } - - // // - // // Conver the complex array to a double array - // // - // // - // // - // // - /* static public double[] ConvertToDoubleArray( Complex[] array, ConversionStyle style ) { - double[] newArray = new double[ array.Length ]; - switch( style ) { - case ConversionStyle.Length: - for( int i = 0; i < array.Length; i ++ ) { - newArray[i] = (double) array[i].GetModulus(); - } - break; - case ConversionStyle.Real: - for( int i = 0; i < array.Length; i ++ ) { - newArray[i] = (double) array[i].Re; - } - break; - case ConversionStyle.Imaginary: - for( int i = 0; i < array.Length; i ++ ) { - newArray[i] = (double) array[i].Im; - } - break; - default: - Debug.Assert( false ); - break; - } - return newArray; - } */ - - //--------------------------------------------------------------------------------------------- - - /// - /// Determine whether the elements in the two arrays are the same - /// - /// - /// - /// - /// - static public bool IsEqual( Complex[] array1, Complex[] array2, double tolerance ) { - if ( array1.Length != array2.Length ) { - return false; - } - for( int i = 0; i < array1.Length; i ++ ) { - if( Complex.IsEqual( array1[i], array2[i], tolerance ) == false ) { - return false; - } - } - return true; - } - - /// - /// Determine whether the elements in the two arrays are the same - /// - /// - /// - /// - /// - static public bool IsEqual( ComplexF[] array1, ComplexF[] array2, float tolerance ) { - if ( array1.Length != array2.Length ) { - return false; - } - for( int i = 0; i < array1.Length; i ++ ) { - if( ComplexF.IsEqual( array1[i], array2[i], tolerance ) == false ) { - return false; - } - } - return true; - } - - //--------------------------------------------------------------------------------------------- - - /// - /// Add a specific value to each element in the array - /// - /// - /// - static public void Offset( Complex[] array, double offset ) { - int length = array.Length; - for( int i = 0; i < length; i ++ ) { - array[i].Re += offset; - } - } - - /// - /// Add a specific value to each element in the array - /// - /// - /// - static public void Offset( Complex[] array, Complex offset ) { - int length = array.Length; - for( int i = 0; i < length; i ++ ) { - array[i] += offset; - } - } - - /// - /// Add a specific value to each element in the array - /// - /// - /// - static public void Offset( ComplexF[] array, float offset ) { - int length = array.Length; - for( int i = 0; i < length; i ++ ) { - array[i].Re += offset; - } - } - - /// - /// Add a specific value to each element in the array - /// - /// - /// - static public void Offset( ComplexF[] array, ComplexF offset ) { - int length = array.Length; - for( int i = 0; i < length; i ++ ) { - array[i] += offset; - } - } - - //--------------------------------------------------------------------------------------------- - - /// - /// Multiply each element in the array by a specific value - /// - /// - /// - static public void Scale( Complex[] array, double scale ) { - Debug.Assert( array != null ); - - int length = array.Length; - for( int i = 0; i < length; i ++ ) { - array[i] *= scale; - } - } - /// - /// Multiply each element in the array by a specific value - /// - /// - /// - /// - /// - static public void Scale( Complex[] array, double scale, int start, int length ) { - Debug.Assert( array != null ); - Debug.Assert( start >= 0 ); - Debug.Assert( length >= 0 ); - Debug.Assert( ( start + length ) < array.Length ); - - for( int i = 0; i < length; i ++ ) { - array[i + start] *= scale; - } - } - - /// - /// Multiply each element in the array by a specific value - /// - /// - /// - static public void Scale( Complex[] array, Complex scale ) { - Debug.Assert( array != null ); - - int length = array.Length; - for( int i = 0; i < length; i ++ ) { - array[i] *= scale; - } - } - /// - /// Multiply each element in the array by a specific value - /// - /// - /// - /// - /// - static public void Scale( Complex[] array, Complex scale, int start, int length ) { - Debug.Assert( array != null ); - Debug.Assert( start >= 0 ); - Debug.Assert( length >= 0 ); - Debug.Assert( ( start + length ) < array.Length ); - - for( int i = 0; i < length; i ++ ) { - array[i + start] *= scale; - } - } - - /// - /// Multiply each element in the array by a specific value - /// - /// - /// - static public void Scale( ComplexF[] array, float scale ) { - Debug.Assert( array != null ); - - int length = array.Length; - for( int i = 0; i < length; i ++ ) { - array[i] *= scale; - } - } - /// - /// Multiply each element in the array by a specific value - /// - /// - /// - /// - /// - static public void Scale( ComplexF[] array, float scale, int start, int length ) { - Debug.Assert( array != null ); - Debug.Assert( start >= 0 ); - Debug.Assert( length >= 0 ); - Debug.Assert( ( start + length ) < array.Length ); - - for( int i = 0; i < length; i ++ ) { - array[i + start] *= scale; - } - } - - /// - /// Multiply each element in the array by a specific value - /// - /// - /// - static public void Scale( ComplexF[] array, ComplexF scale ) { - Debug.Assert( array != null ); - - int length = array.Length; - for( int i = 0; i < length; i ++ ) { - array[i] *= scale; - } - } - /// - /// Multiply each element in the array by a specific value - /// - /// - /// - /// - /// - static public void Scale( ComplexF[] array, ComplexF scale, int start, int length ) { - Debug.Assert( array != null ); - Debug.Assert( start >= 0 ); - Debug.Assert( length >= 0 ); - Debug.Assert( ( start + length ) < array.Length ); - - for( int i = 0; i < length; i ++ ) { - array[i + start] *= scale; - } - } - - //--------------------------------------------------------------------------------------------- - - /// - /// Multiply each element in target array with corresponding element in rhs array - /// - /// - /// - static public void Multiply( Complex[] target, Complex[] rhs ) { - ComplexArray.Multiply( target, rhs, target ); - } - /// - /// Multiply each element in lhs array with corresponding element in rhs array and - /// put product in result array - /// - /// - /// - /// - static public void Multiply( Complex[] lhs, Complex[] rhs, Complex[] result ) { - Debug.Assert( lhs != null ); - Debug.Assert( rhs != null ); - Debug.Assert( result != null ); - Debug.Assert( lhs.Length == rhs.Length ); - Debug.Assert( lhs.Length == result.Length ); - - int length = lhs.Length; - for( int i = 0; i < length; i ++ ) { - result[i] = lhs[i] * rhs[i]; - } - } - - /// - /// Multiply each element in target array with corresponding element in rhs array - /// - /// - /// - static public void Multiply( ComplexF[] target, ComplexF[] rhs ) { - ComplexArray.Multiply( target, rhs, target ); - } - /// - /// Multiply each element in lhs array with corresponding element in rhs array and - /// put product in result array - /// - /// - /// - /// - static public void Multiply( ComplexF[] lhs, ComplexF[] rhs, ComplexF[] result ) { - Debug.Assert( lhs != null ); - Debug.Assert( rhs != null ); - Debug.Assert( result != null ); - Debug.Assert( lhs.Length == rhs.Length ); - Debug.Assert( lhs.Length == result.Length ); - - int length = lhs.Length; - for( int i = 0; i < length; i ++ ) { - result[i] = lhs[i] * rhs[i]; - } - } - - //--------------------------------------------------------------------------------------------- - - /// - /// Divide each element in target array with corresponding element in rhs array - /// - /// - /// - static public void Divide( Complex[] target, Complex[] rhs ) { - ComplexArray.Divide( target, rhs, target ); - } - /// - /// Divide each element in lhs array with corresponding element in rhs array and - /// put product in result array - /// - /// - /// - /// - static public void Divide( Complex[] lhs, Complex[] rhs, Complex[] result ) { - Debug.Assert( lhs != null ); - Debug.Assert( rhs != null ); - Debug.Assert( result != null ); - Debug.Assert( lhs.Length == rhs.Length ); - Debug.Assert( lhs.Length == result.Length ); - - int length = lhs.Length; - for( int i = 0; i < length; i ++ ) { - result[i] = lhs[i] / rhs[i]; - } - } - - /// - /// Divide each element in target array with corresponding element in rhs array - /// - /// - /// - static public void Divide( ComplexF[] target, ComplexF[] rhs ) { - ComplexArray.Divide( target, rhs, target ); - } - /// - /// Divide each element in lhs array with corresponding element in rhs array and - /// put product in result array - /// - /// - /// - /// - static public void Divide( ComplexF[] lhs, ComplexF[] rhs, ComplexF[] result ) { - Debug.Assert( lhs != null ); - Debug.Assert( rhs != null ); - Debug.Assert( result != null ); - Debug.Assert( lhs.Length == rhs.Length ); - Debug.Assert( lhs.Length == result.Length ); - - ComplexF zero = ComplexF.Zero; - int length = lhs.Length; - for( int i = 0; i < length; i ++ ) { - if( rhs[i] != zero ) { - result[i] = lhs[i] / rhs[i]; - } - else { - result[i] = zero; - } - } - } - - //--------------------------------------------------------------------------------------------- - - /*static public void Flip( ComplexF[] array, Size3 size ) { - Debug.Assert( array != null ); - - ComplexF[] workspace = null; - ComplexArray.LockWorkspaceF( size.GetTotalLength(), ref workspace ); - - for( int z = 0; z < size.Depth; z ++ ) { - for( int y = 0; y < size.Height; y ++ ) { - int xyzOffset = 0 + y * size.Width + z * size.Width * size.Height; - int abcOffset = size.Width - 1 + ( size.Height - y - 1 ) * size.Width + ( size.Depth - z - 1 ) * size.Width * size.Height; - for( int x = 0; x < size.Width; x ++ ) { - workspace[ xyzOffset ++ ] = array[ abcOffset -- ]; - } - } - } - - for( int i = 0; i < size.GetTotalLength(); i ++ ) { - array[ i ] = workspace[ i ]; - } - - ComplexArray.UnlockWorkspaceF( ref workspace ); - } */ - - - /// - /// Copy an array - /// - /// - /// - static public void Copy( Complex[] dest, Complex[] source ) { - Debug.Assert( dest != null ); - Debug.Assert( source != null ); - Debug.Assert( dest.Length == source.Length ); - for( int i = 0; i < dest.Length; i ++ ) { - dest[i] = source[i]; - } - } - - /// - /// Copy an array - /// - /// - /// - static public void Copy( ComplexF[] dest, ComplexF[] source ) { - Debug.Assert( dest != null ); - Debug.Assert( source != null ); - Debug.Assert( dest.Length == source.Length ); - for( int i = 0; i < dest.Length; i ++ ) { - dest[i] = source[i]; - } - } - - /// - /// Reverse the elements in the array - /// - /// - static public void Reverse( Complex[] array ) { - Complex temp; - int length = array.Length; - for( int i = 0; i < length/2; i ++ ) { - temp = array[i]; - array[i] = array[length-1-i]; - array[length-1-i] = temp; - } - } - - /// - /// Scale and offset the elements in the array so that the - /// overall range is [0, 1] - /// - /// - static public void Normalize( Complex[] array ) { - double min = 0, max = 0; - GetLengthRange( array, ref min, ref max ); - Scale( array, ( 1 / ( max - min ) ) ); - Offset( array, ( - min / ( max - min ) ) ); - } - - /// - /// Scale and offset the elements in the array so that the - /// overall range is [0, 1] - /// - /// - static public void Normalize( ComplexF[] array ) { - float min = 0, max = 0; - GetLengthRange( array, ref min, ref max ); - Scale( array, ( 1 / ( max - min ) ) ); - Offset( array, ( - min / ( max - min ) ) ); - } - - /// - /// Invert each element in the array - /// - /// - static public void Invert( Complex[] array ) { - for( int i = 0; i < array.Length; i ++ ) { - array[i] = ((Complex) 1 ) / array[i]; - } - } - - /// - /// Invert each element in the array - /// - /// - static public void Invert( ComplexF[] array ) { - for( int i = 0; i < array.Length; i ++ ) { - array[i] = ((ComplexF) 1 ) / array[i]; - } - } - - //---------------------------------------------------------------------------------------- - - } -} diff --git a/mcs/class/System.Drawing/Test/DrawingTest/Exocortex.DSP/src/ComplexF.cs b/mcs/class/System.Drawing/Test/DrawingTest/Exocortex.DSP/src/ComplexF.cs deleted file mode 100644 index b2d399645f3..00000000000 --- a/mcs/class/System.Drawing/Test/DrawingTest/Exocortex.DSP/src/ComplexF.cs +++ /dev/null @@ -1,520 +0,0 @@ -/* - * BSD Licence: - * Copyright (c) 2001, 2002 Ben Houston [ ben@exocortex.org ] - * Exocortex Technologies [ www.exocortex.org ] - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH - * DAMAGE. - */ - -using System; -using System.Diagnostics; -using System.Runtime.InteropServices; - - -namespace Exocortex.DSP { - - // Comments? Questions? Bugs? Tell Ben Houston at ben@exocortex.org - // Version: May 4, 2002 - - /// - ///

A single-precision complex number representation.

- ///
- [StructLayout(LayoutKind.Sequential)] - public struct ComplexF : IComparable, ICloneable { - - //----------------------------------------------------------------------------------- - //----------------------------------------------------------------------------------- - - /// - /// The real component of the complex number - /// - public float Re; - - /// - /// The imaginary component of the complex number - /// - public float Im; - - //----------------------------------------------------------------------------------- - //----------------------------------------------------------------------------------- - - /// - /// Create a complex number from a real and an imaginary component - /// - /// - /// - public ComplexF( float real, float imaginary ) { - this.Re = (float) real; - this.Im = (float) imaginary; - } - - /// - /// Create a complex number based on an existing complex number - /// - /// - public ComplexF( ComplexF c ) { - this.Re = c.Re; - this.Im = c.Im; - } - - /// - /// Create a complex number from a real and an imaginary component - /// - /// - /// - /// - static public ComplexF FromRealImaginary( float real, float imaginary ) { - ComplexF c; - c.Re = (float) real; - c.Im = (float) imaginary; - return c; - } - - /// - /// Create a complex number from a modulus (length) and an argument (radian) - /// - /// - /// - /// - static public ComplexF FromModulusArgument( float modulus, float argument ) { - ComplexF c; - c.Re = (float)( modulus * System.Math.Cos( argument ) ); - c.Im = (float)( modulus * System.Math.Sin( argument ) ); - return c; - } - - //----------------------------------------------------------------------------------- - //----------------------------------------------------------------------------------- - - object ICloneable.Clone() { - return new ComplexF( this ); - } - /// - /// Clone the complex number - /// - /// - public ComplexF Clone() { - return new ComplexF( this ); - } - - //----------------------------------------------------------------------------------- - //----------------------------------------------------------------------------------- - - /// - /// The modulus (length) of the complex number - /// - /// - public float GetModulus() { - float x = this.Re; - float y = this.Im; - return (float) Math.Sqrt( x*x + y*y ); - } - - /// - /// The squared modulus (length^2) of the complex number - /// - /// - public float GetModulusSquared() { - float x = this.Re; - float y = this.Im; - return (float) x*x + y*y; - } - - /// - /// The argument (radians) of the complex number - /// - /// - public float GetArgument() { - return (float) Math.Atan2( this.Im, this.Re ); - } - - //----------------------------------------------------------------------------------- - - /// - /// Get the conjugate of the complex number - /// - /// - public ComplexF GetConjugate() { - return FromRealImaginary( this.Re, -this.Im ); - } - - //----------------------------------------------------------------------------------- - - /// - /// Scale the complex number to 1. - /// - public void Normalize() { - double modulus = this.GetModulus(); - if( modulus == 0 ) { - throw new DivideByZeroException( "Can not normalize a complex number that is zero." ); - } - this.Re = (float)( this.Re / modulus ); - this.Im = (float)( this.Im / modulus ); - } - - //----------------------------------------------------------------------------------- - //----------------------------------------------------------------------------------- - - /// - /// Convert to a from double precision complex number to a single precison complex number - /// - /// - /// - public static explicit operator ComplexF ( Complex c ) { - ComplexF cF; - cF.Re = (float) c.Re; - cF.Im = (float) c.Im; - return cF; - } - - /// - /// Convert from a single precision real number to a complex number - /// - /// - /// - public static explicit operator ComplexF ( float f ) { - ComplexF c; - c.Re = (float) f; - c.Im = (float) 0; - return c; - } - - /// - /// Convert from a single precision complex to a real number - /// - /// - /// - public static explicit operator float ( ComplexF c ) { - return (float) c.Re; - } - - //----------------------------------------------------------------------------------- - //----------------------------------------------------------------------------------- - - /// - /// Are these two complex numbers equivalent? - /// - /// - /// - /// - public static bool operator==( ComplexF a, ComplexF b ) { - return ( a.Re == b.Re ) && ( a.Im == b.Im ); - } - - /// - /// Are these two complex numbers different? - /// - /// - /// - /// - public static bool operator!=( ComplexF a, ComplexF b ) { - return ( a.Re != b.Re ) || ( a.Im != b.Im ); - } - - /// - /// Get the hash code of the complex number - /// - /// - public override int GetHashCode() { - return ( this.Re.GetHashCode() ^ this.Im.GetHashCode() ); - } - - /// - /// Is this complex number equivalent to another object? - /// - /// - /// - public override bool Equals( object o ) { - if( o is ComplexF ) { - ComplexF c = (ComplexF) o; - return ( this == c ); - } - return false; - } - - //----------------------------------------------------------------------------------- - //----------------------------------------------------------------------------------- - - /// - /// Compare to other complex numbers or real numbers - /// - /// - /// - public int CompareTo( object o ) { - if( o == null ) { - return 1; // null sorts before current - } - if( o is ComplexF ) { - return this.GetModulus().CompareTo( ((ComplexF)o).GetModulus() ); - } - if( o is float ) { - return this.GetModulus().CompareTo( (float)o ); - } - if( o is Complex ) { - return this.GetModulus().CompareTo( ((Complex)o).GetModulus() ); - } - if( o is double ) { - return this.GetModulus().CompareTo( (double)o ); - } - throw new ArgumentException(); - } - - //----------------------------------------------------------------------------------- - //----------------------------------------------------------------------------------- - - /// - /// This operator doesn't do much. :-) - /// - /// - /// - public static ComplexF operator+( ComplexF a ) { - return a; - } - - /// - /// Negate the complex number - /// - /// - /// - public static ComplexF operator-( ComplexF a ) { - a.Re = -a.Re; - a.Im = -a.Im; - return a; - } - - /// - /// Add a complex number to a real - /// - /// - /// - /// - public static ComplexF operator+( ComplexF a, float f ) { - a.Re = (float)( a.Re + f ); - return a; - } - - /// - /// Add a real to a complex number - /// - /// - /// - /// - public static ComplexF operator+( float f, ComplexF a ) { - a.Re = (float)( a.Re + f ); - return a; - } - - /// - /// Add to complex numbers - /// - /// - /// - /// - public static ComplexF operator+( ComplexF a, ComplexF b ) { - a.Re = a.Re + b.Re; - a.Im = a.Im + b.Im; - return a; - } - - /// - /// Subtract a real from a complex number - /// - /// - /// - /// - public static ComplexF operator-( ComplexF a, float f ) { - a.Re = (float)( a.Re - f ); - return a; - } - - /// - /// Subtract a complex number from a real - /// - /// - /// - /// - public static ComplexF operator-( float f, ComplexF a ) { - a.Re = (float)( f - a.Re ); - a.Im = (float)( 0 - a.Im ); - return a; - } - - /// - /// Subtract two complex numbers - /// - /// - /// - /// - public static ComplexF operator-( ComplexF a, ComplexF b ) { - a.Re = a.Re - b.Re; - a.Im = a.Im - b.Im; - return a; - } - - /// - /// Multiply a complex number by a real - /// - /// - /// - /// - public static ComplexF operator*( ComplexF a, float f ) { - a.Re = (float)( a.Re * f ); - a.Im = (float)( a.Im * f ); - return a; - } - - /// - /// Multiply a real by a complex number - /// - /// - /// - /// - public static ComplexF operator*( float f, ComplexF a ) { - a.Re = (float)( a.Re * f ); - a.Im = (float)( a.Im * f ); - return a; - } - - /// - /// Multiply two complex numbers together - /// - /// - /// - /// - public static ComplexF operator*( ComplexF a, ComplexF b ) { - // (x + yi)(u + vi) = (xu – yv) + (xv + yu)i. - double x = a.Re, y = a.Im; - double u = b.Re, v = b.Im; - a.Re = (float)( x*u - y*v ); - a.Im = (float)( x*v + y*u ); - return a; - } - - /// - /// Divide a complex number by a real number - /// - /// - /// - /// - public static ComplexF operator/( ComplexF a, float f ) { - if( f == 0 ) { - throw new DivideByZeroException(); - } - a.Re = (float)( a.Re / f ); - a.Im = (float)( a.Im / f ); - return a; - } - - /// - /// Divide a complex number by a complex number - /// - /// - /// - /// - public static ComplexF operator/( ComplexF a, ComplexF b ) { - double x = a.Re, y = a.Im; - double u = b.Re, v = b.Im; - double denom = u*u + v*v; - - if( denom == 0 ) { - throw new DivideByZeroException(); - } - a.Re = (float)( ( x*u + y*v ) / denom ); - a.Im = (float)( ( y*u - x*v ) / denom ); - return a; - } - - /// - /// Parse a complex representation in this fashion: "( %f, %f )" - /// - /// - /// - static public ComplexF Parse( string s ) { - throw new NotImplementedException( "ComplexF ComplexF.Parse( string s ) is not implemented." ); - } - - /// - /// Get the string representation - /// - /// - public override string ToString() { - return String.Format( "( {0}, {1}i )", this.Re, this.Im ); - } - - //----------------------------------------------------------------------------------- - //----------------------------------------------------------------------------------- - - /// - /// Determine whether two complex numbers are almost (i.e. within the tolerance) equivalent. - /// - /// - /// - /// - /// - static public bool IsEqual( ComplexF a, ComplexF b, float tolerance ) { - return - ( Math.Abs( a.Re - b.Re ) < tolerance ) && - ( Math.Abs( a.Im - b.Im ) < tolerance ); - - } - - //---------------------------------------------------------------------------------- - //---------------------------------------------------------------------------------- - - /// - /// Represents zero - /// - static public ComplexF Zero { - get { return new ComplexF( 0, 0 ); } - } - - /// - /// Represents the result of sqrt( -1 ) - /// - static public ComplexF I { - get { return new ComplexF( 0, 1 ); } - } - - /// - /// Represents the largest possible value of ComplexF. - /// - static public ComplexF MaxValue { - get { return new ComplexF( float.MaxValue, float.MaxValue ); } - } - - /// - /// Represents the smallest possible value of ComplexF. - /// - static public ComplexF MinValue { - get { return new ComplexF( float.MinValue, float.MinValue ); } - } - - - //---------------------------------------------------------------------------------- - //---------------------------------------------------------------------------------- - } - -} diff --git a/mcs/class/System.Drawing/Test/DrawingTest/Exocortex.DSP/src/ComplexMath.cs b/mcs/class/System.Drawing/Test/DrawingTest/Exocortex.DSP/src/ComplexMath.cs deleted file mode 100644 index 3ce28dd147c..00000000000 --- a/mcs/class/System.Drawing/Test/DrawingTest/Exocortex.DSP/src/ComplexMath.cs +++ /dev/null @@ -1,158 +0,0 @@ -/* - * BSD Licence: - * Copyright (c) 2001, 2002 Ben Houston [ ben@exocortex.org ] - * Exocortex Technologies [ www.exocortex.org ] - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH - * DAMAGE. - */ - -using System; -using System.Diagnostics; - - -namespace Exocortex.DSP { - - // Comments? Questions? Bugs? Tell Ben Houston at ben@exocortex.org - // Version: May 4, 2002 - - /// - ///

Various mathematical functions for complex numbers.

- ///
- public class ComplexMath { - - //--------------------------------------------------------------------------------------------------- - - private ComplexMath() { - } - - //--------------------------------------------------------------------------------------------------- - - /// - /// Swap two complex numbers - /// - /// - /// - static public void Swap( ref Complex a, ref Complex b ) { - Complex temp = a; - a = b; - b = temp; - } - - /// - /// Swap two complex numbers - /// - /// - /// - static public void Swap( ref ComplexF a, ref ComplexF b ) { - ComplexF temp = a; - a = b; - b = temp; - } - - //--------------------------------------------------------------------------------------------------- - - static private double _halfOfRoot2 = 0.5 * Math.Sqrt( 2 ); - - /// - /// Calculate the square root of a complex number - /// - /// - /// - static public ComplexF Sqrt( ComplexF c ) { - double x = c.Re; - double y = c.Im; - - double modulus = Math.Sqrt( x*x + y*y ); - int sign = ( y < 0 ) ? -1 : 1; - - c.Re = (float)( _halfOfRoot2 * Math.Sqrt( modulus + x ) ); - c.Im = (float)( _halfOfRoot2 * sign * Math.Sqrt( modulus - x ) ); - - return c; - } - - /// - /// Calculate the square root of a complex number - /// - /// - /// - static public Complex Sqrt( Complex c ) { - double x = c.Re; - double y = c.Im; - - double modulus = Math.Sqrt( x*x + y*y ); - int sign = ( y < 0 ) ? -1 : 1; - - c.Re = (double)( _halfOfRoot2 * Math.Sqrt( modulus + x ) ); - c.Im = (double)( _halfOfRoot2 * sign * Math.Sqrt( modulus - x ) ); - - return c; - } - - //--------------------------------------------------------------------------------------------------- - - /// - /// Calculate the power of a complex number - /// - /// - /// - /// - static public ComplexF Pow( ComplexF c, double exponent ) { - double x = c.Re; - double y = c.Im; - - double modulus = Math.Pow( x*x + y*y, exponent * 0.5 ); - double argument = Math.Atan2( y, x ) * exponent; - - c.Re = (float)( modulus * System.Math.Cos( argument ) ); - c.Im = (float)( modulus * System.Math.Sin( argument ) ); - - return c; - } - - /// - /// Calculate the power of a complex number - /// - /// - /// - /// - static public Complex Pow( Complex c, double exponent ) { - double x = c.Re; - double y = c.Im; - - double modulus = Math.Pow( x*x + y*y, exponent * 0.5 ); - double argument = Math.Atan2( y, x ) * exponent; - - c.Re = (double)( modulus * System.Math.Cos( argument ) ); - c.Im = (double)( modulus * System.Math.Sin( argument ) ); - - return c; - } - - //--------------------------------------------------------------------------------------------------- - - } -} diff --git a/mcs/class/System.Drawing/Test/DrawingTest/Exocortex.DSP/src/ComplexStats.cs b/mcs/class/System.Drawing/Test/DrawingTest/Exocortex.DSP/src/ComplexStats.cs deleted file mode 100644 index 1de21c419d2..00000000000 --- a/mcs/class/System.Drawing/Test/DrawingTest/Exocortex.DSP/src/ComplexStats.cs +++ /dev/null @@ -1,306 +0,0 @@ -/* - * BSD Licence: - * Copyright (c) 2001, 2002 Ben Houston [ ben@exocortex.org ] - * Exocortex Technologies [ www.exocortex.org ] - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH - * DAMAGE. - */ - -using System; -using System.Diagnostics; - -namespace Exocortex.DSP -{ - // Comments? Questions? Bugs? Tell Ben Houston at ben@exocortex.org - // Version: May 4, 2002 - - /// - ///

A set of statistical utilities for complex number arrays

- ///
- public class ComplexStats - { - //--------------------------------------------------------------------------------------------- - - private ComplexStats() { - } - - //--------------------------------------------------------------------------------------------- - //-------------------------------------------------------------------------------------------- - - /// - /// Calculate the sum - /// - /// - /// - static public ComplexF Sum( ComplexF[] data ) { - Debug.Assert( data != null ); - return SumRecursion( data, 0, data.Length ); - } - static private ComplexF SumRecursion( ComplexF[] data, int start, int end ) { - Debug.Assert( 0 <= start, "start = " + start ); - Debug.Assert( start < end, "start = " + start + " and end = " + end ); - Debug.Assert( end <= data.Length, "end = " + end + " and data.Length = " + data.Length ); - if( ( end - start ) <= 1000 ) { - ComplexF sum = ComplexF.Zero; - for( int i = start; i < end; i ++ ) { - sum += data[ i ]; - - } - return sum; - } - else { - int middle = ( start + end ) >> 1; - return SumRecursion( data, start, middle ) + SumRecursion( data, middle, end ); - } - } - - /// - /// Calculate the sum - /// - /// - /// - static public Complex Sum( Complex[] data ) { - Debug.Assert( data != null ); - return SumRecursion( data, 0, data.Length ); - } - static private Complex SumRecursion( Complex[] data, int start, int end ) { - Debug.Assert( 0 <= start, "start = " + start ); - Debug.Assert( start < end, "start = " + start + " and end = " + end ); - Debug.Assert( end <= data.Length, "end = " + end + " and data.Length = " + data.Length ); - if( ( end - start ) <= 1000 ) { - Complex sum = Complex.Zero; - for( int i = start; i < end; i ++ ) { - sum += data[ i ]; - - } - return sum; - } - else { - int middle = ( start + end ) >> 1; - return SumRecursion( data, start, middle ) + SumRecursion( data, middle, end ); - } - } - - //-------------------------------------------------------------------------------------------- - //-------------------------------------------------------------------------------------------- - - /// - /// Calculate the sum of squares - /// - /// - /// - static public ComplexF SumOfSquares( ComplexF[] data ) { - Debug.Assert( data != null ); - return SumOfSquaresRecursion( data, 0, data.Length ); - } - static private ComplexF SumOfSquaresRecursion( ComplexF[] data, int start, int end ) { - Debug.Assert( 0 <= start, "start = " + start ); - Debug.Assert( start < end, "start = " + start + " and end = " + end ); - Debug.Assert( end <= data.Length, "end = " + end + " and data.Length = " + data.Length ); - if( ( end - start ) <= 1000 ) { - ComplexF sumOfSquares = ComplexF.Zero; - for( int i = start; i < end; i ++ ) { - sumOfSquares += data[ i ] * data[ i ]; - - } - return sumOfSquares; - } - else { - int middle = ( start + end ) >> 1; - return SumOfSquaresRecursion( data, start, middle ) + SumOfSquaresRecursion( data, middle, end ); - } - } - - /// - /// Calculate the sum of squares - /// - /// - /// - static public Complex SumOfSquares( Complex[] data ) { - Debug.Assert( data != null ); - return SumOfSquaresRecursion( data, 0, data.Length ); - } - static private Complex SumOfSquaresRecursion( Complex[] data, int start, int end ) { - Debug.Assert( 0 <= start, "start = " + start ); - Debug.Assert( start < end, "start = " + start + " and end = " + end ); - Debug.Assert( end <= data.Length, "end = " + end + " and data.Length = " + data.Length ); - if( ( end - start ) <= 1000 ) { - Complex sumOfSquares = Complex.Zero; - for( int i = start; i < end; i ++ ) { - sumOfSquares += data[ i ] * data[ i ]; - - } - return sumOfSquares; - } - else { - int middle = ( start + end ) >> 1; - return SumOfSquaresRecursion( data, start, middle ) + SumOfSquaresRecursion( data, middle, end ); - } - } - - //-------------------------------------------------------------------------------------------- - //-------------------------------------------------------------------------------------------- - - /// - /// Calculate the mean (average) - /// - /// - /// - static public ComplexF Mean( ComplexF[] data ) { - return ComplexStats.Sum( data ) / data.Length; - } - - /// - /// Calculate the mean (average) - /// - /// - /// - static public Complex Mean( Complex[] data ) { - return ComplexStats.Sum( data ) / data.Length; - } - - /// - /// Calculate the variance - /// - /// - /// - static public ComplexF Variance( ComplexF[] data ) { - Debug.Assert( data != null ); - if( data.Length == 0 ) { - throw new DivideByZeroException( "length of data is zero" ); - } - return ComplexStats.SumOfSquares( data ) / data.Length - ComplexStats.Sum( data ); - } - /// - /// Calculate the variance - /// - /// - /// - static public Complex Variance( Complex[] data ) { - Debug.Assert( data != null ); - if( data.Length == 0 ) { - throw new DivideByZeroException( "length of data is zero" ); - } - return ComplexStats.SumOfSquares( data ) / data.Length - ComplexStats.Sum( data ); - } - - /// - /// Calculate the standard deviation - /// - /// - /// - static public ComplexF StdDev( ComplexF[] data ) { - Debug.Assert( data != null ); - if( data.Length == 0 ) { - throw new DivideByZeroException( "length of data is zero" ); - } - return ComplexMath.Sqrt( ComplexStats.Variance( data ) ); - } - /// - /// Calculate the standard deviation - /// - /// - /// - static public Complex StdDev( Complex[] data ) { - Debug.Assert( data != null ); - if( data.Length == 0 ) { - throw new DivideByZeroException( "length of data is zero" ); - } - return ComplexMath.Sqrt( ComplexStats.Variance( data ) ); - } - - //-------------------------------------------------------------------------------------------- - //-------------------------------------------------------------------------------------------- - - /// - /// Calculate the root mean squared (RMS) error between two sets of data. - /// - /// - /// - /// - static public float RMSError( ComplexF[] alpha, ComplexF[] beta ) { - Debug.Assert( alpha != null ); - Debug.Assert( beta != null ); - Debug.Assert( beta.Length == alpha.Length ); - - return (float) Math.Sqrt( SumOfSquaredErrorRecursion( alpha, beta, 0, alpha.Length ) ); - } - static private float SumOfSquaredErrorRecursion( ComplexF[] alpha, ComplexF[] beta, int start, int end ) { - Debug.Assert( 0 <= start, "start = " + start ); - Debug.Assert( start < end, "start = " + start + " and end = " + end ); - Debug.Assert( end <= alpha.Length, "end = " + end + " and alpha.Length = " + alpha.Length ); - Debug.Assert( beta.Length == alpha.Length ); - if( ( end - start ) <= 1000 ) { - float sumOfSquaredError = 0; - for( int i = start; i < end; i ++ ) { - ComplexF delta = beta[ i ] - alpha[ i ]; - sumOfSquaredError += ( delta.Re * delta.Re ) + ( delta.Im * delta.Im ); - - } - return sumOfSquaredError; - } - else { - int middle = ( start + end ) >> 1; - return SumOfSquaredErrorRecursion( alpha, beta, start, middle ) + SumOfSquaredErrorRecursion( alpha, beta, middle, end ); - } - } - - /// - /// Calculate the root mean squared (RMS) error between two sets of data. - /// - /// - /// - /// - static public double RMSError( Complex[] alpha, Complex[] beta ) { - Debug.Assert( alpha != null ); - Debug.Assert( beta != null ); - Debug.Assert( beta.Length == alpha.Length ); - - return Math.Sqrt( SumOfSquaredErrorRecursion( alpha, beta, 0, alpha.Length ) ); - } - static private double SumOfSquaredErrorRecursion( Complex[] alpha, Complex[] beta, int start, int end ) { - Debug.Assert( 0 <= start, "start = " + start ); - Debug.Assert( start < end, "start = " + start + " and end = " + end ); - Debug.Assert( end <= alpha.Length, "end = " + end + " and alpha.Length = " + alpha.Length ); - Debug.Assert( beta.Length == alpha.Length ); - if( ( end - start ) <= 1000 ) { - double sumOfSquaredError = 0; - for( int i = start; i < end; i ++ ) { - Complex delta = beta[ i ] - alpha[ i ]; - sumOfSquaredError += ( delta.Re * delta.Re ) + ( delta.Im * delta.Im ); - - } - return sumOfSquaredError; - } - else { - int middle = ( start + end ) >> 1; - return SumOfSquaredErrorRecursion( alpha, beta, start, middle ) + SumOfSquaredErrorRecursion( alpha, beta, middle, end ); - } - } - - - } -} diff --git a/mcs/class/System.Drawing/Test/DrawingTest/Exocortex.DSP/src/Exocortex.DSP.v1.J2EE.vmwcsproj b/mcs/class/System.Drawing/Test/DrawingTest/Exocortex.DSP/src/Exocortex.DSP.v1.J2EE.vmwcsproj deleted file mode 100644 index 4854e55ec81..00000000000 --- a/mcs/class/System.Drawing/Test/DrawingTest/Exocortex.DSP/src/Exocortex.DSP.v1.J2EE.vmwcsproj +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/mcs/class/System.Drawing/Test/DrawingTest/Exocortex.DSP/src/Exocortex.DSP.v1.csproj b/mcs/class/System.Drawing/Test/DrawingTest/Exocortex.DSP/src/Exocortex.DSP.v1.csproj deleted file mode 100644 index 7c10afb2b67..00000000000 --- a/mcs/class/System.Drawing/Test/DrawingTest/Exocortex.DSP/src/Exocortex.DSP.v1.csproj +++ /dev/null @@ -1,135 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/mcs/class/System.Drawing/Test/DrawingTest/Exocortex.DSP/src/Fourier.cs b/mcs/class/System.Drawing/Test/DrawingTest/Exocortex.DSP/src/Fourier.cs deleted file mode 100644 index 87bbd971ec7..00000000000 --- a/mcs/class/System.Drawing/Test/DrawingTest/Exocortex.DSP/src/Fourier.cs +++ /dev/null @@ -1,1346 +0,0 @@ -/* - * BSD Licence: - * Copyright (c) 2001, 2002 Ben Houston [ ben@exocortex.org ] - * Exocortex Technologies [ www.exocortex.org ] - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH - * DAMAGE. - */ - -using System; -using System.Diagnostics; -using System.IO; -using System.Text; - -//using Exocortex.Imaging; - -namespace Exocortex.DSP { - - // Comments? Questions? Bugs? Tell Ben Houston at ben@exocortex.org - // Version: May 4, 2002 - - /// - ///

Static functions for doing various Fourier Operations.

- ///
- public class Fourier { - - //====================================================================================== - - private Fourier() { - } - - //====================================================================================== - - static private void Swap( ref float a, ref float b ) { - float temp = a; - a = b; - b = temp; - } - static private void Swap( ref double a, ref double b ) { - double temp = a; - a = b; - b = temp; - } - static private void Swap( ref ComplexF a, ref ComplexF b ) { - ComplexF temp = a; - a = b; - b = temp; - } - static private void Swap( ref Complex a, ref Complex b ) { - Complex temp = a; - a = b; - b = temp; - } - - //------------------------------------------------------------------------------------- - - private const int cMaxLength = 4096; - private const int cMinLength = 1; - - private const int cMaxBits = 12; - private const int cMinBits = 0; - - - static private bool IsPowerOf2( int x ) { - return (x & (x - 1)) == 0; - //return ( x == Pow2( Log2( x ) ) ); - } - static private int Pow2( int exponent ) { - if( exponent >= 0 && exponent < 31 ) { - return 1 << exponent; - } - return 0; - } - static private int Log2( int x ) { - if( x <= 65536 ) { - if( x <= 256 ) { - if( x <= 16 ) { - if( x <= 4 ) { - if( x <= 2 ) { - if( x <= 1 ) { - return 0; - } - return 1; - } - return 2; - } - if( x <= 8 ) - return 3; - return 4; - } - if( x <= 64 ) { - if( x <= 32 ) - return 5; - return 6; - } - if( x <= 128 ) - return 7; - return 8; - } - if( x <= 4096 ) { - if( x <= 1024 ) { - if( x <= 512 ) - return 9; - return 10; - } - if( x <= 2048 ) - return 11; - return 12; - } - if( x <= 16384 ) { - if( x <= 8192 ) - return 13; - return 14; - } - if( x <= 32768 ) - return 15; - return 16; - } - if( x <= 16777216 ) { - if( x <= 1048576 ) { - if( x <= 262144 ) { - if( x <= 131072 ) - return 17; - return 18; - } - if( x <= 524288 ) - return 19; - return 20; - } - if( x <= 4194304 ) { - if( x <= 2097152 ) - return 21; - return 22; - } - if( x <= 8388608 ) - return 23; - return 24; - } - if( x <= 268435456 ) { - if( x <= 67108864 ) { - if( x <= 33554432 ) - return 25; - return 26; - } - if( x <= 134217728 ) - return 27; - return 28; - } - if( x <= 1073741824 ) { - if( x <= 536870912 ) - return 29; - return 30; - } - // since int is unsigned it can never be higher than 2,147,483,647 - // if( x <= 2147483648 ) - // return 31; - // return 32; - return 31; - } - - //------------------------------------------------------------------------------------- - //------------------------------------------------------------------------------------- - - static private int ReverseBits( int index, int numberOfBits ) { - Debug.Assert( numberOfBits >= cMinBits ); - Debug.Assert( numberOfBits <= cMaxBits ); - - int reversedIndex = 0; - for( int i = 0; i < numberOfBits; i ++ ) { - reversedIndex = ( reversedIndex << 1 ) | ( index & 1 ); - index = ( index >> 1 ); - } - return reversedIndex; - } - - //------------------------------------------------------------------------------------- - - static private int[][] _reversedBits = new int[ cMaxBits ][]; - static private int[] GetReversedBits( int numberOfBits ) { - Debug.Assert( numberOfBits >= cMinBits ); - Debug.Assert( numberOfBits <= cMaxBits ); - if( _reversedBits[ numberOfBits - 1 ] == null ) { - int maxBits = Fourier.Pow2( numberOfBits ); - int[] reversedBits = new int[ maxBits ]; - for( int i = 0; i < maxBits; i ++ ) { - int oldBits = i; - int newBits = 0; - for( int j = 0; j < numberOfBits; j ++ ) { - newBits = ( newBits << 1 ) | ( oldBits & 1 ); - oldBits = ( oldBits >> 1 ); - } - reversedBits[ i ] = newBits; - } - _reversedBits[ numberOfBits - 1 ] = reversedBits; - } - return _reversedBits[ numberOfBits - 1 ]; - } - - //------------------------------------------------------------------------------------- - - static private void ReorderArray( float[] data ) { - Debug.Assert( data != null ); - - int length = data.Length / 2; - - Debug.Assert( Fourier.IsPowerOf2( length ) == true ); - Debug.Assert( length >= cMinLength ); - Debug.Assert( length <= cMaxLength ); - - int[] reversedBits = Fourier.GetReversedBits( Fourier.Log2( length ) ); - for( int i = 0; i < length; i ++ ) { - int swap = reversedBits[ i ]; - if( swap > i ) { - Fourier.Swap( ref data[ (i<<1) ], ref data[ (swap<<1) ] ); - Fourier.Swap( ref data[ (i<<1) + 1 ], ref data[ (swap<<1) + 1 ] ); - } - } - } - - static private void ReorderArray( double[] data ) { - Debug.Assert( data != null ); - - int length = data.Length / 2; - - Debug.Assert( Fourier.IsPowerOf2( length ) == true ); - Debug.Assert( length >= cMinLength ); - Debug.Assert( length <= cMaxLength ); - - int[] reversedBits = Fourier.GetReversedBits( Fourier.Log2( length ) ); - for( int i = 0; i < length; i ++ ) { - int swap = reversedBits[ i ]; - if( swap > i ) { - Fourier.Swap( ref data[ i<<1 ], ref data[ swap<<1 ] ); - Fourier.Swap( ref data[ i<<1 + 1 ], ref data[ swap<<1 + 1 ] ); - } - } - } - - static private void ReorderArray( Complex[] data ) { - Debug.Assert( data != null ); - - int length = data.Length; - - Debug.Assert( Fourier.IsPowerOf2( length ) == true ); - Debug.Assert( length >= cMinLength ); - Debug.Assert( length <= cMaxLength ); - - int[] reversedBits = Fourier.GetReversedBits( Fourier.Log2( length ) ); - for( int i = 0; i < length; i ++ ) { - int swap = reversedBits[ i ]; - if( swap > i ) { - Complex temp = data[ i ]; - data[ i ] = data[ swap ]; - data[ swap ] = temp; - } - } - } - - static private void ReorderArray( ComplexF[] data ) { - Debug.Assert( data != null ); - - int length = data.Length; - - Debug.Assert( Fourier.IsPowerOf2( length ) == true ); - Debug.Assert( length >= cMinLength ); - Debug.Assert( length <= cMaxLength ); - - int[] reversedBits = Fourier.GetReversedBits( Fourier.Log2( length ) ); - for( int i = 0; i < length; i ++ ) { - int swap = reversedBits[ i ]; - if( swap > i ) { - ComplexF temp = data[ i ]; - data[ i ] = data[ swap ]; - data[ swap ] = temp; - } - } - } - - //====================================================================================== - - private static int[][] _reverseBits = null; - - private static int _ReverseBits( int bits, int n ) { - int bitsReversed = 0; - for( int i = 0; i < n; i ++ ) { - bitsReversed = ( bitsReversed << 1 ) | ( bits & 1 ); - bits = ( bits >> 1 ); - } - return bitsReversed; - } - - private static void InitializeReverseBits( int levels ) { - _reverseBits = new int[levels + 1][]; - for( int j = 0; j < ( levels + 1 ); j ++ ) { - int count = (int) Math.Pow( 2, j ); - _reverseBits[j] = new int[ count ]; - for( int i = 0; i < count; i ++ ) { - _reverseBits[j][i] = _ReverseBits( i, j ); - } - } - } - - private static int _lookupTabletLength = -1; - private static double[,][] _uRLookup = null; - private static double[,][] _uILookup = null; - private static float[,][] _uRLookupF = null; - private static float[,][] _uILookupF = null; - - private static void SyncLookupTableLength( int length ) { - Debug.Assert( length < 1024*10 ); - Debug.Assert( length >= 0 ); - if( length > _lookupTabletLength ) { - int level = (int) Math.Ceiling( Math.Log( length, 2 ) ); - Fourier.InitializeReverseBits( level ); - Fourier.InitializeComplexRotations( level ); - //_cFFTData = new Complex[ Math2.CeilingBase( length, 2 ) ]; - //_cFFTDataF = new ComplexF[ Math2.CeilingBase( length, 2 ) ]; - _lookupTabletLength = length; - } - } - - private static int GetLookupTableLength() { - return _lookupTabletLength; - } - - private static void ClearLookupTables() { - _uRLookup = null; - _uILookup = null; - _uRLookupF = null; - _uILookupF = null; - _lookupTabletLength = -1; - } - - private static void InitializeComplexRotations( int levels ) { - int ln = levels; - //_wRLookup = new float[ levels + 1, 2 ]; - //_wILookup = new float[ levels + 1, 2 ]; - - _uRLookup = new double[ levels + 1, 2 ][]; - _uILookup = new double[ levels + 1, 2 ][]; - - _uRLookupF = new float[ levels + 1, 2 ][]; - _uILookupF = new float[ levels + 1, 2 ][]; - - int N = 1; - for( int level = 1; level <= ln; level ++ ) { - int M = N; - N <<= 1; - - //float scale = (float)( 1 / Math.Sqrt( 1 << ln ) ); - - // positive sign ( i.e. [M,0] ) - { - double uR = 1; - double uI = 0; - double angle = (double) Math.PI / M * 1; - double wR = (double) Math.Cos( angle ); - double wI = (double) Math.Sin( angle ); - - _uRLookup[level,0] = new double[ M ]; - _uILookup[level,0] = new double[ M ]; - _uRLookupF[level,0] = new float[ M ]; - _uILookupF[level,0] = new float[ M ]; - - for( int j = 0; j < M; j ++ ) { - _uRLookupF[level,0][j] = (float)( _uRLookup[level,0][j] = uR ); - _uILookupF[level,0][j] = (float)( _uILookup[level,0][j] = uI ); - double uwI = uR*wI + uI*wR; - uR = uR*wR - uI*wI; - uI = uwI; - } - } - { - - - // negative sign ( i.e. [M,1] ) - double uR = 1; - double uI = 0; - double angle = (double) Math.PI / M * -1; - double wR = (double) Math.Cos( angle ); - double wI = (double) Math.Sin( angle ); - - _uRLookup[level,1] = new double[ M ]; - _uILookup[level,1] = new double[ M ]; - _uRLookupF[level,1] = new float[ M ]; - _uILookupF[level,1] = new float[ M ]; - - for( int j = 0; j < M; j ++ ) { - _uRLookupF[level,1][j] = (float)( _uRLookup[level,1][j] = uR ); - _uILookupF[level,1][j] = (float)( _uILookup[level,1][j] = uI ); - double uwI = uR*wI + uI*wR; - uR = uR*wR - uI*wI; - uI = uwI; - } - } - - } - } - - //====================================================================================== - //====================================================================================== - - static private bool _bufferFLocked = false; - static private float[] _bufferF = new float[ 0 ]; - - static private void LockBufferF( int length, ref float[] buffer ) { - Debug.Assert( _bufferFLocked == false ); - _bufferFLocked = true; - if( length >= _bufferF.Length ) { - _bufferF = new float[ length ]; - } - buffer = _bufferF; - } - static private void UnlockBufferF( ref float[] buffer ) { - Debug.Assert( _bufferF == buffer ); - Debug.Assert( _bufferFLocked == true ); - _bufferFLocked = false; - buffer = null; - } - - private static void LinearFFT( float[] data, int start, int inc, int length, FourierDirection direction ) { - Debug.Assert( data != null ); - Debug.Assert( start >= 0 ); - Debug.Assert( inc >= 1 ); - Debug.Assert( length >= 1 ); - Debug.Assert( ( start + inc * ( length - 1 ) ) * 2 < data.Length ); - - // copy to buffer - float[] buffer = null; - LockBufferF( length * 2, ref buffer ); - int j = start; - for( int i = 0; i < length * 2; i ++ ) { - buffer[ i ] = data[ j ]; - j += inc; - } - - FFT( buffer, length, direction ); - - // copy from buffer - j = start; - for( int i = 0; i < length; i ++ ) { - data[ j ] = buffer[ i ]; - j += inc; - } - UnlockBufferF( ref buffer ); - } - - private static void LinearFFT_Quick( float[] data, int start, int inc, int length, FourierDirection direction ) { - /*Debug.Assert( data != null ); - Debug.Assert( start >= 0 ); - Debug.Assert( inc >= 1 ); - Debug.Assert( length >= 1 ); - Debug.Assert( ( start + inc * ( length - 1 ) ) * 2 < data.Length );*/ - - // copy to buffer - float[] buffer = null; - LockBufferF( length * 2, ref buffer ); - int j = start; - for( int i = 0; i < length * 2; i ++ ) { - buffer[ i ] = data[ j ]; - j += inc; - } - - FFT_Quick( buffer, length, direction ); - - // copy from buffer - j = start; - for( int i = 0; i < length; i ++ ) { - data[ j ] = buffer[ i ]; - j += inc; - } - UnlockBufferF( ref buffer ); - } - - //====================================================================================== - //====================================================================================== - - static private bool _bufferCFLocked = false; - static private ComplexF[] _bufferCF = new ComplexF[ 0 ]; - - static private void LockBufferCF( int length, ref ComplexF[] buffer ) { - Debug.Assert( length >= 0 ); - Debug.Assert( _bufferCFLocked == false ); - - _bufferCFLocked = true; - if( length != _bufferCF.Length ) { - _bufferCF = new ComplexF[ length ]; - } - buffer = _bufferCF; - } - static private void UnlockBufferCF( ref ComplexF[] buffer ) { - Debug.Assert( _bufferCF == buffer ); - Debug.Assert( _bufferCFLocked == true ); - - _bufferCFLocked = false; - buffer = null; - } - - private static void LinearFFT( ComplexF[] data, int start, int inc, int length, FourierDirection direction ) { - Debug.Assert( data != null ); - Debug.Assert( start >= 0 ); - Debug.Assert( inc >= 1 ); - Debug.Assert( length >= 1 ); - Debug.Assert( ( start + inc * ( length - 1 ) ) < data.Length ); - - // copy to buffer - ComplexF[] buffer = null; - LockBufferCF( length, ref buffer ); - int j = start; - for( int i = 0; i < length; i ++ ) { - buffer[ i ] = data[ j ]; - j += inc; - } - - FFT( buffer, length, direction ); - - // copy from buffer - j = start; - for( int i = 0; i < length; i ++ ) { - data[ j ] = buffer[ i ]; - j += inc; - } - UnlockBufferCF( ref buffer ); - } - - private static void LinearFFT_Quick( ComplexF[] data, int start, int inc, int length, FourierDirection direction ) { - /*Debug.Assert( data != null ); - Debug.Assert( start >= 0 ); - Debug.Assert( inc >= 1 ); - Debug.Assert( length >= 1 ); - Debug.Assert( ( start + inc * ( length - 1 ) ) < data.Length ); */ - - // copy to buffer - ComplexF[] buffer = null; - LockBufferCF( length, ref buffer ); - int j = start; - for( int i = 0; i < length; i ++ ) { - buffer[ i ] = data[ j ]; - j += inc; - } - - FFT( buffer, length, direction ); - - // copy from buffer - j = start; - for( int i = 0; i < length; i ++ ) { - data[ j ] = buffer[ i ]; - j += inc; - } - UnlockBufferCF( ref buffer ); - } - - //====================================================================================== - //====================================================================================== - - static private bool _bufferCLocked = false; - static private Complex[] _bufferC = new Complex[ 0 ]; - - static private void LockBufferC( int length, ref Complex[] buffer ) { - Debug.Assert( length >= 0 ); - Debug.Assert( _bufferCLocked == false ); - - _bufferCLocked = true; - if( length >= _bufferC.Length ) { - _bufferC = new Complex[ length ]; - } - buffer = _bufferC; - } - static private void UnlockBufferC( ref Complex[] buffer ) { - Debug.Assert( _bufferC == buffer ); - Debug.Assert( _bufferCLocked == true ); - - _bufferCLocked = false; - buffer = null; - } - - private static void LinearFFT( Complex[] data, int start, int inc, int length, FourierDirection direction ) { - Debug.Assert( data != null ); - Debug.Assert( start >= 0 ); - Debug.Assert( inc >= 1 ); - Debug.Assert( length >= 1 ); - Debug.Assert( ( start + inc * ( length - 1 ) ) < data.Length ); - - // copy to buffer - Complex[] buffer = null; - LockBufferC( length, ref buffer ); - int j = start; - for( int i = 0; i < length; i ++ ) { - buffer[ i ] = data[ j ]; - j += inc; - } - - FFT( buffer, length, direction ); - - // copy from buffer - j = start; - for( int i = 0; i < length; i ++ ) { - data[ j ] = buffer[ i ]; - j += inc; - } - UnlockBufferC( ref buffer ); - } - - private static void LinearFFT_Quick( Complex[] data, int start, int inc, int length, FourierDirection direction ) { - /*Debug.Assert( data != null ); - Debug.Assert( start >= 0 ); - Debug.Assert( inc >= 1 ); - Debug.Assert( length >= 1 ); - Debug.Assert( ( start + inc * ( length - 1 ) ) < data.Length );*/ - - // copy to buffer - Complex[] buffer = null; - LockBufferC( length, ref buffer ); - int j = start; - for( int i = 0; i < length; i ++ ) { - buffer[ i ] = data[ j ]; - j += inc; - } - - FFT_Quick( buffer, length, direction ); - - // copy from buffer - j = start; - for( int i = 0; i < length; i ++ ) { - data[ j ] = buffer[ i ]; - j += inc; - } - UnlockBufferC( ref buffer ); - } - - //====================================================================================== - //====================================================================================== - - /// - /// Compute a 1D fast Fourier transform of a dataset of complex numbers (as pairs of float's). - /// - /// - /// - /// - public static void FFT( float[] data, int length, FourierDirection direction ) { - Debug.Assert( data != null ); - Debug.Assert( data.Length >= length*2 ); - Debug.Assert( Fourier.IsPowerOf2( length ) == true ); - - Fourier.SyncLookupTableLength( length ); - - int ln = Fourier.Log2( length ); - - // reorder array - Fourier.ReorderArray( data ); - - // successive doubling - int N = 1; - int signIndex = ( direction == FourierDirection.Forward ) ? 0 : 1; - for( int level = 1; level <= ln; level ++ ) { - int M = N; - N <<= 1; - - float[] uRLookup = _uRLookupF[ level, signIndex ]; - float[] uILookup = _uILookupF[ level, signIndex ]; - - for( int j = 0; j < M; j ++ ) { - float uR = uRLookup[j]; - float uI = uILookup[j]; - - for( int evenT = j; evenT < length; evenT += N ) { - int even = evenT << 1; - int odd = ( evenT + M ) << 1; - - float r = data[ odd ]; - float i = data[ odd+1 ]; - - float odduR = r * uR - i * uI; - float odduI = r * uI + i * uR; - - r = data[ even ]; - i = data[ even+1 ]; - - data[ even ] = r + odduR; - data[ even+1 ] = i + odduI; - - data[ odd ] = r - odduR; - data[ odd+1 ] = i - odduI; - } - } - } - } - - /// - /// Compute a 1D fast Fourier transform of a dataset of complex numbers (as pairs of float's). - /// - /// - /// - /// - public static void FFT_Quick( float[] data, int length, FourierDirection direction ) { - /*Debug.Assert( data != null ); - Debug.Assert( data.Length >= length*2 ); - Debug.Assert( Fourier.IsPowerOf2( length ) == true ); - - Fourier.SyncLookupTableLength( length );*/ - - int ln = Fourier.Log2( length ); - - // reorder array - Fourier.ReorderArray( data ); - - // successive doubling - int N = 1; - int signIndex = ( direction == FourierDirection.Forward ) ? 0 : 1; - for( int level = 1; level <= ln; level ++ ) { - int M = N; - N <<= 1; - - float[] uRLookup = _uRLookupF[ level, signIndex ]; - float[] uILookup = _uILookupF[ level, signIndex ]; - - for( int j = 0; j < M; j ++ ) { - float uR = uRLookup[j]; - float uI = uILookup[j]; - - for( int evenT = j; evenT < length; evenT += N ) { - int even = evenT << 1; - int odd = ( evenT + M ) << 1; - - float r = data[ odd ]; - float i = data[ odd+1 ]; - - float odduR = r * uR - i * uI; - float odduI = r * uI + i * uR; - - r = data[ even ]; - i = data[ even+1 ]; - - data[ even ] = r + odduR; - data[ even+1 ] = i + odduI; - - data[ odd ] = r - odduR; - data[ odd+1 ] = i - odduI; - } - } - } - } - - /// - /// Compute a 1D fast Fourier transform of a dataset of complex numbers. - /// - /// - /// - /// - public static void FFT( ComplexF[] data, int length, FourierDirection direction ) { - if( data == null ) { - throw new ArgumentNullException( "data" ); - } - if( data.Length < length ) { - throw new ArgumentOutOfRangeException( "length", length, "must be at least as large as 'data.Length' parameter" ); - } - if( Fourier.IsPowerOf2( length ) == false ) { - throw new ArgumentOutOfRangeException( "length", length, "must be a power of 2" ); - } - - Fourier.SyncLookupTableLength( length ); - - int ln = Fourier.Log2( length ); - - // reorder array - Fourier.ReorderArray( data ); - - // successive doubling - int N = 1; - int signIndex = ( direction == FourierDirection.Forward ) ? 0 : 1; - - for( int level = 1; level <= ln; level ++ ) { - int M = N; - N <<= 1; - - float[] uRLookup = _uRLookupF[ level, signIndex ]; - float[] uILookup = _uILookupF[ level, signIndex ]; - - for( int j = 0; j < M; j ++ ) { - float uR = uRLookup[j]; - float uI = uILookup[j]; - - for( int even = j; even < length; even += N ) { - int odd = even + M; - - float r = data[ odd ].Re; - float i = data[ odd ].Im; - - float odduR = r * uR - i * uI; - float odduI = r * uI + i * uR; - - r = data[ even ].Re; - i = data[ even ].Im; - - data[ even ].Re = r + odduR; - data[ even ].Im = i + odduI; - - data[ odd ].Re = r - odduR; - data[ odd ].Im = i - odduI; - } - } - } - - } - - /// - /// Compute a 1D fast Fourier transform of a dataset of complex numbers. - /// - /// - /// - /// - public static void FFT_Quick( ComplexF[] data, int length, FourierDirection direction ) { - /*if( data == null ) { - throw new ArgumentNullException( "data" ); - } - if( data.Length < length ) { - throw new ArgumentOutOfRangeException( "length", length, "must be at least as large as 'data.Length' parameter" ); - } - if( Fourier.IsPowerOf2( length ) == false ) { - throw new ArgumentOutOfRangeException( "length", length, "must be a power of 2" ); - } - - Fourier.SyncLookupTableLength( length );*/ - - int ln = Fourier.Log2( length ); - - // reorder array - Fourier.ReorderArray( data ); - - // successive doubling - int N = 1; - int signIndex = ( direction == FourierDirection.Forward ) ? 0 : 1; - - for( int level = 1; level <= ln; level ++ ) { - int M = N; - N <<= 1; - - float[] uRLookup = _uRLookupF[ level, signIndex ]; - float[] uILookup = _uILookupF[ level, signIndex ]; - - for( int j = 0; j < M; j ++ ) { - float uR = uRLookup[j]; - float uI = uILookup[j]; - - for( int even = j; even < length; even += N ) { - int odd = even + M; - - float r = data[ odd ].Re; - float i = data[ odd ].Im; - - float odduR = r * uR - i * uI; - float odduI = r * uI + i * uR; - - r = data[ even ].Re; - i = data[ even ].Im; - - data[ even ].Re = r + odduR; - data[ even ].Im = i + odduI; - - data[ odd ].Re = r - odduR; - data[ odd ].Im = i - odduI; - } - } - } - - } - - /// - /// Compute a 1D fast Fourier transform of a dataset of complex numbers. - /// - /// - /// - public static void FFT( ComplexF[] data, FourierDirection direction ) { - if( data == null ) { - throw new ArgumentNullException( "data" ); - } - Fourier.FFT( data, data.Length, direction ); - } - - /// - /// Compute a 1D fast Fourier transform of a dataset of complex numbers. - /// - /// - /// - /// - public static void FFT( Complex[] data, int length, FourierDirection direction ) { - if( data == null ) { - throw new ArgumentNullException( "data" ); - } - if( data.Length < length ) { - throw new ArgumentOutOfRangeException( "length", length, "must be at least as large as 'data.Length' parameter" ); - } - if( Fourier.IsPowerOf2( length ) == false ) { - throw new ArgumentOutOfRangeException( "length", length, "must be a power of 2" ); - } - - Fourier.SyncLookupTableLength( length ); - - int ln = Fourier.Log2( length ); - - // reorder array - Fourier.ReorderArray( data ); - - // successive doubling - int N = 1; - int signIndex = ( direction == FourierDirection.Forward ) ? 0 : 1; - - for( int level = 1; level <= ln; level ++ ) { - int M = N; - N <<= 1; - - double[] uRLookup = _uRLookup[ level, signIndex ]; - double[] uILookup = _uILookup[ level, signIndex ]; - - for( int j = 0; j < M; j ++ ) { - double uR = uRLookup[j]; - double uI = uILookup[j]; - - for( int even = j; even < length; even += N ) { - int odd = even + M; - - double r = data[ odd ].Re; - double i = data[ odd ].Im; - - double odduR = r * uR - i * uI; - double odduI = r * uI + i * uR; - - r = data[ even ].Re; - i = data[ even ].Im; - - data[ even ].Re = r + odduR; - data[ even ].Im = i + odduI; - - data[ odd ].Re = r - odduR; - data[ odd ].Im = i - odduI; - } - } - } - - } - - /// - /// Compute a 1D fast Fourier transform of a dataset of complex numbers. - /// - /// - /// - /// - public static void FFT_Quick( Complex[] data, int length, FourierDirection direction ) { - /*if( data == null ) { - throw new ArgumentNullException( "data" ); - } - if( data.Length < length ) { - throw new ArgumentOutOfRangeException( "length", length, "must be at least as large as 'data.Length' parameter" ); - } - if( Fourier.IsPowerOf2( length ) == false ) { - throw new ArgumentOutOfRangeException( "length", length, "must be a power of 2" ); - } - - Fourier.SyncLookupTableLength( length ); */ - - int ln = Fourier.Log2( length ); - - // reorder array - Fourier.ReorderArray( data ); - - // successive doubling - int N = 1; - int signIndex = ( direction == FourierDirection.Forward ) ? 0 : 1; - - for( int level = 1; level <= ln; level ++ ) { - int M = N; - N <<= 1; - - double[] uRLookup = _uRLookup[ level, signIndex ]; - double[] uILookup = _uILookup[ level, signIndex ]; - - for( int j = 0; j < M; j ++ ) { - double uR = uRLookup[j]; - double uI = uILookup[j]; - - for( int even = j; even < length; even += N ) { - int odd = even + M; - - double r = data[ odd ].Re; - double i = data[ odd ].Im; - - double odduR = r * uR - i * uI; - double odduI = r * uI + i * uR; - - r = data[ even ].Re; - i = data[ even ].Im; - - data[ even ].Re = r + odduR; - data[ even ].Im = i + odduI; - - data[ odd ].Re = r - odduR; - data[ odd ].Im = i - odduI; - } - } - } - - } - - /// - /// Compute a 1D real-symmetric fast fourier transform. - /// - /// - /// - public static void RFFT( float[] data, FourierDirection direction ) { - if( data == null ) { - throw new ArgumentNullException( "data" ); - } - Fourier.RFFT( data, data.Length, direction ); - } - - /// - /// Compute a 1D real-symmetric fast fourier transform. - /// - /// - /// - /// - public static void RFFT( float[] data, int length, FourierDirection direction ) { - if( data == null ) { - throw new ArgumentNullException( "data" ); - } - if( data.Length < length ) { - throw new ArgumentOutOfRangeException( "length", length, "must be at least as large as 'data.Length' parameter" ); - } - if( Fourier.IsPowerOf2( length ) == false ) { - throw new ArgumentOutOfRangeException( "length", length, "must be a power of 2" ); - } - - float c1 = 0.5f, c2; - float theta = (float) Math.PI / (length/2); - - if( direction == FourierDirection.Forward ) { - c2 = -0.5f; - FFT( data, length/2, direction ); - } - else { - c2 = 0.5f; - theta = - theta; - } - - float wtemp = (float) Math.Sin( 0.5*theta ); - float wpr = -2 * wtemp*wtemp; - float wpi =(float) Math.Sin( theta ); - float wr = 1 + wpr; - float wi = wpi; - - // do / undo packing - for( int i = 1; i < length/4; i ++ ) { - int a = 2*i; - int b = length - 2*i; - float h1r = c1 * ( data[ a ] + data[ b ] ); - float h1i = c1 * ( data[ a+1 ] - data[ b+1 ] ); - float h2r = -c2 * ( data[ a+1 ] + data[ b+1 ] ); - float h2i = c2 * ( data[ a ] - data[ b ] ); - data[ a ] = h1r + wr*h2r - wi*h2i; - data[ a+1 ] = h1i + wr*h2i + wi*h2r; - data[ b ] = h1r - wr*h2r + wi*h2i; - data[ b+1 ] = -h1i + wr*h2i + wi*h2r; - wr = (wtemp = wr) * wpr - wi * wpi + wr; - wi = wi * wpr + wtemp * wpi + wi; - } - - if( direction == FourierDirection.Forward ) { - float hir = data[0]; - data[0] = hir + data[1]; - data[1] = hir - data[1]; - } - else { - float hir = data[0]; - data[0] = c1 * ( hir + data[1] ); - data[1] = c1 * ( hir - data[1] ); - Fourier.FFT( data, length/2, direction ); - } - } - - /// - /// Compute a 2D fast fourier transform on a data set of complex numbers (represented as pairs of floats) - /// - /// - /// - /// - /// - public static void FFT2( float[] data, int xLength, int yLength, FourierDirection direction ) { - if( data == null ) { - throw new ArgumentNullException( "data" ); - } - if( data.Length < xLength*yLength*2 ) { - throw new ArgumentOutOfRangeException( "data.Length", data.Length, "must be at least as large as 'xLength * yLength * 2' parameter" ); - } - if( Fourier.IsPowerOf2( xLength ) == false ) { - throw new ArgumentOutOfRangeException( "xLength", xLength, "must be a power of 2" ); - } - if( Fourier.IsPowerOf2( yLength ) == false ) { - throw new ArgumentOutOfRangeException( "yLength", yLength, "must be a power of 2" ); - } - - int xInc = 1; - int yInc = xLength; - - if( xLength > 1 ) { - Fourier.SyncLookupTableLength( xLength ); - for( int y = 0; y < yLength; y ++ ) { - int xStart = y * yInc; - Fourier.LinearFFT_Quick( data, xStart, xInc, xLength, direction ); - } - } - - if( yLength > 1 ) { - Fourier.SyncLookupTableLength( yLength ); - for( int x = 0; x < xLength; x ++ ) { - int yStart = x * xInc; - Fourier.LinearFFT_Quick( data, yStart, yInc, yLength, direction ); - } - } - } - - /// - /// Compute a 2D fast fourier transform on a data set of complex numbers - /// - /// - /// - /// - /// - public static void FFT2( ComplexF[] data, int xLength, int yLength, FourierDirection direction ) { - if( data == null ) { - throw new ArgumentNullException( "data" ); - } - if( data.Length < xLength*yLength ) { - throw new ArgumentOutOfRangeException( "data.Length", data.Length, "must be at least as large as 'xLength * yLength' parameter" ); - } - if( Fourier.IsPowerOf2( xLength ) == false ) { - throw new ArgumentOutOfRangeException( "xLength", xLength, "must be a power of 2" ); - } - if( Fourier.IsPowerOf2( yLength ) == false ) { - throw new ArgumentOutOfRangeException( "yLength", yLength, "must be a power of 2" ); - } - - int xInc = 1; - int yInc = xLength; - - if( xLength > 1 ) { - Fourier.SyncLookupTableLength( xLength ); - for( int y = 0; y < yLength; y ++ ) { - int xStart = y * yInc; - Fourier.LinearFFT_Quick( data, xStart, xInc, xLength, direction ); - } - } - - if( yLength > 1 ) { - Fourier.SyncLookupTableLength( yLength ); - for( int x = 0; x < xLength; x ++ ) { - int yStart = x * xInc; - Fourier.LinearFFT_Quick( data, yStart, yInc, yLength, direction ); - } - } - } - - /// - /// Compute a 2D fast fourier transform on a data set of complex numbers - /// - /// - /// - /// - /// - public static void FFT2( Complex[] data, int xLength, int yLength, FourierDirection direction ) { - if( data == null ) { - throw new ArgumentNullException( "data" ); - } - if( data.Length < xLength*yLength ) { - throw new ArgumentOutOfRangeException( "data.Length", data.Length, "must be at least as large as 'xLength * yLength' parameter" ); - } - if( Fourier.IsPowerOf2( xLength ) == false ) { - throw new ArgumentOutOfRangeException( "xLength", xLength, "must be a power of 2" ); - } - if( Fourier.IsPowerOf2( yLength ) == false ) { - throw new ArgumentOutOfRangeException( "yLength", yLength, "must be a power of 2" ); - } - - int xInc = 1; - int yInc = xLength; - - if( xLength > 1 ) { - Fourier.SyncLookupTableLength( xLength ); - for( int y = 0; y < yLength; y ++ ) { - int xStart = y * yInc; - Fourier.LinearFFT_Quick( data, xStart, xInc, xLength, direction ); - } - } - - if( yLength > 1 ) { - Fourier.SyncLookupTableLength( yLength ); - for( int x = 0; x < xLength; x ++ ) { - int yStart = x * xInc; - Fourier.LinearFFT_Quick( data, yStart, yInc, yLength, direction ); - } - } - } - - /// - /// Compute a 3D fast fourier transform on a data set of complex numbers - /// - /// - /// - /// - /// - /// - public static void FFT3( ComplexF[] data, int xLength, int yLength, int zLength, FourierDirection direction ) { - if( data == null ) { - throw new ArgumentNullException( "data" ); - } - if( data.Length < xLength*yLength*zLength ) { - throw new ArgumentOutOfRangeException( "data.Length", data.Length, "must be at least as large as 'xLength * yLength * zLength' parameter" ); - } - if( Fourier.IsPowerOf2( xLength ) == false ) { - throw new ArgumentOutOfRangeException( "xLength", xLength, "must be a power of 2" ); - } - if( Fourier.IsPowerOf2( yLength ) == false ) { - throw new ArgumentOutOfRangeException( "yLength", yLength, "must be a power of 2" ); - } - if( Fourier.IsPowerOf2( zLength ) == false ) { - throw new ArgumentOutOfRangeException( "zLength", zLength, "must be a power of 2" ); - } - - int xInc = 1; - int yInc = xLength; - int zInc = xLength * yLength; - - if( xLength > 1 ) { - Fourier.SyncLookupTableLength( xLength ); - for( int z = 0; z < zLength; z ++ ) { - for( int y = 0; y < yLength; y ++ ) { - int xStart = y * yInc + z * zInc; - Fourier.LinearFFT_Quick( data, xStart, xInc, xLength, direction ); - } - } - } - - if( yLength > 1 ) { - Fourier.SyncLookupTableLength( yLength ); - for( int z = 0; z < zLength; z ++ ) { - for( int x = 0; x < xLength; x ++ ) { - int yStart = z * zInc + x * xInc; - Fourier.LinearFFT_Quick( data, yStart, yInc, yLength, direction ); - } - } - } - - if( zLength > 1 ) { - Fourier.SyncLookupTableLength( zLength ); - for( int y = 0; y < yLength; y ++ ) { - for( int x = 0; x < xLength; x ++ ) { - int zStart = y * yInc + x * xInc; - Fourier.LinearFFT_Quick( data, zStart, zInc, zLength, direction ); - } - } - } - } - - /// - /// Compute a 3D fast fourier transform on a data set of complex numbers - /// - /// - /// - /// - /// - /// - public static void FFT3( Complex[] data, int xLength, int yLength, int zLength, FourierDirection direction ) { - if( data == null ) { - throw new ArgumentNullException( "data" ); - } - if( data.Length < xLength*yLength*zLength ) { - throw new ArgumentOutOfRangeException( "data.Length", data.Length, "must be at least as large as 'xLength * yLength * zLength' parameter" ); - } - if( Fourier.IsPowerOf2( xLength ) == false ) { - throw new ArgumentOutOfRangeException( "xLength", xLength, "must be a power of 2" ); - } - if( Fourier.IsPowerOf2( yLength ) == false ) { - throw new ArgumentOutOfRangeException( "yLength", yLength, "must be a power of 2" ); - } - if( Fourier.IsPowerOf2( zLength ) == false ) { - throw new ArgumentOutOfRangeException( "zLength", zLength, "must be a power of 2" ); - } - - int xInc = 1; - int yInc = xLength; - int zInc = xLength * yLength; - - if( xLength > 1 ) { - Fourier.SyncLookupTableLength( xLength ); - for( int z = 0; z < zLength; z ++ ) { - for( int y = 0; y < yLength; y ++ ) { - int xStart = y * yInc + z * zInc; - Fourier.LinearFFT_Quick( data, xStart, xInc, xLength, direction ); - } - } - } - - if( yLength > 1 ) { - Fourier.SyncLookupTableLength( yLength ); - for( int z = 0; z < zLength; z ++ ) { - for( int x = 0; x < xLength; x ++ ) { - int yStart = z * zInc + x * xInc; - Fourier.LinearFFT_Quick( data, yStart, yInc, yLength, direction ); - } - } - } - - if( zLength > 1 ) { - Fourier.SyncLookupTableLength( zLength ); - for( int y = 0; y < yLength; y ++ ) { - for( int x = 0; x < xLength; x ++ ) { - int zStart = y * yInc + x * xInc; - Fourier.LinearFFT_Quick( data, zStart, zInc, zLength, direction ); - } - } - } - } - - } -} diff --git a/mcs/class/System.Drawing/Test/DrawingTest/Exocortex.DSP/src/FourierDirection.cs b/mcs/class/System.Drawing/Test/DrawingTest/Exocortex.DSP/src/FourierDirection.cs deleted file mode 100644 index 275ad743c18..00000000000 --- a/mcs/class/System.Drawing/Test/DrawingTest/Exocortex.DSP/src/FourierDirection.cs +++ /dev/null @@ -1,55 +0,0 @@ -/* - * BSD Licence: - * Copyright (c) 2001, 2002 Ben Houston [ ben@exocortex.org ] - * Exocortex Technologies [ www.exocortex.org ] - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH - * DAMAGE. - */ - - -using System; - -namespace Exocortex.DSP -{ - // Comments? Questions? Bugs? Tell Ben Houston at ben@exocortex.org - // Version: May 4, 2002 - - /// - ///

The direction of the fourier transform.

- ///
- public enum FourierDirection : int { - /// - /// Forward direction. Usually in reference to moving from temporal - /// representation to frequency representation - /// - Forward = 1, - /// - /// Backward direction. Usually in reference to moving from frequency - /// representation to temporal representation - /// - Backward = -1, - } -} diff --git a/mcs/class/System.Drawing/Test/DrawingTest/System.Drawing.Test.dotnet.sln b/mcs/class/System.Drawing/Test/DrawingTest/System.Drawing.Test.dotnet.sln deleted file mode 100644 index c786bb02b1b..00000000000 --- a/mcs/class/System.Drawing/Test/DrawingTest/System.Drawing.Test.dotnet.sln +++ /dev/null @@ -1,51 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 8.00 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test.dotnet", "..\Test.dotnet.csproj", "{DFE29E81-D6A8-45D4-A627-161F462BE767}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Exocortex.DSP.v1", "Exocortex.DSP\src\Exocortex.DSP.v1.csproj", "{1904A41B-D1B8-40E5-ADBB-728DDCF7C816}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DrawingTestHelper", "DrawingTestHelper\DrawingTestHelper.csproj", "{8EF9FC71-4D70-4F89-BF4D-B83EF37D4A0C}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfiguration) = preSolution - Debug = Debug - Debug_Java = Debug_Java - Release = Release - Release_Java = Release_Java - EndGlobalSection - GlobalSection(ProjectConfiguration) = postSolution - {DFE29E81-D6A8-45D4-A627-161F462BE767}.Debug.ActiveCfg = Debug|.NET - {DFE29E81-D6A8-45D4-A627-161F462BE767}.Debug.Build.0 = Debug|.NET - {DFE29E81-D6A8-45D4-A627-161F462BE767}.Debug_Java.ActiveCfg = Debug|.NET - {DFE29E81-D6A8-45D4-A627-161F462BE767}.Debug_Java.Build.0 = Debug|.NET - {DFE29E81-D6A8-45D4-A627-161F462BE767}.Release.ActiveCfg = Release|.NET - {DFE29E81-D6A8-45D4-A627-161F462BE767}.Release.Build.0 = Release|.NET - {DFE29E81-D6A8-45D4-A627-161F462BE767}.Release_Java.ActiveCfg = Release|.NET - {DFE29E81-D6A8-45D4-A627-161F462BE767}.Release_Java.Build.0 = Release|.NET - {1904A41B-D1B8-40E5-ADBB-728DDCF7C816}.Debug.ActiveCfg = Debug|.NET - {1904A41B-D1B8-40E5-ADBB-728DDCF7C816}.Debug.Build.0 = Debug|.NET - {1904A41B-D1B8-40E5-ADBB-728DDCF7C816}.Debug_Java.ActiveCfg = Debug|.NET - {1904A41B-D1B8-40E5-ADBB-728DDCF7C816}.Debug_Java.Build.0 = Debug|.NET - {1904A41B-D1B8-40E5-ADBB-728DDCF7C816}.Release.ActiveCfg = Release|.NET - {1904A41B-D1B8-40E5-ADBB-728DDCF7C816}.Release.Build.0 = Release|.NET - {1904A41B-D1B8-40E5-ADBB-728DDCF7C816}.Release_Java.ActiveCfg = Release|.NET - {1904A41B-D1B8-40E5-ADBB-728DDCF7C816}.Release_Java.Build.0 = Release|.NET - {8EF9FC71-4D70-4F89-BF4D-B83EF37D4A0C}.Debug.ActiveCfg = Debug|.NET - {8EF9FC71-4D70-4F89-BF4D-B83EF37D4A0C}.Debug.Build.0 = Debug|.NET - {8EF9FC71-4D70-4F89-BF4D-B83EF37D4A0C}.Debug_Java.ActiveCfg = Debug|.NET - {8EF9FC71-4D70-4F89-BF4D-B83EF37D4A0C}.Debug_Java.Build.0 = Debug|.NET - {8EF9FC71-4D70-4F89-BF4D-B83EF37D4A0C}.Release.ActiveCfg = Release|.NET - {8EF9FC71-4D70-4F89-BF4D-B83EF37D4A0C}.Release.Build.0 = Release|.NET - {8EF9FC71-4D70-4F89-BF4D-B83EF37D4A0C}.Release_Java.ActiveCfg = Release|.NET - {8EF9FC71-4D70-4F89-BF4D-B83EF37D4A0C}.Release_Java.Build.0 = Release|.NET - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - EndGlobalSection - GlobalSection(ExtensibilityAddIns) = postSolution - EndGlobalSection -EndGlobal diff --git a/mcs/class/System.Drawing/Test/DrawingTest/System.Drawing.Test.sln b/mcs/class/System.Drawing/Test/DrawingTest/System.Drawing.Test.sln deleted file mode 100644 index dea52ef1fb5..00000000000 --- a/mcs/class/System.Drawing/Test/DrawingTest/System.Drawing.Test.sln +++ /dev/null @@ -1,44 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 8.00 -Project("{83B010C7-76FC-4FAD-A26C-00D7EFE60256}") = "Exocortex.DSP.v1.J2EE", "Exocortex.DSP\src\Exocortex.DSP.v1.J2EE.vmwcsproj", "{8D602CEF-DC13-48F1-AF0C-F6201A634FD2}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Project("{83B010C7-76FC-4FAD-A26C-00D7EFE60256}") = "DrawingTestHelper_java", "DrawingTestHelper\DrawingTestHelper_java.vmwcsproj", "{8EF9FC71-4D70-4F89-BF4D-B83EF37D4A0C}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Project("{83B010C7-76FC-4FAD-A26C-00D7EFE60256}") = "Test", "..\Test.vmwcsproj", "{D92997D0-B8BD-49A8-A7D0-8B6043930A07}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfiguration) = preSolution - Debug = Debug - Debug_Java = Debug_Java - Release_Java = Release_Java - EndGlobalSection - GlobalSection(ProjectConfiguration) = postSolution - {8D602CEF-DC13-48F1-AF0C-F6201A634FD2}.Debug.ActiveCfg = Debug|.NET - {8D602CEF-DC13-48F1-AF0C-F6201A634FD2}.Debug.Build.0 = Debug|.NET - {8D602CEF-DC13-48F1-AF0C-F6201A634FD2}.Debug_Java.ActiveCfg = Debug_Java|.NET - {8D602CEF-DC13-48F1-AF0C-F6201A634FD2}.Debug_Java.Build.0 = Debug_Java|.NET - {8D602CEF-DC13-48F1-AF0C-F6201A634FD2}.Release_Java.ActiveCfg = Release_Java|.NET - {8D602CEF-DC13-48F1-AF0C-F6201A634FD2}.Release_Java.Build.0 = Release_Java|.NET - {8EF9FC71-4D70-4F89-BF4D-B83EF37D4A0C}.Debug.ActiveCfg = Debug|.NET - {8EF9FC71-4D70-4F89-BF4D-B83EF37D4A0C}.Debug.Build.0 = Debug|.NET - {8EF9FC71-4D70-4F89-BF4D-B83EF37D4A0C}.Debug_Java.ActiveCfg = Debug_Java|.NET - {8EF9FC71-4D70-4F89-BF4D-B83EF37D4A0C}.Debug_Java.Build.0 = Debug_Java|.NET - {8EF9FC71-4D70-4F89-BF4D-B83EF37D4A0C}.Release_Java.ActiveCfg = Release_Java|.NET - {8EF9FC71-4D70-4F89-BF4D-B83EF37D4A0C}.Release_Java.Build.0 = Release_Java|.NET - {D92997D0-B8BD-49A8-A7D0-8B6043930A07}.Debug.ActiveCfg = Debug|.NET - {D92997D0-B8BD-49A8-A7D0-8B6043930A07}.Debug.Build.0 = Debug|.NET - {D92997D0-B8BD-49A8-A7D0-8B6043930A07}.Debug_Java.ActiveCfg = Debug_Java|.NET - {D92997D0-B8BD-49A8-A7D0-8B6043930A07}.Debug_Java.Build.0 = Debug_Java|.NET - {D92997D0-B8BD-49A8-A7D0-8B6043930A07}.Release_Java.ActiveCfg = Release_Java|.NET - {D92997D0-B8BD-49A8-A7D0-8B6043930A07}.Release_Java.Build.0 = Release_Java|.NET - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - EndGlobalSection - GlobalSection(ExtensibilityAddIns) = postSolution - EndGlobalSection -EndGlobal diff --git a/mcs/class/System.Drawing/Test/DrawingTest/Test/AssemblyInfo.cs b/mcs/class/System.Drawing/Test/DrawingTest/Test/AssemblyInfo.cs deleted file mode 100644 index 177a4f0e70a..00000000000 --- a/mcs/class/System.Drawing/Test/DrawingTest/Test/AssemblyInfo.cs +++ /dev/null @@ -1,58 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; - -// -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -// -[assembly: AssemblyTitle("")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("")] -[assembly: AssemblyCopyright("")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: - -[assembly: AssemblyVersion("1.0.*")] - -// -// In order to sign your assembly you must specify a key to use. Refer to the -// Microsoft .NET Framework documentation for more information on assembly signing. -// -// Use the attributes below to control which key is used for signing. -// -// Notes: -// (*) If no key is specified, the assembly is not signed. -// (*) KeyName refers to a key that has been installed in the Crypto Service -// Provider (CSP) on your machine. KeyFile refers to a file which contains -// a key. -// (*) If the KeyFile and the KeyName values are both specified, the -// following processing occurs: -// (1) If the KeyName can be found in the CSP, that key is used. -// (2) If the KeyName does not exist and the KeyFile does exist, the key -// in the KeyFile is installed into the CSP and used. -// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility. -// When specifying the KeyFile, the location of the KeyFile should be -// relative to the project output directory which is -// %Project Directory%\obj\. For example, if your KeyFile is -// located in the project directory, you would specify the AssemblyKeyFile -// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")] -// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework -// documentation for more information on this. -// -[assembly: AssemblyDelaySign(false)] -[assembly: AssemblyKeyFile("")] -[assembly: AssemblyKeyName("")] diff --git a/mcs/class/System.Drawing/Test/DrawingTest/Test/Bitmap.cs b/mcs/class/System.Drawing/Test/DrawingTest/Test/Bitmap.cs deleted file mode 100644 index 483e1cefaba..00000000000 --- a/mcs/class/System.Drawing/Test/DrawingTest/Test/Bitmap.cs +++ /dev/null @@ -1,53 +0,0 @@ -using System; -using System.Drawing; -using System.Drawing.Drawing2D; -using NUnit.Framework; -using DrawingTestHelper; - -namespace Test.Sys.Drawing -{ - /// - /// Summary description for Bitmap. - /// - [TestFixture] - public class BitmapFixture { - DrawingTest t; - - [SetUp] - public void SetUp () { - t = DrawingTest.Create (64, 64); - Bitmap b = new Bitmap (@"..\..\..\Test\Bitmap1.png"); - t.Graphics.DrawImageUnscaled (b, 0, 0); - DrawingTest.ShowForms = false; - } - [Test] - public void CloneTest () { - Bitmap b1 = (Bitmap) t.Bitmap.Clone (); - Assert.IsFalse (Object.ReferenceEquals (t.Bitmap, b1)); - Assert.AreEqual (DrawingTest.CalculateNorm (t.Bitmap), - DrawingTest.CalculateNorm (b1)); - t.Graphics.FillRectangle (Brushes.Black, 0, 0, 64, 64); - Assert.IsFalse (DrawingTest.CalculateNorm (t.Bitmap) == - DrawingTest.CalculateNorm (b1)); - } - [Test] - public void GetPixel () { - Assert.AreEqual (Color.FromArgb (255, Color.White), - t.Bitmap.GetPixel (0, 0)); - t.Graphics.FillRectangle (Brushes.Black, 30, 30, 30, 30); - Assert.AreEqual (Color.FromArgb (255, Color.Black), - t.Bitmap.GetPixel (31, 31)); - } - [Test] - [Category ("GHNotWorking")] //FIXME: MakeTransparent method does not working as expected. Fix it. - public void MakeTransparent () { - t.Show (); - Bitmap b = (Bitmap) t.Bitmap.Clone (); - b.MakeTransparent (Color.White); - t.Graphics.FillRectangle (Brushes.Black, 0, 0, 64, 64); - t.Graphics.DrawImageUnscaled (b, 0, 0); - t.Show (); - Assert.IsTrue (t.Compare (10)); - } - } -} diff --git a/mcs/class/System.Drawing/Test/DrawingTest/Test/Bitmap1.bmp b/mcs/class/System.Drawing/Test/DrawingTest/Test/Bitmap1.bmp deleted file mode 100644 index 4c21def1a0f73d99e294cf4b0a48b55d9383d6d6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12342 zcmeHJF>)L+47=1W-Q)=_UAfMr&;Os3a7>$~K?#CxZ_m52cIMV31b`6l3jhA|@_c!H zUhMs3pI>jEAD5q2*<i#H6Gy`(f42TSHy2r@ja0JX6@&k_pslT{haTU->2+-i|zjIFns5w z-LSqoe*_l8%<`vfMRKOi=9%T^S)_JbLTDbDs)=(ju5g{aX+E2OmY;`aZLTwCwx04a z@~nU6*I644&AfW%iBNAGS7&WBoXWp_mTv=mpoNVMTa$|pJ=&|mrxzbueO$~{y;EKL zDPn4>GxxMpkZ?Ybq1Cm{tZy*1mV4SMNH`zJ&?;Kz)VW|Kw$(?;z|E^?=5P0Rx1LWA z&lz~#%kR$H{dxX4N$K|M2 z`y*F!Z>I(d9ai9Q*~$2QzpD9-Raes-gWRp(hM!GY z^pLesREguP%iRbA!DaGH0_L7f74nh{s*iXKl!6$-)@^4HN!EORV1^3+rrLFK3wG=- zpDgU))m*JA5*EF`DP#)6jIj4^cH0{5s$@Bs*37y&fx)SIg?q!Kh`r_fUo`e{@w}YN zw~L|Xo>_%>f#H?9y{)Z=g*y$IOZU6ze^+N%7rUSJz$MoPzMRTr3x*#qUwk;(y1xc3 zJ97EM9ky8!Qx+Nv*e*K|!#2G^STa)6jL%5>*|ex~2AlBppYJnwe`Bv>vtig-;qx*n T_SIdWcNsig{an^LB{Ts5BwLAo diff --git a/mcs/class/System.Drawing/Test/DrawingTest/Test/Brush.cs b/mcs/class/System.Drawing/Test/DrawingTest/Test/Brush.cs deleted file mode 100644 index a7275958c39..00000000000 --- a/mcs/class/System.Drawing/Test/DrawingTest/Test/Brush.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System; -using System.Drawing; -using System.Drawing.Drawing2D; -using NUnit.Framework; -using DrawingTestHelper; - -namespace Test.Sys.Drawing -{ - /// - /// Summary description for Brush. - /// - [TestFixture] - public class BrushFixture - { - [Test] - public void ColorTest() - { - SolidBrush b = new SolidBrush (Color.Azure); - Assert.AreEqual (Color.Azure, b.Color); - DrawingTest t = DrawingTest.Create (64, 64); - t.Graphics.FillRectangle (b, 0, 0, 30, 30); - t.Show (); - b.Color = Color.FromArgb (100, 240, 30); - t.Graphics.FillRectangle (b, 30, 5, 30, 50); - t.Show (); - b.Color = Color.FromArgb (70, Color.FromName ("red")); - t.Graphics.FillRectangle (b, 15, 15, 40, 40); - t.Show (); - } - } -} diff --git a/mcs/class/System.Drawing/Test/DrawingTest/Test/Brushes.cs b/mcs/class/System.Drawing/Test/DrawingTest/Test/Brushes.cs deleted file mode 100644 index 6c495440c48..00000000000 --- a/mcs/class/System.Drawing/Test/DrawingTest/Test/Brushes.cs +++ /dev/null @@ -1,367 +0,0 @@ -using System; -using System.Drawing; -using System.Drawing.Drawing2D; -using NUnit.Framework; -using DrawingTestHelper; -using System.Reflection; - -namespace Test.Sys.Drawing -{ - /// - /// Summary description for Pens. - /// - - [TestFixture] - public class BrushesFixture - { - - [SetUp] - public void SetUp () - { - } - - #region Names Array - string [] ar_brushes = { - "Transparent", - "AliceBlue", - "AntiqueWhite", - "Aqua", - "Aquamarine", - "Azure", - "Beige", - "Bisque", - "Black", - "BlanchedAlmond", - "Blue", - "BlueViolet", - "Brown", - "BurlyWood", - "CadetBlue", - "Chartreuse", - "Chocolate", - "Coral", - "CornflowerBlue", - "Cornsilk", - "Crimson", - "Cyan", - "DarkBlue", - "DarkCyan", - "DarkGoldenrod", - "DarkGray", - "DarkGreen", - "DarkKhaki", - "DarkMagenta", - "DarkOliveGreen", - "DarkOrange", - "DarkOrchid", - "DarkRed", - "DarkSalmon", - "DarkSeaGreen", - "DarkSlateBlue", - "DarkSlateGray", - "DarkTurquoise", - "DarkViolet", - "DeepPink", - "DeepSkyBlue", - "DimGray", - "DodgerBlue", - "Firebrick", - "FloralWhite", - "ForestGreen", - "Fuchsia", - "Gainsboro", - "GhostWhite", - "Gold", - "Goldenrod", - "Gray", - "Green", - "GreenYellow", - "Honeydew", - "HotPink", - "IndianRed", - "Indigo", - "Ivory", - "Khaki", - "Lavender", - "LavenderBlush", - "LawnGreen", - "LemonChiffon", - "LightBlue", - "LightCoral", - "LightCyan", - "LightGoldenrodYellow", - "LightGreen", - "LightGray", - "LightPink", - "LightSalmon", - "LightSeaGreen", - "LightSkyBlue", - "LightSlateGray", - "LightSteelBlue", - "LightYellow", - "Lime", - "LimeGreen", - "Linen", - "Magenta", - "Maroon", - "MediumAquamarine", - "MediumBlue", - "MediumOrchid", - "MediumPurple", - "MediumSeaGreen", - "MediumSlateBlue", - "MediumSpringGreen", - "MediumTurquoise", - "MediumVioletRed", - "MidnightBlue", - "MintCream", - "MistyRose", - "Moccasin", - "NavajoWhite", - "Navy", - "OldLace", - "Olive", - "OliveDrab", - "Orange", - "OrangeRed", - "Orchid", - "PaleGoldenrod", - "PaleGreen", - "PaleTurquoise", - "PaleVioletRed", - "PapayaWhip", - "PeachPuff", - "Peru", - "Pink", - "Plum", - "PowderBlue", - "Purple", - "Red", - "RosyBrown", - "RoyalBlue", - "SaddleBrown", - "Salmon", - "SandyBrown", - "SeaGreen", - "SeaShell", - "Sienna", - "Silver", - "SkyBlue", - "SlateBlue", - "SlateGray", - "Snow", - "SpringGreen", - "SteelBlue", - "Tan", - "Teal", - "Thistle", - "Tomato", - "Turquoise", - "Violet", - "Wheat", - "White", - "WhiteSmoke", - "Yellow", - "YellowGreen"}; - - string [] ar_system_brushes = { - "ActiveBorder", - "ActiveCaption", - "ActiveCaptionText", - "AppWorkspace", - "Desktop", - "Control", - "ControlLightLight", - "ControlLight", - "ControlDark", - "ControlDarkDark", - "ControlText", - "Highlight", - "HighlightText", - "HotTrack", - "InactiveCaption", - "InactiveBorder", - "Info", - "Menu", - "ScrollBar", - "Window", - "WindowText"}; - - - #endregion - - [Test] - public void BrushesPropertyCount() - { - Type t = typeof(Brushes); - PropertyInfo [] pi = t.GetProperties(BindingFlags.Static | BindingFlags.Public); - - int i = 0; - foreach (PropertyInfo p in pi) - { - if (p.PropertyType == typeof(Brush)) - { - i++; - } - } - Assert.AreEqual(ar_brushes.Length, i, "Number of brushes"); - } - - [Test] - public void BrushesProperties () - { - Type t = typeof(Brushes); - foreach (string s in ar_brushes) - { - MemberInfo [] mi = t.GetMember(s); - - if (mi.Length == 1) - { - if (mi[0].MemberType == MemberTypes.Property) - { - PropertyInfo p = (PropertyInfo)mi[0]; - SolidBrush brush = (SolidBrush)p.GetValue(null, null); - Assert.AreEqual("Color [" + s + "]", brush.Color.ToString()); - } - else - { - Assert.Fail(s + " is not property of Brushes class"); - } - } - else - { - Assert.Fail("Property " + s + " not found in Brushes class"); - } - } - } - - [Test] - public void BrushesAssignValue () - { - Type t = typeof(Brushes); - foreach (string s in ar_brushes) - { - MemberInfo [] mi = t.GetMember(s); - - if (mi.Length == 1) - { - if (mi[0].MemberType == MemberTypes.Property) - { - PropertyInfo p = (PropertyInfo)mi[0]; - SolidBrush brush = (SolidBrush)p.GetValue(null, null); - - try - { - Color c = brush.Color; - brush.Color = Color.AliceBlue; - brush.Color = c; - - //BUG: Bug in .NET - //Assert.Fail("SolidBrush.Color must throw exception"); - Assert.IsTrue(true); - } - catch(ArgumentException) - { - Assert.IsTrue(true); - } - } - else - { - Assert.Fail(s + " is not property of Brushes class"); - } - } - else - { - Assert.Fail("Property " + s + " not found in Brushes class"); - } - } - } - - [Test] - public void SystemBrushesPropertyCount() - { - Type t = typeof(SystemBrushes); - PropertyInfo [] pi = t.GetProperties(BindingFlags.Static | BindingFlags.Public); - - int i = 0; - foreach (PropertyInfo p in pi) - { - if (p.PropertyType == typeof(Brush)) - { - i++; - } - } - Assert.AreEqual(ar_system_brushes.Length, i, "Number of brushes"); - } - - [Test] - public void SystemBrushesProperties () - { - Type t = typeof(SystemBrushes); - foreach (string s in ar_system_brushes) - { - MemberInfo [] mi = t.GetMember(s); - - if (mi.Length == 1) - { - if (mi[0].MemberType == MemberTypes.Property) - { - PropertyInfo p = (PropertyInfo)mi[0]; - SolidBrush brush = (SolidBrush)p.GetValue(null, null); - Assert.AreEqual("Color [" + s + "]", brush.Color.ToString()); - } - else - { - Assert.Fail(s + " is not property of SystemBrushes class"); - } - } - else - { - Assert.Fail("Property " + s + " not found in SystemBrushes class"); - } - } - } - - [Test] - public void SystemBrushesAssignValue () - { - Type t = typeof(SystemBrushes); - foreach (string s in ar_system_brushes) - { - MemberInfo [] mi = t.GetMember(s); - - if (mi.Length == 1) - { - if (mi[0].MemberType == MemberTypes.Property) - { - PropertyInfo p = (PropertyInfo)mi[0]; - SolidBrush brush = (SolidBrush)p.GetValue(null, null); - - try - { - Color c = brush.Color; - brush.Color = Color.AliceBlue; - brush.Color = c; - - //BUG: Bug in .NET - //Assert.Fail("SolidBrush.Color must throw exception"); - Assert.IsTrue(true); - } - catch(ArgumentException) - { - Assert.IsTrue(true); - } - } - else - { - Assert.Fail(s + " is not property of SystemBrushes class"); - } - } - else - { - Assert.Fail("Property " + s + " not found in SystemBrushes class"); - } - } - } - } -} diff --git a/mcs/class/System.Drawing/Test/DrawingTest/Test/ChangeLog b/mcs/class/System.Drawing/Test/DrawingTest/Test/ChangeLog deleted file mode 100644 index b7a9306627e..00000000000 --- a/mcs/class/System.Drawing/Test/DrawingTest/Test/ChangeLog +++ /dev/null @@ -1,66 +0,0 @@ -2005-09-21 Vladimir Krasnov - - * Graphics.cs: Added tests for DrawImage - * Image.cs: Added tests for clone, GetFrameCount - -2005-09-20 Vladimir Krasnov - - * Graphics.cs: Added tests for DrawImage, fixed use pixel distance comparer - -2005-09-10 Konstnatin Triger - - * Graphics.cs: Added test for Clipping - -2005-09-07 Boris Kirzner - * GraphicsPath.cs: Added another PathData test.. - -2005-09-06 Boris Kirzner - * GraphicsPathIterator.cs: added. - * GraphicsPath.cs: Changed tests. Added NotWorking for the tests that - should fail in TARGET_JVM. - -2005-08-25 Vladimir Krasnov - - * Graphics.cs: Added tests for Graphics.Begin/EndContaioner, - Graphics.Save/Restore, Transforms - -2005-08-25 Vladimir Krasnov - - * Pen.cs: Refactoring - * Image.cs: Refactoring - * Bitmap.cs: Refactoring - * Graphics.cs: Refactoring - * Region.cs: Refactoring - -2005-08-16 Andrew Skiba - - * Test.dotnet.csproj, Test.vmwcsproj: make Bitmap1.png embedded resource, - add Bitmap1.bmp - * Bitmap1.bmp: added to make tests on java without jai - * Bitmap.cs: open bitmap from resources, to get rid of dir dependency - * Color.cs: remove unnecessary using DrawingTestHelper - * Graphics.cs: naive StringAlignment tests, must be improved later - * Image.cs: same as Bitmap.cs + use test.bmp instead of test.png (works - immediately on java w/o jai) - -2005-08-10 Boris Kirzner - * GraphicsPath.cs: Added new class. Test fixture for GraphicsPath. - -2005-08-08 Vladimir Krasnov - - * Pen.cs: Added LineCaps and LineJoin tests - * Image.cs: Added png interop test - * Added test images bitmap_gh.png, bitmap_net.png - -2005-08-08 Vladimir Krasnov - - * Added Brushes.cs: Brushes and SystemBrushes tests - * Added Colors.cs: Colors, SystemColors tests - * Added Enums.cs: Various enums tests - * Added Pens.cs: Pens, SystemPent tests - -Andrew Skiba - - * Test.dotnet.csproj, Test.vmwcsproj: move project to sys.drawing/Test so - it's easy to include Mono tests - diff --git a/mcs/class/System.Drawing/Test/DrawingTest/Test/Colors.cs b/mcs/class/System.Drawing/Test/DrawingTest/Test/Colors.cs deleted file mode 100644 index 5217c80da61..00000000000 --- a/mcs/class/System.Drawing/Test/DrawingTest/Test/Colors.cs +++ /dev/null @@ -1,361 +0,0 @@ -using System; -using System.Drawing; -using System.Drawing.Drawing2D; -using NUnit.Framework; -using System.Reflection; - -namespace Test.Sys.Drawing -{ - /// - /// Summary description for Pens. - /// - - [TestFixture] - public class ColorsFixture - { - - [SetUp] - public void SetUp () - { - } - - #region names array - private string [] ar_colors = { - "Transparent,0,255,255,255,1,0,0", - "AliceBlue,255,240,248,255,0.9705882,208,1", - "AntiqueWhite,255,250,235,215,0.9117647,34.28571,0.7777778", - "Aqua,255,0,255,255,0.5,180,1", - "Aquamarine,255,127,255,212,0.7490196,159.8438,1", - "Azure,255,240,255,255,0.9705882,180,1", - "Beige,255,245,245,220,0.9117647,60,0.5555556", - "Bisque,255,255,228,196,0.8843137,32.54237,1", - "Black,255,0,0,0,0,0,0", - "BlanchedAlmond,255,255,235,205,0.9019608,36,1", - "Blue,255,0,0,255,0.5,240,1", - "BlueViolet,255,138,43,226,0.527451,271.1476,0.7593361", - "Brown,255,165,42,42,0.4058824,0,0.5942029", - "BurlyWood,255,222,184,135,0.7,33.7931,0.5686275", - "CadetBlue,255,95,158,160,0.5,181.8462,0.254902", - "Chartreuse,255,127,255,0,0.5,90.11765,1", - "Chocolate,255,210,105,30,0.4705882,25,0.75", - "Coral,255,255,127,80,0.6568627,16.11428,1", - "CornflowerBlue,255,100,149,237,0.6607843,218.5401,0.7919075", - "Cornsilk,255,255,248,220,0.9313725,48,1", - "Crimson,255,220,20,60,0.4705882,348,0.8333333", - "Cyan,255,0,255,255,0.5,180,1", - "DarkBlue,255,0,0,139,0.272549,240,1", - "DarkCyan,255,0,139,139,0.272549,180,1", - "DarkGoldenrod,255,184,134,11,0.3823529,42.65896,0.8871795", - "DarkGray,255,169,169,169,0.6627451,0,0", - "DarkGreen,255,0,100,0,0.1960784,120,1", - "DarkKhaki,255,189,183,107,0.5803922,55.60976,0.3831776", - "DarkMagenta,255,139,0,139,0.272549,300,1", - "DarkOliveGreen,255,85,107,47,0.3019608,82,0.3896104", - "DarkOrange,255,255,140,0,0.5,32.94118,1", - "DarkOrchid,255,153,50,204,0.4980392,280.1299,0.6062992", - "DarkRed,255,139,0,0,0.272549,0,1", - "DarkSalmon,255,233,150,122,0.6960784,15.13514,0.7161291", - "DarkSeaGreen,255,143,188,139,0.6411765,115.102,0.2677596", - "DarkSlateBlue,255,72,61,139,0.3921569,248.4615,0.39", - "DarkSlateGray,255,47,79,79,0.2470588,180,0.2539683", - "DarkTurquoise,255,0,206,209,0.4098039,180.8612,1", - "DarkViolet,255,148,0,211,0.4137255,282.0853,1", - "DeepPink,255,255,20,147,0.5392157,327.5745,1", - "DeepSkyBlue,255,0,191,255,0.5,195.0588,1", - "DimGray,255,105,105,105,0.4117647,0,0", - "DodgerBlue,255,30,144,255,0.5588235,209.6,1", - "Firebrick,255,178,34,34,0.4156863,0,0.6792453", - "FloralWhite,255,255,250,240,0.9705882,40,1", - "ForestGreen,255,34,139,34,0.3392157,120,0.6069364", - "Fuchsia,255,255,0,255,0.5,300,1", - "Gainsboro,255,220,220,220,0.8627451,0,0", - "GhostWhite,255,248,248,255,0.9862745,240,1", - "Gold,255,255,215,0,0.5,50.58823,1", - "Goldenrod,255,218,165,32,0.4901961,42.90322,0.744", - "Gray,255,128,128,128,0.5019608,0,0", - "Green,255,0,128,0,0.2509804,120,1", - "GreenYellow,255,173,255,47,0.5921569,83.65385,1", - "Honeydew,255,240,255,240,0.9705882,120,1", - "HotPink,255,255,105,180,0.7058824,330,1", - "IndianRed,255,205,92,92,0.5823529,0,0.5305164", - "Indigo,255,75,0,130,0.254902,274.6154,1", - "Ivory,255,255,255,240,0.9705882,60,1", - "Khaki,255,240,230,140,0.7450981,54,0.7692308", - "Lavender,255,230,230,250,0.9411765,240,0.6666667", - "LavenderBlush,255,255,240,245,0.9705882,340,1", - "LawnGreen,255,124,252,0,0.4941176,90.47619,1", - "LemonChiffon,255,255,250,205,0.9019608,54,1", - "LightBlue,255,173,216,230,0.7901961,194.7368,0.5327103", - "LightCoral,255,240,128,128,0.7215686,0,0.7887324", - "LightCyan,255,224,255,255,0.9392157,180,1", - "LightGoldenrodYellow,255,250,250,210,0.9019608,60,0.8", - "LightGreen,255,144,238,144,0.7490196,120,0.734375", - "LightGray,255,211,211,211,0.827451,0,0", - "LightPink,255,255,182,193,0.8568628,350.9589,1", - "LightSalmon,255,255,160,122,0.7392157,17.14286,1", - "LightSeaGreen,255,32,178,170,0.4117647,176.7123,0.6952381", - "LightSkyBlue,255,135,206,250,0.754902,202.9565,0.92", - "LightSlateGray,255,119,136,153,0.5333334,210,0.1428572", - "LightSteelBlue,255,176,196,222,0.7803922,213.913,0.4107143", - "LightYellow,255,255,255,224,0.9392157,60,1", - "Lime,255,0,255,0,0.5,120,1", - "LimeGreen,255,50,205,50,0.5,120,0.6078432", - "Linen,255,250,240,230,0.9411765,30,0.6666667", - "Magenta,255,255,0,255,0.5,300,1", - "Maroon,255,128,0,0,0.2509804,0,1", - "MediumAquamarine,255,102,205,170,0.6019608,159.6116,0.5073892", - "MediumBlue,255,0,0,205,0.4019608,240,1", - "MediumOrchid,255,186,85,211,0.5803922,288.0952,0.5887851", - "MediumPurple,255,147,112,219,0.6490196,259.6262,0.5977654", - "MediumSeaGreen,255,60,179,113,0.4686275,146.7227,0.497908", - "MediumSlateBlue,255,123,104,238,0.6705883,248.5075,0.797619", - "MediumSpringGreen,255,0,250,154,0.4901961,156.96,1", - "MediumTurquoise,255,72,209,204,0.5509804,177.8102,0.5982533", - "MediumVioletRed,255,199,21,133,0.4313726,322.2472,0.8090909", - "MidnightBlue,255,25,25,112,0.2686275,240,0.6350365", - "MintCream,255,245,255,250,0.9803922,150,1", - "MistyRose,255,255,228,225,0.9411765,6,1", - "Moccasin,255,255,228,181,0.854902,38.10811,1", - "NavajoWhite,255,255,222,173,0.8392157,35.85366,1", - "Navy,255,0,0,128,0.2509804,240,1", - "OldLace,255,253,245,230,0.9470588,39.13044,0.8518519", - "Olive,255,128,128,0,0.2509804,60,1", - "OliveDrab,255,107,142,35,0.3470588,79.62617,0.6045198", - "Orange,255,255,165,0,0.5,38.82353,1", - "OrangeRed,255,255,69,0,0.5,16.23529,1", - "Orchid,255,218,112,214,0.6470588,302.2642,0.5888889", - "PaleGoldenrod,255,238,232,170,0.8,54.70588,0.6666667", - "PaleGreen,255,152,251,152,0.7901961,120,0.9252337", - "PaleTurquoise,255,175,238,238,0.809804,180,0.6494845", - "PaleVioletRed,255,219,112,147,0.6490196,340.3738,0.5977654", - "PapayaWhip,255,255,239,213,0.9176471,37.14286,1", - "PeachPuff,255,255,218,185,0.8627451,28.28572,1", - "Peru,255,205,133,63,0.5254902,29.57747,0.5867769", - "Pink,255,255,192,203,0.8764706,349.5238,1", - "Plum,255,221,160,221,0.7470589,300,0.4728682", - "PowderBlue,255,176,224,230,0.7960784,186.6667,0.5192308", - "Purple,255,128,0,128,0.2509804,300,1", - "Red,255,255,0,0,0.5,0,1", - "RosyBrown,255,188,143,143,0.6490196,0,0.2513967", - "RoyalBlue,255,65,105,225,0.5686275,225,0.7272727", - "SaddleBrown,255,139,69,19,0.3098039,25,0.7594936", - "Salmon,255,250,128,114,0.7137255,6.176474,0.9315069", - "SandyBrown,255,244,164,96,0.6666667,27.56757,0.8705882", - "SeaGreen,255,46,139,87,0.3627451,146.4516,0.5027027", - "SeaShell,255,255,245,238,0.9666667,24.70588,1", - "Sienna,255,160,82,45,0.4019608,19.30435,0.5609756", - "Silver,255,192,192,192,0.7529412,0,0", - "SkyBlue,255,135,206,235,0.7254902,197.4,0.7142857", - "SlateBlue,255,106,90,205,0.5784314,248.3478,0.5348837", - "SlateGray,255,112,128,144,0.5019608,210,0.1259843", - "Snow,255,255,250,250,0.9901961,0,1", - "SpringGreen,255,0,255,127,0.5,149.8824,1", - "SteelBlue,255,70,130,180,0.4901961,207.2727,0.44", - "Tan,255,210,180,140,0.6862745,34.28571,0.4375", - "Teal,255,0,128,128,0.2509804,180,1", - "Thistle,255,216,191,216,0.7980392,300,0.2427184", - "Tomato,255,255,99,71,0.6392157,9.130435,1", - "Turquoise,255,64,224,208,0.5647059,174,0.7207207", - "Violet,255,238,130,238,0.7215686,300,0.7605634", - "Wheat,255,245,222,179,0.8313726,39.09091,0.7674419", - "White,255,255,255,255,1,0,0", - "WhiteSmoke,255,245,245,245,0.9607843,0,0", - "Yellow,255,255,255,0,0.5,60,1", - "YellowGreen,255,154,205,50,0.5,79.74194,0.6078432"}; - - string [] ar_system_colors = { - "ActiveBorder,255,212,208,200,0.8078431,40,0.122449", - "ActiveCaption,255,10,36,106,0.227451,223.75,0.8275862", - "ActiveCaptionText,255,255,255,255,1,0,0", - "AppWorkspace,255,128,128,128,0.5019608,0,0", - "Control,255,212,208,200,0.8078431,40,0.122449", - "ControlDark,255,128,128,128,0.5019608,0,0", - "ControlDarkDark,255,64,64,64,0.2509804,0,0", - "ControlLight,255,212,208,200,0.8078431,40,0.122449", - "ControlLightLight,255,255,255,255,1,0,0", - "ControlText,255,0,0,0,0,0,0", - "Desktop,255,58,110,165,0.4372549,210.8411,0.4798206", - "GrayText,255,128,128,128,0.5019608,0,0", - "Highlight,255,10,36,106,0.227451,223.75,0.8275862", - "HighlightText,255,255,255,255,1,0,0", - "HotTrack,255,0,0,128,0.2509804,240,1", - "InactiveBorder,255,212,208,200,0.8078431,40,0.122449", - "InactiveCaption,255,128,128,128,0.5019608,0,0", - "InactiveCaptionText,255,212,208,200,0.8078431,40,0.122449", - "Info,255,255,255,225,0.9411765,60,1", - "InfoText,255,0,0,0,0,0,0", - "Menu,255,212,208,200,0.8078431,40,0.122449", - "MenuText,255,0,0,0,0,0,0", - "ScrollBar,255,212,208,200,0.8078431,40,0.122449", - "Window,255,255,255,255,1,0,0", - "WindowFrame,255,0,0,0,0,0,0", - "WindowText,255,0,0,0,0,0,0"}; - - string [] ar_system_color_conversions = { - "ActiveBorder,activeborder", - "ActiveCaption,activecaption", - "ActiveCaptionText,captiontext", - "AppWorkspace,appworkspace", - "Control,buttonface", - "ControlDark,buttonshadow", - "ControlDarkDark,threeddarkshadow", - "ControlLight,buttonface", - "ControlLightLight,buttonhighlight", - "ControlText,buttontext", - "Desktop,background", - "GrayText,graytext", - "Highlight,highlight", - "HighlightText,highlighttext", - "HotTrack,highlight", - "InactiveBorder,inactiveborder", - "InactiveCaption,inactivecaption", - "InactiveCaptionText,inactivecaptiontext", - "Info,infobackground", - "InfoText,infotext", - "Menu,menu", - "MenuText,menutext", - "ScrollBar,scrollbar", - "Window,window", - "WindowFrame,windowframe", - "WindowText,windowtext"}; - #endregion - - - [Test] - public void ColorPropertyCount() - { - Type t = typeof(Color); - PropertyInfo [] pi = t.GetProperties(BindingFlags.Static | BindingFlags.Public); - - int i = 0; - foreach (PropertyInfo p in pi) - { - if (p.PropertyType == typeof(Color)) - { - i++; - } - } - Assert.AreEqual(ar_colors.Length, i, "Number of Colors"); - } - - [Test] - public void ColorProperties () - { - Type t = typeof(Color); - foreach (string s in ar_colors) - { - string [] col = s.Split(','); - MemberInfo [] mi = t.GetMember(col[0]); - - if (mi.Length == 1) - { - if (mi[0].MemberType == MemberTypes.Property) - { - PropertyInfo p = (PropertyInfo)mi[0]; - Color color = (Color)p.GetValue(null, null); - Assert.AreEqual(col[0], color.Name, col[0] + " Color Name is wrong"); - Assert.AreEqual(Convert.ToByte( col[1] ), color.A, col[0] + " Color A is wrong"); - Assert.AreEqual(Convert.ToByte( col[2] ), color.R, col[0] + " Color R is wrong"); - Assert.AreEqual(Convert.ToByte( col[3] ), color.G, col[0] + " Color G is wrong"); - Assert.AreEqual(Convert.ToByte( col[4] ), color.B, col[0] + " Color B is wrong"); - - Assert.AreEqual(float.Parse(col[5]), color.GetBrightness(), 0.001F, col[0] + " Color.GetBrightness() is wrong"); - Assert.AreEqual(float.Parse(col[6]), color.GetHue(), 0.001F, col[0] + " Color.GetHue() is wrong"); - Assert.AreEqual(float.Parse(col[7]), color.GetSaturation(), 0.001F, col[0] + " Color.GetSaturation() is wrong"); - - Assert.AreEqual(true, color.IsNamedColor, col[0] + " IsNamedColor is wrong"); - Assert.AreEqual(false, color.IsSystemColor, col[0] + " IsSystemColor is wrong"); - Assert.AreEqual(true, color.IsKnownColor, col[0] + " IsKnownColor is wrong"); - } - else - { - Assert.Fail(s + " is not property of Color class"); - } - } - else - { - Assert.Fail("Property " + s + " not found in Color class"); - } - } - } - - [Test] - public void SystemColorPropertyCount() - { - Type t = typeof(SystemColors); - PropertyInfo [] pi = t.GetProperties(BindingFlags.Static | BindingFlags.Public); - - int i = 0; - foreach (PropertyInfo p in pi) - { - if (p.PropertyType == typeof(Color)) - { - i++; - } - } - Assert.AreEqual(ar_system_colors.Length, i, "Number of SystemColors"); - } - - [Test] - public void SystemColorProperties () - { - Type t = typeof(SystemColors); - foreach (string s in ar_system_colors) - { - string [] col = s.Split(','); - MemberInfo [] mi = t.GetMember(col[0]); - - if (mi.Length == 1) - { - if (mi[0].MemberType == MemberTypes.Property) - { - PropertyInfo p = (PropertyInfo)mi[0]; - Color color = (Color)p.GetValue(null, null); - Assert.AreEqual(col[0], color.Name, col[0] + " Color Name is wrong"); - Assert.AreEqual(Convert.ToByte( col[1] ), color.A, col[0] + " Color A is wrong"); - Assert.AreEqual(Convert.ToByte( col[2] ), color.R, col[0] + " Color R is wrong"); - Assert.AreEqual(Convert.ToByte( col[3] ), color.G, col[0] + " Color G is wrong"); - Assert.AreEqual(Convert.ToByte( col[4] ), color.B, col[0] + " Color B is wrong"); - - Assert.AreEqual(float.Parse(col[5]), color.GetBrightness(), 0.001F, col[0] + " Color.GetBrightness() is wrong"); - Assert.AreEqual(float.Parse(col[6]), color.GetHue(), 0.001F, col[0] + " Color.GetHue() is wrong"); - Assert.AreEqual(float.Parse(col[7]), color.GetSaturation(), 0.001F, col[0] + " Color.GetSaturation() is wrong"); - - Assert.AreEqual(true, color.IsNamedColor, col[0] + " IsNamedColor is wrong"); - Assert.AreEqual(true, color.IsSystemColor, col[0] + " IsSystemColor is wrong"); - Assert.AreEqual(true, color.IsKnownColor, col[0] + " IsKnownColor is wrong"); - } - else - { - Assert.Fail(s + " is not property of SystemColors class"); - } - } - else - { - Assert.Fail("Property " + s + " not found in SystemColors class"); - } - } - } - [Test] - public void SystemColorTranslator() - { - Type t = typeof(SystemColors); - - foreach (string s in ar_system_color_conversions) - { - string [] col = s.Split(','); - try - { - PropertyInfo pi = t.GetProperty(col[0]); - Color c = (Color)pi.GetValue(null, null); - - Assert.AreEqual(col[1], ColorTranslator.ToHtml(c), col[0] + " is worng"); - } - catch (Exception) - { - Assert.Fail(col[0] + " failed"); - } - } - } - } -} \ No newline at end of file diff --git a/mcs/class/System.Drawing/Test/DrawingTest/Test/Enums.cs b/mcs/class/System.Drawing/Test/DrawingTest/Test/Enums.cs deleted file mode 100644 index 4f777d5bf8d..00000000000 --- a/mcs/class/System.Drawing/Test/DrawingTest/Test/Enums.cs +++ /dev/null @@ -1,454 +0,0 @@ -using System; -using System.Drawing; -using System.Drawing.Drawing2D; -using NUnit.Framework; -using DrawingTestHelper; -using System.Reflection; - -namespace Test.Sys.Drawing -{ - /// - /// Summary description for Enums. - /// - - [TestFixture] - public class Enums - { - #region Names Arrays - string [] ar_known_color = { - "ActiveBorder", - "ActiveCaption", - "ActiveCaptionText", - "AppWorkspace", - "Control", - "ControlDark", - "ControlDarkDark", - "ControlLight", - "ControlLightLight", - "ControlText", - "Desktop", - "GrayText", - "Highlight", - "HighlightText", - "HotTrack", - "InactiveBorder", - "InactiveCaption", - "InactiveCaptionText", - "Info", - "InfoText", - "Menu", - "MenuText", - "ScrollBar", - "Window", - "WindowFrame", - "WindowText", - "Transparent", - "AliceBlue", - "AntiqueWhite", - "Aqua", - "Aquamarine", - "Azure", - "Beige", - "Bisque", - "Black", - "BlanchedAlmond", - "Blue", - "BlueViolet", - "Brown", - "BurlyWood", - "CadetBlue", - "Chartreuse", - "Chocolate", - "Coral", - "CornflowerBlue", - "Cornsilk", - "Crimson", - "Cyan", - "DarkBlue", - "DarkCyan", - "DarkGoldenrod", - "DarkGray", - "DarkGreen", - "DarkKhaki", - "DarkMagenta", - "DarkOliveGreen", - "DarkOrange", - "DarkOrchid", - "DarkRed", - "DarkSalmon", - "DarkSeaGreen", - "DarkSlateBlue", - "DarkSlateGray", - "DarkTurquoise", - "DarkViolet", - "DeepPink", - "DeepSkyBlue", - "DimGray", - "DodgerBlue", - "Firebrick", - "FloralWhite", - "ForestGreen", - "Fuchsia", - "Gainsboro", - "GhostWhite", - "Gold", - "Goldenrod", - "Gray", - "Green", - "GreenYellow", - "Honeydew", - "HotPink", - "IndianRed", - "Indigo", - "Ivory", - "Khaki", - "Lavender", - "LavenderBlush", - "LawnGreen", - "LemonChiffon", - "LightBlue", - "LightCoral", - "LightCyan", - "LightGoldenrodYellow", - "LightGray", - "LightGreen", - "LightPink", - "LightSalmon", - "LightSeaGreen", - "LightSkyBlue", - "LightSlateGray", - "LightSteelBlue", - "LightYellow", - "Lime", - "LimeGreen", - "Linen", - "Magenta", - "Maroon", - "MediumAquamarine", - "MediumBlue", - "MediumOrchid", - "MediumPurple", - "MediumSeaGreen", - "MediumSlateBlue", - "MediumSpringGreen", - "MediumTurquoise", - "MediumVioletRed", - "MidnightBlue", - "MintCream", - "MistyRose", - "Moccasin", - "NavajoWhite", - "Navy", - "OldLace", - "Olive", - "OliveDrab", - "Orange", - "OrangeRed", - "Orchid", - "PaleGoldenrod", - "PaleGreen", - "PaleTurquoise", - "PaleVioletRed", - "PapayaWhip", - "PeachPuff", - "Peru", - "Pink", - "Plum", - "PowderBlue", - "Purple", - "Red", - "RosyBrown", - "RoyalBlue", - "SaddleBrown", - "Salmon", - "SandyBrown", - "SeaGreen", - "SeaShell", - "Sienna", - "Silver", - "SkyBlue", - "SlateBlue", - "SlateGray", - "Snow", - "SpringGreen", - "SteelBlue", - "Tan", - "Teal", - "Thistle", - "Tomato", - "Turquoise", - "Violet", - "Wheat", - "White", - "WhiteSmoke", - "Yellow", - "YellowGreen"}; - - string [] ar_font_style = { - "Regular", - "Bold", - "Italic", - "Underline", - "Strikeout"}; - - - string [] ar_content_alignment = { - "TopLeft", - "TopCenter", - "TopRight", - "MiddleLeft", - "MiddleCenter", - "MiddleRight", - "BottomLeft", - "BottomCenter", - "BottomRight"}; - - string [] ar_string_alignment = { - "Near", - "Center", - "Far"}; - - - string [] ar_string_digit_substitute = { - "User", - "None", - "National", - "Traditional"}; - - string [] ar_string_unit = { - "World", - "Display", - "Pixel", - "Point", - "Inch", - "Document", - "Millimeter", - "Em"}; - - string [] ar_string_trimming = { - "None", - "Character", - "Word", - "EllipsisCharacter", - "EllipsisWord", - "EllipsisPath"}; - - #endregion - - [SetUp] - public void SetUp () - { - } - - #region KnownColor - [Test] - public void KnownColors() - { - Type t = typeof(KnownColor); - - foreach (string s in ar_known_color) - { - try - { - FieldInfo fi = t.GetField(s); - Assert.AreEqual(s, fi.Name); - } - catch (Exception) - { - Assert.Fail("Color " + s + " is not found"); - } - } - } - - [Test] - public void KnownColorsCount() - { - Type t = typeof(KnownColor); - - MemberInfo [] mi = t.GetFields(BindingFlags.Static | BindingFlags.Public); - Assert.AreEqual(ar_known_color.Length, mi.Length); - } - #endregion - - #region FontStyle - [Test] - public void FontStyles() - { - Type t = typeof(FontStyle); - - foreach (string s in ar_font_style) - { - try - { - FieldInfo fi = t.GetField(s); - Assert.AreEqual(s, fi.Name); - } - catch (Exception) - { - Assert.Fail("Font Style " + s + " is not found"); - } - } - } - - [Test] - public void FontStylesCount() - { - Type t = typeof(FontStyle); - - MemberInfo [] mi = t.GetFields(BindingFlags.Static | BindingFlags.Public); - Assert.AreEqual(ar_font_style.Length, mi.Length); - } - #endregion - - #region ContentAligment - [Test] - public void ContentAlignments() - { - Type t = typeof(ContentAlignment); - - foreach (string s in ar_content_alignment) - { - try - { - FieldInfo fi = t.GetField(s); - Assert.AreEqual(s, fi.Name); - } - catch (Exception) - { - Assert.Fail("ContentAligment " + s + " is not found"); - } - } - } - - [Test] - public void ContentAlignmentsCount() - { - Type t = typeof(ContentAlignment); - - MemberInfo [] mi = t.GetFields(BindingFlags.Static | BindingFlags.Public); - Assert.AreEqual(ar_content_alignment.Length, mi.Length); - } - #endregion - - #region StringAligment - [Test] - public void StringAlignments() - { - Type t = typeof(StringAlignment); - - foreach (string s in ar_string_alignment) - { - try - { - FieldInfo fi = t.GetField(s); - Assert.AreEqual(s, fi.Name); - } - catch (Exception) - { - Assert.Fail("Font Style " + s + " is not found"); - } - } - } - - [Test] - public void StringAlignmentsCount() - { - Type t = typeof(StringAlignment); - - MemberInfo [] mi = t.GetFields(BindingFlags.Static | BindingFlags.Public); - Assert.AreEqual(ar_string_alignment.Length, mi.Length); - } - #endregion - - #region StringDigitSubstitute - [Test] - public void StringDigitSubstitutes() - { - Type t = typeof(StringDigitSubstitute); - - foreach (string s in ar_string_digit_substitute) - { - try - { - FieldInfo fi = t.GetField(s); - Assert.AreEqual(s, fi.Name); - } - catch (Exception) - { - Assert.Fail("Font Style " + s + " is not found"); - } - } - } - - [Test] - public void StringDigitSubstitutesCount() - { - Type t = typeof(StringDigitSubstitute); - - MemberInfo [] mi = t.GetFields(BindingFlags.Static | BindingFlags.Public); - Assert.AreEqual(ar_string_digit_substitute.Length, mi.Length); - } - #endregion - - #region StringUnit - [Test] - public void StringUnits() - { - Type t = typeof(StringUnit); - - foreach (string s in ar_string_unit) - { - try - { - FieldInfo fi = t.GetField(s); - Assert.AreEqual(s, fi.Name); - } - catch (Exception) - { - Assert.Fail("Font Style " + s + " is not found"); - } - } - } - - [Test] - public void StringUnitsCount() - { - Type t = typeof(StringUnit); - - MemberInfo [] mi = t.GetFields(BindingFlags.Static | BindingFlags.Public); - Assert.AreEqual(ar_string_unit.Length, mi.Length); - } - #endregion - - #region StringTrimming - [Test] - public void StringTrimmings() - { - Type t = typeof(StringTrimming); - - foreach (string s in ar_string_trimming) - { - try - { - FieldInfo fi = t.GetField(s); - Assert.AreEqual(s, fi.Name); - } - catch (Exception) - { - Assert.Fail("Font Style " + s + " is not found"); - } - } - } - - [Test] - public void StringTrimmingsCount() - { - Type t = typeof(StringTrimming); - - MemberInfo [] mi = t.GetFields(BindingFlags.Static | BindingFlags.Public); - Assert.AreEqual(ar_string_trimming.Length, mi.Length); - } - #endregion - - } -} diff --git a/mcs/class/System.Drawing/Test/DrawingTest/Test/Graphics.cs b/mcs/class/System.Drawing/Test/DrawingTest/Test/Graphics.cs deleted file mode 100644 index 638ba2a623a..00000000000 --- a/mcs/class/System.Drawing/Test/DrawingTest/Test/Graphics.cs +++ /dev/null @@ -1,2505 +0,0 @@ -// -// Test.System.Drawing.Graphics.cs -// -// Author: -// Konstantin Triger -// - -// -// Copyright (C) 2005 Mainsoft, Corp (http://www.mainsoft.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; -using System.Collections; -using System.Diagnostics; -using NUnit.Framework; -using System.Drawing; -using System.Drawing.Drawing2D; -using System.Drawing.Text; -using System.Drawing.Imaging; -using DrawingTestHelper; -using System.IO; - -namespace Test.Sys.Drawing.GraphicsFixtures { - #region GraphicsFixtureProps - - [TestFixture] - public class GraphicsFixtureProps { - - protected DrawingTest t; - const int TOLERANCE = 3; //in % - - [SetUp] - public void SetUp() { - t = DrawingTest.Create(512, 512); - } - - [Test] -#if TARGET_JVM - [Category ("NotWorking")] // FIXME: Newly created region area is not the same. -#endif - public void ClipTest_1() { - Region r = new Region(); - Assert.IsTrue(r.Equals(t.Graphics.Clip, t.Graphics)); - } - - [Test] - public void ClipTest_2() { - Region r = new Region(new Rectangle(10, 10, 60, 60)); - t.Graphics.Clip = r; - Assert.IsTrue(r.Equals(t.Graphics.Clip, t.Graphics)); - - Pen redPen = new Pen(Color.Red, 3); - Pen greenPen = new Pen(Color.Green, 3); - // Create points that define curve. - Point point1 = new Point( 50, 50); - Point point2 = new Point(100, 25); - Point point3 = new Point(200, 5); - Point point4 = new Point(250, 50); - Point point5 = new Point(300, 100); - Point point6 = new Point(350, 200); - Point point7 = new Point(250, 250); - Point[] curvePoints = { - point1, - point2, - point3, - point4, - point5, - point6, - point7 - }; - // Draw lines between original points to screen. - t.Graphics.DrawLines(redPen, curvePoints); - t.Show (); - Assert.IsTrue(t.PDCompare(TOLERANCE)); - } - - [Test] - public void ClipTest_3() { - t.Graphics.TranslateTransform(3, 3); - t.Graphics.SetClip(new Rectangle(23, 24, 30, 40)); - - RectangleF cb = t.Graphics.VisibleClipBounds; - DrawingTest.AssertAlmostEqual(23, cb.X); - DrawingTest.AssertAlmostEqual(24, cb.Y); - DrawingTest.AssertAlmostEqual(30, cb.Width); - DrawingTest.AssertAlmostEqual(40, cb.Height); - - t.Graphics.PageUnit = GraphicsUnit.Millimeter; - - cb = t.Graphics.VisibleClipBounds; - DrawingTest.AssertAlmostEqual(23, cb.X); - DrawingTest.AssertAlmostEqual(24, cb.Y); - DrawingTest.AssertAlmostEqual(30, cb.Width); - DrawingTest.AssertAlmostEqual(40, cb.Height); - - t.Graphics.RotateTransform(128); - - t.Graphics.TranslateTransform(14, 14); - t.Graphics.ExcludeClip(new Rectangle(0, 0, 4, 60)); - - - t.Graphics.RotateTransform(128); - - t.Graphics.PageUnit = GraphicsUnit.Pixel; - - t.Graphics.TranslateClip(5.2f, 3.1f); - - t.Graphics.ResetTransform(); - t.Graphics.PageUnit = GraphicsUnit.Pixel; - - cb = t.Graphics.VisibleClipBounds; - DrawingTest.AssertAlmostEqual(28, cb.X); - DrawingTest.AssertAlmostEqual(22, cb.Y); - DrawingTest.AssertAlmostEqual(30, cb.Width); - DrawingTest.AssertAlmostEqual(40, cb.Height); - - t.Graphics.ScaleTransform(5, 7); - t.Graphics.IntersectClip(new Rectangle(7, 4, 20, 20)); - - cb = t.Graphics.VisibleClipBounds; - DrawingTest.AssertAlmostEqual(7, cb.X); - DrawingTest.AssertAlmostEqual(4f, cb.Y); - DrawingTest.AssertAlmostEqual(4.6f, cb.Width); - DrawingTest.AssertAlmostEqual(4.85714245f, cb.Height); - } - - [Test] -#if TARGET_JVM - [Category ("NotWorking")] // FIXME: Newly created region area is not the same. -#endif - public void ClipBoundsTest() { - Region r = new Region(); - Assert.IsTrue(t.Graphics.ClipBounds.Equals(r.GetBounds(t.Graphics))); - - RectangleF rf = new RectangleF(10, 10, 60, 60); - r = new Region(rf); - t.Graphics.Clip = r; - Assert.IsTrue(rf.Equals(t.Graphics.ClipBounds)); - } - - [Test] - public void CompositingModeTest() { - //TODO: seems to draw equal images - Assert.AreEqual(CompositingMode.SourceOver, t.Graphics.CompositingMode); - - Bitmap b = new Bitmap(100, 100); - Graphics g = Graphics.FromImage(b); - - Color c = Color.FromArgb(100, Color.Red); - - Brush redBrush = new SolidBrush(c); - g.FillEllipse(redBrush, 5, 6, 100, 200); - //t.Graphics.FillEllipse(redBrush, 5, 6, 100, 200); - t.Graphics.DrawImage(b, 10, 10); - - t.Show (); - - t.Graphics.CompositingMode = CompositingMode.SourceCopy; - - t.Graphics.DrawImage(b, 300, 300); - - t.Show (); - Assert.IsTrue(t.PDCompare(TOLERANCE)); - } - - [Test] //TBD - public void CompositingQualityTest() { - } - - [Test] - public void DpiXTest() { - Assert.IsTrue(t.Graphics.DpiX == 96f); - } - - [Test] - public void DpiYTest() { - Assert.IsTrue(t.Graphics.DpiY == 96f); - } - - [Test] //TBD - public void InterpolationModeTest() { - Assert.AreEqual(InterpolationMode.Bilinear, t.Graphics.InterpolationMode); - } - - [Test] - public void IsClipEmtpyTest() { - Assert.IsFalse(t.Graphics.IsClipEmpty); - - try { - t.Graphics.Clip = null; - Assert.Fail("The ArgumentNullException was not thrown"); - } - catch(Exception e) { - Assert.AreEqual(e.GetType(), typeof(ArgumentNullException)); - } - - Region r = new Region(new Rectangle(10, 10, 0, 0)); - t.Graphics.Clip = r; - - Assert.IsTrue( t.Graphics.IsClipEmpty); - } - - [Test] - public void IsVisibleClipEmtpyTest() { - Assert.IsFalse(t.Graphics.IsVisibleClipEmpty, "default t.Graphics.IsVisibleClipEmpty"); - - Region r = new Region(new Rectangle(512, 512, 100, 100)); - t.Graphics.Clip = r; - Assert.IsFalse(t.Graphics.IsClipEmpty); - Assert.IsTrue(t.Graphics.IsVisibleClipEmpty); - } - - [Test] - public void PageScaleTest() { - Assert.AreEqual(1f, t.Graphics.PageScale); - } - - [Test] - public void PageUnitTest() { - Assert.AreEqual(GraphicsUnit.Display, t.Graphics.PageUnit); - } - - [Test] - public void PixelOffsetModeTest() { - Assert.AreEqual(PixelOffsetMode.Default, t.Graphics.PixelOffsetMode); - } - - [Test] -#if TARGET_JVM - [Category ("NotWorking")] // FIXME: RenderingOrigin is not implemented -#endif - public void RenderingOriginTest() { - Assert.AreEqual(new Point(0,0), t.Graphics.RenderingOrigin); - } - - [Test] - public void SmoothingModeTest() { - Assert.AreEqual(SmoothingMode.None, t.Graphics.SmoothingMode); - } - - [Test] - public void TextContrastTest() { - Assert.AreEqual(4, t.Graphics.TextContrast); - } - - [Test] - public void TextRenderingHintTest() { - Assert.AreEqual(TextRenderingHint.SystemDefault, t.Graphics.TextRenderingHint); - } - - [Test] - public void TransformTest() { - Assert.AreEqual(new Matrix(), t.Graphics.Transform); - } - - [Test] -#if TARGET_JVM - [Category ("NotWorking")] // FIXME: Graphics.ClipBounds retun null if no clip region was set. -#endif - public void VisibleClipBoundsTest() { - Assert.AreEqual(new RectangleF(0, 0, 512, 512), t.Graphics.VisibleClipBounds); - } - } - - #endregion - - #region DrawImage - [TestFixture] - public class DrawImage { - protected DrawingTest t; - protected int TOLERANCE = 10; //in %; - protected Hashtable st = new Hashtable(); - - Rectangle src = new Rectangle(0, 0, 50, 50); - RectangleF srcF = new Rectangle(0, 0, 50, 50); - Rectangle dst = new Rectangle(170, 170, 100, 100); - RectangleF dstF = new Rectangle(270, 270, 100, 100); - - Image bmp; - Image bmp2; - - [SetUp] - public virtual void SetUp() { - SetUp("DrawImage"); - DrawingTest.ShowForms = false; - try { - bmp = Bitmap.FromFile(@"..\..\bitmap50.png"); - bmp2 = Bitmap.FromFile(@"..\..\bitmap25.png"); - } - catch(Exception e) { - Console.WriteLine(e.Message); - } - } - public virtual void SetUp(string ownerClass) { - t = DrawingTest.Create(512, 512, ownerClass); - t.Graphics.InterpolationMode = InterpolationMode.NearestNeighbor; - - // hashtable of differents tolerance values for specified tests. - } - [TearDown] - public void TearDown() { - } - - [Test] - public void DrawImage1() { - t.Graphics.DrawImage(bmp, new Point[]{new Point(170,10), new Point(250,0), new Point(100,100)}, src, GraphicsUnit.Pixel ); - t.Graphics.DrawImage(bmp, new PointF[]{new PointF(70,10), new PointF(150,0), new PointF(10,100)}, srcF, GraphicsUnit.Pixel ); - t.Show(); - Assert.IsTrue(t.Compare()); - } - [Test] - public void DrawImage2() { - t.Graphics.DrawImage(bmp, dst, src, GraphicsUnit.Pixel); - t.Graphics.DrawImage(bmp, dstF, srcF, GraphicsUnit.Pixel); - t.Show(); - Assert.IsTrue(t.Compare()); - } - [Test] - public void DrawImage3() { - t.Graphics.DrawImage(bmp, 10.0F, 10.0F, srcF, GraphicsUnit.Pixel); - t.Graphics.DrawImage(bmp, 70.0F, 150.0F, 250.0F, 150.0F); - t.Show(); - Assert.IsTrue(t.Compare()); - } - [Test] - public void DrawImage4() { - t.Graphics.DrawImage(bmp, dst); - t.Graphics.DrawImage(bmp, dstF); - t.Show(); - Assert.IsTrue(t.Compare()); - } - [Test] - public void DrawImage5() { - t.Graphics.SetClip( new Rectangle(70, 0, 20, 200)); - t.Graphics.DrawImage(bmp, new Point[]{new Point(50,50), new Point(250,30), new Point(100,150)}, src, GraphicsUnit.Pixel ); - t.Show(); - Assert.IsTrue(t.Compare()); - } - [Test] - public void DrawImage6() { - t.Graphics.ScaleTransform(2, 2); - t.Graphics.SetClip( new Rectangle(70, 0, 20, 200)); - t.Graphics.DrawImage(bmp, new Point[]{new Point(50,50), new Point(250,30), new Point(100,150)}, src, GraphicsUnit.Pixel ); - t.Show(); - Assert.IsTrue(t.Compare()); - } - [Test] - public void DrawImage7() { - t.Graphics.DrawImage(bmp, 170, 70, src, GraphicsUnit.Pixel); - t.Graphics.DrawImage(bmp, 70, 350, 350, 150); - t.Show(); - Assert.IsTrue(t.Compare()); - } - [Test] - public void DrawImage8() { - t.Graphics.DrawImage(bmp, new Point[]{new Point(170,10), new Point(250,10), new Point(100,100)} ); - t.Graphics.DrawImage(bmp, new PointF[]{new PointF(170,100), new PointF(250,100), new PointF(100,190)} ); - t.Show(); - Assert.IsTrue(t.Compare()); - } - [Test] - public void DrawImage9() { - t.Graphics.DrawImage(bmp, 0, 0); - t.Graphics.DrawImage(bmp, 200, 200); - t.Show(); - Assert.IsTrue(t.Compare()); - } - [Test] - public void DrawImageWithResolution() { - t.Graphics.DrawImage(bmp2, 0, 0); - t.Show(); - Assert.IsTrue(t.Compare()); - } - [Test] - public void DrawImageInContainer1() { - t.Graphics.BeginContainer(new Rectangle(10, 10, 50, 50), new Rectangle(70, 70, 100, 100), GraphicsUnit.Pixel); - t.Graphics.DrawImage(bmp, 0, 0); - t.Show(); - Assert.IsTrue(t.Compare()); - } - [Test] - public void DrawImageInContainer2() { - t.Graphics.BeginContainer(new Rectangle(10, 10, 50, 50), new Rectangle(70, 70, 100, 100), GraphicsUnit.Pixel); - t.Graphics.DrawImage(bmp2, 0, 0); - t.Show(); - Assert.IsTrue(t.Compare()); - } - [Test] - public void DrawImageInContainer3() { - t.Graphics.BeginContainer(new Rectangle(10, 10, 50, 50), new Rectangle(70, 70, 100, 100), GraphicsUnit.Pixel); - t.Graphics.SetClip( new Rectangle(0, 0, 15, 15) ); - t.Graphics.ScaleTransform(0.5f, 0.5f); - t.Graphics.DrawImage(bmp2, 0, 0); - t.Show(); - Assert.IsTrue(t.Compare()); - } - } - #endregion - - #region GraphicsFixture - /// - /// Summary description for Graphics. - /// - [TestFixture] - public class GraphicsFixture { - protected DrawingTest t; - protected int TOLERANCE = 3; //in %; - protected Hashtable st = new Hashtable(); - - [SetUp] - public virtual void SetUp() { - SetUp("GraphicsFixture"); - } - public virtual void SetUp(string ownerClass) { - t = DrawingTest.Create(512, 512, ownerClass); - - // hashtable of differents tolerance values for specified tests. - st["DrawArcTest:6"] = TOLERANCE * 2.5f; - st["DrawCurveTestF:4"] = TOLERANCE * 2f; - st["DrawPolygonPoint:2"] = TOLERANCE * 2f; - st["DrawPolygonPointF:2"] = TOLERANCE * 2f; - st["DrawStringFloatFormat:2"] = TOLERANCE * 2f; // in .net the font is shmoothed - st["DrawStringFloatFormat:4"] = TOLERANCE * 2.5f; // in .net the font is shmoothed - st["DrawStringFloatFormat:6"] = TOLERANCE * 2.5f; // in .net the font is shmoothed - st["RotateTransformAngleMatrixOrder1:2"] = TOLERANCE * 2f; // Line width problem - st["ScaleTransformFloatMatrixOrder:2"] = TOLERANCE * 2f; // Line width problem - st["TranslateTransformAngleMatrixOrder:2"] = TOLERANCE * 2f; // Line width problem - t.SpecialTolerance = st; - } - - [TearDown] - public void TearDown() { - } - - [Test] - public void BeginContainerTest() { - // Define transformation for container. - RectangleF srcRect = new RectangleF(0.0F, 0.0F, 200.0F, 200.0F); - RectangleF destRect = new RectangleF(100.0F, 100.0F, 150.0F, 150.0F); - // Begin graphics container. - GraphicsContainer containerState = t.Graphics.BeginContainer( - destRect, srcRect, - GraphicsUnit.Pixel); - // Fill red rectangle in container. - t.Graphics.FillRectangle(new SolidBrush(Color.Red), 0.0F, 0.0F, 200.0F, 200.0F); - t.Show (); - // End graphics container. - t.Graphics.EndContainer(containerState); - // Fill untransformed rectangle with green. - t.Graphics.FillRectangle(new SolidBrush(Color.Green), 0.0F, 0.0F, 200.0F, 200.0F); - t.Show (); - Assert.IsTrue(t.PDCompare()); - } - - [Test] - public void ClearTest() { - // Clear screen with teal background. - t.Show(); - Assert.IsTrue(t.PDCompare()); - t.Graphics.Clear(Color.Teal); - t.Show(); - Assert.IsTrue(t.PDCompare()); - } - - [Test] - public void DrawArcTest() { - // Create pen. - Pen blackPen= new Pen(Color.Black, 1); - // Create coordinates of rectangle to bound ellipse. - float x = 10.0F; - float y = 10.0F; - float width = 400.0F; - float height = 100.0F; - // Create start and sweep angles on ellipse. - float startAngle = 370.0F; - float sweepAngle = 70.0F; - // Draw arc to screen. - t.Graphics.DrawArc(blackPen, (int)x, (int)y, (int)width, (int)height, (int)startAngle, (int)sweepAngle); - t.Show(); - Assert.IsTrue(t.PDCompare()); - SetUp(); - startAngle = 10.0F; - sweepAngle = 120.0F; - t.Graphics.DrawArc(blackPen, new Rectangle((int)x, (int)y, (int)width, (int)height), startAngle, sweepAngle); - t.Show(); - Assert.IsTrue(t.PDCompare()); - SetUp(); - startAngle = 10.0F; - sweepAngle = 190.0F; - t.Graphics.DrawArc(blackPen, x, y, width, height, startAngle, sweepAngle); - t.Show(); - Assert.IsTrue(t.PDCompare()); - SetUp(); - startAngle = 10.0F; - sweepAngle = 300.0F; - t.Graphics.DrawArc(blackPen, new RectangleF(x, y, width, height), startAngle, sweepAngle); - t.Show(); - Assert.IsTrue(t.PDCompare()); - } - - [Test] - public void DrawBezierTest() { - // Create pen. - Pen blackPen = new Pen(Color.Black, 3); - // Create coordinates of points for curve. - float startX = 100.0F; - float startY = 100.0F; - float controlX1 = 200.0F; - float controlY1 = 10.0F; - float controlX2 = 350.0F; - float controlY2 = 50.0F; - float endX = 500.0F; - float endY = 100.0F; - // Draw arc to screen. - t.Graphics.DrawBezier(blackPen, startX, startY, - controlX1, controlY1, - controlX2, controlY2, - endX, endY); - t.Show(); - Assert.IsTrue(t.PDCompare()); - SetUp(); - t.Graphics.DrawBezier(blackPen, new PointF( startX, startY), - new PointF(controlX1, controlY1), - new PointF(controlX2, controlY2), - new PointF(endX, endY)); - t.Show(); - Assert.IsTrue(t.PDCompare()); - SetUp(); - t.Graphics.DrawBezier(blackPen, new Point((int)startX, (int)startY), - new Point((int)controlX1, (int)controlY1), - new Point((int)controlX2, (int)controlY2), - new Point((int)endX, (int)endY)); - t.Show(); - Assert.IsTrue(t.PDCompare()); - } - - [Test] - public void DrawBeziersTest() { - // Create pen. - Pen blackPen = new Pen(Color.Black, 3); - // Create points for curve. - Point start = new Point(100, 100); - Point control1 = new Point(200, 10); - Point control2 = new Point(350, 50); - Point end1 = new Point(500, 100); - Point control3 = new Point(600, 150); - Point control4 = new Point(650, 250); - Point end2 = new Point(500, 300); - Point[] bezierPoints = { - start, control1, control2, end1, - control3, control4, end2 - }; - // Draw arc to screen. - t.Graphics.DrawBeziers(blackPen, bezierPoints); - t.Show(); - Assert.IsTrue(t.PDCompare()); - SetUp(); - - PointF startF = new PointF(100.0F, 100.0F); - PointF control1F = new PointF(200.0F, 10.0F); - PointF control2F = new PointF(350.0F, 50.0F); - PointF end1F = new PointF(500.0F, 100.0F); - PointF control3F = new PointF(600.0F, 150.0F); - PointF control4F = new PointF(650.0F, 250.0F); - PointF end2F = new PointF(500.0F, 300.0F); - PointF[] bezierPointsF = { - startF, control1F, control2F, end1F, - control3F, control4F, end2F - }; - // Draw arc to screen. - t.Graphics.DrawBeziers(blackPen, bezierPointsF); - t.Show(); - Assert.IsTrue(t.PDCompare()); - } - - [Test] - public void DrawClosedCurveTest() { - // Create pens. - Pen redPen = new Pen(Color.Red, 3); - Pen greenPen = new Pen(Color.Green, 3); - // Create points that define curve. - PointF point1 = new PointF( 50.0F, 50.0F); - PointF point2 = new PointF(100.0F, 25.0F); - PointF point3 = new PointF(200.0F, 5.0F); - PointF point4 = new PointF(250.0F, 50.0F); - PointF point5 = new PointF(300.0F, 100.0F); - PointF point6 = new PointF(350.0F, 200.0F); - PointF point7 = new PointF(250.0F, 250.0F); - PointF[] curvePoints = { - point1, - point2, - point3, - point4, - point5, - point6, - point7 - }; - // Draw lines between original points to screen. - t.Graphics.DrawLines(redPen, curvePoints); - // Create tension and fill mode. - float tension = 0.7F; - FillMode aFillMode = FillMode.Alternate; - // Draw closed curve to screen. - t.Graphics.DrawClosedCurve(greenPen, curvePoints, tension, aFillMode); - t.Show(); - Assert.IsTrue(t.PDCompare()); - SetUp(); - - aFillMode = FillMode.Winding; - // Draw closed curve to screen. - t.Graphics.DrawClosedCurve(greenPen, curvePoints, tension, aFillMode); - t.Show(); - Assert.IsTrue(t.PDCompare()); - } - - [Test] - public void DrawCurveTest() { - // Create pens. - Pen redPen = new Pen(Color.Red, 3); - Pen greenPen = new Pen(Color.Green, 3); - // Create points that define curve. - Point point1 = new Point( 50, 50); - Point point2 = new Point(100, 25); - Point point3 = new Point(200, 5); - Point point4 = new Point(250, 50); - Point point5 = new Point(300, 100); - Point point6 = new Point(350, 200); - Point point7 = new Point(250, 250); - Point[] curvePoints = { - point1, - point2, - point3, - point4, - point5, - point6, - point7 - }; - // Draw lines between original points to screen. - t.Graphics.DrawLines(redPen, curvePoints); - // Create offset, number of segments, and tension. - int offset = 2; - int numSegments = 4; - float tension = 0.7F; - // Draw curve to screen. - t.Graphics.DrawCurve(greenPen, curvePoints, offset, numSegments, tension); - t.Show(); - Assert.IsTrue(t.PDCompare()); - SetUp(); - - t.Graphics.DrawCurve(greenPen, curvePoints, tension); - t.Show(); - Assert.IsTrue(t.PDCompare()); - SetUp(); - - t.Graphics.DrawCurve(greenPen, curvePoints); - t.Show(); - Assert.IsTrue(t.PDCompare()); - } - - [Test] - public void DrawCurveTestF() { - // Create pens. - Pen redPen = new Pen(Color.Red, 3); - Pen greenPen = new Pen(Color.Green, 3); - // Create points that define curve. - PointF point1 = new PointF( 50.0F, 50.0F); - PointF point2 = new PointF(100.0F, 25.0F); - PointF point3 = new PointF(200.0F, 5.0F); - PointF point4 = new PointF(250.0F, 50.0F); - PointF point5 = new PointF(300.0F, 100.0F); - PointF point6 = new PointF(350.0F, 200.0F); - PointF point7 = new PointF(250.0F, 250.0F); - PointF[] curvePoints = { - point1, - point2, - point3, - point4, - point5, - point6, - point7 - }; - // Draw lines between original points to screen. - t.Graphics.DrawLines(redPen, curvePoints); - // Create offset, number of segments, and tension. - int offset = 2; - int numSegments = 4; - float tension = 0.7F; - // Draw curve to screen. - t.Graphics.DrawCurve(greenPen, curvePoints, offset, numSegments, tension); - t.Show(); - Assert.IsTrue(t.PDCompare()); - SetUp(); - - t.Graphics.DrawCurve(greenPen, curvePoints, offset, numSegments); - t.Show(); - Assert.IsTrue(t.PDCompare()); - SetUp(); - - t.Graphics.DrawCurve(greenPen, curvePoints, tension); - t.Show(); - Assert.IsTrue(t.PDCompare()); - SetUp(); - - t.Graphics.DrawCurve(greenPen, curvePoints); - t.Show(); - Assert.IsTrue(t.PDCompare()); - } - - [Test] - public void DrawEllipseTest() { - // Create pen. - Pen blackPen = new Pen(Color.Black, 3); - // Create location and size of ellipse. - int x = 0; - int y = 0; - int width = 200; - int height = 100; - // Draw ellipse to screen. - t.Graphics.DrawEllipse(blackPen, x, y, width, height); - t.Show(); - Assert.IsTrue(t.PDCompare()); - SetUp(); - - t.Graphics.DrawEllipse(blackPen, new Rectangle(x, y, width, height)); - t.Show(); - Assert.IsTrue(t.PDCompare()); - } - - [Test] - public void DrawEllipseTestF() { - // Create pen. - Pen blackPen = new Pen(Color.Black, 3); - // Create location and size of ellipse. - float x = 0.0F; - float y = 0.0F; - float width = 200.0F; - float height = 100.0F; - // Draw ellipse to screen. - t.Graphics.DrawEllipse(blackPen, x, y, width, height); - t.Show(); - Assert.IsTrue(t.PDCompare()); - SetUp(); - - t.Graphics.DrawEllipse(blackPen, new RectangleF(x, y, width, height)); - t.Show(); - Assert.IsTrue(t.PDCompare()); - } - - static string getInFile (string file) { - string sRslt; - - sRslt = Path.GetFullPath (file); - - if (! File.Exists (file)) - sRslt = Path.Combine ( - Path.Combine ("..", ".."), - file); - - return sRslt; - } - - [Test] -#if TARGET_JVM - [Category ("NotWorking")] // FIXME: ImageFormat.Icon is not supported yet. - // java external library should be installed. -#endif - public void DrawIconTest() { - // Create icon. - Icon newIcon = new Icon(getInFile ("SampIcon.ico")); - // Create coordinates for upper-left corner of icon. - int x = 100; - int y = 100; - // Draw icon to screen. - t.Graphics.DrawIcon(newIcon, x, y); - t.Show(); - Assert.IsTrue(t.PDCompare()); - - t.Graphics.DrawIcon(newIcon, new Rectangle(200, 300, 125, 345)); - t.Show(); - Assert.IsTrue(t.PDCompare()); - } - - [Test] -#if TARGET_JVM - [Category ("NotWorking")] // FIXME: ImageFormat.Icon is not supported yet. - // java external library should be installed. -#endif - public void DrawIconUnstretchedTest() { - // Create icon. - Icon newIcon = new Icon(getInFile ("SampIcon.ico")); - // Create rectangle for icon. - Rectangle rect = new Rectangle( 100, 100, 200, 200); - // Draw icon to screen. - t.Graphics.DrawIconUnstretched(newIcon, rect); - t.Show(); - Assert.IsTrue(t.PDCompare()); - } -#if INTPTR_SUPPORTED - // Define DrawImageAbort callback method. - private bool DrawImageCallback(IntPtr callBackData) { - // Test for call that passes callBackData parameter. - if(callBackData==IntPtr.Zero) { - // If no callBackData passed, abort DrawImage method. - return true; - } - else { - // If callBackData passed, continue DrawImage method. - return false; - } - } - - [Test] //TBD: add more overrides - public void DrawImageTest() { - // Create callback method. - Graphics.DrawImageAbort imageCallback - = new Graphics.DrawImageAbort(DrawImageCallback); - IntPtr imageCallbackData = new IntPtr(1); - // Create image. - Image newImage = Image.FromFile("SampIcon.ico"); - // Create rectangle for displaying original image. - Rectangle destRect1 = new Rectangle( 100, 25, 450, 150); - // Create coordinates of rectangle for source image. - float x = 50.0F; - float y = 50.0F; - float width = 150.0F; - float height = 150.0F; - GraphicsUnit units = GraphicsUnit.Pixel; - // Draw original image to screen. - t.Graphics.DrawImage(newImage, destRect1, x, y, width, height, units); - t.Show(); - // Create rectangle for adjusted image. - Rectangle destRect2 = new Rectangle(100, 175, 450, 150); - // Create image attributes and set large gamma. - ImageAttributes imageAttr = new ImageAttributes(); - imageAttr.SetGamma(4.0F); - // Draw adjusted image to screen. - - t.Graphics.DrawImage( - newImage, - destRect2, - x, y, - width, height, - units, - imageAttr, - imageCallback, - imageCallbackData); - - t.Show(); - } -#endif - [Test] -#if TARGET_JVM - [Category ("NotWorking")] // GH NUnit unable to read machine.config or any other app.config files -#endif - public void DrawImageUnscaledTest() { - // Create image. - Image newImage = Bitmap.FromFile(getInFile ("bitmap_gh.png")); - // Create coordinates for upper-left corner of image. - int x = 100; - int y = 100; - // Draw image to screen. - t.Graphics.DrawImageUnscaled(newImage, x, y, 100, 125); - t.Show(); - Assert.IsTrue(t.PDCompare()); - SetUp(); - - t.Graphics.DrawImageUnscaled(newImage, new Rectangle(x, y, 34, 235)); - t.Show(); - Assert.IsTrue(t.PDCompare()); - SetUp(); - - t.Graphics.DrawImageUnscaled(newImage, x, y); - t.Show(); - Assert.IsTrue(t.PDCompare()); - SetUp(); - - t.Graphics.DrawImageUnscaled(newImage, new Point(x, y)); - t.Show(); - Assert.IsTrue(t.PDCompare()); - } - - [Test] - public void DrawLineTest() { - // Create pen. - Pen blackPen = new Pen(Color.Black, 3); - // Create coordinates of points that define line. - int x1 = 100; - int y1 = 100; - int x2 = 500; - int y2 = 100; - // Draw line to screen. - t.Graphics.DrawLine(blackPen, x1, y1, x2, y2); - t.Show(); - Assert.IsTrue(t.PDCompare()); - SetUp(); - - t.Graphics.DrawLine(blackPen, new Point( x1, y1), new Point( x2, y2)); - t.Show(); - Assert.IsTrue(t.PDCompare()); - } - - [Test] - public void DrawLineTestF() { - // Create pen. - Pen blackPen = new Pen(Color.Black, 3); - // Create coordinates of points that define line. - float x1 = 100.0F; - float y1 = 100.0F; - float x2 = 500.0F; - float y2 = 100.0F; - // Draw line to screen. - t.Graphics.DrawLine(blackPen, x1, y1, x2, y2); - t.Show(); - Assert.IsTrue(t.PDCompare()); - SetUp(); - - t.Graphics.DrawLine(blackPen, new PointF( x1, y1), new PointF( x2, y2)); - t.Show(); - Assert.IsTrue(t.PDCompare()); - } - - [Test] - public void DrawLinesTest() { - // Create pen. - Pen pen = new Pen(Color.Black, 3); - // Create array of points that define lines to draw. - Point[] points = { - new Point( 10, 10), - new Point( 10, 100), - new Point(200, 50), - new Point(250, 300) - }; - //Draw lines to screen. - t.Graphics.DrawLines(pen, points); - t.Show(); - Assert.IsTrue(t.PDCompare()); - } - - [Test] - public void DrawLinesTestF() { - // Create pen. - Pen pen = new Pen(Color.Black, 3); - // Create array of points that define lines to draw. - PointF[] points = { - new PointF( 10.0F, 10.0F), - new PointF( 10.0F, 100.0F), - new PointF(200.0F, 50.0F), - new PointF(250.0F, 300.0F) - }; - //Draw lines to screen. - t.Graphics.DrawLines(pen, points); - t.Show(); - Assert.IsTrue(t.PDCompare()); - } - - [Test] - public void DrawPathTest() { - // Create graphics path object and add ellipse. - GraphicsPath graphPath = new GraphicsPath(); - graphPath.AddEllipse(0, 0, 200, 100); - // Create pen. - Pen blackPen = new Pen(Color.Black, 3); - // Draw graphics path to screen. - t.Graphics.DrawPath(blackPen, graphPath); - t.Show(); - Assert.IsTrue(t.PDCompare()); - } - - [Test] - public void DrawPieTestF() { - // Create pen. - Pen blackPen = new Pen(Color.Black, 3); - // Create location and size of ellipse. - float x = 0.0F; - float y = 0.0F; - float width = 200.0F; - float height = 100.0F; - // Create start and sweep angles. - float startAngle = 0.0F; - float sweepAngle = 45.0F; - // Draw pie to screen. - t.Graphics.DrawPie(blackPen, x, y, width, height, startAngle, sweepAngle); - t.Show(); - Assert.IsTrue(t.PDCompare()); - SetUp(); - - t.Graphics.DrawPie(blackPen, new RectangleF( x, y, width, height), startAngle, sweepAngle); - t.Show(); - Assert.IsTrue(t.PDCompare()); - } - - [Test] - public void DrawPieTest() { - // Create pen. - Pen blackPen = new Pen(Color.Black, 3); - // Create location and size of ellipse. - int x = 0; - int y = 0; - int width = 200; - int height = 100; - // Create start and sweep angles. - int startAngle = 0; - int sweepAngle = 45; - // Draw pie to screen. - t.Graphics.DrawPie(blackPen, x, y, width, height, startAngle, sweepAngle); - t.Show(); - Assert.IsTrue(t.PDCompare()); - SetUp(); - - t.Graphics.DrawPie(blackPen, new Rectangle( x, y, width, height), startAngle, sweepAngle); - t.Show(); - Assert.IsTrue(t.PDCompare()); - } - - [Test] - public void DrawPolygonPoint() { - // Create pen. - Pen blackPen = new Pen(Color.Black, 3); - // Create points that define polygon. - Point point1 = new Point( 50, 50); - Point point2 = new Point(100, 25); - Point point3 = new Point(200, 5); - Point point4 = new Point(250, 50); - Point point5 = new Point(300, 100); - Point point6 = new Point(350, 200); - Point point7 = new Point(250, 250); - Point[] curvePoints = { - point1, - point2, - point3, - point4, - point5, - point6, - point7 - }; - // Draw polygon to screen. - t.Graphics.DrawPolygon(blackPen, curvePoints); - t.Show(); - Assert.IsTrue(t.PDCompare()); // .NET's lines of polygon is more wide - } - - [Test] - public void DrawPolygonPointF() { - // Create pen. - Pen blackPen = new Pen(Color.Black, 3); - // Create points that define polygon. - PointF point1 = new PointF( 50, 50); - PointF point2 = new PointF(100, 25); - PointF point3 = new PointF(200, 5); - PointF point4 = new PointF(250, 50); - PointF point5 = new PointF(300, 100); - PointF point6 = new PointF(350, 200); - PointF point7 = new PointF(250, 250); - PointF[] curvePoints = { - point1, - point2, - point3, - point4, - point5, - point6, - point7 - }; - // Draw polygon to screen. - t.Graphics.DrawPolygon(blackPen, curvePoints); - t.Show(); - Assert.IsTrue(t.PDCompare()); - } - - [Test] - public void DrawRectangleFloat() { - // Create pen. - Pen blackPen = new Pen(Color.Black, 3); - // Create location and size of rectangle. - float x = 7.0F; - float y = 7.0F; - float width = 200.0F; - float height = 200.0F; - // Draw rectangle to screen. - t.Graphics.DrawRectangle(blackPen, x, y, width, height); - t.Show(); - Assert.IsTrue(t.PDCompare()); - SetUp(); - - t.Graphics.DrawRectangle(blackPen, (int)x, (int)y, (int)width, (int)height); - t.Show(); - Assert.IsTrue(t.PDCompare()); - SetUp(); - - t.Graphics.DrawRectangle(blackPen, new Rectangle( (int)x, (int)y, (int)width, (int)height)); - t.Show(); - Assert.IsTrue(t.PDCompare()); - } - - [Test] - public void DrawRectanglesRectangleF() { - // Create pen. - Pen blackPen = new Pen(Color.Black, 3); - // Create array of rectangles. - RectangleF[] rects = { - new RectangleF( 20.0F, 20.0F, 100.0F, 200.0F), - new RectangleF(100.0F, 200.0F, 250.0F, 50.0F), - new RectangleF(300.0F, 20.0F, 50.0F, 100.0F) - }; - // Draw rectangles to screen. - t.Graphics.DrawRectangles(blackPen, rects); - t.Show(); - Assert.IsTrue(t.PDCompare()); - } - - [Test] - public void DrawRectanglesRectangle() { - // Create pen. - Pen blackPen = new Pen(Color.Black, 3); - // Create array of rectangles. - Rectangle[] rects = { - new Rectangle( 20, 20, 100, 200), - new Rectangle(100, 200, 250, 50), - new Rectangle(300, 20, 50, 100) - }; - // Draw rectangles to screen. - t.Graphics.DrawRectangles(blackPen, rects); - t.Show(); - Assert.IsTrue(t.PDCompare()); - } - - [Test] //TBD: add more combinations - public void DrawStringFloatFormat() { - // Create string to draw. - String drawString = "Sample Text"; - // Create font and brush. - Font drawFont = new Font("Arial", 34, FontStyle.Italic); - SolidBrush drawBrush = new SolidBrush(Color.Black); - // Create point for upper-left corner of drawing. - float x = 150.0F; - float y = 50.0F; - // Set format of string. - StringFormat drawFormat = new StringFormat(); - drawFormat.FormatFlags = StringFormatFlags.DirectionVertical; - // Draw string to screen. - t.Graphics.DrawString(drawString, drawFont, drawBrush, x, y, drawFormat); - t.Show(); - Assert.IsTrue(t.PDCompare()); // in .net the font is shmoothed - SetUp(); - - drawFormat.FormatFlags = StringFormatFlags.NoClip; - // Draw string to screen. - t.Graphics.DrawString(drawString, drawFont, drawBrush, x, y, drawFormat); - t.Show(); - Assert.IsTrue(t.PDCompare()); - SetUp(); - - drawFormat.FormatFlags = StringFormatFlags.FitBlackBox; - // Draw string to screen. - t.Graphics.DrawString(drawString, drawFont, drawBrush, x, y, drawFormat); - t.Show(); - Assert.IsTrue(t.PDCompare()); - } - - [Test] - public void EndContainerState() { - // Begin graphics container. - GraphicsContainer containerState = t.Graphics.BeginContainer(); - // Translate world transformation. - t.Graphics.TranslateTransform(100.0F, 100.0F); - // Fill translated rectangle in container with red. - t.Graphics.FillRectangle(new SolidBrush(Color.Red), 0, 0, 200, 200); - t.Show(); - // End graphics container. - t.Graphics.EndContainer(containerState); - // Fill untransformed rectangle with green. - t.Graphics.FillRectangle(new SolidBrush(Color.Green), 0, 0, 200, 200); - t.Show(); - Assert.IsTrue(t.PDCompare()); - } - - [Test] //TBD - public void EnumerateMetafile() { - } - - [Test] - public void ExcludeClipRegion() { - // Create rectangle for exclusion. - Rectangle excludeRect = new Rectangle(100, 100, 200, 200); - // Set clipping region to exclude rectangle. - t.Graphics.ExcludeClip(excludeRect); - // Fill large rectangle to show clipping region. - t.Graphics.FillRectangle(new SolidBrush(Color.Blue), 0, 0, 300, 300); - t.Show(); - Assert.IsTrue(t.PDCompare()); - } - - [Test] - public void FillClosedCurvePointFillModeTension() { - // Create solid brush. - SolidBrush redBrush = new SolidBrush(Color.Red); - // Create array of points for curve. - Point point1 = new Point(100, 100); - Point point2 = new Point(200, 50); - Point point3 = new Point(250, 200); - Point point4 = new Point( 50, 150); - Point[] points = {point1, point2, point3, point4}; - // Set fill mode. - FillMode newFillMode = FillMode.Winding; - // Set tension. - float tension = 0.68F; - // Fill curve on screen. - t.Graphics.FillClosedCurve(redBrush, points); - t.Show(); - Assert.IsTrue(t.PDCompare()); - SetUp(); - - t.Graphics.FillClosedCurve(redBrush, points, newFillMode); - t.Show(); - Assert.IsTrue(t.PDCompare()); - SetUp(); - - newFillMode = FillMode.Alternate; - t.Graphics.FillClosedCurve(redBrush, points, newFillMode, tension); - Assert.IsTrue(t.PDCompare()); - t.Show(); - } - - [Test] - public void FillClosedCurvePointFFillModeTension() { - // Create solid brush. - SolidBrush redBrush = new SolidBrush(Color.Red); - // Create array of points for curve. - PointF point1 = new PointF(100.0F, 100.0F); - PointF point2 = new PointF(200.0F, 50.0F); - PointF point3 = new PointF(250.0F, 200.0F); - PointF point4 = new PointF( 50.0F, 150.0F); - PointF[] points = {point1, point2, point3, point4}; - // Set fill mode. - FillMode newFillMode = FillMode.Winding; - // Set tension. - float tension = 0.68F; - // Fill curve on screen. - t.Graphics.FillClosedCurve(redBrush, points); - t.Show(); - Assert.IsTrue(t.PDCompare()); - SetUp(); - - t.Graphics.FillClosedCurve(redBrush, points, newFillMode); - t.Show(); - Assert.IsTrue(t.PDCompare()); - SetUp(); - - newFillMode = FillMode.Alternate; - t.Graphics.FillClosedCurve(redBrush, points, newFillMode, tension); - t.Show(); - Assert.IsTrue(t.PDCompare()); - } - - [Test] - public void FillEllipse() { - // Create solid brush. - SolidBrush redBrush = new SolidBrush(Color.Red); - // Create location and size of ellipse. - int x = 0; - int y = 0; - int width = 200; - int height = 100; - // Fill ellipse on screen. - t.Graphics.FillEllipse(redBrush, x, y, width, height); - t.Show(); - Assert.IsTrue(t.PDCompare()); - SetUp(); - - t.Graphics.FillEllipse(redBrush, new Rectangle( x, y, width, height)); - t.Show(); - Assert.IsTrue(t.PDCompare()); - } - - [Test] - public void FillEllipseFloat() { - // Create solid brush. - SolidBrush redBrush = new SolidBrush(Color.Red); - // Create location and size of ellipse. - float x = 0.0F; - float y = 0.0F; - float width = 200.0F; - float height = 100.0F; - // Fill ellipse on screen. - t.Graphics.FillEllipse(redBrush, x, y, width, height); - t.Show(); - Assert.IsTrue(t.PDCompare()); - SetUp(); - - t.Graphics.FillEllipse(redBrush, new RectangleF( x, y, width, height)); - t.Show(); - Assert.IsTrue(t.PDCompare()); - } - - [Test] - public void FillPathEllipse() { - // Create solid brush. - SolidBrush redBrush = new SolidBrush(Color.Red); - // Create graphics path object and add ellipse. - GraphicsPath graphPath = new GraphicsPath(); - graphPath.AddEllipse(0, 0, 200, 100); - // Fill graphics path to screen. - t.Graphics.FillPath(redBrush, graphPath); - t.Show(); - Assert.IsTrue(t.PDCompare()); - } - - [Test] - public void FillPieFloat() { - // Create solid brush. - SolidBrush redBrush = new SolidBrush(Color.Red); - // Create location and size of ellipse. - int x = 0; - int y = 0; - int width = 200; - int height = 100; - // Create start and sweep angles. - float startAngle = 0.0F; - float sweepAngle = 45.0F; - // Fill pie to screen. - t.Graphics.FillPie(redBrush, new Rectangle(x, y, width, height), startAngle, sweepAngle); - t.Show(); - Assert.IsTrue(t.PDCompare()); - SetUp(); - - t.Graphics.FillPie(redBrush, x, y, width, height, (int)startAngle, (int)sweepAngle); - t.Show(); - Assert.IsTrue(t.PDCompare()); - SetUp(); - - t.Graphics.FillPie(redBrush, (float)x, (float)y, (float)width, (float)height, startAngle, sweepAngle); - t.Show(); - Assert.IsTrue(t.PDCompare()); - } - - [Test] - public void FillPolygonPointFillMode() { - // Create solid brush. - SolidBrush blueBrush = new SolidBrush(Color.Blue); - // Create points that define polygon. - Point point1 = new Point( 50, 50); - Point point2 = new Point(100, 25); - Point point3 = new Point(200, 5); - Point point4 = new Point(250, 50); - Point point5 = new Point(300, 100); - Point point6 = new Point(350, 200); - Point point7 = new Point(250, 250); - Point[] curvePoints = { - point1, - point2, - point3, - point4, - point5, - point6, - point7 - }; - - // Fill polygon to screen. - t.Graphics.FillPolygon(blueBrush, curvePoints, FillMode.Winding); - t.Show(); - Assert.IsTrue(t.PDCompare()); - SetUp(); - - t.Graphics.FillPolygon(blueBrush, curvePoints, FillMode.Alternate); - t.Show(); - Assert.IsTrue(t.PDCompare()); - SetUp(); - - t.Graphics.FillPolygon(blueBrush, curvePoints); - t.Show(); - Assert.IsTrue(t.PDCompare()); - } - - [Test] - public void FillPolygonPointFFillMode() { - // Create solid brush. - SolidBrush blueBrush = new SolidBrush(Color.Blue); - // Create points that define polygon. - PointF point1 = new PointF( 50.0F, 50.0F); - PointF point2 = new PointF(100.0F, 25.0F); - PointF point3 = new PointF(200.0F, 5.0F); - PointF point4 = new PointF(250.0F, 50.0F); - PointF point5 = new PointF(300.0F, 100.0F); - PointF point6 = new PointF(350.0F, 200.0F); - PointF point7 = new PointF(250.0F, 250.0F); - PointF[] curvePoints = { - point1, - point2, - point3, - point4, - point5, - point6, - point7 - }; - - // Fill polygon to screen. - t.Graphics.FillPolygon(blueBrush, curvePoints, FillMode.Winding); - t.Show(); - Assert.IsTrue(t.PDCompare()); - SetUp(); - - t.Graphics.FillPolygon(blueBrush, curvePoints, FillMode.Alternate); - t.Show(); - Assert.IsTrue(t.PDCompare()); - SetUp(); - - t.Graphics.FillPolygon(blueBrush, curvePoints); - t.Show(); - Assert.IsTrue(t.PDCompare()); - } - - [Test] - public void FillRectangle() { - // Create solid brush. - SolidBrush blueBrush = new SolidBrush(Color.Blue); - // Create location and size of rectangle. - int x = 0; - int y = 0; - int width = 300; - int height = 200; - // Fill rectangle to screen. - t.Graphics.FillRectangle(blueBrush, x, y, width, height); - t.Show(); - Assert.IsTrue(t.PDCompare()); - SetUp(); - - t.Graphics.FillRectangle(blueBrush, new Rectangle( x, y, width, height)); - t.Show(); - Assert.IsTrue(t.PDCompare()); - } - - [Test] - public void FillRectangleFloat() { - // Create solid brush. - SolidBrush blueBrush = new SolidBrush(Color.Blue); - // Create location and size of rectangle. - float x = 0.0F; - float y = 0.0F; - float width = 300.0F; - float height = 200.0F; - // Fill rectangle to screen. - t.Graphics.FillRectangle(blueBrush, x, y, width, height); - t.Show(); - Assert.IsTrue(t.PDCompare()); - SetUp(); - - t.Graphics.FillRectangle(blueBrush, new RectangleF( x, y, width, height)); - t.Show(); - Assert.IsTrue(t.PDCompare()); - } - - [Test] - public void FillRectanglesRectangle() { - // Create solid brush. - SolidBrush blueBrush = new SolidBrush(Color.Blue); - // Create array of rectangles. - Rectangle[] rects = { - new Rectangle( 0, 0, 100, 200), - new Rectangle(100, 200, 250, 50), - new Rectangle(300, 0, 50, 100) - }; - // Fill rectangles to screen. - t.Graphics.FillRectangles(blueBrush, rects); - t.Show(); - Assert.IsTrue(t.PDCompare()); - } - - [Test] - public void FillRectanglesRectangleF() { - // Create solid brush. - SolidBrush blueBrush = new SolidBrush(Color.Blue); - // Create array of rectangles. - RectangleF[] rects = { - new RectangleF( 0.0F, 0.0F, 100.0F, 200.0F), - new RectangleF(100.0F, 200.0F, 250.0F, 50.0F), - new RectangleF(300.0F, 0.0F, 50.0F, 100.0F) - }; - // Fill rectangles to screen. - t.Graphics.FillRectangles(blueBrush, rects); - t.Show(); - Assert.IsTrue(t.PDCompare()); - } - - [Test] - public void FillRegionRectangle() { - // Create solid brush. - SolidBrush blueBrush = new SolidBrush(Color.Blue); - // Create rectangle for region. - Rectangle fillRect = new Rectangle(100, 150, 200, 250); - // Create region for fill. - Region fillRegion = new Region(fillRect); - // Fill region to screen. - t.Graphics.FillRegion(blueBrush, fillRegion); - t.Show(); - Assert.IsTrue(t.PDCompare()); - } - - [Test] - public void FlushTest() { - t.Graphics.Flush(); - t.Graphics.Flush(FlushIntention.Flush); - } - - [Test] - public void IntersectClipRegion() { - // Set clipping region. - Rectangle clipRect = new Rectangle(0, 0, 200, 300); - Region clipRegion = new Region(clipRect); - t.Graphics.SetClip(clipRegion, CombineMode.Replace); - // Update clipping region to intersection of - // existing region with specified rectangle. - Rectangle intersectRect = new Rectangle(100, 100, 200, 300); - Region intersectRegion = new Region(intersectRect); - t.Graphics.IntersectClip(intersectRegion); - // Fill rectangle to demonstrate effective clipping region. - t.Graphics.FillRectangle(new SolidBrush(Color.Blue), 0, 0, 500, 600); - t.Show(); - // Reset clipping region to infinite. - t.Graphics.ResetClip(); - // Draw clipRect and intersectRect to screen. - t.Graphics.DrawRectangle(new Pen(Color.Black), clipRect); - t.Show(); - t.Graphics.DrawRectangle(new Pen(Color.Red), intersectRect); - t.Show(); - Assert.IsTrue(t.PDCompare()); - } - - [Test] - public void IsVisible4Float() { - // Set clip region. - Region clipRegion = new Region(new Rectangle(50, 50, 100, 100)); - t.Graphics.SetClip(clipRegion, CombineMode.Replace); - // Set up coordinates of rectangles. - float x1 = 100.0F; - float y1 = 100.0F; - float width1 = 20.0F; - float height1 = 20.0F; - float x2 = 200.0F; - float y2 = 200.0F; - float width2 = 20.0F; - float height2 = 20.0F; - // If rectangle is visible, fill it. - if (t.Graphics.IsVisible(x1, y1, width1, height1)) { - t.Graphics.FillRectangle(new SolidBrush(Color.Red), x1, y1, width1, height1); - t.Show(); - } - if (t.Graphics.IsVisible(x2, y2, width2, height2)) { - t.Graphics.FillRectangle(new SolidBrush(Color.Blue), x2, y2, width2, height2); - t.Show(); - } - - Assert.IsTrue(t.PDCompare()); - } - - [Test] -#if TARGET_JVM - [Category ("NotWorking")] // FIXME: Graphics.MeasureCharacterRanges is not implemented -#endif - public void MeasureCharacterRangesRegions() { - // Set up string. - string measureString = "First and Second ranges"; - Font stringFont = new Font("Times New Roman", 16.0F); - // Set character ranges to "First" and "Second". - CharacterRange[] characterRanges = { - new CharacterRange(0, 5), - new CharacterRange(10, 6) - }; - // Create rectangle for layout. - float x = 50.0F; - float y = 50.0F; - float width = 35.0F; - float height = 200.0F; - RectangleF layoutRect = new RectangleF(x, y, width, height); - // Set string format. - StringFormat stringFormat = new StringFormat(); - stringFormat.FormatFlags = StringFormatFlags.DirectionVertical; - stringFormat.SetMeasurableCharacterRanges(characterRanges); - // Draw string to screen. - t.Graphics.DrawString( - measureString, - stringFont, - Brushes.Black, - x, y, - stringFormat); - // Measure two ranges in string. - Region[] stringRegions = new Region[2]; - stringRegions = t.Graphics.MeasureCharacterRanges( - measureString, - stringFont, - layoutRect, - stringFormat); - // Draw rectangle for first measured range. - RectangleF measureRect1 = stringRegions[0].GetBounds(t.Graphics); - t.Graphics.DrawRectangle( - new Pen(Color.Red, 1), - Rectangle.Round(measureRect1)); - t.Show(); - // Draw rectangle for second measured range. - RectangleF measureRect2 = stringRegions[1].GetBounds(t.Graphics); - t.Graphics.DrawRectangle( - new Pen(Color.Blue, 1), - Rectangle.Round(measureRect2)); - t.Show(); - Assert.IsTrue(t.PDCompare()); - } - - [Test] //TBD: add more overloads -#if TARGET_JVM - [Category ("NotWorking")] // FIXME: Graphics.MeasureString(string,Font,SizeF,StringFormat,out int,out int) - // is not implemented -#endif - public void MeasureStringSizeFFormatInts() { - // Set up string. - string measureString = "Measure String"; - Font stringFont = new Font("Arial", 16); - // Set maximum layout size. - SizeF layoutSize = new SizeF(100.0F, 200.0F); - // Set string format. - StringFormat newStringFormat = new StringFormat(); - newStringFormat.FormatFlags = StringFormatFlags.DirectionVertical; - // Measure string. - int charactersFitted; - int linesFilled; - SizeF stringSize = new SizeF(); - stringSize = t.Graphics.MeasureString( - measureString, - stringFont, - layoutSize, - newStringFormat, - out charactersFitted, - out linesFilled); - // Draw rectangle representing size of string. - t.Graphics.DrawRectangle( - new Pen(Color.Red, 1), - 0.0F, 0.0F, stringSize.Width, stringSize.Height); - t.Show(); - // Draw string to screen. - t.Graphics.DrawString( - measureString, - stringFont, - Brushes.Black, - new PointF(0, 0), - newStringFormat); - t.Show(); - // Draw output parameters to screen. - string outString = "chars " + charactersFitted + ", lines " + linesFilled; - t.Graphics.DrawString( - outString, - stringFont, - Brushes.Black, - new PointF(100, 0)); - t.Show(); - Assert.IsTrue(t.PDCompare()); - } - - [Test] - public void MultiplyTransform() { - // Create transform matrix. - Matrix transformMatrix = new Matrix(); - // Translate matrix, prepending translation vector. - transformMatrix.Translate(200.0F, 100.0F); - // Rotate transformation matrix of graphics object, - // prepending rotation matrix. - t.Graphics.RotateTransform(30.0F); - // Multiply (append to) transformation matrix of - // graphics object to translate graphics transformation. - t.Graphics.MultiplyTransform(transformMatrix); - // Draw rotated, translated ellipse. - t.Graphics.DrawEllipse(new Pen(Color.Blue, 3), -80, -40, 160, 80); - t.Show(); - Assert.IsTrue(t.PDCompare()); - } - - [Test] - public void MultiplyTransformMatrixOrder() { - // Create transform matrix. - Matrix transformMatrix = new Matrix(); - // Translate matrix, prepending translation vector. - transformMatrix.Translate(200.0F, 100.0F); - // Rotate transformation matrix of graphics object, - // prepending rotation matrix. - t.Graphics.RotateTransform(30.0F); - // Multiply (append to) transformation matrix of - // graphics object to translate graphics transformation. - t.Graphics.MultiplyTransform(transformMatrix, MatrixOrder.Append); - // Draw rotated, translated ellipse. - t.Graphics.DrawEllipse(new Pen(Color.Blue, 3), -80, -40, 160, 80); - t.Show(); - Assert.IsTrue(t.PDCompare()); - } - - [Test] - public void MultiplyTransformMatrixOrder1() { - // Create transform matrix. - Matrix transformMatrix = new Matrix(); - // Translate matrix, prepending translation vector. - transformMatrix.Translate(200.0F, 100.0F); - // Rotate transformation matrix of graphics object, - // prepending rotation matrix. - t.Graphics.RotateTransform(30.0F); - // Multiply (append to) transformation matrix of - // graphics object to translate graphics transformation. - t.Graphics.MultiplyTransform(transformMatrix, MatrixOrder.Prepend); - // Draw rotated, translated ellipse. - t.Graphics.DrawEllipse(new Pen(Color.Blue, 3), -80, -40, 160, 80); - t.Show(); - Assert.IsTrue(t.PDCompare()); - } - - [Test] - public void ResetClipIntersectClipRectangleF() { - // Set clipping region. - Rectangle clipRect = new Rectangle(0, 0, 200, 200); - t.Graphics.SetClip(clipRect); - // Update clipping region to intersection of existing region with new rectangle. - RectangleF intersectRectF = new RectangleF(100.0F, 100.0F, 200.0F, 200.0F); - t.Graphics.IntersectClip(intersectRectF); - // Fill rectangle to demonstrate effective clipping region. - t.Graphics.FillRectangle(new SolidBrush(Color.Blue), 0, 0, 500, 500); - // Reset clipping region to infinite. - t.Graphics.ResetClip(); - // Draw clipRect and intersectRect to screen. - t.Graphics.DrawRectangle(new Pen(Color.Black), clipRect); - t.Graphics.DrawRectangle(new Pen(Color.Red), Rectangle.Round(intersectRectF)); - t.Show(); - Assert.IsTrue(t.PDCompare()); - } - - [Test] - public void SaveRestoreTranslate() { - // Translate transformation matrix. - t.Graphics.TranslateTransform(100, 0); - // Save translated graphics state. - GraphicsState transState = t.Graphics.Save(); - // Reset transformation matrix to identity and fill rectangle. - t.Graphics.ResetTransform(); - t.Graphics.FillRectangle(new SolidBrush(Color.Red), 0, 0, 100, 100); - t.Show(); - // Restore graphics state to translated state and fill second rectangle. - t.Graphics.Restore(transState); - t.Graphics.FillRectangle(new SolidBrush(Color.Blue), 0, 0, 100, 100); - t.Show(); - Assert.IsTrue(t.PDCompare()); - } - - [Test] - public void RotateTransformAngleMatrixOrder() { - // Set world transform of graphics object to translate. - t.Graphics.TranslateTransform(100.0F, 0.0F); - // Then to rotate, appending rotation matrix. - t.Graphics.RotateTransform(30.0F, MatrixOrder.Append); - // Draw translated, rotated ellipse to screen. - t.Graphics.DrawEllipse(new Pen(Color.Blue, 3), 0, 0, 200, 80); - t.Show(); - Assert.IsTrue(t.PDCompare()); - } - - [Test] - public void RotateTransformAngleMatrixOrder1() { - // Set world transform of graphics object to translate. - t.Graphics.TranslateTransform(100.0F, 0.0F); - // Then to rotate, appending rotation matrix. - t.Graphics.RotateTransform(30.0F, MatrixOrder.Prepend); - // Draw translated, rotated ellipse to screen. - t.Graphics.DrawEllipse(new Pen(Color.Blue, 3), 0, 0, 200, 80); - t.Show(); - Assert.IsTrue(t.PDCompare()); // Line width problem - } - - [Test] - public void ScaleTransformFloatMatrixOrder() { - // Set world transform of graphics object to rotate. - t.Graphics.RotateTransform(30.0F); - // Then to scale, appending to world transform. - t.Graphics.ScaleTransform(3.0F, 1.0F, MatrixOrder.Append); - // Draw rotated, scaled rectangle to screen. - t.Graphics.DrawRectangle(new Pen(Color.Blue, 3), 50, 0, 100, 40); - t.Show(); - Assert.IsTrue(t.PDCompare()); // Line width problem - } - - [Test] - public void ScaleTransformFloatMatrixOrder1() { - // Set world transform of graphics object to rotate. - t.Graphics.RotateTransform(30.0F); - // Then to scale, appending to world transform. - t.Graphics.ScaleTransform(3.0F, 1.0F, MatrixOrder.Prepend); - // Draw rotated, scaled rectangle to screen. - t.Graphics.DrawRectangle(new Pen(Color.Blue, 3), 50, 0, 100, 40); - t.Show(); - Assert.IsTrue(t.PDCompare()); - } - - [Test] //TBD: add more combination - public void SetClipRegionCombine() { - // Create region for clipping. - Region clipRegion = new Region(new Rectangle(0, 0, 200, 100)); - // Set clipping region of graphics to region. - t.Graphics.SetClip(clipRegion, CombineMode.Replace); - // Fill rectangle to demonstrate clip region. - t.Graphics.FillRectangle(new SolidBrush(Color.Black), 0, 0, 500, 300); - t.Show(); - Assert.IsTrue(t.PDCompare()); - } - - [Test] - public void TransformPointsPointF() { - // Create array of two points. - PointF[] points = {new PointF(0.0F, 0.0F), - new PointF(100.0F, 50.0F)}; - // Draw line connecting two untransformed points. - t.Graphics.DrawLine(new Pen(Color.Blue, 3), - points[0], - points[1]); - // Set world transformation of Graphics object to translate. - t.Graphics.TranslateTransform(40.0F, 30.0F); - // Transform points in array from world to page coordinates. - t.Graphics.TransformPoints(CoordinateSpace.Page, - CoordinateSpace.World, - points); - // Reset world transformation. - t.Graphics.ResetTransform(); - // Draw line that connects transformed points. - t.Graphics.DrawLine(new Pen(Color.Red, 3), - points[0], - points[1]); - t.Show(); - Assert.IsTrue(t.PDCompare()); - } - - [Test] - public void TranslateClipFloat() { - // Create rectangle for clipping region. - RectangleF clipRect = new RectangleF(0.0F, 0.0F, 100.0F, 100.0F); - // Set clipping region of graphics to rectangle. - t.Graphics.SetClip(clipRect); - // Translate clipping region. - float dx = 50.0F; - float dy = 50.0F; - t.Graphics.TranslateClip(dx, dy); - // Fill rectangle to demonstrate translated clip region. - t.Graphics.FillRectangle(new SolidBrush(Color.Black), 0, 0, 500, 300); - t.Show(); - Assert.IsTrue(t.PDCompare()); - } - - [Test] - public void TranslateTransformAngleMatrixOrder() { - // Set world transform of graphics object to rotate. - t.Graphics.RotateTransform(30.0F); - // Then to translate, appending to world transform. - t.Graphics.TranslateTransform(100.0F, 0.0F, MatrixOrder.Append); - // Draw rotated, translated ellipse to screen. - t.Graphics.DrawEllipse(new Pen(Color.Blue, 3), 0, 0, 200, 80); - t.Show(); - Assert.IsTrue(t.PDCompare()); // Line width problem - } - - [Test] - public void TranslateTransformAngleMatrixOrder1() { - // Set world transform of graphics object to rotate. - t.Graphics.RotateTransform(30.0F); - // Then to translate, appending to world transform. - t.Graphics.TranslateTransform(100.0F, 0.0F, MatrixOrder.Prepend); - // Draw rotated, translated ellipse to screen. - t.Graphics.DrawEllipse(new Pen(Color.Blue, 3), 0, 0, 200, 80); - t.Show(); - Assert.IsTrue(t.PDCompare()); - } - - [Test] - public void TransfromPageScaleUnits() { - t.Graphics.PageUnit = GraphicsUnit.Millimeter; - t.Graphics.PageScale = 1.0F; - t.Graphics.DrawLine(Pens.Red, 10, 70, 70, 10); - - t.Graphics.PageUnit = GraphicsUnit.Document; - t.Graphics.PageScale = 10.0F; - t.Graphics.DrawLine(Pens.Blue, 10, 70, 70, 10); - - t.Graphics.PageUnit = GraphicsUnit.Inch; - t.Graphics.PageScale = 0.055F; - t.Graphics.DrawLine(Pens.Green, 10, 70, 70, 10); - - Matrix mx=new Matrix(0.5f,0,0,0.5f,0,0); - t.Graphics.Transform = mx; - - t.Graphics.PageUnit = GraphicsUnit.Inch; - t.Graphics.DrawLine(Pens.Black, 10, 70, 70, 10); - - t.Graphics.PageUnit = GraphicsUnit.Point; - t.Graphics.PageScale = 2.7F; - t.Graphics.DrawLine(Pens.Yellow, 10, 70, 70, 10); - - t.Show(); - Assert.IsTrue(t.PDCompare()); - } - - [Test] - public void TransfromPageScaleUnits_2() { - t.Graphics.RotateTransform(45); - t.Graphics.PageUnit = GraphicsUnit.Millimeter; - t.Graphics.PageScale = 1.0F; - t.Graphics.DrawLine(Pens.Red, 10, 70, 70, 10); - - t.Graphics.TranslateTransform(100, 0); - t.Graphics.PageUnit = GraphicsUnit.Pixel; - t.Graphics.PageScale = 2.0F; - t.Graphics.DrawLine(Pens.Blue, 10, 70, 70, 10); - - t.Graphics.ResetTransform(); - t.Graphics.DrawLine(Pens.Green, 10, 70, 70, 10); - - t.Show(); - Assert.IsTrue(t.PDCompare()); - } - [Test] - public void TransfromPageScaleUnits_3() { - t.Graphics.TranslateTransform(20, 20); - t.Graphics.PageUnit = GraphicsUnit.Millimeter; - t.Graphics.PageScale = 1.0F; - t.Graphics.DrawLine(Pens.Red, 10, 70, 70, 10); - - t.Graphics.TranslateTransform(10, 10); - t.Graphics.PageUnit = GraphicsUnit.Millimeter; - t.Graphics.PageScale = 1.0F; - t.Graphics.DrawLine(Pens.Red, 10, 70, 70, 10); - - t.Graphics.RotateTransform(15); - - t.Graphics.PageUnit = GraphicsUnit.Millimeter; - t.Graphics.PageScale = 0.5F; - t.Graphics.DrawLine(Pens.Red, 10, 70, 70, 10); - - t.Graphics.PageUnit = GraphicsUnit.Pixel; - t.Graphics.PageScale = 0.5F; - t.Graphics.DrawLine(Pens.Red, 10, 70, 70, 10); - - t.Graphics.PageUnit = GraphicsUnit.Pixel; - t.Graphics.TranslateTransform(0, 0); - t.Graphics.PageScale = 1.5F; - t.Graphics.DrawLine(Pens.Red, 10, 70, 70, 10); - - t.Show(); - Assert.IsTrue(t.PDCompare()); - } - } - - - #endregion - - #region GraphicsFixturePropClip - - [TestFixture] - public class GraphicsFixturePropClip : GraphicsFixture { - public override void SetUp() { - base.SetUp ("GraphicsFixturePropClip"); - t.Graphics.Clip = new Region(new Rectangle(10, 10, 100, 100)); - - st["DrawArcTest:6"] = TOLERANCE * 5.0f; - st["DrawArcTest:8"] = TOLERANCE * 3.7f; - st["DrawLinesTest:2"] = TOLERANCE * 3.0f; - st["DrawLinesTestF:2"] = TOLERANCE * 3.0f; - st["DrawPieTestF:2"] = TOLERANCE * 2.0f; - st["DrawPieTestF:4"] = TOLERANCE * 2.0f; - st["DrawPieTest:2"] = TOLERANCE * 2.0f; - st["DrawPieTest:4"] = TOLERANCE * 2.0f; - st["FillClosedCurvePointFillModeTension:2"] = TOLERANCE * 1.5f; - st["FillClosedCurvePointFFillModeTension:2"] = TOLERANCE * 1.5f; - st["FillClosedCurvePointFillModeTension:4"] = TOLERANCE * 1.5f; - st["FillClosedCurvePointFFillModeTension:4"] = TOLERANCE * 1.5f; - st["FillClosedCurvePointFillModeTension:5"] = TOLERANCE * 1.5f; - st["FillClosedCurvePointFFillModeTension:6"] = TOLERANCE * 1.5f; - st["ScaleTransformFloatMatrixOrder1:2"] = TOLERANCE * 3.5f; - } - } - - #endregion - - #region GraphicsFixturePropCompositingMode - - [TestFixture] - public class GraphicsFixturePropCompositingMode1 : GraphicsFixture { - public override void SetUp() { - base.SetUp ("GraphicsFixturePropCompositingMode1"); - t.Graphics.CompositingMode = CompositingMode.SourceCopy; - } - } - - [TestFixture] - public class GraphicsFixturePropCompositingMode2 : GraphicsFixture { - public override void SetUp() { - base.SetUp ("GraphicsFixturePropCompositingMode2"); - t.Graphics.CompositingMode = CompositingMode.SourceOver; - } - } - - #endregion - - #region GraphicsFixturePropInterpolationMode - - [TestFixture] - public class GraphicsFixturePropInterpolationMode1 : GraphicsFixture { - public override void SetUp() { - base.SetUp ("GraphicsFixturePropInterpolationMode1"); - t.Graphics.InterpolationMode = InterpolationMode.Bilinear; - } - } - - [TestFixture] - public class GraphicsFixturePropInterpolationMode2 : GraphicsFixture { - public override void SetUp() { - base.SetUp ("GraphicsFixturePropInterpolationMode2"); - t.Graphics.InterpolationMode = InterpolationMode.Bicubic; - } - } - - #endregion - - #region GraphicsFixturePropPageScale - - [TestFixture] - public class GraphicsFixturePropPageScale : GraphicsFixture { - public override void SetUp() { - base.SetUp ("GraphicsFixturePropPageScale"); - - t.Graphics.PageScale = 4.34f; - t.Graphics.PageUnit = GraphicsUnit.Pixel; - - st["IntersectClipRegion:4"] = TOLERANCE * 1.5f; - st["ResetClipIntersectClipRectangleF:2"] = TOLERANCE * 1.5f; - } - } - - #endregion - - #region GraphicsFixturePropPageUnit - - [TestFixture] - public class GraphicsFixturePropPageUnit1 : GraphicsFixture { - public override void SetUp() { - base.SetUp ("GraphicsFixturePropPageUnit1"); - t.Graphics.PageUnit = GraphicsUnit.Display; - } - } - - [TestFixture] - public class GraphicsFixturePropPageUnit2 : GraphicsFixture { - public override void SetUp() { - base.SetUp ("GraphicsFixturePropPageUnit2"); - t.Graphics.PageUnit = GraphicsUnit.Document; - - // FIXME: scaling down loss some pixels. - st["DrawBezierTest:2"] = TOLERANCE * 2.5f; - st["DrawBezierTest:4"] = TOLERANCE * 2.5f; - st["DrawBezierTest:6"] = TOLERANCE * 2.5f; - st["DrawBeziersTest:2"] = TOLERANCE * 2.0f; - st["DrawBeziersTest:4"] = TOLERANCE * 2.0f; - st["DrawClosedCurveTest:2"] = TOLERANCE * 3.0f; - st["DrawClosedCurveTest:4"] = TOLERANCE * 3.7f; - st["DrawCurveTest:2"] = TOLERANCE * 2.5f; - st["DrawCurveTest:4"] = TOLERANCE * 2.0f; - st["DrawCurveTest:6"] = TOLERANCE * 4.0f; - st["DrawCurveTestF:2"] = TOLERANCE * 2.5f; - st["DrawCurveTestF:4"] = TOLERANCE * 6.0f; - st["DrawCurveTestF:6"] = TOLERANCE * 6.0f; - st["DrawCurveTestF:8"] = TOLERANCE * 6.0f; - st["DrawEllipseTest:2"] = TOLERANCE * 2.0f; - st["DrawEllipseTest:4"] = TOLERANCE * 2.0f; - st["DrawEllipseTestF:2"] = TOLERANCE * 2.0f; - st["DrawEllipseTestF:4"] = TOLERANCE * 2.0f; - st["DrawLinesTest:2"] = TOLERANCE * 2.0f; - st["DrawLinesTestF:2"] = TOLERANCE * 2.0f; - st["DrawPathTest:2"] = TOLERANCE * 2.0f; - st["DrawPolygonPoint:2"] = TOLERANCE * 7.0f; - st["DrawPolygonPointF:2"] = TOLERANCE * 7.0f; - st["FillPieFloat:2"] = TOLERANCE * 1.5f; - st["FillPieFloat:4"] = TOLERANCE * 1.5f; - st["FillPieFloat:6"] = TOLERANCE * 1.5f; - st["IntersectClipRegion:4"] = TOLERANCE * 3.0f; - st["MultiplyTransform:2"] = TOLERANCE * 2.5f; - st["MultiplyTransformMatrixOrder1:2"] = TOLERANCE * 2.5f; - st["TranslateTransformAngleMatrixOrder1:2"] = TOLERANCE * 4.0f; - st["ScaleTransformFloatMatrixOrder:2"] = TOLERANCE * 4.0f; - st["ScaleTransformFloatMatrixOrder1:2"] = TOLERANCE * 5.5f; - st["RotateTransformAngleMatrixOrder:2"] = TOLERANCE * 3.5f; - } - } - - [TestFixture] - public class GraphicsFixturePropPageUnit3 : GraphicsFixture { - public override void SetUp() { - base.SetUp ("GraphicsFixturePropPageUnit3"); - t.Graphics.PageUnit = GraphicsUnit.Inch; - } - } - - [TestFixture] - public class GraphicsFixturePropPageUnit4 : GraphicsFixture { - public override void SetUp() { - base.SetUp ("GraphicsFixturePropPageUnit4"); - t.Graphics.PageUnit = GraphicsUnit.Millimeter; - - st["DrawArcTest:8"] = TOLERANCE * 1.5f; - st["DrawRectangleFloat:2"] = TOLERANCE * 1.5f; // line width problem - st["DrawRectangleFloat:4"] = TOLERANCE * 1.5f; - st["DrawRectangleFloat:6"] = TOLERANCE * 1.5f; - st["DrawRectanglesRectangle:2"] = TOLERANCE * 1.5f; - st["DrawRectanglesRectangleF:2"] = TOLERANCE * 1.5f; - } - } - - [TestFixture] - public class GraphicsFixturePropPageUnit5 : GraphicsFixture { - public override void SetUp() { - base.SetUp ("GraphicsFixturePropPageUnit5"); - - t.Graphics.PageUnit = GraphicsUnit.Pixel; - } - } - - [TestFixture] - public class GraphicsFixturePropPageUnit6 : GraphicsFixture { - public override void SetUp() { - base.SetUp ("GraphicsFixturePropPageUnit6"); - t.Graphics.PageUnit = GraphicsUnit.Point; - - st["DrawArcTest:2"] = TOLERANCE * 2.5f; - st["DrawArcTest:4"] = TOLERANCE * 8.0f; // big difference in width of line - st["DrawArcTest:6"] = TOLERANCE * 8.0f; // big difference in width of line - st["DrawArcTest:8"] = TOLERANCE * 6.0f; // big difference in width of line - st["IsVisible4Float:2"] = TOLERANCE * 1.5f; - st["TransformPointsPointF:2"] = TOLERANCE * 2.0f; - } - } - - // [TestFixture] - // public class GraphicsFixturePropPageUnit7 : GraphicsFixture { - // public override void SetUp() { - // base.SetUp (); - // - // t.Graphics.PageUnit = GraphicsUnit.World; - // } - // } - - #endregion - - #region GraphicsFixturePropPixelOffsetMode - - [TestFixture] - public class GraphicsFixturePropPixelOffsetMode : GraphicsFixture { - public override void SetUp() { - base.SetUp ("GraphicsFixturePropPixelOffsetMode"); - t.Graphics.PixelOffsetMode = PixelOffsetMode.Half; - - st["TransformPointsPointF:2"] = TOLERANCE * 3.0f; - } - } - - [TestFixture] - public class GraphicsFixturePropPixelOffsetMode1 : GraphicsFixture { - public override void SetUp() { - base.SetUp ("GraphicsFixturePropPixelOffsetMode1"); - t.Graphics.PixelOffsetMode = PixelOffsetMode.HighSpeed; - } - } - - [TestFixture] - public class GraphicsFixturePropPixelOffsetMode2 : GraphicsFixture { - public override void SetUp() { - base.SetUp ("GraphicsFixturePropPixelOffsetMode2"); - t.Graphics.PixelOffsetMode = PixelOffsetMode.HighQuality; - - st["TransformPointsPointF:2"] = TOLERANCE * 3.0f; - } - } - - #endregion - - #region GraphicsFixturePropRenderingOrigin - - [TestFixture] -#if TARGET_JVM - [Category ("NotWorking")] // FIXME: Graphics.RenderingOrigin is not implemented -#endif - public class GraphicsFixturePropRenderingOrigin : GraphicsFixture { - public override void SetUp() { - base.SetUp ("GraphicsFixturePropRenderingOrigin"); - t.Graphics.RenderingOrigin = new Point(12, 23); - } - } - - #endregion - - /// - /// TBD: add more variants - /// - #region GraphicsFixturePropSmoothingMode - - [TestFixture] - public class GraphicsFixturePropSmoothingMode : GraphicsFixture { - public override void SetUp() { - base.SetUp ("GraphicsFixturePropSmoothingMode"); - t.Graphics.SmoothingMode = SmoothingMode.AntiAlias; - - st["DrawArcTest:4"] = TOLERANCE * 3.0f; - st["DrawLineTest:2"] = TOLERANCE * 3.0f; - st["DrawLineTest:4"] = TOLERANCE * 3.0f; // difference in line width even in horizontal lines - st["DrawLineTestF:2"] = TOLERANCE * 3.0f; - st["DrawLineTestF:4"] = TOLERANCE * 3.0f; - st["DrawPieTest:2"] = TOLERANCE * 1.5f; - st["DrawPieTestF:2"] = TOLERANCE * 1.5f; - st["DrawPieTest:4"] = TOLERANCE * 1.5f; - st["DrawPieTestF:4"] = TOLERANCE * 1.5f; - st["DrawRectangleFloat:2"] = TOLERANCE * 3.0f; // big difference in line width - st["DrawRectangleFloat:4"] = TOLERANCE * 3.0f; // big difference in line width - st["DrawRectangleFloat:6"] = TOLERANCE * 3.0f; - st["DrawRectanglesRectangle:2"] = TOLERANCE * 3.0f; - st["DrawRectanglesRectangleF:2"] = TOLERANCE * 3.0f; - } - } - - [TestFixture] - public class GraphicsFixturePropSmoothingMode1 : GraphicsFixture { - public override void SetUp() { - base.SetUp ("GraphicsFixturePropSmoothingMode1"); - t.Graphics.SmoothingMode = SmoothingMode.HighSpeed; - } - } - - #endregion - - #region GraphicsFixturePropTextContrast - - [TestFixture] - public class GraphicsFixturePropTextContrast : GraphicsFixture { - public override void SetUp() { - base.SetUp ("GraphicsFixturePropTextContrast"); - t.Graphics.TextContrast = 9; - } - } - - #endregion - - #region GraphicsFixtureGraphicsState - - [TestFixture] - public class GraphicsFixtureGraphicsState { - protected DrawingTest t; - protected int TOLERANCE = 3; //in %; - - [SetUp] - public virtual void SetUp() { - t = DrawingTest.Create(512, 512, "GraphicsFixtureGraphicsState"); - } - - [TearDown] - public void TearDown() { - } - - [Test] - public void BeginEndContainer() { - t.Graphics.FillRectangle( Brushes.Blue, 0, 0, 100, 100 ); - - GraphicsContainer c1 = t.Graphics.BeginContainer( - new Rectangle(100, 100, 100, 100), - new Rectangle(0, 0, 100, 100), - GraphicsUnit.Pixel); - - t.Graphics.FillRectangle( Brushes.Green, 0, 0, 100, 100 ); - - GraphicsContainer c2 = t.Graphics.BeginContainer( - new Rectangle(100, 100, 100, 100), - new Rectangle(0, 0, 100, 100), - GraphicsUnit.Pixel); - - t.Graphics.FillRectangle( Brushes.Red, 0, 0, 100, 100 ); - - GraphicsState s1 = t.Graphics.Save(); - t.Graphics.PageUnit = GraphicsUnit.Pixel; - - t.Graphics.PageScale = 0.7f; - t.Graphics.FillRectangle( Brushes.SeaGreen, 0, 0, 100, 100 ); - - t.Graphics.EndContainer(c2); - t.Graphics.PageScale = 0.7f; - t.Graphics.FillRectangle( Brushes.SeaGreen, 0, 0, 100, 100 ); - - t.Graphics.EndContainer(c1); - t.Graphics.PageScale = 0.7f; - t.Graphics.FillRectangle( Brushes.SeaGreen, 0, 0, 100, 100 ); - - t.Show(); - Assert.IsTrue(t.PDCompare()); - } - - [Test] - public void SaveRestoreGraphicsProps() { - t.Graphics.CompositingQuality = CompositingQuality.GammaCorrected; - t.Graphics.CompositingMode = CompositingMode.SourceCopy; - t.Graphics.InterpolationMode = InterpolationMode.NearestNeighbor; - t.Graphics.PageScale = 7; - t.Graphics.PageUnit = GraphicsUnit.Inch; - t.Graphics.PixelOffsetMode = PixelOffsetMode.Half; - t.Graphics.SmoothingMode = SmoothingMode.AntiAlias; - t.Graphics.Transform = new Matrix(1, 2, 3, 4, 5, 6); - t.Graphics.TextContrast = 10; - t.Graphics.TextRenderingHint = TextRenderingHint.ClearTypeGridFit; - - GraphicsContainer c1 = t.Graphics.BeginContainer(); - - Assert.AreEqual(CompositingQuality.Default, t.Graphics.CompositingQuality); - Assert.AreEqual(CompositingMode.SourceOver, t.Graphics.CompositingMode); - Assert.AreEqual(InterpolationMode.Bilinear, t.Graphics.InterpolationMode); - Assert.AreEqual(1.0F, t.Graphics.PageScale); - Assert.AreEqual(GraphicsUnit.Display, t.Graphics.PageUnit); - Assert.AreEqual(PixelOffsetMode.Default, t.Graphics.PixelOffsetMode); - Assert.AreEqual(SmoothingMode.None, t.Graphics.SmoothingMode); - Assert.AreEqual(true, t.Graphics.Transform.IsIdentity); - Assert.AreEqual(4.0f, t.Graphics.TextContrast); - Assert.AreEqual(TextRenderingHint.SystemDefault, t.Graphics.TextRenderingHint); - - t.Graphics.EndContainer(c1); - } - [Test] - public void SaveRestoreGraphicsProps_2() { - GraphicsState s = t.Graphics.Save(); - - t.Graphics.CompositingQuality = CompositingQuality.GammaCorrected; - t.Graphics.CompositingMode = CompositingMode.SourceCopy; - t.Graphics.InterpolationMode = InterpolationMode.NearestNeighbor; - t.Graphics.PageScale = 7; - t.Graphics.PageUnit = GraphicsUnit.Inch; - t.Graphics.PixelOffsetMode = PixelOffsetMode.Half; - t.Graphics.SmoothingMode = SmoothingMode.AntiAlias; - t.Graphics.Transform = new Matrix(1, 2, 3, 4, 5, 6); - t.Graphics.TextContrast = 10; - t.Graphics.TextRenderingHint = TextRenderingHint.ClearTypeGridFit; - - t.Graphics.Restore(s); - - Assert.AreEqual(CompositingQuality.Default, t.Graphics.CompositingQuality); - Assert.AreEqual(CompositingMode.SourceOver, t.Graphics.CompositingMode); - Assert.AreEqual(InterpolationMode.Bilinear, t.Graphics.InterpolationMode); - Assert.AreEqual(1.0F, t.Graphics.PageScale); - Assert.AreEqual(GraphicsUnit.Display, t.Graphics.PageUnit); - Assert.AreEqual(PixelOffsetMode.Default, t.Graphics.PixelOffsetMode); - Assert.AreEqual(SmoothingMode.None, t.Graphics.SmoothingMode); - Assert.AreEqual(true, t.Graphics.Transform.IsIdentity); - Assert.AreEqual(4.0f, t.Graphics.TextContrast); - Assert.AreEqual(TextRenderingHint.SystemDefault, t.Graphics.TextRenderingHint); - } - - [Test] - public void SaveRestoreGraphicsProps_3() { - t.Graphics.PageScale = 2; - GraphicsContainer c1 = t.Graphics.BeginContainer(); - - t.Graphics.PageScale = 3; - GraphicsContainer c2 = t.Graphics.BeginContainer(); - - t.Graphics.PageScale = 4; - GraphicsContainer c3 = t.Graphics.BeginContainer(); - - t.Graphics.EndContainer(c2); - Assert.AreEqual(3, t.Graphics.PageScale); - - t.Graphics.PageScale = 5; - GraphicsState c5 = t.Graphics.Save(); - - t.Graphics.EndContainer(c3); - Assert.AreEqual(5, t.Graphics.PageScale); - - t.Graphics.Restore(c5); - Assert.AreEqual(5, t.Graphics.PageScale); - - t.Graphics.EndContainer(c1); - Assert.AreEqual(2, t.Graphics.PageScale); - } - [Test] - public void SaveRestoreGraphicsProps_4() { - t.Graphics.PageScale = 2; - GraphicsContainer c1 = t.Graphics.BeginContainer(); - - t.Graphics.PageScale = 3; - GraphicsState c2 = t.Graphics.Save(); - - t.Graphics.EndContainer(c1); - Assert.AreEqual(2, t.Graphics.PageScale); - - t.Graphics.Restore(c2); - Assert.AreEqual(2, t.Graphics.PageScale); - } - } - #endregion - - #region GraphicsFixturePropTextRenderingHint - - [TestFixture] -#if TARGET_JVM - [Category ("NotWorking")] // FIXME: Graphics.TextRenderingHint is not implemented -#endif - public class GraphicsFixturePropTextRenderingHint : GraphicsFixture { - public override void SetUp() { - base.SetUp ("GraphicsFixturePropTextRenderingHint"); - t.Graphics.TextRenderingHint = TextRenderingHint.AntiAlias; - } - } - - [TestFixture] -#if TARGET_JVM - [Category ("NotWorking")] // FIXME: Graphics.TextRenderingHint is not implemented -#endif - public class GraphicsFixturePropTextRenderingHint1 : GraphicsFixture { - public override void SetUp() { - base.SetUp ("GraphicsFixturePropTextRenderingHint1"); - t.Graphics.TextRenderingHint = TextRenderingHint.AntiAliasGridFit; - } - } - - [TestFixture] -#if TARGET_JVM - [Category ("NotWorking")] // FIXME: Graphics.TextRenderingHint is not implemented -#endif - public class GraphicsFixturePropTextRenderingHint2 : GraphicsFixture { - public override void SetUp() { - base.SetUp ("GraphicsFixturePropTextRenderingHint2"); - t.Graphics.TextRenderingHint = TextRenderingHint.ClearTypeGridFit; - } - } - - [TestFixture] -#if TARGET_JVM - [Category ("NotWorking")] // FIXME: Graphics.TextRenderingHint is not implemented -#endif - public class GraphicsFixturePropTextRenderingHint3 : GraphicsFixture { - public override void SetUp() { - base.SetUp ("GraphicsFixturePropTextRenderingHint3"); - t.Graphics.TextRenderingHint = TextRenderingHint.SingleBitPerPixel; - } - } - - [TestFixture] -#if TARGET_JVM - [Category ("NotWorking")] // FIXME: Graphics.TextRenderingHint is not implemented -#endif - public class GraphicsFixturePropTextRenderingHint4 : GraphicsFixture { - public override void SetUp() { - base.SetUp ("GraphicsFixturePropTextRenderingHint4"); - t.Graphics.TextRenderingHint = TextRenderingHint.SingleBitPerPixelGridFit; - } - } - - [TestFixture] -#if TARGET_JVM - [Category ("NotWorking")] // FIXME: Graphics.TextRenderingHint is not implemented -#endif - public class GraphicsFixturePropTextRenderingHint5 : GraphicsFixture { - public override void SetUp() { - base.SetUp ("GraphicsFixturePropTextRenderingHint5"); - t.Graphics.TextRenderingHint = TextRenderingHint.SystemDefault; - } - } - - #endregion - - #region GraphicsFixturePropTransform - - [TestFixture] - public class GraphicsFixturePropTransform : GraphicsFixture { - public override void SetUp() { - base.SetUp ("GraphicsFixturePropTransform"); - t.Graphics.Transform = new Matrix(0, 1, 2, 0, 0, 0); - - st["DrawArcTest:2"] = TOLERANCE * 11.0f; // FIXME: Transfrom is ok, but very big difference in width - st["DrawArcTest:4"] = TOLERANCE * 12.0f; // FIXME: Transfrom is ok, but very big difference in width - st["DrawArcTest:6"] = TOLERANCE * 12.0f; // FIXME: Transfrom is ok, but very big difference in width - st["DrawArcTest:8"] = TOLERANCE * 10.0f; // FIXME: Transfrom is ok, but very big difference in width - st["DrawClosedCurveTest:4"] = TOLERANCE * 2.0f; - st["RotateTransformAngleMatrixOrder:2"] = TOLERANCE * 1.5f; - st["TransformPointsPointF:2"] = TOLERANCE * 3.5f; - } - } - - #endregion - -} diff --git a/mcs/class/System.Drawing/Test/DrawingTest/Test/GraphicsPath.cs b/mcs/class/System.Drawing/Test/DrawingTest/Test/GraphicsPath.cs deleted file mode 100644 index 3663bebea55..00000000000 --- a/mcs/class/System.Drawing/Test/DrawingTest/Test/GraphicsPath.cs +++ /dev/null @@ -1,5729 +0,0 @@ -using System; -using System.Drawing; -using System.Drawing.Drawing2D; -using NUnit.Framework; -using DrawingTestHelper; - -namespace Test.Sys.Drawing -{ - [TestFixture] - public class GraphicsPathFixture - { - DrawingTest t; - GraphicsPath path; - Pen p; - - [SetUp] - public void SetUp () { - DrawingTest.ShowForms = false; - t = DrawingTest.Create (512, 512); - p = new Pen (Color.Blue); - p.Width = 2; - } - - [Test] - public void ctor_void() - { - path = new GraphicsPath (); - Assert.AreEqual (FillMode.Alternate, path.FillMode); - Assert.AreEqual (0, path.PathData.Points.Length); - Assert.AreEqual (0, path.PointCount); - } - - [Test] - public void ctor_FillMode() - { - path = new GraphicsPath (FillMode.Alternate); - Assert.AreEqual (FillMode.Alternate, path.FillMode); - Assert.AreEqual (0, path.PathData.Points.Length); - Assert.AreEqual (0, path.PointCount); - - path = new GraphicsPath (FillMode.Winding); - Assert.AreEqual (FillMode.Winding, path.FillMode); - Assert.AreEqual (0, path.PathData.Points.Length); - Assert.AreEqual (0, path.PointCount); - } - - [Test] - public void ctor_PointArr_ByteArr() - { - Point [] points = new Point [] { new Point (0, 0), - new Point (250, 250), - new Point (60, 70), - new Point (230, 10)}; - - byte [] types = new byte [] {(byte) PathPointType.Start, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) (PathPointType.Bezier | PathPointType.CloseSubpath)}; - - path = new GraphicsPath (points, types); - - Assert.AreEqual (FillMode.Alternate, path.FillMode); - Assert.AreEqual (4, path.PointCount); - - PointF [] expectedPoints = new PointF [] { new PointF (0f, 0f), - new PointF (250f, 250f), - new PointF (60f, 70f), - new PointF (230f, 10f)}; - for(int i = 0; i < path.PointCount; i++) { - Assert.AreEqual(expectedPoints [i], path.PathPoints [i]); - } - - byte [] expectedTypes = types; - for(int i = 0; i < path.PointCount; i++) { - Assert.AreEqual(expectedTypes [i], path.PathTypes [i]); - } - - t.Graphics.DrawPath (p, path); - t.Show (); - //t.AssertCompare (); - } - - [Test] - public void ctor_PointFArr_ByteArr() - { - PointF [] points = new PointF [] { new PointF (100.1f, 200.2f), - new PointF (10.2f, 150.6f), - new PointF (60.3f, 70.7f), - new PointF (250.4f, 10.7f)}; - - byte [] types = new byte [] {(byte) PathPointType.Start, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) (PathPointType.Bezier | PathPointType.CloseSubpath)}; - - path = new GraphicsPath (points, types, FillMode.Alternate); - - Assert.AreEqual (FillMode.Alternate, path.FillMode); - Assert.AreEqual (4, path.PointCount); - - PointF [] expectedPoints = points; - for(int i = 0; i < path.PointCount; i++) { - Assert.AreEqual(expectedPoints [i], path.PathPoints [i]); - } - - byte [] expectedTypes = types; - for(int i = 0; i < path.PointCount; i++) { - Assert.AreEqual(expectedTypes [i], path.PathTypes [i]); - } - - t.Graphics.DrawPath (p, path); - t.Show (); - //t.AssertCompare (); - } - - [Test] - public void ctor_PointArr_ByteArr_FillMode() - { - Point [] points = new Point [] {new Point (0, 0), - new Point (250, 250), - new Point (60, 70), - new Point (230, 10)}; - - byte [] types = new byte [] { (byte) PathPointType.Start, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) (PathPointType.Bezier | PathPointType.CloseSubpath)}; - - path = new GraphicsPath (points, types, FillMode.Alternate); - - Assert.AreEqual (FillMode.Alternate, path.FillMode); - Assert.AreEqual (4, path.PointCount); - - t.Graphics.DrawPath(p, path); - t.Show(); - - path = new GraphicsPath (points, types, FillMode.Winding); - - Assert.AreEqual (FillMode.Winding, path.FillMode); - Assert.AreEqual (4, path.PointCount); - - t.Graphics.DrawPath (p, path); - t.Show (); - //t.AssertCompare (); - } - - [Test] - public void ctor_PointFArr_ByteArr_FillMode() - { - PointF [] points = new PointF [] { new PointF (100.1f, 200.2f), - new PointF (10.2f, 150.6f), - new PointF (60.3f, 70.7f), - new PointF (250.4f, 10.7f)}; - - byte [] types = new byte [] { (byte) PathPointType.Start, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) (PathPointType.Bezier | PathPointType.CloseSubpath)}; - - path = new GraphicsPath (points, types, FillMode.Alternate); - - Assert.AreEqual (FillMode.Alternate, path.FillMode); - Assert.AreEqual (4, path.PointCount); - - t.Graphics.DrawPath (p, path); - t.Show(); - - path = new GraphicsPath (points, types, FillMode.Winding); - - Assert.AreEqual (FillMode.Winding, path.FillMode); - Assert.AreEqual (4, path.PointCount); - - t.Graphics.DrawPath (p, path); - t.Show (); - //t.AssertCompare (); - } - - [Test] -#if TARGET_JVM - [Category ("NotWorking")] -#endif - public void AddArc_Rectangle_Float_Float() - { - path = new GraphicsPath (); - - path.AddArc (new Rectangle (50, 50, 150, 170), 10.34f, 240.15f); - - Assert.AreEqual (10, path.PointCount); - - path.AddArc (new Rectangle (50, 50, 70, 95), -45.001f, 135.87f); - - Assert.AreEqual (17, path.PointCount); - - PointF [] expectedPoints = new PointF [] { new PointF(199.0466f, 148.5099f), - new PointF(192.4631f, 194.8574f), - new PointF(153.9743f, 226.3808f), - new PointF(113.0795f, 218.9195f), - new PointF(72.18465f, 211.4582f), - new PointF(44.36986f, 167.8375f), - new PointF(50.95338f, 121.4901f), - new PointF(55.13617f, 92.0436f), - new PointF(72.63087f, 67.23608f), - new PointF(97.05219f, 56.12194f), - new PointF(113.1766f, 69.32237f), - new PointF(124.6434f, 90.44156f), - new PointF(121.324f, 120.1776f), - new PointF(105.7625f, 135.7396f), - new PointF(99.54897f, 141.9534f), - new PointF(91.99629f, 145.2055f), - new PointF(84.27972f, 144.9899f)}; - for(int i = 0; i < path.PointCount; i++) { - DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]); - } - - byte [] expectedTypes = new byte [17] { (byte) PathPointType.Start, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Line, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3 }; - - for (int i = 0; i < path.PointCount; i++) { - Assert.AreEqual(expectedTypes [i], path.PathTypes [i]); - } - - t.Graphics.DrawPath (p, path); - t.Show (); - //t.AssertCompare (); - } - - - [Test] -#if TARGET_JVM - [Category ("NotWorking")] -#endif - public void AddArc_RectangleF_Float_Float() - { - path = new GraphicsPath (); - - path.AddArc (new RectangleF (20.02f, 30.56f, 150.67f, 170.34f), 10.34f, 240.15f); - - Assert.AreEqual (10, path.PointCount); - - path.AddArc (new RectangleF (50.09f, 50.345f, 70.15f, 95.98f), -45.001f, 135.87f); - - Assert.AreEqual (17, path.PointCount); - - PointF [] expectedPoints = new PointF [] { new PointF(169.7277f, 129.2994f), - new PointF(163.0989f, 175.7367f), - new PointF(124.4274f, 207.3063f), - new PointF(83.3525f, 199.8121f), - new PointF(42.27758f, 192.3179f), - new PointF(14.35347f, 148.5978f), - new PointF(20.98226f, 102.1606f), - new PointF(25.1958f, 72.64315f), - new PointF(42.79146f, 47.78527f), - new PointF(67.34177f, 36.66724f), - new PointF(113.4824f, 70.01659f), - new PointF(124.9132f, 91.4144f), - new PointF(121.5016f, 121.4393f), - new PointF(105.8624f, 137.0791f), - new PointF(99.65379f, 143.288f), - new PointF(92.12586f, 146.533f), - new PointF(84.43728f, 146.3147f)}; - - for(int i = 0; i < path.PointCount; i++) { - DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]); - } - - byte [] expectedTypes = new byte [] { (byte) PathPointType.Start, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Line, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier }; - - for (int i=0; i < expectedTypes.Length; i++) { - Assert.AreEqual (expectedTypes [i], path.PathTypes [i]); - } - - t.Graphics.DrawPath (p, path); - t.Show (); - //t.AssertCompare (); - } - - [Test] -#if TARGET_JVM - [Category ("NotWorking")] -#endif - public void AddArc_Int_Int_Int_Int_Float_Float() - { - path = new GraphicsPath (); - - path.AddArc (50, 50, 150, 170, 10.34f, 240.15f); - - Assert.AreEqual (10, path.PointCount); - - path.AddArc (50, 50, 70, 95, -45.001f, 135.87f); - - Assert.AreEqual (17, path.PointCount); - - PointF [] expectedPoints = new PointF [] { new PointF(199.0466f, 148.5099f), - new PointF(192.4631f, 194.8574f), - new PointF(153.9743f, 226.3808f), - new PointF(113.0795f, 218.9195f), - new PointF(72.18465f, 211.4582f), - new PointF(44.36986f, 167.8375f), - new PointF(50.95338f, 121.4901f), - new PointF(55.13617f, 92.0436f), - new PointF(72.63087f, 67.23608f), - new PointF(97.05219f, 56.12194f), - new PointF(113.1766f, 69.32237f), - new PointF(124.6434f, 90.44156f), - new PointF(121.324f, 120.1776f), - new PointF(105.7625f, 135.7396f), - new PointF(99.54897f, 141.9534f), - new PointF(91.99629f, 145.2055f), - new PointF(84.27972f, 144.9899f)}; - - for(int i = 0; i < path.PointCount; i++) { - DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]); - } - - byte [] expectedTypes = new byte [] { (byte) PathPointType.Start, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Line, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3}; - - for (int i=0; i < expectedTypes.Length; i++) { - Assert.AreEqual (expectedTypes [i], path.PathTypes [i]); - } - - t.Graphics.DrawPath (p, path); - t.Show (); - //t.AssertCompare (); - } - - - [Test] -#if TARGET_JVM - [Category ("NotWorking")] -#endif - public void AddArc_Float_Float_Float_Float_Float_Float() - { - path = new GraphicsPath (); - - path.AddArc (20.02f, 30.56f, 150.67f, 170.34f, 10.34f, 240.15f); - - Assert.AreEqual (10, path.PointCount); - - path.AddArc (50.09f, 50.345f, 70.15f, 95.98f, -45.001f, 135.87f); - - Assert.AreEqual (17, path.PointCount); - - PointF [] expectedPoints = new PointF [] { new PointF(169.7277f, 129.2994f), - new PointF(163.0989f, 175.7367f), - new PointF(124.4274f, 207.3063f), - new PointF(83.3525f, 199.8121f), - new PointF(42.27758f, 192.3179f), - new PointF(14.35347f, 148.5978f), - new PointF(20.98226f, 102.1606f), - new PointF(25.1958f, 72.64315f), - new PointF(42.79146f, 47.78527f), - new PointF(67.34177f, 36.66724f), - new PointF(113.4824f, 70.01659f), - new PointF(124.9132f, 91.4144f), - new PointF(121.5016f, 121.4393f), - new PointF(105.8624f, 137.0791f), - new PointF(99.65379f, 143.288f), - new PointF(92.12586f, 146.533f), - new PointF(84.43728f, 146.3147f)}; - - for(int i = 0; i < path.PointCount; i++) { - DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]); - } - - byte [] expectedTypes = new byte [] { (byte) PathPointType.Start, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Line, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3}; - - for (int i=0; i < expectedTypes.Length; i++) { - Assert.AreEqual (expectedTypes [i], path.PathTypes [i]); - } - - t.Graphics.DrawPath (p, path); - t.Show (); - //t.AssertCompare (); - } - - [Test] - public void AddBezier_Point_Point_Point_Point() - { - path = new GraphicsPath (); - path.AddBezier( new Point (10, 10), - new Point (50, 250), - new Point (100, 5), - new Point (200, 280)); - - Assert.AreEqual (4, path.PointCount); - - path.AddBezier( new Point (0, 210), - new Point (50, 6), - new Point (150, 150), - new Point (250, 10)); - - Assert.AreEqual (8, path.PointCount); - - PointF [] expectedPoints = new PointF [] { new PointF(10f, 10f), - new PointF(50f, 250f), - new PointF(100f, 5f), - new PointF(200f, 280f), - new PointF(0f, 210f), - new PointF(50f, 6f), - new PointF(150f, 150f), - new PointF(250f, 10f)}; - - for(int i = 0; i < path.PointCount; i++) { - DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]); - } - - byte [] expectedTypes = new byte [] { (byte) PathPointType.Start, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Line, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3}; - - for (int i=0; i < expectedTypes.Length; i++) { - Assert.AreEqual (expectedTypes [i], path.PathTypes [i]); - } - - t.Graphics.DrawPath (p, path); - t.Show (); - //t.AssertCompare (); - } - - [Test] - public void AddBezier_PointF_PointF_PointF_PointF() - { - path = new GraphicsPath (); - path.AddBezier( new PointF (10.01f, 10.02f), - new PointF (50.3f, 250.4f), - new PointF (100.005f, 5.006f), - new PointF (200.78f, 280.90f)); - - Assert.AreEqual (4, path.PointCount); - - path.AddBezier( new PointF (0.15f, 210.23f), - new PointF (50.34f, 6.45f), - new PointF (150.65f, 150.87f), - new PointF (250.0001f, 10.2345f)); - - Assert.AreEqual (8, path.PointCount); - - PointF [] expectedPoints = new PointF [] { new PointF (10.01f, 10.02f), - new PointF (50.3f, 250.4f), - new PointF (100.005f, 5.006f), - new PointF (200.78f, 280.90f), - new PointF (0.15f, 210.23f), - new PointF (50.34f, 6.45f), - new PointF (150.65f, 150.87f), - new PointF (250.0001f, 10.2345f)}; - - for(int i = 0; i < path.PointCount; i++) { - DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]); - } - - byte [] expectedTypes = new byte [] { (byte) PathPointType.Start, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Line, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3}; - - for (int i=0; i < expectedTypes.Length; i++) { - Assert.AreEqual (expectedTypes [i], path.PathTypes [i]); - } - - t.Graphics.DrawPath (p, path); - t.Show (); - //t.AssertCompare (); - } - - [Test] - public void AddBezier_Int_Int_Int_Int_Int_Int_Int_Int() - { - path = new GraphicsPath (); - path.AddBezier( 10, 10, 50, 250, 100, 5, 200, 280); - - Assert.AreEqual (4, path.PointCount); - - path.AddBezier( 0, 210, 50, 6, 150, 150, 250, 10); - - Assert.AreEqual (8, path.PointCount); - - PointF [] expectedPoints = new PointF [] { new PointF(10f, 10f), - new PointF(50f, 250f), - new PointF(100f, 5f), - new PointF(200f, 280f), - new PointF(0f, 210f), - new PointF(50f, 6f), - new PointF(150f, 150f), - new PointF(250f, 10f)}; - - for(int i = 0; i < path.PointCount; i++) { - DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]); - } - - byte [] expectedTypes = new byte [] { (byte) PathPointType.Start, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Line, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3}; - - for (int i=0; i < expectedTypes.Length; i++) { - Assert.AreEqual (expectedTypes [i], path.PathTypes [i]); - } - - t.Graphics.DrawPath (p, path); - t.Show (); - //t.AssertCompare (); - } - - [Test] - public void AddBezier_Float_Float_Float_Float_Float_Float_Float_Float() - { - path = new GraphicsPath (); - path.AddBezier( 10.01f, 10.02f, 50.3f, 250.4f, 100.005f, 5.006f, 200.78f, 280.90f); - - Assert.AreEqual (4, path.PointCount); - - path.AddBezier( 0.15f, 210.23f, 50.34f, 6.45f, 150.65f, 150.87f, 250.0001f, 10.2345f); - - Assert.AreEqual (8, path.PointCount); - - PointF [] expectedPoints = new PointF [] { new PointF (10.01f, 10.02f), - new PointF (50.3f, 250.4f), - new PointF (100.005f, 5.006f), - new PointF (200.78f, 280.90f), - new PointF (0.15f, 210.23f), - new PointF (50.34f, 6.45f), - new PointF (150.65f, 150.87f), - new PointF (250.0001f, 10.2345f)}; - - for(int i = 0; i < path.PointCount; i++) { - DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]); - } - - byte [] expectedTypes = new byte [] { (byte) PathPointType.Start, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Line, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3}; - - for (int i=0; i < expectedTypes.Length; i++) { - Assert.AreEqual (expectedTypes [i], path.PathTypes [i]); - } - - t.Graphics.DrawPath (p, path); - t.Show (); - //t.AssertCompare (); - } - - [Test] - public void AddBeziers_PointArr() - { - Point [] points = new Point [] {new Point(20, 100), - new Point(40, 75), - new Point(60, 125), - new Point(80, 100), - new Point(100, 50), - new Point(120, 150), - new Point(140, 100)}; - - path = new GraphicsPath(); - path.AddBeziers(points); - - Assert.AreEqual (7, path.PointCount); - - PointF [] expectedPoints = new PointF [] { new PointF(20f, 100f), - new PointF(40f, 75f), - new PointF(60f, 125f), - new PointF(80f, 100f), - new PointF(100f, 50f), - new PointF(120f, 150f), - new PointF(140f, 100f)}; - - for(int i = 0; i < path.PointCount; i++) { - DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]); - } - - byte [] expectedTypes = new byte [] { (byte) PathPointType.Start, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3}; - - for (int i=0; i < expectedTypes.Length; i++) { - Assert.AreEqual (expectedTypes [i], path.PathTypes [i]); - } - - t.Graphics.DrawPath (p, path); - t.Show (); - //t.AssertCompare (); - } - - [Test] - public void AddBeziers_PointFArr() - { - PointF [] points = new PointF [] { new PointF(20.01f, 100.1f), - new PointF(40.02f, 75.2f), - new PointF(60.03f, 125.3f), - new PointF(80.04f, 100.4f), - new PointF(100.05f, 50.5f), - new PointF(120.06f, 150.6f), - new PointF(140.07f, 100.7f)}; - - path = new GraphicsPath(); - path.AddBeziers(points); - - Assert.AreEqual (7, path.PointCount); - - PointF [] expectedPoints = new PointF [] { new PointF(20.01f, 100.1f), - new PointF(40.02f, 75.2f), - new PointF(60.03f, 125.3f), - new PointF(80.04f, 100.4f), - new PointF(100.05f, 50.5f), - new PointF(120.06f, 150.6f), - new PointF(140.07f, 100.7f)}; - - for(int i = 0; i < path.PointCount; i++) { - DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]); - } - - byte [] expectedTypes = new byte [] { (byte) PathPointType.Start, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3}; - - for (int i=0; i < expectedTypes.Length; i++) { - Assert.AreEqual (expectedTypes [i], path.PathTypes [i]); - } - - t.Graphics.DrawPath (p, path); - t.Show (); - //t.AssertCompare (); - } - - [Test] - public void AddClosedCurve_PointArr() - { - Point [] points = new Point [] {new Point(20, 100), - new Point(40, 75), - new Point(60, 125), - new Point(80, 100), - new Point(100, 50), - new Point(120, 150), - new Point(140, 100)}; - - path = new GraphicsPath(); - path.AddClosedCurve(points); - - Assert.AreEqual (22, path.PointCount); - - PointF [] expectedPoints = new PointF [] { new PointF(20f, 100f), - new PointF(3.333333f, 95.83333f), - new PointF(33.33333f, 70.83333f), - new PointF(40f, 75f), - new PointF(46.66666f, 79.16666f), - new PointF(53.33333f, 120.8333f), - new PointF(60f, 125f), - new PointF(66.66666f, 129.1667f), - new PointF(73.33333f, 112.5f), - new PointF(80f, 100f), - new PointF(86.66666f, 87.49999f), - new PointF(93.33333f, 41.66666f), - new PointF(100f, 50f), - new PointF(106.6667f, 58.33333f), - new PointF(113.3333f, 141.6667f), - new PointF(120f, 150f), - new PointF(126.6667f, 158.3333f), - new PointF(156.6667f, 108.3333f), - new PointF(140f, 100f), - new PointF(123.3333f, 91.66666f), - new PointF(36.66666f, 104.1667f), - new PointF(20f, 100f)}; - - for(int i = 0; i < path.PointCount; i++) { - DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]); - } - - byte [] expectedTypes = new byte [] { (byte) PathPointType.Start, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) (PathPointType.Bezier | PathPointType.CloseSubpath)}; - - for (int i=0; i < expectedTypes.Length; i++) { - Assert.AreEqual (expectedTypes [i], path.PathTypes [i]); - } - - t.Graphics.DrawPath (p, path); - t.Show (); - //t.AssertCompare (); - } - - [Test] - public void AddClosedCurve_PointFArr() - { - PointF [] points = new PointF [] { new PointF(20.01f, 100.1f), - new PointF(40.02f, 75.2f), - new PointF(60.03f, 125.3f), - new PointF(80.04f, 100.4f), - new PointF(100.05f, 50.5f), - new PointF(120.06f, 150.6f), - new PointF(140.07f, 100.7f)}; - - path = new GraphicsPath(); - path.AddClosedCurve(points); - - Assert.AreEqual (22, path.PointCount); - - PointF [] expectedPoints = new PointF [] { new PointF(20.01f, 100.1f), - new PointF(3.334998f, 95.84999f), - new PointF(33.35f, 70.99999f), - new PointF(40.02f, 75.2f), - new PointF(46.69f, 79.39999f), - new PointF(53.36f, 121.1f), - new PointF(60.03f, 125.3f), - new PointF(66.7f, 129.5f), - new PointF(73.37f, 112.8667f), - new PointF(80.04f, 100.4f), - new PointF(86.71f, 87.93333f), - new PointF(93.38f, 42.13333f), - new PointF(100.05f, 50.5f), - new PointF(106.72f, 58.86666f), - new PointF(113.39f, 142.2333f), - new PointF(120.06f, 150.6f), - new PointF(126.73f, 158.9667f), - new PointF(156.745f, 109.1167f), - new PointF(140.07f, 100.7f), - new PointF(123.395f, 92.28333f), - new PointF(36.685f, 104.35f), - new PointF(20.01f, 100.1f)}; - - for(int i = 0; i < path.PointCount; i++) { - DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]); - } - - byte [] expectedTypes = new byte [] { (byte) PathPointType.Start, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) (PathPointType.Bezier | PathPointType.CloseSubpath)}; - - for (int i=0; i < expectedTypes.Length; i++) { - Assert.AreEqual (expectedTypes [i], path.PathTypes [i]); - } - - t.Graphics.DrawPath (p, path); - t.Show (); - //t.AssertCompare (); - } - - [Test] - public void AddClosedCurve_PointArr_Float() - { - Point [] points = new Point [] {new Point(20, 100), - new Point(40, 75), - new Point(60, 125), - new Point(80, 100), - new Point(100, 50), - new Point(120, 150), - new Point(140, 100)}; - - path = new GraphicsPath(); - path.AddClosedCurve(points, 0.9f); - - Assert.AreEqual (22, path.PointCount); - - PointF [] expectedPoints = new PointF [] { new PointF(20f, 100f), - new PointF(-10f, 92.49999f), - new PointF(28f, 67.49999f), - new PointF(40f, 75f), - new PointF(52f, 82.5f), - new PointF(48f, 117.5f), - new PointF(60f, 125f), - new PointF(72f, 132.5f), - new PointF(67.99999f, 122.5f), - new PointF(80f, 100f), - new PointF(92f, 77.49999f), - new PointF(87.99999f, 35f), - new PointF(100f, 50f), - new PointF(112f, 65f), - new PointF(108f, 135f), - new PointF(120f, 150f), - new PointF(132f, 165f), - new PointF(170f, 115f), - new PointF(140f, 100f), - new PointF(110f, 84.99999f), - new PointF(50f, 107.5f), - new PointF(20f, 100f)}; - - for(int i = 0; i < path.PointCount; i++) { - DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]); - } - - byte [] expectedTypes = new byte [] { (byte) PathPointType.Start, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) (PathPointType.Bezier | PathPointType.CloseSubpath)}; - - for (int i=0; i < expectedTypes.Length; i++) { - Assert.AreEqual (expectedTypes [i], path.PathTypes [i]); - } - - t.Graphics.DrawPath (p, path); - t.Show (); - //t.AssertCompare (); - } - - [Test] - public void AddClosedCurve_PointFArr_Float() - { - PointF [] points = new PointF [] { new PointF(20.01f, 100.1f), - new PointF(40.02f, 75.2f), - new PointF(60.03f, 125.3f), - new PointF(80.04f, 100.4f), - new PointF(100.05f, 50.5f), - new PointF(120.06f, 150.6f), - new PointF(140.07f, 100.7f)}; - - path = new GraphicsPath(); - path.AddClosedCurve(points, 0.8f); - - Assert.AreEqual (22, path.PointCount); - - PointF [] expectedPoints = new PointF [] { new PointF(20.01f, 100.1f), - new PointF(-6.670003f, 93.3f), - new PointF(29.348f, 68.47999f), - new PointF(40.02f, 75.2f), - new PointF(50.692f, 81.92f), - new PointF(49.358f, 118.58f), - new PointF(60.03f, 125.3f), - new PointF(70.702f, 132.02f), - new PointF(69.368f, 120.3467f), - new PointF(80.04f, 100.4f), - new PointF(90.712f, 80.45333f), - new PointF(89.378f, 37.11333f), - new PointF(100.05f, 50.5f), - new PointF(110.722f, 63.88667f), - new PointF(109.388f, 137.2133f), - new PointF(120.06f, 150.6f), - new PointF(130.732f, 163.9867f), - new PointF(166.75f, 114.1667f), - new PointF(140.07f, 100.7f), - new PointF(113.39f, 87.23332f), - new PointF(46.69f, 106.9f), - new PointF(20.01f, 100.1f)}; - - for(int i = 0; i < path.PointCount; i++) { - DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]); - } - - byte [] expectedTypes = new byte [] { (byte) PathPointType.Start, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) (PathPointType.Bezier | PathPointType.CloseSubpath)}; - - for (int i=0; i < expectedTypes.Length; i++) { - Assert.AreEqual (expectedTypes [i], path.PathTypes [i]); - } - - t.Graphics.DrawPath (p, path); - t.Show (); - //t.AssertCompare (); - } - - [Test] - public void AddCurve_PointArr() - { - Point [] points = new Point [] {new Point(20, 100), - new Point(40, 75), - new Point(60, 125), - new Point(80, 100), - new Point(100, 50), - new Point(120, 150), - new Point(140, 100)}; - - path = new GraphicsPath(); - path.AddCurve(points); - - Assert.AreEqual (19, path.PointCount); - - PointF [] expectedPoints = new PointF [] { new PointF(20f, 100f), - new PointF(23.33333f, 95.83333f), - new PointF(33.33333f, 70.83333f), - new PointF(40f, 75f), - new PointF(46.66666f, 79.16666f), - new PointF(53.33333f, 120.8333f), - new PointF(60f, 125f), - new PointF(66.66666f, 129.1667f), - new PointF(73.33333f, 112.5f), - new PointF(80f, 100f), - new PointF(86.66666f, 87.49999f), - new PointF(93.33333f, 41.66666f), - new PointF(100f, 50f), - new PointF(106.6667f, 58.33333f), - new PointF(113.3333f, 141.6667f), - new PointF(120f, 150f), - new PointF(126.6667f, 158.3333f), - new PointF(136.6667f, 108.3333f), - new PointF(140f, 100f)}; - - for(int i = 0; i < path.PointCount; i++) { - DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]); - } - - byte [] expectedTypes = new byte [] { (byte) PathPointType.Start, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3}; - - for (int i=0; i < expectedTypes.Length; i++) { - Assert.AreEqual (expectedTypes [i], path.PathTypes [i]); - } - - t.Graphics.DrawPath (p, path); - t.Show (); - //t.AssertCompare (); - } - - [Test] - public void AddCurve_PointFArr() - { - PointF [] points = new PointF [] { new PointF(20.01f, 100.1f), - new PointF(40.02f, 75.2f), - new PointF(60.03f, 125.3f), - new PointF(80.04f, 100.4f), - new PointF(100.05f, 50.5f), - new PointF(120.06f, 150.6f), - new PointF(140.07f, 100.7f)}; - - path = new GraphicsPath(); - path.AddCurve(points); - - Assert.AreEqual (19, path.PointCount); - - PointF [] expectedPoints = new PointF [] { new PointF(20.01f, 100.1f), - new PointF(23.345f, 95.95f), - new PointF(33.35f, 70.99999f), - new PointF(40.02f, 75.2f), - new PointF(46.69f, 79.39999f), - new PointF(53.36f, 121.1f), - new PointF(60.03f, 125.3f), - new PointF(66.7f, 129.5f), - new PointF(73.37f, 112.8667f), - new PointF(80.04f, 100.4f), - new PointF(86.71f, 87.93333f), - new PointF(93.38f, 42.13333f), - new PointF(100.05f, 50.5f), - new PointF(106.72f, 58.86666f), - new PointF(113.39f, 142.2333f), - new PointF(120.06f, 150.6f), - new PointF(126.73f, 158.9667f), - new PointF(136.735f, 109.0167f), - new PointF(140.07f, 100.7f)}; - - for(int i = 0; i < path.PointCount; i++) { - DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]); - } - - byte [] expectedTypes = new byte [] { (byte) PathPointType.Start, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3}; - - for (int i=0; i < expectedTypes.Length; i++) { - Assert.AreEqual (expectedTypes [i], path.PathTypes [i]); - } - - t.Graphics.DrawPath (p, path); - t.Show (); - //t.AssertCompare (); - } - - [Test] - public void AddCurve_PointArr_Float() - { - Point [] points = new Point [] {new Point(20, 100), - new Point(40, 75), - new Point(60, 125), - new Point(80, 100), - new Point(100, 50), - new Point(120, 150), - new Point(140, 100)}; - - path = new GraphicsPath(); - path.AddCurve(points, 0.9f); - - Assert.AreEqual (19, path.PointCount); - - PointF [] expectedPoints = new PointF [] { new PointF(20f, 100f), - new PointF(26f, 92.49999f), - new PointF(28f, 67.49999f), - new PointF(40f, 75f), - new PointF(52f, 82.5f), - new PointF(48f, 117.5f), - new PointF(60f, 125f), - new PointF(72f, 132.5f), - new PointF(67.99999f, 122.5f), - new PointF(80f, 100f), - new PointF(92f, 77.49999f), - new PointF(87.99999f, 35f), - new PointF(100f, 50f), - new PointF(112f, 65f), - new PointF(108f, 135f), - new PointF(120f, 150f), - new PointF(132f, 165f), - new PointF(134f, 115f), - new PointF(140f, 100f)}; - - for(int i = 0; i < path.PointCount; i++) { - DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]); - } - - byte [] expectedTypes = new byte [] { (byte) PathPointType.Start, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3}; - - for (int i=0; i < expectedTypes.Length; i++) { - Assert.AreEqual (expectedTypes [i], path.PathTypes [i]); - } - - t.Graphics.DrawPath (p, path); - t.Show (); - //t.AssertCompare (); - } - - [Test] - public void AddCurve_PointFArr_Float() - { - PointF [] points = new PointF [] { new PointF(20.01f, 100.1f), - new PointF(40.02f, 75.2f), - new PointF(60.03f, 125.3f), - new PointF(80.04f, 100.4f), - new PointF(100.05f, 50.5f), - new PointF(120.06f, 150.6f), - new PointF(140.07f, 100.7f)}; - - path = new GraphicsPath(); - path.AddCurve(points, 0.8f); - - Assert.AreEqual (19, path.PointCount); - - PointF [] expectedPoints = new PointF [] { new PointF(20.01f, 100.1f), - new PointF(25.346f, 93.45999f), - new PointF(29.348f, 68.47999f), - new PointF(40.02f, 75.2f), - new PointF(50.692f, 81.92f), - new PointF(49.358f, 118.58f), - new PointF(60.03f, 125.3f), - new PointF(70.702f, 132.02f), - new PointF(69.368f, 120.3467f), - new PointF(80.04f, 100.4f), - new PointF(90.712f, 80.45333f), - new PointF(89.378f, 37.11333f), - new PointF(100.05f, 50.5f), - new PointF(110.722f, 63.88667f), - new PointF(109.388f, 137.2133f), - new PointF(120.06f, 150.6f), - new PointF(130.732f, 163.9867f), - new PointF(134.734f, 114.0067f), - new PointF(140.07f, 100.7f)}; - - for(int i = 0; i < path.PointCount; i++) { - DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]); - } - - byte [] expectedTypes = new byte [] { (byte) PathPointType.Start, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3}; - - for (int i=0; i < expectedTypes.Length; i++) { - Assert.AreEqual (expectedTypes [i], path.PathTypes [i]); - } - - t.Graphics.DrawPath (p, path); - t.Show (); - //t.AssertCompare (); - } - - [Test] - public void AddCurve_PointArr_Int_Int_Float() - { - - Point [] points = new Point [] {new Point(20, 100), - new Point(40, 75), - new Point(60, 125), - new Point(80, 100), - new Point(100, 50), - new Point(120, 150), - new Point(140, 100)}; - - path = new GraphicsPath(); - path.AddCurve(points, 0, 3, 0.8f); - - Assert.AreEqual (10, path.PointCount); - - PointF [] expectedPoints = new PointF [] { new PointF(20f, 100f), - new PointF(25.33333f, 93.33333f), - new PointF(29.33333f, 68.33333f), - new PointF(40f, 75f), - new PointF(50.66666f, 81.66666f), - new PointF(49.33333f, 118.3333f), - new PointF(60f, 125f), - new PointF(70.66666f, 131.6667f), - new PointF(69.33333f, 120f), - new PointF(80f, 100f)}; - - for(int i = 0; i < path.PointCount; i++) { - DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]); - } - - byte [] expectedTypes = new byte [] { (byte) PathPointType.Start, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3}; - - for (int i=0; i < expectedTypes.Length; i++) { - Assert.AreEqual (expectedTypes [i], path.PathTypes [i]); - } - - t.Graphics.DrawPath (p, path); - t.Show (); - //t.AssertCompare (); - } - - [Test] - public void AddCurve_PointFArr_Int_Int_Float() - { - - PointF [] points = new PointF [] { new PointF(20.01f, 100.1f), - new PointF(40.02f, 75.2f), - new PointF(60.03f, 125.3f), - new PointF(80.04f, 100.4f), - new PointF(100.05f, 50.5f), - new PointF(120.06f, 150.6f), - new PointF(140.07f, 100.7f)}; - - path = new GraphicsPath(); - path.AddCurve(points, 0, 3, 0.8f); - - Assert.AreEqual (10, path.PointCount); - - PointF [] expectedPoints = new PointF [] { new PointF(20.01f, 100.1f), - new PointF(25.346f, 93.45999f), - new PointF(29.348f, 68.47999f), - new PointF(40.02f, 75.2f), - new PointF(50.692f, 81.92f), - new PointF(49.358f, 118.58f), - new PointF(60.03f, 125.3f), - new PointF(70.702f, 132.02f), - new PointF(69.368f, 120.3467f), - new PointF(80.04f, 100.4f)}; - - for(int i = 0; i < path.PointCount; i++) { - DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]); - } - - byte [] expectedTypes = new byte [] { (byte) PathPointType.Start, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3}; - - for (int i=0; i < expectedTypes.Length; i++) { - Assert.AreEqual (expectedTypes [i], path.PathTypes [i]); - } - - t.Graphics.DrawPath (p, path); - t.Show (); - //t.AssertCompare (); - } - - [Test] - public void AddEllipse_Rectangle() - { - path = new GraphicsPath(); - path.AddEllipse (new Rectangle(50, 50, 400, 80)); - - Assert.AreEqual (13, path.PointCount); - - PointF [] expectedPoints = new PointF [] { new PointF(450f, 90f), - new PointF(450f, 112.0914f), - new PointF(360.4569f, 130f), - new PointF(250f, 130f), - new PointF(139.543f, 130f), - new PointF(50f, 112.0914f), - new PointF(50f, 90f), - new PointF(50f, 67.90861f), - new PointF(139.543f, 50f), - new PointF(250f, 50f), - new PointF(360.4569f, 50f), - new PointF(450f, 67.90861f), - new PointF(450f, 90f)}; - - for(int i = 0; i < path.PointCount; i++) { - DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]); - } - - byte [] expectedTypes = new byte [] { (byte) PathPointType.Start, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) (PathPointType.Bezier | PathPointType.CloseSubpath)}; - - for (int i=0; i < expectedTypes.Length; i++) { - Assert.AreEqual (expectedTypes [i], path.PathTypes [i]); - } - - t.Graphics.DrawPath (p, path); - t.Show (); - //t.AssertCompare (); - } - - [Test] - public void AddEllipse_RectangleF() - { - path = new GraphicsPath(); - path.AddEllipse (new RectangleF(50.1f, 50.4f, 400.12f, 80.123f)); - - Assert.AreEqual (13, path.PointCount); - - PointF [] expectedPoints = new PointF [] { new PointF(450.22f, 90.4615f), - new PointF(450.22f, 112.5869f), - new PointF(360.6501f, 130.523f), - new PointF(250.16f, 130.523f), - new PointF(139.6699f, 130.523f), - new PointF(50.09999f, 112.5869f), - new PointF(50.09999f, 90.4615f), - new PointF(50.09999f, 68.33614f), - new PointF(139.6699f, 50.4f), - new PointF(250.16f, 50.4f), - new PointF(360.6501f, 50.4f), - new PointF(450.22f, 68.33614f), - new PointF(450.22f, 90.4615f)}; - - for(int i = 0; i < path.PointCount; i++) { - DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]); - } - - byte [] expectedTypes = new byte [] { (byte) PathPointType.Start, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) (PathPointType.Bezier | PathPointType.CloseSubpath)}; - - for (int i=0; i < expectedTypes.Length; i++) { - Assert.AreEqual (expectedTypes [i], path.PathTypes [i]); - } - - t.Graphics.DrawPath (p, path); - t.Show (); - //t.AssertCompare (); - } - - [Test] - public void AddEllipse_Int_Int_Int_Int() - { - path = new GraphicsPath(); - path.AddEllipse (50, 50, 400, 80); - - Assert.AreEqual (13, path.PointCount); - - PointF [] expectedPoints = new PointF [] { new PointF(450f, 90f), - new PointF(450f, 112.0914f), - new PointF(360.4569f, 130f), - new PointF(250f, 130f), - new PointF(139.543f, 130f), - new PointF(50f, 112.0914f), - new PointF(50f, 90f), - new PointF(50f, 67.90861f), - new PointF(139.543f, 50f), - new PointF(250f, 50f), - new PointF(360.4569f, 50f), - new PointF(450f, 67.90861f), - new PointF(450f, 90f)}; - - for(int i = 0; i < path.PointCount; i++) { - DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]); - } - - byte [] expectedTypes = new byte [] { (byte) PathPointType.Start, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) (PathPointType.Bezier | PathPointType.CloseSubpath)}; - - for (int i=0; i < expectedTypes.Length; i++) { - Assert.AreEqual (expectedTypes [i], path.PathTypes [i]); - } - - t.Graphics.DrawPath (p, path); - t.Show (); - //t.AssertCompare (); - } - - [Test] - public void AddEllipse_Float_Float_Float_Float() - { - path = new GraphicsPath(); - path.AddEllipse (50.1f, 50.4f, 400.12f, 80.123f); - - Assert.AreEqual (13, path.PointCount); - - PointF [] expectedPoints = new PointF [] { new PointF(450.22f, 90.4615f), - new PointF(450.22f, 112.5869f), - new PointF(360.6501f, 130.523f), - new PointF(250.16f, 130.523f), - new PointF(139.6699f, 130.523f), - new PointF(50.09999f, 112.5869f), - new PointF(50.09999f, 90.4615f), - new PointF(50.09999f, 68.33614f), - new PointF(139.6699f, 50.4f), - new PointF(250.16f, 50.4f), - new PointF(360.6501f, 50.4f), - new PointF(450.22f, 68.33614f), - new PointF(450.22f, 90.4615f)}; - - for(int i = 0; i < path.PointCount; i++) { - DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]); - } - - byte [] expectedTypes = new byte [] { (byte) PathPointType.Start, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) (PathPointType.Bezier | PathPointType.CloseSubpath)}; - - for (int i=0; i < expectedTypes.Length; i++) { - Assert.AreEqual (expectedTypes [i], path.PathTypes [i]); - } - - t.Graphics.DrawPath (p, path); - t.Show (); - //t.AssertCompare (); - } - - - [Test] - public void AddLine_Point_Point() - { - path = new GraphicsPath (); - - path.AddLine (new Point (20, 20), new Point (10, 120)); - Assert.AreEqual (2, path.PointCount); - - path.AddLine (new Point (40, 320), new Point (310, 45)); - Assert.AreEqual (4, path.PointCount); - - path.AddLine (new Point (300, 300), new Point (48, 62)); - Assert.AreEqual (6, path.PointCount); - - PointF [] expectedPoints = new PointF [] { new PointF(20f, 20f), - new PointF(10f, 120f), - new PointF(40f, 320f), - new PointF(310f, 45f), - new PointF(300f, 300f), - new PointF(48f, 62f)}; - - for(int i = 0; i < path.PointCount; i++) { - DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]); - } - - byte [] expectedTypes = new byte [] { (byte) PathPointType.Start, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line}; - - for (int i=0; i < expectedTypes.Length; i++) { - Assert.AreEqual (expectedTypes [i], path.PathTypes [i]); - } - - t.Graphics.DrawPath (p, path); - t.Show (); - //t.AssertCompare (); - } - - [Test] - public void AddLine_PointF_PointF() - { - path = new GraphicsPath (); - - path.AddLine (new PointF (20.02f, 20.123f), new PointF (10.0001f, 120.23f)); - Assert.AreEqual (2, path.PointCount); - - path.AddLine (new PointF (40.00f, 320.234f), new PointF (310.9999f, 45.33333333f)); - Assert.AreEqual (4, path.PointCount); - - path.AddLine (new PointF (300f, 300.97f), new PointF (48.18f, 62.54f)); - Assert.AreEqual (6, path.PointCount); - - PointF [] expectedPoints = new PointF [] { new PointF(20.02f, 20.123f), - new PointF(10.0001f, 120.23f), - new PointF(40f, 320.234f), - new PointF(310.9999f, 45.33333f), - new PointF(300f, 300.97f), - new PointF(48.18f, 62.54f)}; - - for(int i = 0; i < path.PointCount; i++) { - DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]); - } - - byte [] expectedTypes = new byte [] { (byte) PathPointType.Start, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line}; - - for (int i=0; i < expectedTypes.Length; i++) { - Assert.AreEqual (expectedTypes [i], path.PathTypes [i]); - } - - t.Graphics.DrawPath (p, path); - t.Show (); - //t.AssertCompare (); - } - - [Test] - public void AddLine_Int_Int_Int_Int() - { - path = new GraphicsPath (); - - path.AddLine (20, 20, 10, 120); - Assert.AreEqual (2, path.PointCount); - - path.AddLine (40, 320, 310, 45); - Assert.AreEqual (4, path.PointCount); - - path.AddLine (300, 300, 48, 62); - Assert.AreEqual (6, path.PointCount); - - PointF [] expectedPoints = new PointF [] { new PointF(20f, 20f), - new PointF(10f, 120f), - new PointF(40f, 320f), - new PointF(310f, 45f), - new PointF(300f, 300f), - new PointF(48f, 62f)}; - - for(int i = 0; i < path.PointCount; i++) { - DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]); - } - - byte [] expectedTypes = new byte [] { (byte) PathPointType.Start, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line}; - - for (int i=0; i < expectedTypes.Length; i++) { - Assert.AreEqual (expectedTypes [i], path.PathTypes [i]); - } - - t.Graphics.DrawPath (p, path); - t.Show (); - //t.AssertCompare (); - } - - [Test] - public void AddLine_Float_Float_Float_Float() - { - path = new GraphicsPath (); - - path.AddLine (20.02f, 20.123f, 10.0001f, 120.23f); - Assert.AreEqual (2, path.PointCount); - - path.AddLine (40.00f, 320.234f, 310.9999f, 45.33333333f); - Assert.AreEqual (4, path.PointCount); - - path.AddLine (300f, 300.97f, 48.18f, 62.54f); - Assert.AreEqual (6, path.PointCount); - - PointF [] expectedPoints = new PointF [] { new PointF(20.02f, 20.123f), - new PointF(10.0001f, 120.23f), - new PointF(40f, 320.234f), - new PointF(310.9999f, 45.33333f), - new PointF(300f, 300.97f), - new PointF(48.18f, 62.54f)}; - - for(int i = 0; i < path.PointCount; i++) { - DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]); - } - - byte [] expectedTypes = new byte [] { (byte) PathPointType.Start, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line}; - - for (int i=0; i < expectedTypes.Length; i++) { - Assert.AreEqual (expectedTypes [i], path.PathTypes [i]); - } - - t.Graphics.DrawPath (p, path); - t.Show (); - //t.AssertCompare (); - } - - [Test] - public void AddLines_PointArr() - { - Point [] points = new Point [] {new Point(20, 100), - new Point(40, 75), - new Point(60, 125), - new Point(80, 100), - new Point(100, 50), - new Point(120, 150), - new Point(140, 100)}; - - path = new GraphicsPath(); - path.AddLines(points); - - Assert.AreEqual (7, path.PointCount); - - PointF [] expectedPoints = new PointF [] { new PointF(20f, 100f), - new PointF(40f, 75f), - new PointF(60f, 125f), - new PointF(80f, 100f), - new PointF(100f, 50f), - new PointF(120f, 150f), - new PointF(140f, 100f)}; - - for(int i = 0; i < path.PointCount; i++) { - DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]); - } - - byte [] expectedTypes = new byte [] { (byte) PathPointType.Start, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line}; - - for (int i=0; i < expectedTypes.Length; i++) { - Assert.AreEqual (expectedTypes [i], path.PathTypes [i]); - } - - t.Graphics.DrawPath (p, path); - t.Show (); - //t.AssertCompare (); - } - - [Test] - public void AddLines_PointFArr() - { - PointF [] points = new PointF [] { new PointF(20.01f, 100.1f), - new PointF(40.02f, 75.2f), - new PointF(60.03f, 125.3f), - new PointF(80.04f, 100.4f), - new PointF(100.05f, 50.5f), - new PointF(120.06f, 150.6f), - new PointF(140.07f, 100.7f)}; - - path = new GraphicsPath(); - path.AddLines(points); - - Assert.AreEqual (7, path.PointCount); - - PointF [] expectedPoints = new PointF [] { new PointF(20.01f, 100.1f), - new PointF(40.02f, 75.2f), - new PointF(60.03f, 125.3f), - new PointF(80.04f, 100.4f), - new PointF(100.05f, 50.5f), - new PointF(120.06f, 150.6f), - new PointF(140.07f, 100.7f)}; - - for(int i = 0; i < path.PointCount; i++) { - DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]); - } - - byte [] expectedTypes = new byte [] { (byte) PathPointType.Start, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line}; - - for (int i=0; i < expectedTypes.Length; i++) { - Assert.AreEqual (expectedTypes [i], path.PathTypes [i]); - } - - t.Graphics.DrawPath (p, path); - t.Show (); - //t.AssertCompare (); - } - - [Test] - public void AddPath_GraphicsPath_Bool_1() - { - Point [] points1 = new Point [] { new Point (302, 302), - new Point (360, 360), - new Point (0, 460), - new Point (130, 230)}; - - GraphicsPath path1 = new GraphicsPath (); - path1.AddLines (points1); - - Point [] points2 = { new Point (350, 350), - new Point (0, 0), - new Point (260, 100), - new Point (310, 30)}; - - path = new GraphicsPath (); - path.AddLines (points2); - - path.AddPath (path1, true); - - Assert.AreEqual (8, path.PointCount); - - PointF [] expectedPoints = new PointF [] { new PointF(350f, 350f), - new PointF(0f, 0f), - new PointF(260f, 100f), - new PointF(310f, 30f), - new PointF(302f, 302f), - new PointF(360f, 360f), - new PointF(0f, 460f), - new PointF(130f, 230f)}; - - for(int i = 0; i < path.PointCount; i++) { - DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]); - } - - byte [] expectedTypes = new byte [] { (byte) PathPointType.Start, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line}; - - for (int i=0; i < expectedTypes.Length; i++) { - Assert.AreEqual (expectedTypes [i], path.PathTypes [i]); - } - - t.Graphics.DrawPath (p, path); - t.Show (); - //t.AssertCompare (); - } - - [Test] - public void AddPath_GraphicsPath_Bool_2() - { - Point [] points1 = new Point [] { new Point (302, 302), - new Point (360, 360), - new Point (0, 460), - new Point (130, 230)}; - - GraphicsPath path1 = new GraphicsPath (); - path1.AddLines (points1); - - Point [] points2 = { new Point (350, 350), - new Point (0, 0), - new Point (260, 100), - new Point (310, 30)}; - - path = new GraphicsPath (); - path.AddLines (points2); - - path.AddPath (path1, false); - - Assert.AreEqual (8, path.PointCount); - - PointF [] expectedPoints = new PointF [] { new PointF(350f, 350f), - new PointF(0f, 0f), - new PointF(260f, 100f), - new PointF(310f, 30f), - new PointF(302f, 302f), - new PointF(360f, 360f), - new PointF(0f, 460f), - new PointF(130f, 230f)}; - - for(int i = 0; i < path.PointCount; i++) { - DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]); - } - - byte [] expectedTypes = new byte [] { (byte) PathPointType.Start, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Start, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line}; - - for (int i=0; i < expectedTypes.Length; i++) { - Assert.AreEqual (expectedTypes [i], path.PathTypes [i]); - } - - t.Graphics.DrawPath (p, path); - t.Show (); - //t.AssertCompare (); - } - - [Test] -#if TARGET_JVM - [Category ("NotWorking")] -#endif - public void AddPie_Rectangle_Float_Float() - { - path = new GraphicsPath (); - - path.AddPie (new Rectangle (20, 30, 350, 370), 10.34f, 240.15f); - - Assert.AreEqual (11, path.PointCount); - - path.AddPie (new Rectangle (150, 150, 170, 35), -45.001f, 135.87f); - - Assert.AreEqual (19, path.PointCount); - - PointF [] expectedPoints = new PointF [] { new PointF(195f, 215f), - new PointF(367.4504f, 246.4639f), - new PointF(351.0127f, 347.148f), - new PointF(260.4786f, 414.6818f), - new PointF(165.2368f, 397.3047f), - new PointF(69.99509f, 379.9277f), - new PointF(6.111823f, 284.2202f), - new PointF(22.54954f, 183.5361f), - new PointF(33.12234f, 118.7757f), - new PointF(75.40034f, 64.80574f), - new PointF(133.6162f, 41.75421f), - new PointF(235f, 167.5f), - new PointF(252.1399f, 150.3595f), - new PointF(298.1198f, 152.3084f), - new PointF(327.72f, 161.5623f), - new PointF(318.254f, 171.0288f), - new PointF(310.1f, 179.1831f), - new PointF(275.1718f, 185.0259f), - new PointF(234.7346f, 184.9999f)}; - - for(int i = 0; i < path.PointCount; i++) { - DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]); - } - - byte [] expectedTypes = new byte [] { (byte) PathPointType.Start, - (byte) PathPointType.Line, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) (PathPointType.Bezier3 | PathPointType.CloseSubpath), - (byte) PathPointType.Start, - (byte) PathPointType.Line, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) (PathPointType.Bezier3 | PathPointType.CloseSubpath)}; - - for (int i=0; i < expectedTypes.Length; i++) { - Assert.AreEqual (expectedTypes [i], path.PathTypes [i]); - } - - t.Graphics.DrawPath (p, path); - t.Show (); - //t.AssertCompare (); - } - - [Test] -#if TARGET_JVM - [Category ("NotWorking")] -#endif - public void AddPie_Int_Int_Int_Int_Float_Float() - { - path = new GraphicsPath (); - - path.AddPie (20, 30, 350, 370, 10.34f, 240.15f); - - Assert.AreEqual (11, path.PointCount); - - path.AddPie (150, 150, 170, 35, -45.001f, 135.87f); - - Assert.AreEqual (19, path.PointCount); - - PointF [] expectedPoints = new PointF [] { new PointF(195f, 215f), - new PointF(367.4504f, 246.4639f), - new PointF(351.0127f, 347.148f), - new PointF(260.4786f, 414.6818f), - new PointF(165.2368f, 397.3047f), - new PointF(69.99509f, 379.9277f), - new PointF(6.111823f, 284.2202f), - new PointF(22.54954f, 183.5361f), - new PointF(33.12234f, 118.7757f), - new PointF(75.40034f, 64.80574f), - new PointF(133.6162f, 41.75421f), - new PointF(235f, 167.5f), - new PointF(252.1399f, 150.3595f), - new PointF(298.1198f, 152.3084f), - new PointF(327.72f, 161.5623f), - new PointF(318.254f, 171.0288f), - new PointF(310.1f, 179.1831f), - new PointF(275.1718f, 185.0259f), - new PointF(234.7346f, 184.9999f)}; - - for(int i = 0; i < path.PointCount; i++) { - DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]); - } - - byte [] expectedTypes = new byte [] { (byte) PathPointType.Start, - (byte) PathPointType.Line, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) (PathPointType.Bezier3 | PathPointType.CloseSubpath), - (byte) PathPointType.Start, - (byte) PathPointType.Line, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) (PathPointType.Bezier3 | PathPointType.CloseSubpath)}; - - for (int i=0; i < expectedTypes.Length; i++) { - Assert.AreEqual (expectedTypes [i], path.PathTypes [i]); - } - - t.Graphics.DrawPath (p, path); - t.Show (); - //t.AssertCompare (); - } - - [Test] -#if TARGET_JVM - [Category ("NotWorking")] -#endif - public void AddPie_Float_Float_Float_Float_Float_Float() - { - path = new GraphicsPath (); - - path.AddPie (20f, 30.01f, 350.34f, 370.56f, 10.34f, 240.15f); - - Assert.AreEqual (11, path.PointCount); - - path.AddPie (150.23f, 150.12f, 170.99f, 35.098f, -45.001f, 135.87f); - - Assert.AreEqual (19, path.PointCount); - - PointF [] expectedPoints = new PointF [] { new PointF(195.17f, 215.29f), - new PointF(367.7906f, 246.785f), - new PointF(351.3456f, 347.623f), - new PointF(260.7293f, 415.2677f), - new PointF(165.3936f, 397.8735f), - new PointF(70.05784f, 380.4793f), - new PointF(6.104279f, 284.6331f), - new PointF(22.54932f, 183.7951f), - new PointF(33.12589f, 118.9412f), - new PointF(75.43399f, 64.88889f), - new PointF(133.6974f, 41.79355f), - new PointF(235.725f, 167.669f), - new PointF(252.9149f, 150.4784f), - new PointF(299.1682f, 152.4271f), - new PointF(328.9677f, 161.7033f), - new PointF(319.474f, 171.1974f), - new PointF(311.2924f, 179.3794f), - new PointF(276.1503f, 185.2439f), - new PointF(235.4589f, 185.2179f)}; - - for(int i = 0; i < path.PointCount; i++) { - DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]); - } - - byte [] expectedTypes = new byte [] { (byte) PathPointType.Start, - (byte) PathPointType.Line, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) (PathPointType.Bezier3 | PathPointType.CloseSubpath), - (byte) PathPointType.Start, - (byte) PathPointType.Line, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) (PathPointType.Bezier3 | PathPointType.CloseSubpath)}; - - for (int i=0; i < expectedTypes.Length; i++) { - Assert.AreEqual (expectedTypes [i], path.PathTypes [i]); - } - - t.Graphics.DrawPath (p, path); - t.Show (); - //t.AssertCompare (); - } - - [Test] - public void AddPolygon_PointArr() - { - Point [] points = new Point [] {new Point(20, 100), - new Point(40, 75), - new Point(60, 125), - new Point(80, 100), - new Point(100, 50), - new Point(120, 150), - new Point(140, 100)}; - - path = new GraphicsPath(); - path.AddPolygon(points); - - Assert.AreEqual (7, path.PointCount); - - PointF [] expectedPoints = new PointF [] { new PointF(20f, 100f), - new PointF(40f, 75f), - new PointF(60f, 125f), - new PointF(80f, 100f), - new PointF(100f, 50f), - new PointF(120f, 150f), - new PointF(140f, 100f)}; - - for(int i = 0; i < path.PointCount; i++) { - DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]); - } - - byte [] expectedTypes = new byte [] { (byte) PathPointType.Start, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) (PathPointType.Line | PathPointType.CloseSubpath)}; - - for (int i=0; i < expectedTypes.Length; i++) { - Assert.AreEqual (expectedTypes [i], path.PathTypes [i]); - } - - t.Graphics.DrawPath (p, path); - t.Show (); - //t.AssertCompare (); - } - - [Test] - public void AddPolygon_PointFArr() - { - PointF [] points = new PointF [] { new PointF(20.01f, 100.1f), - new PointF(40.02f, 75.2f), - new PointF(60.03f, 125.3f), - new PointF(80.04f, 100.4f), - new PointF(100.05f, 50.5f), - new PointF(120.06f, 150.6f), - new PointF(140.07f, 100.7f)}; - - path = new GraphicsPath(); - path.AddPolygon(points); - - Assert.AreEqual (7, path.PointCount); - - PointF [] expectedPoints = new PointF [] { new PointF(20.01f, 100.1f), - new PointF(40.02f, 75.2f), - new PointF(60.03f, 125.3f), - new PointF(80.04f, 100.4f), - new PointF(100.05f, 50.5f), - new PointF(120.06f, 150.6f), - new PointF(140.07f, 100.7f)}; - - for(int i = 0; i < path.PointCount; i++) { - DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]); - } - - byte [] expectedTypes = new byte [] { (byte) PathPointType.Start, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) (PathPointType.Line | PathPointType.CloseSubpath)}; - - for (int i=0; i < expectedTypes.Length; i++) { - Assert.AreEqual (expectedTypes [i], path.PathTypes [i]); - } - - t.Graphics.DrawPath (p, path); - t.Show (); - //t.AssertCompare (); - } - - [Test] - public void AddRectangle_Rectangle() - { - path = new GraphicsPath(); - path.AddRectangle (new Rectangle(50, 50, 400, 80)); - - Assert.AreEqual (4, path.PointCount); - - PointF [] expectedPoints = new PointF [] { new PointF(50f, 50f), - new PointF(450f, 50f), - new PointF(450f, 130f), - new PointF(50f, 130f)}; - - for(int i = 0; i < path.PointCount; i++) { - DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]); - } - - byte [] expectedTypes = new byte [] { (byte) PathPointType.Start, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) (PathPointType.Line | PathPointType.CloseSubpath)}; - - for (int i=0; i < expectedTypes.Length; i++) { - Assert.AreEqual (expectedTypes [i], path.PathTypes [i]); - } - - t.Graphics.DrawPath (p, path); - t.Show (); - //t.AssertCompare (); - } - - [Test] - public void AddRectangle_RectangleF() - { - path = new GraphicsPath(); - path.AddRectangle (new RectangleF(50.1f, 50.4f, 400.12f, 80.123f)); - - Assert.AreEqual (4, path.PointCount); - - PointF [] expectedPoints = new PointF [] { new PointF(50.1f, 50.4f), - new PointF(450.22f, 50.4f), - new PointF(450.22f, 130.523f), - new PointF(50.1f, 130.523f)}; - - for(int i = 0; i < path.PointCount; i++) { - DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]); - } - - byte [] expectedTypes = new byte [] { (byte) PathPointType.Start, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) (PathPointType.Line | PathPointType.CloseSubpath)}; - - for (int i=0; i < expectedTypes.Length; i++) { - Assert.AreEqual (expectedTypes [i], path.PathTypes [i]); - } - - t.Graphics.DrawPath (p, path); - t.Show (); - //t.AssertCompare (); - } - - [Test] - public void AddRectangles_RectangleArr() - { - path = new GraphicsPath(); - Rectangle [] rectangles = new Rectangle [] {new Rectangle (50, 50, 400, 80), - new Rectangle (150, 150, 100, 400), - new Rectangle (0, 0, 200, 480), - new Rectangle (450, 450, 40, 80)}; - path.AddRectangles (rectangles); - - Assert.AreEqual (16, path.PointCount); - - PointF [] expectedPoints = new PointF [] { new PointF(50f, 50f), - new PointF(450f, 50f), - new PointF(450f, 130f), - new PointF(50f, 130f), - new PointF(150f, 150f), - new PointF(250f, 150f), - new PointF(250f, 550f), - new PointF(150f, 550f), - new PointF(0f, 0f), - new PointF(200f, 0f), - new PointF(200f, 480f), - new PointF(0f, 480f), - new PointF(450f, 450f), - new PointF(490f, 450f), - new PointF(490f, 530f), - new PointF(450f, 530f)}; - - for(int i = 0; i < path.PointCount; i++) { - DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]); - } - - byte [] expectedTypes = new byte [] { (byte) PathPointType.Start, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) (PathPointType.Line | PathPointType.CloseSubpath), - (byte) PathPointType.Start, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) (PathPointType.Line | PathPointType.CloseSubpath), - (byte) PathPointType.Start, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) (PathPointType.Line | PathPointType.CloseSubpath), - (byte) PathPointType.Start, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) (PathPointType.Line | PathPointType.CloseSubpath)}; - - for (int i=0; i < expectedTypes.Length; i++) { - Assert.AreEqual (expectedTypes [i], path.PathTypes [i]); - } - - t.Graphics.DrawPath (p, path); - t.Show (); - //t.AssertCompare (); - } - - [Test] - public void AddRectangles_RectangleFArr() - { - path = new GraphicsPath(); - RectangleF [] rectangles = new RectangleF [] { new RectangleF (50.10f, 50.11f, 400.1f, 80.15f), - new RectangleF (150f, 150.87f, 100.09f, 400.99f), - new RectangleF (0.123245f, 0.23f, 200.98f, 480.56f), - new RectangleF (450.3333333333f, 450.6666666f, 40.8f, 80.4f)}; - path.AddRectangles (rectangles); - - Assert.AreEqual (16, path.PointCount); - - PointF [] expectedPoints = new PointF [] { new PointF(50.1f, 50.11f), - new PointF(450.2f, 50.11f), - new PointF(450.2f, 130.26f), - new PointF(50.1f, 130.26f), - new PointF(150f, 150.87f), - new PointF(250.09f, 150.87f), - new PointF(250.09f, 551.86f), - new PointF(150f, 551.86f), - new PointF(0.123245f, 0.23f), - new PointF(201.1032f, 0.23f), - new PointF(201.1032f, 480.79f), - new PointF(0.123245f, 480.79f), - new PointF(450.3333f, 450.6667f), - new PointF(491.1333f, 450.6667f), - new PointF(491.1333f, 531.0667f), - new PointF(450.3333f, 531.0667f)}; - - for(int i = 0; i < path.PointCount; i++) { - DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]); - } - - byte [] expectedTypes = new byte [] { (byte) PathPointType.Start, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) (PathPointType.Line | PathPointType.CloseSubpath), - (byte) PathPointType.Start, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) (PathPointType.Line | PathPointType.CloseSubpath), - (byte) PathPointType.Start, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) (PathPointType.Line | PathPointType.CloseSubpath), - (byte) PathPointType.Start, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) (PathPointType.Line | PathPointType.CloseSubpath)}; - - for (int i=0; i < expectedTypes.Length; i++) { - Assert.AreEqual (expectedTypes [i], path.PathTypes [i]); - } - - t.Graphics.DrawPath (p, path); - t.Show (); - //t.AssertCompare (); - } - - [Test] -#if TARGET_JVM - [Category ("NotWorking")] -#endif - public void AddString_String_FontFamily_Int_Float_Point_StringFormat() - { - path = new GraphicsPath(); - - string stringText = "System@Drawing"; - FontFamily family = new FontFamily ("Arial"); - int fontStyle = (int)FontStyle.Italic; - int emSize = 56; - Point origin = new Point (10, 120); - StringFormat format = StringFormat.GenericDefault; - - path.AddString (stringText, family, fontStyle, emSize, origin, format); - - Assert.AreEqual (939, path.PointCount); - - t.Graphics.DrawPath (p, path); - t.Show (); - //t.AssertCompare (); - } - - [Test] -#if TARGET_JVM - [Category ("NotWorking")] -#endif - public void AddString_String_FontFamily_Int_Float_PointF_StringFormat() - { - path = new GraphicsPath(); - - string stringText = "System@Drawing"; - FontFamily family = new FontFamily ("Arial"); - int fontStyle = (int)FontStyle.Italic; - int emSize = 56; - PointF origin = new PointF (10.15f, 120.01f); - StringFormat format = StringFormat.GenericDefault; - - path.AddString (stringText, family, fontStyle, emSize, origin, format); - - Assert.AreEqual (939, path.PointCount); - - t.Graphics.DrawPath (p, path); - t.Show (); - //t.AssertCompare (); - } - - [Test] -#if TARGET_JVM - [Category ("NotWorking")] -#endif - public void AddString_String_FontFamily_Int_Float_Rectangle_StringFormat() - { - path = new GraphicsPath(); - - string stringText = "System@Drawing"; - FontFamily family = new FontFamily ("Arial"); - int fontStyle = (int)FontStyle.Italic; - int emSize = 56; - Rectangle bound = new Rectangle (10, 120, 335, 50); - StringFormat format = StringFormat.GenericDefault; - - path.AddString (stringText, family, fontStyle, emSize, bound, format); - - Assert.AreEqual (657, path.PointCount); - - t.Graphics.DrawPath (p, path); - t.Show (); - //t.AssertCompare (); - } - - [Test] -#if TARGET_JVM - [Category ("NotWorking")] -#endif - public void AddString_String_FontFamily_Int_Float_RectangleFF_StringFormat() - { - path = new GraphicsPath(); - - string stringText = "System@Drawing"; - FontFamily family = new FontFamily ("Arial"); - int fontStyle = (int)FontStyle.Italic; - int emSize = 56; - RectangleF bound = new RectangleF (10f, 120.1f, 335.13f, 50.99f); - StringFormat format = StringFormat.GenericDefault; - - path.AddString (stringText, family, fontStyle, emSize, bound, format); - - Assert.AreEqual (657, path.PointCount); - - t.Graphics.DrawPath (p, path); - t.Show (); - //t.AssertCompare (); - } - - [Test] - public void ClearMarkers() - { - path = new GraphicsPath (); - path.AddEllipse (0, 0, 100, 200); - path.SetMarkers (); - path.AddLine (new Point (100, 100), new Point (200, 100)); - Rectangle rect = new Rectangle (200, 0, 100, 200); - path.AddRectangle (rect); - path.SetMarkers (); - path.AddLine (new Point (250, 200), new Point (250, 300)); - path.SetMarkers (); - - path.ClearMarkers(); - - GraphicsPathIterator pathIterator = new GraphicsPathIterator(path); - pathIterator.Rewind (); - int [] pointsNumber = new int [] {21, 0, 0, 0}; - for (int i=0; i < 4; i ++) { - Assert.AreEqual (pointsNumber [i], pathIterator.NextMarker (path)); - } - //t.AssertCompare (); - } - - [Test] - public void Clone() - { - path = new GraphicsPath (); - path.AddEllipse (0, 0, 100, 200); - path.SetMarkers (); - path.AddLine (new Point (100, 100), new Point (200, 100)); - Rectangle rect = new Rectangle (200, 0, 100, 200); - path.AddRectangle (rect); - path.SetMarkers (); - path.AddLine (new Point (250, 200), new Point (250, 300)); - path.SetMarkers (); - - GraphicsPath cloned = (GraphicsPath) path.Clone (); - - Assert.AreEqual (path.PointCount, cloned.PointCount); - - for ( int i = 0; i < path.PointCount; i++) { - DrawingTest.AssertAlmostEqual(path.PathPoints [i], cloned.PathPoints [i]); - Assert.AreEqual (path.PathTypes [i], cloned.PathTypes [i]); - } - - GraphicsPathIterator pathIterator = new GraphicsPathIterator(path); - pathIterator.Rewind (); - - GraphicsPathIterator clonedIterator = new GraphicsPathIterator(cloned); - clonedIterator.Rewind (); - - for (int i=0; i < 4; i ++) { - Assert.AreEqual (pathIterator.NextMarker (path), clonedIterator.NextMarker (cloned)); - } - //t.AssertCompare (); - } - - [Test] - public void CloseAllFigures() - { - path = new GraphicsPath (); - path.AddLine (new Point (100, 100), new Point (400, 100)); - path.AddLine (new Point (400, 200), new Point (10, 100)); - - path.StartFigure(); - path.AddBezier( 10, 10, 50, 250, 100, 5, 200, 280); - path.StartFigure(); - path.AddRectangle (new Rectangle (10, 20, 300, 400)); - - path.StartFigure(); - path.AddLine (new Point (400, 400), new Point (400, 10)); - - Assert.AreEqual (14, path.PointCount); - - PointF [] expectedPoints = new PointF [] { new PointF(100f, 100f), - new PointF(400f, 100f), - new PointF(400f, 200f), - new PointF(10f, 100f), - new PointF(10f, 10f), - new PointF(50f, 250f), - new PointF(100f, 5f), - new PointF(200f, 280f), - new PointF(10f, 20f), - new PointF(310f, 20f), - new PointF(310f, 420f), - new PointF(10f, 420f), - new PointF(400f, 400f), - new PointF(400f, 10f)}; - - for(int i = 0; i < path.PointCount; i++) { - DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]); - } - - byte [] expectedTypes = new byte [] { (byte) PathPointType.Start, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Start, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Start, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) (PathPointType.Line | PathPointType.CloseSubpath), - (byte) PathPointType.Start, - (byte) PathPointType.Line}; - - for (int i=0; i < expectedTypes.Length; i++) { - Assert.AreEqual (expectedTypes [i], path.PathTypes [i]); - } - - path.CloseAllFigures(); - - Assert.AreEqual (14, path.PointCount); - - expectedPoints = new PointF [] { new PointF(100f, 100f), - new PointF(400f, 100f), - new PointF(400f, 200f), - new PointF(10f, 100f), - new PointF(10f, 10f), - new PointF(50f, 250f), - new PointF(100f, 5f), - new PointF(200f, 280f), - new PointF(10f, 20f), - new PointF(310f, 20f), - new PointF(310f, 420f), - new PointF(10f, 420f), - new PointF(400f, 400f), - new PointF(400f, 10f)}; - - for(int i = 0; i < path.PointCount; i++) { - DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]); - } - - expectedTypes = new byte [] { (byte) PathPointType.Start, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) (PathPointType.Line | PathPointType.CloseSubpath), - (byte) PathPointType.Start, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) (PathPointType.Bezier3 | PathPointType.CloseSubpath), - (byte) PathPointType.Start, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) (PathPointType.Line | PathPointType.CloseSubpath), - (byte) PathPointType.Start, - (byte) (PathPointType.Line | PathPointType.CloseSubpath)}; - - for (int i=0; i < expectedTypes.Length; i++) { - Assert.AreEqual (expectedTypes [i], path.PathTypes [i]); - } - - t.Graphics.DrawPath (p, path); - t.Show (); - //t.AssertCompare (); - } - - [Test] - public void CloseFigure() - { - path = new GraphicsPath (); - path.AddLine (new Point (100, 100), new Point (400, 100)); - path.AddLine (new Point (400, 200), new Point (10, 100)); - - path.StartFigure(); - path.AddBezier( 10, 10, 50, 250, 100, 5, 200, 280); - path.StartFigure(); - path.AddRectangle (new Rectangle (10, 20, 300, 400)); - - path.StartFigure(); - path.AddLine (new Point (400, 400), new Point (400, 10)); - - Assert.AreEqual (14, path.PointCount); - - PointF [] expectedPoints = new PointF [] { new PointF(100f, 100f), - new PointF(400f, 100f), - new PointF(400f, 200f), - new PointF(10f, 100f), - new PointF(10f, 10f), - new PointF(50f, 250f), - new PointF(100f, 5f), - new PointF(200f, 280f), - new PointF(10f, 20f), - new PointF(310f, 20f), - new PointF(310f, 420f), - new PointF(10f, 420f), - new PointF(400f, 400f), - new PointF(400f, 10f)}; - - for(int i = 0; i < path.PointCount; i++) { - DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]); - } - - byte [] expectedTypes = new byte [] { (byte) PathPointType.Start, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Start, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Start, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) (PathPointType.Line | PathPointType.CloseSubpath), - (byte) PathPointType.Start, - (byte) PathPointType.Line}; - - for (int i=0; i < expectedTypes.Length; i++) { - Assert.AreEqual (expectedTypes [i], path.PathTypes [i]); - } - - path.CloseFigure(); - - Assert.AreEqual (14, path.PointCount); - - expectedPoints = new PointF [] { new PointF(100f, 100f), - new PointF(400f, 100f), - new PointF(400f, 200f), - new PointF(10f, 100f), - new PointF(10f, 10f), - new PointF(50f, 250f), - new PointF(100f, 5f), - new PointF(200f, 280f), - new PointF(10f, 20f), - new PointF(310f, 20f), - new PointF(310f, 420f), - new PointF(10f, 420f), - new PointF(400f, 400f), - new PointF(400f, 10f)}; - - for(int i = 0; i < path.PointCount; i++) { - DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]); - } - - expectedTypes = new byte [] { (byte) PathPointType.Start, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Start, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Start, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) (PathPointType.Line | PathPointType.CloseSubpath), - (byte) PathPointType.Start, - (byte) (PathPointType.Line | PathPointType.CloseSubpath)}; - - for (int i=0; i < expectedTypes.Length; i++) { - Assert.AreEqual (expectedTypes [i], path.PathTypes [i]); - } - - t.Graphics.DrawPath (p, path); - t.Show (); - //t.AssertCompare (); - } - - [Test] -#if TARGET_JVM - [Category ("NotWorking")] -#endif - public void Flatten() - { - path = new GraphicsPath (); - path.AddBezier( new Point (10, 10), - new Point (50, 250), - new Point (100, 5), - new Point (200, 280)); - - path.AddBezier( new Point (0, 210), - new Point (50, 6), - new Point (150, 150), - new Point (250, 10)); - - Assert.AreEqual (8, path.PointCount); - - path.Flatten(); - - Assert.AreEqual (87, path.PointCount); - - PointF [] expectedPoints = new PointF [] { new PointF(10f, 10f), - new PointF(11.875f, 20.875f), - new PointF(13.75f, 31.125f), - new PointF(15.6875f, 40.6875f), - new PointF(17.625f, 49.5625f), - new PointF(19.5625f, 57.875f), - new PointF(21.5625f, 65.5625f), - new PointF(23.5625f, 72.6875f), - new PointF(25.5625f, 79.25f), - new PointF(27.5625f, 85.25f), - new PointF(29.625f, 90.8125f), - new PointF(31.6875f, 95.875f), - new PointF(33.8125f, 100.5f), - new PointF(35.9375f, 104.625f), - new PointF(38.125f, 108.375f), - new PointF(40.3125f, 111.75f), - new PointF(42.5f, 114.75f), - new PointF(47f, 119.75f), - new PointF(51.625f, 123.5625f), - new PointF(56.4375f, 126.375f), - new PointF(61.3125f, 128.375f), - new PointF(66.375f, 129.75f), - new PointF(71.5625f, 130.6875f), - new PointF(82.5f, 131.875f), - new PointF(88.1875f, 132.5625f), - new PointF(94.125f, 133.5f), - new PointF(100.1875f, 134.9375f), - new PointF(106.5f, 137f), - new PointF(113f, 139.9375f), - new PointF(119.6875f, 143.875f), - new PointF(126.625f, 149f), - new PointF(130.125f, 152.0625f), - new PointF(133.75f, 155.5625f), - new PointF(137.4375f, 159.375f), - new PointF(141.125f, 163.6875f), - new PointF(144.9375f, 168.375f), - new PointF(148.75f, 173.5625f), - new PointF(152.6875f, 179.1875f), - new PointF(156.625f, 185.375f), - new PointF(160.6875f, 192.0625f), - new PointF(164.75f, 199.3125f), - new PointF(168.9375f, 207.125f), - new PointF(173.1875f, 215.5625f), - new PointF(177.4375f, 224.5625f), - new PointF(181.8125f, 234.3125f), - new PointF(186.25f, 244.625f), - new PointF(190.75f, 255.6875f), - new PointF(195.375f, 267.5f), - new PointF(200f, 280f), - new PointF(0f, 210f), - new PointF(2.375f, 200.6875f), - new PointF(4.8125f, 191.875f), - new PointF(7.375f, 183.5625f), - new PointF(9.9375f, 175.6875f), - new PointF(12.625f, 168.25f), - new PointF(15.3125f, 161.25f), - new PointF(18.125f, 154.75f), - new PointF(21f, 148.5625f), - new PointF(23.9375f, 142.8125f), - new PointF(26.9375f, 137.4375f), - new PointF(33.0625f, 127.8125f), - new PointF(39.4375f, 119.4375f), - new PointF(46.125f, 112.375f), - new PointF(52.9375f, 106.375f), - new PointF(60f, 101.4375f), - new PointF(67.25f, 97.3125f), - new PointF(74.6875f, 94f), - new PointF(82.3125f, 91.3125f), - new PointF(90.125f, 89.125f), - new PointF(98.125f, 87.4375f), - new PointF(106.25f, 86f), - new PointF(122.9375f, 83.625f), - new PointF(140.125f, 81f), - new PointF(148.9375f, 79.375f), - new PointF(157.75f, 77.3125f), - new PointF(166.75f, 74.8125f), - new PointF(175.8125f, 71.625f), - new PointF(184.875f, 67.75f), - new PointF(194.0625f, 62.9375f), - new PointF(203.3125f, 57.25f), - new PointF(212.625f, 50.4375f), - new PointF(221.9375f, 42.375f), - new PointF(231.25f, 33.0625f), - new PointF(235.9375f, 27.875f), - new PointF(240.625f, 22.3125f), - new PointF(245.3125f, 16.375f), - new PointF(250f, 10f)}; - - for(int i = 0; i < path.PointCount; i++) { - DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]); - } - - byte [] expectedTypes = new byte [] { (byte) PathPointType.Start, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line}; - - for (int i=0; i < expectedTypes.Length; i++) { - Assert.AreEqual (expectedTypes [i], path.PathTypes [i]); - } - - t.Graphics.DrawPath (p, path); - t.Show (); - //t.AssertCompare (); - } - - [Test] -#if TARGET_JVM - [Category ("NotWorking")] -#endif - public void Flatten_Matrix() - { - path = new GraphicsPath (); - path.AddBezier( new Point (10, 10), - new Point (50, 250), - new Point (100, 5), - new Point (200, 280)); - - path.AddBezier( new Point (0, 210), - new Point (50, 6), - new Point (150, 150), - new Point (250, 10)); - - Assert.AreEqual (8, path.PointCount); - - Matrix matrix = new Matrix(); - matrix.Scale(2f,3f); - path.Flatten(matrix); - - Assert.AreEqual (141, path.PointCount); - - PointF [] expectedPoints = new PointF [] { new PointF(20f, 30f), - new PointF(21.875f, 46.625f), - new PointF(23.75f, 62.6875f), - new PointF(25.6875f, 78.25f), - new PointF(27.5625f, 93.3125f), - new PointF(29.5f, 107.875f), - new PointF(31.375f, 122f), - new PointF(33.3125f, 135.5625f), - new PointF(35.25f, 148.6875f), - new PointF(37.1875f, 161.3125f), - new PointF(39.125f, 173.5625f), - new PointF(41.125f, 185.3125f), - new PointF(43.0625f, 196.625f), - new PointF(45.0625f, 207.5f), - new PointF(47.0625f, 218f), - new PointF(49.0625f, 228f), - new PointF(51.125f, 237.6875f), - new PointF(53.125f, 246.9375f), - new PointF(55.1875f, 255.8125f), - new PointF(57.1875f, 264.3125f), - new PointF(59.25f, 272.4375f), - new PointF(63.4375f, 287.625f), - new PointF(67.625f, 301.375f), - new PointF(71.875f, 313.875f), - new PointF(76.1875f, 325.1875f), - new PointF(80.5625f, 335.25f), - new PointF(85f, 344.25f), - new PointF(89.5f, 352.25f), - new PointF(94f, 359.25f), - new PointF(98.625f, 365.375f), - new PointF(103.3125f, 370.6875f), - new PointF(108.0625f, 375.25f), - new PointF(112.8125f, 379.125f), - new PointF(117.6875f, 382.375f), - new PointF(122.6875f, 385.0625f), - new PointF(127.6875f, 387.3125f), - new PointF(132.75f, 389.125f), - new PointF(143.1875f, 391.875f), - new PointF(153.9375f, 393.75f), - new PointF(165f, 395.4375f), - new PointF(176.4375f, 397.375f), - new PointF(188.25f, 400.1875f), - new PointF(194.25f, 402.125f), - new PointF(200.375f, 404.4375f), - new PointF(206.625f, 407.25f), - new PointF(213f, 410.625f), - new PointF(219.4375f, 414.5625f), - new PointF(225.9375f, 419.3125f), - new PointF(232.625f, 424.75f), - new PointF(239.375f, 431.0625f), - new PointF(246.25f, 438.25f), - new PointF(253.1875f, 446.375f), - new PointF(260.3125f, 455.625f), - new PointF(267.5f, 465.9375f), - new PointF(274.8125f, 477.4375f), - new PointF(282.25f, 490.1875f), - new PointF(289.8125f, 504.25f), - new PointF(297.5f, 519.6875f), - new PointF(301.4375f, 527.9375f), - new PointF(305.3125f, 536.625f), - new PointF(309.3125f, 545.625f), - new PointF(313.25f, 555.0625f), - new PointF(317.3125f, 564.8125f), - new PointF(321.3125f, 575.0625f), - new PointF(325.4375f, 585.6875f), - new PointF(329.5625f, 596.75f), - new PointF(333.6875f, 608.25f), - new PointF(337.875f, 620.1875f), - new PointF(342.0625f, 632.5625f), - new PointF(346.3125f, 645.375f), - new PointF(350.625f, 658.6875f), - new PointF(354.9375f, 672.4375f), - new PointF(359.25f, 686.75f), - new PointF(363.625f, 701.5f), - new PointF(368.0625f, 716.75f), - new PointF(372.5f, 732.5f), - new PointF(377f, 748.8125f), - new PointF(381.5625f, 765.625f), - new PointF(386.125f, 782.9375f), - new PointF(390.6875f, 800.875f), - new PointF(395.3125f, 819.3125f), - new PointF(400f, 838.3125f), - new PointF(0f, 630f), - new PointF(2.375f, 615.875f), - new PointF(4.75f, 602.0625f), - new PointF(9.6875f, 575.625f), - new PointF(14.6875f, 550.625f), - new PointF(19.875f, 527f), - new PointF(25.25f, 504.75f), - new PointF(30.6875f, 483.8125f), - new PointF(36.25f, 464.1875f), - new PointF(42f, 445.75f), - new PointF(47.8125f, 428.5f), - new PointF(53.8125f, 412.375f), - new PointF(59.9375f, 397.3125f), - new PointF(66.125f, 383.375f), - new PointF(72.4375f, 370.375f), - new PointF(78.9375f, 358.375f), - new PointF(85.5f, 347.3125f), - new PointF(92.1875f, 337.125f), - new PointF(98.9375f, 327.75f), - new PointF(105.875f, 319.1875f), - new PointF(112.875f, 311.375f), - new PointF(119.9375f, 304.25f), - new PointF(127.1875f, 297.8125f), - new PointF(134.4375f, 291.9375f), - new PointF(141.875f, 286.6875f), - new PointF(149.3125f, 281.9375f), - new PointF(156.9375f, 277.6875f), - new PointF(164.5625f, 273.875f), - new PointF(172.375f, 270.5f), - new PointF(180.1875f, 267.4375f), - new PointF(196.125f, 262.25f), - new PointF(212.3125f, 258f), - new PointF(228.875f, 254.3125f), - new PointF(245.625f, 250.8125f), - new PointF(262.6875f, 247.125f), - new PointF(279.9375f, 243.0625f), - new PointF(297.4375f, 238.125f), - new PointF(306.25f, 235.25f), - new PointF(315.125f, 232f), - new PointF(324f, 228.375f), - new PointF(333f, 224.375f), - new PointF(342f, 219.875f), - new PointF(351f, 214.875f), - new PointF(360.0625f, 209.3125f), - new PointF(369.1875f, 203.1875f), - new PointF(378.3125f, 196.375f), - new PointF(387.4375f, 188.875f), - new PointF(396.625f, 180.6875f), - new PointF(405.8125f, 171.6875f), - new PointF(415.0625f, 161.9375f), - new PointF(424.3125f, 151.25f), - new PointF(433.5625f, 139.6875f), - new PointF(442.8125f, 127.25f), - new PointF(452.125f, 113.75f), - new PointF(461.4375f, 99.25f), - new PointF(470.75f, 83.625f), - new PointF(480.0625f, 66.9375f), - new PointF(489.375f, 49.0625f), - new PointF(498.6875f, 30f)}; - - for(int i = 0; i < path.PointCount; i++) { - DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]); - } - - byte [] expectedTypes = new byte [] { (byte) PathPointType.Start, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line}; - - for (int i=0; i < expectedTypes.Length; i++) { - Assert.AreEqual (expectedTypes [i], path.PathTypes [i]); - } - - t.Graphics.DrawPath (p, path); - t.Show (); - //t.AssertCompare (); - } - - [Test] -#if TARGET_JVM - [Category ("NotWorking")] -#endif - public void Flatten_Matrix_Float() - { - path = new GraphicsPath (); - path.AddBezier( new Point (10, 10), - new Point (50, 250), - new Point (100, 5), - new Point (200, 280)); - - Assert.AreEqual (4, path.PointCount); - - Matrix matrix = new Matrix(); - matrix.Scale(2f,3f); - path.Flatten(matrix, 0.1f); - - Assert.AreEqual (78, path.PointCount); - - PointF [] expectedPoints = new PointF [] { new PointF(20f, 30f), - new PointF(21.875f, 46.6f), - new PointF(23.775f, 62.7f), - new PointF(25.65f, 78.27499f), - new PointF(27.55f, 93.325f), - new PointF(29.475f, 107.9f), - new PointF(31.4f, 121.975f), - new PointF(33.325f, 135.575f), - new PointF(35.25f, 148.675f), - new PointF(37.2f, 161.35f), - new PointF(39.15f, 173.55f), - new PointF(41.125f, 185.3f), - new PointF(43.1f, 196.625f), - new PointF(45.075f, 207.5f), - new PointF(47.075f, 217.975f), - new PointF(49.075f, 228.025f), - new PointF(51.1f, 237.675f), - new PointF(55.15f, 255.825f), - new PointF(59.275f, 272.425f), - new PointF(63.425f, 287.6f), - new PointF(67.625f, 301.425f), - new PointF(71.89999f, 313.925f), - new PointF(76.2f, 325.2f), - new PointF(80.575f, 335.3f), - new PointF(85f, 344.3f), - new PointF(89.475f, 352.275f), - new PointF(94.02499f, 359.3f), - new PointF(98.625f, 365.425f), - new PointF(103.3f, 370.75f), - new PointF(108.025f, 375.3f), - new PointF(112.85f, 379.175f), - new PointF(117.7f, 382.45f), - new PointF(122.65f, 385.175f), - new PointF(127.675f, 387.4f), - new PointF(132.775f, 389.25f), - new PointF(143.175f, 392f), - new PointF(153.925f, 393.925f), - new PointF(165f, 395.625f), - new PointF(176.425f, 397.625f), - new PointF(188.225f, 400.5f), - new PointF(194.25f, 402.425f), - new PointF(200.4f, 404.775f), - new PointF(206.625f, 407.6f), - new PointF(212.975f, 411f), - new PointF(219.4f, 415.025f), - new PointF(225.95f, 419.75f), - new PointF(232.6f, 425.25f), - new PointF(239.35f, 431.575f), - new PointF(246.225f, 438.825f), - new PointF(253.2f, 447.025f), - new PointF(260.3f, 456.275f), - new PointF(267.5f, 466.65f), - new PointF(274.825f, 478.175f), - new PointF(282.275f, 490.975f), - new PointF(289.825f, 505.1f), - new PointF(297.525f, 520.6f), - new PointF(305.325f, 537.55f), - new PointF(313.275f, 556.05f), - new PointF(317.275f, 565.875f), - new PointF(321.325f, 576.125f), - new PointF(325.425f, 586.775f), - new PointF(329.525f, 597.85f), - new PointF(333.675f, 609.375f), - new PointF(337.85f, 621.35f), - new PointF(342.075f, 633.75f), - new PointF(346.325f, 646.625f), - new PointF(350.6f, 659.95f), - new PointF(354.925f, 673.775f), - new PointF(359.275f, 688.075f), - new PointF(363.65f, 702.85f), - new PointF(368.075f, 718.15f), - new PointF(372.525f, 733.95f), - new PointF(377.025f, 750.275f), - new PointF(381.55f, 767.125f), - new PointF(386.1f, 784.525f), - new PointF(390.7f, 802.45f), - new PointF(395.325f, 820.95f), - new PointF(400f, 840f)}; - - for(int i = 0; i < path.PointCount; i++) { - DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]); - } - - byte [] expectedTypes = new byte [] { (byte) PathPointType.Start, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line}; - - for (int i=0; i < expectedTypes.Length; i++) { - Assert.AreEqual (expectedTypes [i], path.PathTypes [i]); - } - - t.Graphics.DrawPath (p, path); - t.Show (); - //t.AssertCompare (); - } - - [Test] - public void GetBounds() - { - path = new GraphicsPath (); - path.AddLine (new Point (100, 100), new Point (400, 100)); - path.AddLine (new Point (400, 200), new Point (10, 100)); - - path.StartFigure (); - path.AddBezier( 10, 10, 50, 250, 100, 5, 200, 280); - path.StartFigure (); - path.AddRectangle (new Rectangle (10, 20, 300, 400)); - - path.StartFigure (); - path.AddLine (new Point (400, 400), new Point (400, 10)); - - RectangleF actual = path.GetBounds (); - RectangleF expected = new RectangleF (10f, 5f, 390f, 415f); - - DrawingTest.AssertAlmostEqual(expected.X, actual.X); - DrawingTest.AssertAlmostEqual(expected.Y, actual.Y); - DrawingTest.AssertAlmostEqual(expected.Width, actual.Width); - DrawingTest.AssertAlmostEqual(expected.Height, actual.Height); - - //t.AssertCompare (); - } - - [Test] - public void GetBounds_Matrix() - { - path = new GraphicsPath (); - path.AddLine (new Point (100, 100), new Point (400, 100)); - path.AddLine (new Point (400, 200), new Point (10, 100)); - - path.StartFigure (); - path.AddBezier( 10, 10, 50, 250, 100, 5, 200, 280); - path.StartFigure (); - path.AddRectangle (new Rectangle (10, 20, 300, 400)); - - path.StartFigure (); - path.AddLine (new Point (400, 400), new Point (400, 10)); - - Matrix matrix = new Matrix (); - matrix.Scale (1.2f,1.3f); - matrix.Shear (1.5f, 1.9f); - - RectangleF actual = path.GetBounds (matrix); - RectangleF expected = new RectangleF (21f, 31.2f, 1215f, 1502.8f); - - DrawingTest.AssertAlmostEqual(expected.X, actual.X); - DrawingTest.AssertAlmostEqual(expected.Y, actual.Y); - DrawingTest.AssertAlmostEqual(expected.Width, actual.Width); - DrawingTest.AssertAlmostEqual(expected.Height, actual.Height); - - //t.AssertCompare (); - } - - [Test] - public void GetBounds_Matrix_Pen() - { - path = new GraphicsPath (); - path.AddLine (new Point (100, 100), new Point (400, 100)); - path.AddLine (new Point (400, 200), new Point (10, 100)); - - path.StartFigure (); - path.AddBezier( 10, 10, 50, 250, 100, 5, 200, 280); - path.StartFigure (); - path.AddRectangle (new Rectangle (10, 20, 300, 400)); - - path.StartFigure (); - path.AddLine (new Point (400, 400), new Point (400, 10)); - - Matrix matrix = new Matrix (); - matrix.Scale (0.2f,0.3f); - matrix.Shear (0.5f, 0.5f); - - Pen p = new Pen (Color.AliceBlue, 45); - - RectangleF actual = path.GetBounds (matrix, p); - RectangleF expected = new RectangleF (21f, 31.2f, 2758.363f, 3046.163f); - - // we do not know exacly how the bounding rectangle - // is calculated so we just want to obtain bounds - // that still contain the path widened by oen and transformed by matrix - path.Widen (p, matrix); - RectangleF widened = path.GetBounds (); - Assert.IsTrue (actual.Contains (widened)); - -// DrawingTest.AssertAlmostEqual(expected.X, actual.X); -// DrawingTest.AssertAlmostEqual(expected.Y, actual.Y); -// DrawingTest.AssertAlmostEqual(expected.Width, actual.Width); -// DrawingTest.AssertAlmostEqual(expected.Height, actual.Height); - - path = new GraphicsPath (); - path.AddLine (new Point (100, 100), new Point (400, 100)); - path.AddLine (new Point (400, 200), new Point (10, 100)); - - path.StartFigure (); - path.AddBezier( 10, 10, 50, 250, 100, 5, 200, 280); - path.StartFigure (); - path.AddRectangle (new Rectangle (10, 20, 300, 400)); - - path.StartFigure (); - path.AddLine (new Point (400, 400), new Point (400, 10)); - - p = new Pen (Color.AliceBlue, 45); - p.DashCap = DashCap.Triangle; - p.DashStyle = DashStyle.Dash; - - actual = path.GetBounds (matrix, p); - expected = new RectangleF (21f, 31.2f, 2758.363f, 3046.163f); - - // we do not know exacly how the bounding rectangle - // is calculated so we just want to obtain bounds - // that still contain the path widened by oen and transformed by matrix - path.Widen (p, matrix); - widened = path.GetBounds (); - Assert.IsTrue (actual.Contains (widened)); - -// DrawingTest.AssertAlmostEqual(expected.X, actual.X); -// DrawingTest.AssertAlmostEqual(expected.Y, actual.Y); -// DrawingTest.AssertAlmostEqual(expected.Width, actual.Width); -// DrawingTest.AssertAlmostEqual(expected.Height, actual.Height); - - //t.AssertCompare (); - } - - [Test] - public void GetLastPoint() - { - path = new GraphicsPath (); - path.AddLine (new Point (100, 100), new Point (400, 100)); - path.AddLine (new Point (400, 200), new Point (10, 100)); - - PointF expected = new PointF (10f, 100f); - PointF actual = path.GetLastPoint (); - - DrawingTest.AssertAlmostEqual(expected, actual); - - path.StartFigure (); - path.AddBezier( 10, 10, 50, 250, 100, 5, 200, 280); - path.StartFigure (); - path.AddRectangle (new Rectangle (10, 20, 300, 400)); - - expected = new PointF (10f, 420f); - actual = path.GetLastPoint (); - - DrawingTest.AssertAlmostEqual(expected, actual); - - path.StartFigure (); - path.AddLine (new Point (400, 400), new Point (400, 10)); - - expected = new PointF (400f, 10f); - actual = path.GetLastPoint (); - - DrawingTest.AssertAlmostEqual(expected, actual); - - //t.AssertCompare (); - } - - [Test] - [ExpectedException (typeof (ArgumentException))] - public void GetLastPoint2() - { - path = new GraphicsPath (); - - PointF actual = path.GetLastPoint (); - } - - [Test] - public void IsOutlineVisible_Float_Float_Pen() - { - path = new GraphicsPath (); - path.AddRectangle (new RectangleF (10f, 10f, 300f, 300f)); - - path.StartFigure(); - path.AddRectangle (new RectangleF (150f, 10f, 50f, 400f)); - - Pen pen = new Pen (Color.Red, 5); - - Assert.IsFalse (path.IsOutlineVisible (0f, 0f, pen)); - - Assert.IsFalse (path.IsOutlineVisible (40f, 40f, pen)); - - Assert.IsTrue (path.IsOutlineVisible (9f, 9f, pen)); - - Assert.IsFalse (path.IsOutlineVisible (400f, 400f, pen)); - - Assert.IsTrue (path.IsOutlineVisible (312f, 312f, pen)); - - Assert.IsFalse (path.IsOutlineVisible (313f, 313f, pen)); - - //t.AssertCompare (); - } - - - [Test] - public void IsOutlineVisible_PointF_Pen() - { - path = new GraphicsPath (); - path.AddRectangle (new RectangleF (10f, 10f, 300f, 300f)); - - path.StartFigure(); - path.AddRectangle (new RectangleF (150f, 10f, 50f, 400f)); - - Pen pen = new Pen (Color.Red, 5); - - Assert.IsFalse (path.IsOutlineVisible (new PointF (0f, 0f), pen)); - - Assert.IsFalse (path.IsOutlineVisible (new PointF (40f, 40f), pen)); - - Assert.IsTrue (path.IsOutlineVisible (new PointF (9f, 9f), pen)); - - Assert.IsFalse (path.IsOutlineVisible (new PointF (400f, 400f), pen)); - - Assert.IsTrue (path.IsOutlineVisible (new PointF (312f, 312f), pen)); - - Assert.IsFalse (path.IsOutlineVisible (new PointF (313f, 313f), pen)); - - //t.AssertCompare (); - } - - - [Test] - public void IsOutlineVisible_Float_Float_Pen_Graphics() - { - path = new GraphicsPath (); - path.AddRectangle (new RectangleF (10f, 10f, 300f, 300f)); - - path.StartFigure(); - path.AddRectangle (new RectangleF (150f, 10f, 50f, 400f)); - - Pen pen = new Pen (Color.Red, 5); - Graphics gr = Graphics.FromImage (new Bitmap (512, 512)); - gr.Clip = new Region (new Rectangle ( 5, 5, 500, 50)); - - Assert.IsFalse (path.IsOutlineVisible (0f, 0f, pen, gr)); - - Assert.IsFalse (path.IsOutlineVisible (40f, 40f, pen, gr)); - - Assert.IsTrue (path.IsOutlineVisible (9f, 9f, pen, gr)); - - Assert.IsFalse (path.IsOutlineVisible (400f, 400f, pen, gr)); - - Assert.IsTrue (path.IsOutlineVisible (312f, 312f, pen, gr)); - - Assert.IsFalse (path.IsOutlineVisible (313f, 313f, pen, gr)); - - //t.AssertCompare (); - } - - - [Test] - public void IsOutlineVisible_PointF_Pen_Graphics() - { - path = new GraphicsPath (); - path.AddRectangle (new RectangleF (10f, 10f, 300f, 300f)); - - path.StartFigure(); - path.AddRectangle (new RectangleF (150f, 10f, 50f, 400f)); - - Pen pen = new Pen (Color.Red, 5); - Graphics gr = Graphics.FromImage (new Bitmap (512, 512)); - gr.Clip = new Region (new Rectangle ( 5, 5, 500, 50)); - - Assert.IsFalse (path.IsOutlineVisible (new PointF (0f, 0f), pen, gr)); - - Assert.IsFalse (path.IsOutlineVisible (new PointF (40f, 40f), pen, gr)); - - Assert.IsTrue (path.IsOutlineVisible (new PointF (9f, 9f), pen, gr)); - - Assert.IsFalse (path.IsOutlineVisible (new PointF (400f, 400f), pen, gr)); - - Assert.IsTrue (path.IsOutlineVisible (new PointF (312f, 312f), pen, gr)); - - Assert.IsFalse (path.IsOutlineVisible (new PointF (313f, 313f), pen, gr)); - - //t.AssertCompare (); - } - - - [Test] - public void IsOutlineVisible_Int_Int_Pen() - { - path = new GraphicsPath (); - path.AddRectangle (new RectangleF (10f, 10f, 300f, 300f)); - - path.StartFigure(); - path.AddRectangle (new RectangleF (150f, 10f, 50f, 400f)); - - Pen pen = new Pen (Color.Red, 5); - - Assert.IsFalse (path.IsOutlineVisible (0, 0, pen)); - - Assert.IsFalse (path.IsOutlineVisible (40, 40, pen)); - - Assert.IsTrue (path.IsOutlineVisible (9, 9, pen)); - - Assert.IsFalse (path.IsOutlineVisible (400, 400, pen)); - - Assert.IsTrue (path.IsOutlineVisible (312, 312, pen)); - - Assert.IsFalse (path.IsOutlineVisible (313, 313, pen)); - - //t.AssertCompare (); - } - - - [Test] - public void IsOutlineVisible_Point_Pen() - { - path = new GraphicsPath (); - path.AddRectangle (new RectangleF (10f, 10f, 300f, 300f)); - - path.StartFigure(); - path.AddRectangle (new RectangleF (150f, 10f, 50f, 400f)); - - Pen pen = new Pen (Color.Red, 5); - - Assert.IsFalse (path.IsOutlineVisible (new Point (0, 0), pen)); - - Assert.IsFalse (path.IsOutlineVisible (new Point (40, 40), pen)); - - Assert.IsTrue (path.IsOutlineVisible (new Point (9, 9), pen)); - - Assert.IsFalse (path.IsOutlineVisible (new Point (400, 400), pen)); - - Assert.IsTrue (path.IsOutlineVisible (new Point (312, 312), pen)); - - Assert.IsFalse (path.IsOutlineVisible (new Point (313, 313), pen)); - - //t.AssertCompare (); - } - - - [Test] - public void IsOutlineVisible_Int_Int_Pen_Graphics() - { - path = new GraphicsPath (); - path.AddRectangle (new RectangleF (10f, 10f, 300f, 300f)); - - path.StartFigure(); - path.AddRectangle (new RectangleF (150f, 10f, 50f, 400f)); - - Pen pen = new Pen (Color.Red, 5); - Graphics gr = Graphics.FromImage (new Bitmap (512, 512)); - gr.Clip = new Region (new Rectangle ( 5, 5, 500, 50)); - - Assert.IsFalse (path.IsOutlineVisible (0, 0, pen, gr)); - - Assert.IsFalse (path.IsOutlineVisible (40, 40, pen, gr)); - - Assert.IsTrue (path.IsOutlineVisible (9, 9, pen, gr)); - - Assert.IsFalse (path.IsOutlineVisible (400, 400, pen, gr)); - - Assert.IsTrue (path.IsOutlineVisible (312, 312, pen, gr)); - - Assert.IsFalse (path.IsOutlineVisible (313, 313, pen, gr)); - - //t.AssertCompare (); - } - - - [Test] - public void IsOutlineVisible_Point_Pen_Graphics() - { - path = new GraphicsPath (); - path.AddRectangle (new RectangleF (10f, 10f, 300f, 300f)); - - path.StartFigure(); - path.AddRectangle (new RectangleF (150f, 10f, 50f, 400f)); - - Pen pen = new Pen (Color.Red, 5); - Graphics gr = Graphics.FromImage (new Bitmap (512, 512)); - gr.Clip = new Region (new Rectangle ( 5, 5, 500, 50)); - - Assert.IsFalse (path.IsOutlineVisible (new Point (0, 0), pen, gr)); - - Assert.IsFalse (path.IsOutlineVisible (new Point (40, 40), pen, gr)); - - Assert.IsTrue (path.IsOutlineVisible (new Point (9, 9), pen, gr)); - - Assert.IsFalse (path.IsOutlineVisible (new Point (400, 400), pen, gr)); - - Assert.IsTrue (path.IsOutlineVisible (new Point (312, 312), pen, gr)); - - Assert.IsFalse (path.IsOutlineVisible (new Point (313, 313), pen, gr)); - - Assert.IsTrue (path.IsOutlineVisible (new Point (310, 10), pen, gr)); - Assert.IsTrue (path.IsOutlineVisible (new Point (310, 10), pen, null)); - - Assert.IsTrue (path.IsOutlineVisible (new Point (310, 210), pen, gr)); - Assert.IsTrue (path.IsOutlineVisible (new Point (310, 210), pen, null)); - - //t.AssertCompare (); - } - - [Test] - public void IsVisible_Float_Float() - { - path = new GraphicsPath (); - path.AddLine (10, 10, 400, 10); - path.AddLine (400, 10, 10, 400); - path.AddLine (10, 400, 400, 400); - path.CloseFigure(); - - Assert.IsFalse (path.IsVisible (9f, 9f)); - - Assert.IsTrue (path.IsVisible (10f, 10f)); - - Assert.IsFalse (path.IsVisible (400f, 400f)); - - Assert.IsTrue (path.IsVisible (397f, 399f)); - - Assert.IsFalse (path.IsVisible (399f, 397f)); - - Assert.IsTrue (path.IsVisible (190f, 190f)); - - Assert.IsFalse (path.IsVisible (50f, 190f)); - - Assert.IsTrue (path.IsVisible (190f, 50f)); - - //t.AssertCompare (); - } - - - [Test] - public void IsVisible_PointF() - { - path = new GraphicsPath (); - path.AddLine (10, 10, 400, 10); - path.AddLine (400, 10, 10, 400); - path.AddLine (10, 400, 400, 400); - path.CloseFigure(); - - Assert.IsFalse (path.IsVisible (new PointF (9f, 9f))); - - Assert.IsTrue (path.IsVisible (new PointF (10f, 10f))); - - Assert.IsFalse (path.IsVisible (new PointF (400f, 400f))); - - Assert.IsTrue (path.IsVisible (new PointF (397f, 399f))); - - Assert.IsFalse (path.IsVisible (new PointF (399f, 397f))); - - Assert.IsTrue (path.IsVisible (new PointF (190f, 190f))); - - Assert.IsFalse (path.IsVisible (new PointF (50f, 190f))); - - Assert.IsTrue (path.IsVisible (new PointF (190f, 50f))); - - //t.AssertCompare (); - } - - - [Test] - public void IsVisible_Float_Float_Graphics() - { - path = new GraphicsPath (); - path.AddLine (10, 10, 400, 10); - path.AddLine (400, 10, 10, 400); - path.AddLine (10, 400, 400, 400); - path.CloseFigure(); - - Graphics gr = Graphics.FromImage (new Bitmap (500, 100)); - gr.Clip = new Region (new Rectangle(0, 0, 50, 50)); - - Assert.IsFalse (path.IsVisible (9f, 9f, gr)); - - Assert.IsTrue (path.IsVisible (10f, 10f, gr)); - - Assert.IsFalse (path.IsVisible (400f, 400f, gr)); - - Assert.IsTrue (path.IsVisible (397f, 399f, gr)); - - Assert.IsFalse (path.IsVisible (399f, 397f, gr)); - - Assert.IsTrue (path.IsVisible (190f, 190f, gr)); - - Assert.IsFalse (path.IsVisible (50f, 190f, gr)); - - Assert.IsTrue (path.IsVisible (190f, 50f, gr)); - - //t.AssertCompare (); - } - - - [Test] - public void IsVisible_PointF_Graphics() - { - path = new GraphicsPath (); - path.AddLine (10, 10, 400, 10); - path.AddLine (400, 10, 10, 400); - path.AddLine (10, 400, 400, 400); - path.CloseFigure(); - - Graphics gr = Graphics.FromImage (new Bitmap (500, 100)); - gr.Clip = new Region (new Rectangle(0, 0, 50, 50)); - - Assert.IsFalse (path.IsVisible (new PointF (9f, 9f), gr)); - - Assert.IsTrue (path.IsVisible (new PointF (10f, 10f), gr)); - - Assert.IsFalse (path.IsVisible (new PointF (400f, 400f), gr)); - - Assert.IsTrue (path.IsVisible (new PointF (397f, 399f), gr)); - - Assert.IsFalse (path.IsVisible (new PointF (399f, 397f), gr)); - - Assert.IsTrue (path.IsVisible (new PointF (190f, 190f), gr)); - - Assert.IsFalse (path.IsVisible (new PointF (50f, 190f), gr)); - - Assert.IsTrue (path.IsVisible (new PointF (190f, 50f), gr)); - - //t.AssertCompare (); - } - - - [Test] - public void IsVisible_Int_Int() - { - path = new GraphicsPath (); - path.AddLine (10, 10, 400, 10); - path.AddLine (400, 10, 10, 400); - path.AddLine (10, 400, 400, 400); - path.CloseFigure(); - - Assert.IsFalse (path.IsVisible (9, 9)); - - Assert.IsTrue (path.IsVisible (10, 10)); - - Assert.IsFalse (path.IsVisible (400, 400)); - - Assert.IsTrue (path.IsVisible (397, 399)); - - Assert.IsFalse (path.IsVisible (399, 397)); - - Assert.IsTrue (path.IsVisible (190, 190)); - - Assert.IsFalse (path.IsVisible (50, 190)); - - Assert.IsTrue (path.IsVisible (190, 50)); - - //t.AssertCompare (); - } - - - [Test] - public void IsVisible_Point() - { - path = new GraphicsPath (); - path.AddLine (10, 10, 400, 10); - path.AddLine (400, 10, 10, 400); - path.AddLine (10, 400, 400, 400); - path.CloseFigure(); - - Assert.IsFalse (path.IsVisible (new Point (9, 9))); - - Assert.IsTrue (path.IsVisible (new Point (10, 10))); - - Assert.IsFalse (path.IsVisible (new Point (400, 400))); - - Assert.IsTrue (path.IsVisible (new Point (397, 399))); - - Assert.IsFalse (path.IsVisible (new Point (399, 397))); - - Assert.IsTrue (path.IsVisible (new Point (190, 190))); - - Assert.IsFalse (path.IsVisible (new Point (50, 190))); - - Assert.IsTrue (path.IsVisible (new Point (190, 50))); - - //t.AssertCompare (); - } - - - [Test] - public void IsVisible_Int_Int_Graphics() - { - path = new GraphicsPath (); - path.AddLine (10, 10, 400, 10); - path.AddLine (400, 10, 10, 400); - path.AddLine (10, 400, 400, 400); - path.CloseFigure(); - - Graphics gr = Graphics.FromImage (new Bitmap (500, 100)); - gr.Clip = new Region (new Rectangle(0, 0, 50, 50)); - - Assert.IsFalse (path.IsVisible (9, 9, gr)); - - Assert.IsTrue (path.IsVisible (10, 10, gr)); - - Assert.IsFalse (path.IsVisible (400, 400, gr)); - - Assert.IsTrue (path.IsVisible (397, 399, gr)); - - Assert.IsFalse (path.IsVisible (399, 397, gr)); - - Assert.IsTrue (path.IsVisible (190, 190, gr)); - - Assert.IsFalse (path.IsVisible (50, 190, gr)); - - Assert.IsTrue (path.IsVisible (190, 50)); - - //t.AssertCompare (); - } - - - [Test] - public void IsVisible_Point_Graphics() - { - path = new GraphicsPath (); - path.AddLine (10, 10, 400, 10); - path.AddLine (400, 10, 10, 400); - path.AddLine (10, 400, 400, 400); - path.CloseFigure(); - - Graphics gr = Graphics.FromImage (new Bitmap (500, 100)); - gr.Clip = new Region (new Rectangle(0, 0, 50, 50)); - - Assert.IsFalse (path.IsVisible (new Point (9, 9), gr)); - - Assert.IsTrue (path.IsVisible (new Point (10, 10), gr)); - - Assert.IsFalse (path.IsVisible (new Point (400, 400), gr)); - - Assert.IsTrue (path.IsVisible (new Point (397, 399), gr)); - - Assert.IsFalse (path.IsVisible (new Point (399, 397), gr)); - - Assert.IsTrue (path.IsVisible (new Point (190, 190), gr)); - - Assert.IsFalse (path.IsVisible (new Point (50, 190), gr)); - - Assert.IsTrue (path.IsVisible (new Point (190, 50), gr)); - - //t.AssertCompare (); - } - - [Test] - public void PathData () - { - path = new GraphicsPath (); - path.AddLine (new Point (100, 100), new Point (400, 100)); - path.AddLine (new Point (400, 200), new Point (10, 100)); - path.StartFigure (); - path.SetMarkers (); - path.AddBezier( 10, 10, 50, 250, 100, 5, 200, 280); - path.StartFigure (); - path.SetMarkers (); - path.AddRectangle (new Rectangle (10, 20, 300, 400)); - path.StartFigure (); - path.SetMarkers (); - path.AddLine (new Point (400, 400), new Point (400, 10)); - - PointF [] expectedPoints = new PointF [] { new PointF(100f, 100f), - new PointF(400f, 100f), - new PointF(400f, 200f), - new PointF(10f, 100f), - new PointF(10f, 10f), - new PointF(50f, 250f), - new PointF(100f, 5f), - new PointF(200f, 280f), - new PointF(10f, 20f), - new PointF(310f, 20f), - new PointF(310f, 420f), - new PointF(10f, 420f), - new PointF(400f, 400f), - new PointF(400f, 10f)}; - - for(int i = 0; i < path.PointCount; i++) { - DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]); - } - - byte [] expectedTypes = new byte [] { (byte) PathPointType.Start, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) (PathPointType.Line | PathPointType.PathMarker), - (byte) PathPointType.Start, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) (PathPointType.Bezier3 | PathPointType.PathMarker), - (byte) PathPointType.Start, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) (PathPointType.Line | PathPointType.CloseSubpath | PathPointType.PathMarker), - (byte) PathPointType.Start, - (byte) PathPointType.Line}; - - for (int i=0; i < expectedTypes.Length; i++) { - Assert.AreEqual (expectedTypes [i], path.PathTypes [i]); - } - - - path = new GraphicsPath (); - path.AddEllipse (0, 0, 100, 200); - path.SetMarkers (); - path.AddLine (new Point (100, 100), new Point (200, 100)); - Rectangle rect = new Rectangle (200, 0, 100, 200); - path.AddRectangle (rect); - path.SetMarkers (); - path.AddLine (new Point (250, 200), new Point (250, 300)); - path.SetMarkers (); - - expectedTypes = new byte [] { (byte) PathPointType.Start, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) (PathPointType.Bezier3 | PathPointType.CloseSubpath | PathPointType.PathMarker), - (byte) PathPointType.Start, - (byte) PathPointType.Line, - (byte) PathPointType.Start, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) (PathPointType.Line | PathPointType.CloseSubpath | PathPointType.PathMarker), - (byte) PathPointType.Start, - (byte) (PathPointType.Line | PathPointType.PathMarker) }; - - for (int i=0; i < expectedTypes.Length; i++) { - Assert.AreEqual (expectedTypes [i], path.PathTypes [i]); - } - } - - [Test] - public void PathData2 () - { - path = new GraphicsPath (); - path.AddLine (new Point (100, 100), new Point (400, 100)); - path.AddLine (new Point (400, 200), new Point (10, 100)); - - byte [] types = path.PathTypes; - PointF [] points = path.PathPoints; - - types [1] = 88; - points [1] = new PointF (-88, -88); - - Assert.AreEqual ( 88, types [1]); - DrawingTest.AssertAlmostEqual ( new PointF (-88,-88), points [1]); - - Assert.AreEqual ( 1, path.PathData.Types [1]); - DrawingTest.AssertAlmostEqual ( new PointF (400,100), path.PathData.Points [1]); - } - - [Test] - public void Reset() - { - path = new GraphicsPath (); - path.AddLine (new Point (100, 100), new Point (400, 100)); - path.AddLine (new Point (400, 200), new Point (10, 100)); - - path.StartFigure (); - path.AddBezier( 10, 10, 50, 250, 100, 5, 200, 280); - path.StartFigure (); - path.AddRectangle (new Rectangle (10, 20, 300, 400)); - - path.StartFigure (); - path.AddLine (new Point (400, 400), new Point (400, 10)); - - path.Reset (); - - Assert.AreEqual (0, path.PointCount); - Assert.AreEqual (FillMode.Alternate, path.FillMode); - - //t.AssertCompare (); - } - - - [Test] - public void Reverse() - { - path = new GraphicsPath (); - path.AddLine (new Point (100, 100), new Point (400, 100)); - path.SetMarkers (); - path.AddLine (new Point (400, 200), new Point (10, 100)); - - path.SetMarkers (); - path.StartFigure (); - path.AddBezier( 10, 10, 50, 250, 100, 5, 200, 280); - path.SetMarkers (); - path.StartFigure (); - path.AddRectangle (new Rectangle (10, 20, 300, 400)); - - path.StartFigure (); - path.AddLine (new Point (400, 400), new Point (400, 10)); - path.AddLine (new Point (400, 450), new Point (500, 510)); - path.SetMarkers (); - path.CloseFigure (); - - path.Reverse (); - - PointF [] expectedPoints = new PointF [] { new PointF(500f, 510f), - new PointF(400f, 450f), - new PointF(400f, 10f), - new PointF(400f, 400f), - new PointF(10f, 420f), - new PointF(310f, 420f), - new PointF(310f, 20f), - new PointF(10f, 20f), - new PointF(200f, 280f), - new PointF(100f, 5f), - new PointF(50f, 250f), - new PointF(10f, 10f), - new PointF(10f, 100f), - new PointF(400f, 200f), - new PointF(400f, 100f), - new PointF(100f, 100f)}; - - - - for(int i = 0; i < path.PointCount; i++) { - DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]); - } - - byte [] expectedTypes = new byte [] { (byte) PathPointType.Start, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) (PathPointType.Line | PathPointType.CloseSubpath), - (byte) PathPointType.Start, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) (PathPointType.Line | PathPointType.CloseSubpath | PathPointType.PathMarker), - (byte) PathPointType.Start, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) (PathPointType.Bezier3 | PathPointType.PathMarker), - (byte) PathPointType.Start, - (byte) (PathPointType.Line | PathPointType.PathMarker), - (byte) PathPointType.Line, - (byte) PathPointType.Line}; - - for (int i=0; i < expectedTypes.Length; i++) { - Assert.AreEqual (expectedTypes [i], path.PathTypes [i]); - } - - //t.AssertCompare (); - } - - [Test] - public void Reverse2() - { - path = new GraphicsPath (); - path.AddLine (new Point (100, 100), new Point (400, 100)); - path.SetMarkers (); - path.AddLine (new Point (400, 200), new Point (10, 100)); - - path.SetMarkers (); - path.StartFigure (); - path.AddBezier( 10, 10, 50, 250, 100, 5, 200, 280); - path.SetMarkers (); - path.StartFigure (); - path.AddRectangle (new Rectangle (10, 20, 300, 400)); - - path.StartFigure (); - path.AddLine (new Point (400, 400), new Point (400, 10)); - path.AddBezier( 100, 100, 500, 250, 150, 500, 250, 300); - path.SetMarkers (); - path.AddLine (new Point (400, 450), new Point (500, 510)); - path.SetMarkers (); - path.CloseFigure (); - - path.Reverse (); - - PointF [] expectedPoints = new PointF [] { new PointF(500f, 510f), - new PointF(400f, 450f), - new PointF(250f, 300f), - new PointF(150f, 500f), - new PointF(500f, 250f), - new PointF(100f, 100f), - new PointF(400f, 10f), - new PointF(400f, 400f), - new PointF(10f, 420f), - new PointF(310f, 420f), - new PointF(310f, 20f), - new PointF(10f, 20f), - new PointF(200f, 280f), - new PointF(100f, 5f), - new PointF(50f, 250f), - new PointF(10f, 10f), - new PointF(10f, 100f), - new PointF(400f, 200f), - new PointF(400f, 100f), - new PointF(100f, 100f)}; - - for(int i = 0; i < path.PointCount; i++) { - DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]); - } - - byte [] expectedTypes = new byte [] { (byte) PathPointType.Start, - (byte) (PathPointType.Line | PathPointType.PathMarker), - (byte) PathPointType.Line, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Line, - (byte) (PathPointType.Line | PathPointType.CloseSubpath), - (byte) PathPointType.Start, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) (PathPointType.Line | PathPointType.CloseSubpath | PathPointType.PathMarker), - (byte) PathPointType.Start, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) (PathPointType.Bezier3 | PathPointType.PathMarker), - (byte) PathPointType.Start, - (byte) (PathPointType.Line | PathPointType.PathMarker), - (byte) PathPointType.Line, - (byte) PathPointType.Line}; - - for (int i=0; i < expectedTypes.Length; i++) { - Assert.AreEqual (expectedTypes [i], path.PathTypes [i]); - } - - //t.AssertCompare (); - } - - [Test] - public void SetMarkers() - { - path = new GraphicsPath (); - path.AddEllipse (0, 0, 100, 200); - path.SetMarkers (); - path.AddLine (new Point (100, 100), new Point (200, 100)); - Rectangle rect = new Rectangle (200, 0, 100, 200); - path.AddRectangle (rect); - path.SetMarkers (); - path.AddLine (new Point (250, 200), new Point (250, 300)); - path.SetMarkers (); - - byte [] expectedTypes = new byte [] { (byte) PathPointType.Start, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) (PathPointType.Bezier3 | PathPointType.CloseSubpath | PathPointType.PathMarker), - (byte) PathPointType.Start, - (byte) PathPointType.Line, - (byte) PathPointType.Start, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) (PathPointType.Line | PathPointType.CloseSubpath | PathPointType.PathMarker), - (byte) PathPointType.Start, - (byte) (PathPointType.Line | PathPointType.PathMarker) }; - - for (int i=0; i < expectedTypes.Length; i++) { - Assert.AreEqual (expectedTypes [i], path.PathTypes [i]); - } - - - //t.AssertCompare (); - } - - [Test] - public void StartFigure() - { - path = new GraphicsPath (); - path.AddLine (new Point (100, 100), new Point (400, 100)); - path.AddLine (new Point (400, 200), new Point (10, 100)); - - path.StartFigure(); - path.AddBezier( 10, 10, 50, 250, 100, 5, 200, 280); - path.StartFigure(); - path.AddRectangle (new Rectangle (10, 20, 300, 400)); - - path.StartFigure(); - path.AddLine (new Point (400, 400), new Point (400, 10)); - - path.StartFigure(); - - Assert.AreEqual (14, path.PointCount); - - PointF [] expectedPoints = new PointF [] { new PointF(100f, 100f), - new PointF(400f, 100f), - new PointF(400f, 200f), - new PointF(10f, 100f), - new PointF(10f, 10f), - new PointF(50f, 250f), - new PointF(100f, 5f), - new PointF(200f, 280f), - new PointF(10f, 20f), - new PointF(310f, 20f), - new PointF(310f, 420f), - new PointF(10f, 420f), - new PointF(400f, 400f), - new PointF(400f, 10f)}; - - for(int i = 0; i < path.PointCount; i++) { - DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]); - } - - byte [] expectedTypes = new byte [] { (byte) PathPointType.Start, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Start, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Start, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) (PathPointType.Line | PathPointType.CloseSubpath), - (byte) PathPointType.Start, - (byte) PathPointType.Line}; - - for (int i=0; i < expectedTypes.Length; i++) { - Assert.AreEqual (expectedTypes [i], path.PathTypes [i]); - } - - //t.AssertCompare (); - } - - [Test] - public void Transform_Matrix() - { - path = new GraphicsPath (); - path.AddLine (new Point (100, 100), new Point (200, 100)); - path.AddLine (new Point (200, 200), new Point (10, 100)); - - path.StartFigure(); - path.AddBezier( 10, 10, 50, 250, 100, 5, 200, 280); - path.StartFigure(); - path.AddRectangle (new Rectangle (10, 20, 200, 200)); - - path.StartFigure(); - path.AddLine (new Point (200, 200), new Point (200, 10)); - - Matrix matrix = new Matrix (); - matrix.Scale (1.2f, 1.4f); - matrix.Shear (0.9f, -1.15f); - matrix.Rotate (5); - - path.Transform (matrix); - - PointF [] expectedPoints = new PointF [] { new PointF(226.0865f, 5.313778f), - new PointF(355.0427f, -142.8718f), - new PointF(452.173f, 10.62756f), - new PointF(110.0259f, 138.6808f), - new PointF(22.60865f, 0.5313778f), - new PointF(307.3039f, 309.6555f), - new PointF(133.8127f, -140.5106f), - new PointF(529.8773f, 133.427f), - new PointF(32.32168f, 15.88131f), - new PointF(290.234f, -280.4898f), - new PointF(484.4947f, 26.50887f), - new PointF(226.5823f, 322.8799f), - new PointF(452.173f, 10.62756f), - new PointF(267.6254f, -281.0212f)}; - - for(int i = 0; i < path.PointCount; i++) { - DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]); - } - - byte [] expectedTypes = new byte [] { (byte) PathPointType.Start, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Start, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Start, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) (PathPointType.Line | PathPointType.CloseSubpath), - (byte) PathPointType.Start, - (byte) PathPointType.Line}; - - for (int i=0; i < expectedTypes.Length; i++) { - Assert.AreEqual (expectedTypes [i], path.PathTypes [i]); - } - - t.Graphics.DrawPath (p, path); - t.Show (); - //t.AssertCompare (); - } - - [Test] -#if TARGET_JVM - [Category ("NotWorking")] -#endif - public void Warp_PointFArr_RectangleF() - { - path = new GraphicsPath (); - path.AddLine (new Point (100, 100), new Point (200, 100)); - path.AddLine (new Point (200, 200), new Point (10, 100)); - - path.StartFigure(); - path.AddBezier( 10, 10, 50, 250, 100, 5, 200, 280); - path.StartFigure(); - path.AddRectangle (new Rectangle (10, 20, 200, 200)); - - path.StartFigure(); - path.AddLine (new Point (200, 200), new Point (200, 10)); - - RectangleF rectangle = new RectangleF (0f, 0f, 40f, 40f); - PointF [] warp = new PointF [] { new PointF (0f, 0f), - new PointF (50f, 50f), - new PointF (20f, 40f)}; - - path.Warp (warp, rectangle); - - PointF [] expectedPoints = new PointF [] { new PointF(175f, 225f), - new PointF(300f, 350f), - new PointF(350f, 450f), - new PointF(62.5f, 112.5f), - new PointF(17.5f, 22.5f), - new PointF(71.54785f, 111.1621f), - new PointF(110.5078f, 167.8906f), - new PointF(140.8545f, 205.0488f), - new PointF(169.0625f, 235f), - new PointF(201.6064f, 270.1074f), - new PointF(244.9609f, 322.7344f), - new PointF(305.6006f, 405.2441f), - new PointF(390f, 530f), - new PointF(22.5f, 32.5f), - new PointF(272.5f, 282.5f), - new PointF(372.5f, 482.5f), - new PointF(122.5f, 232.5f), - new PointF(350f, 450f), - new PointF(255f, 260f)}; - - for(int i = 0; i < path.PointCount; i++) { - DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]); - } - - byte [] expectedTypes = new byte [] { (byte) PathPointType.Start, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Start, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Start, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) (PathPointType.Line | PathPointType.CloseSubpath), - (byte) PathPointType.Start, - (byte) PathPointType.Line}; - - for (int i=0; i < expectedTypes.Length; i++) { - Assert.AreEqual (expectedTypes [i], path.PathTypes [i]); - } - - t.Graphics.DrawPath (p, path); - t.Show (); - //t.AssertCompare (); - } - - - [Test] -#if TARGET_JVM - [Category ("NotWorking")] -#endif - public void Warp_PointFArr_RectangleF_Matrix() - { - path = new GraphicsPath (); - path.AddLine (new Point (100, 100), new Point (200, 100)); - path.AddLine (new Point (200, 200), new Point (10, 100)); - - path.StartFigure(); - path.AddBezier( 10, 10, 50, 250, 100, 5, 200, 280); - path.StartFigure(); - path.AddRectangle (new Rectangle (10, 20, 200, 200)); - - path.StartFigure(); - path.AddLine (new Point (200, 200), new Point (200, 10)); - - RectangleF rectangle = new RectangleF (0f, 0f, 40f, 40f); - PointF [] warp = new PointF [] { new PointF (0f, 0f), - new PointF (50f, 50f), - new PointF (20f, 40f)}; - - Matrix matrix = new Matrix(); - matrix.Scale(1.5f, 0.5f); - - path.Warp (warp, rectangle, matrix); - - PointF [] expectedPoints = new PointF [] { new PointF(262.5f, 112.5f), - new PointF(450f, 175f), - new PointF(525f, 225f), - new PointF(93.75f, 56.25f), - new PointF(26.25f, 11.25f), - new PointF(107.3218f, 55.58105f), - new PointF(165.7617f, 83.94531f), - new PointF(211.2817f, 102.5244f), - new PointF(253.5938f, 117.5f), - new PointF(302.4097f, 135.0537f), - new PointF(367.4414f, 161.3672f), - new PointF(458.4009f, 202.6221f), - new PointF(585f, 265f), - new PointF(33.75f, 16.25f), - new PointF(408.75f, 141.25f), - new PointF(558.75f, 241.25f), - new PointF(183.75f, 116.25f), - new PointF(525f, 225f), - new PointF(382.5f, 130f)}; - - for(int i = 0; i < path.PointCount; i++) { - DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]); - } - - byte [] expectedTypes = new byte [] { (byte) PathPointType.Start, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Start, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Start, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) (PathPointType.Line | PathPointType.CloseSubpath), - (byte) PathPointType.Start, - (byte) PathPointType.Line}; - - for (int i=0; i < expectedTypes.Length; i++) { - Assert.AreEqual (expectedTypes [i], path.PathTypes [i]); - } - - t.Graphics.DrawPath (p, path); - t.Show (); - //t.AssertCompare (); - } - - - [Test] -#if TARGET_JVM - [Category ("NotWorking")] -#endif - public void Warp_PointFArr_RectangleF_Matrix_WarpMode() - { - path = new GraphicsPath (); - path.AddLine (new Point (100, 100), new Point (200, 100)); - path.AddLine (new Point (200, 200), new Point (10, 100)); - - path.StartFigure(); - path.AddBezier( 10, 10, 50, 250, 100, 5, 200, 280); - path.StartFigure(); - path.AddRectangle (new Rectangle (10, 20, 200, 200)); - - path.StartFigure(); - path.AddLine (new Point (200, 200), new Point (200, 10)); - - RectangleF rectangle = new RectangleF (0f, 0f, 40f, 40f); - PointF [] warp = new PointF [] { new PointF (0f, 0f), - new PointF (50f, 50f), - new PointF (20f, 40f)}; - - Matrix matrix = new Matrix(); - matrix.Scale(1.5f, 0.5f); - - path.Warp (warp, rectangle, matrix, WarpMode.Bilinear); - - PointF [] expectedPoints = new PointF [] { new PointF(262.5f, 112.5f), - new PointF(449.9999f, 175f), - new PointF(524.9999f, 225f), - new PointF(412.9687f, 180f), - new PointF(292.4999f, 129.375f), - new PointF(163.5937f, 73.12499f), - new PointF(26.25f, 11.25f), - new PointF(153.75f, 83.74999f), - new PointF(153.75f, 83.74999f), - new PointF(192.6927f, 98.78391f), - new PointF(226.0163f, 109.1132f), - new PointF(253.6658f, 116.3978f), - new PointF(266.8857f, 118.041f), - new PointF(254.0196f, 109.4254f), - new PointF(213.4754f, 89.22914f), - new PointF(408.7499f, 141.25f), - new PointF(558.7499f, 241.25f), - new PointF(456.5624f, 205.9375f), - new PointF(469.4531f, 208.6719f), - new PointF(524.9999f, 225f), - new PointF(382.5f, 130f), - new PointF(5.064195E-08f, 8.370257E-08f), - new PointF(3.344191E-06f, 2.124933E-06f)}; - - for(int i = 0; i < path.PointCount; i++) { - DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]); - } - - byte [] expectedTypes = new byte [] { (byte) PathPointType.Start, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Start, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Start, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Start, - (byte) PathPointType.Line}; - - for (int i=0; i < expectedTypes.Length; i++) { - Assert.AreEqual (expectedTypes [i], path.PathTypes [i]); - } - - path = new GraphicsPath (); - path.AddLine (new Point (100, 100), new Point (200, 100)); - path.AddLine (new Point (200, 200), new Point (10, 100)); - - path.StartFigure(); - path.AddBezier( 10, 10, 50, 250, 100, 5, 200, 280); - path.StartFigure(); - path.AddRectangle (new Rectangle (10, 20, 200, 200)); - - path.StartFigure(); - path.AddLine (new Point (200, 200), new Point (200, 10)); - - path.Warp (warp, rectangle, matrix, WarpMode.Perspective); - - expectedPoints = new PointF [] {new PointF(262.5f, 112.5f), - new PointF(450f, 175f), - new PointF(525f, 225f), - new PointF(93.75f, 56.25f), - new PointF(26.25f, 11.25f), - new PointF(107.3218f, 55.58105f), - new PointF(165.7617f, 83.94531f), - new PointF(211.2817f, 102.5244f), - new PointF(253.5938f, 117.5f), - new PointF(302.4097f, 135.0537f), - new PointF(367.4414f, 161.3672f), - new PointF(458.4009f, 202.6221f), - new PointF(585f, 265f), - new PointF(33.75f, 16.25f), - new PointF(408.75f, 141.25f), - new PointF(558.75f, 241.25f), - new PointF(183.75f, 116.25f), - new PointF(525f, 225f), - new PointF(382.5f, 130f)}; - - for(int i = 0; i < path.PointCount; i++) { - DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]); - } - - expectedTypes = new byte [] { (byte) PathPointType.Start, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Start, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Start, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) (PathPointType.Line | PathPointType.CloseSubpath), - (byte) PathPointType.Start, - (byte) PathPointType.Line}; - - for (int i=0; i < expectedTypes.Length; i++) { - Assert.AreEqual (expectedTypes [i], path.PathTypes [i]); - } - - t.Graphics.DrawPath (p, path); - t.Show (); - //t.AssertCompare (); - } - - - [Test] -#if TARGET_JVM - [Category ("NotWorking")] -#endif - public void Warp_PointFArr_RectangleF_Matrix_WarpMode_Float() - { - path = new GraphicsPath (); - path.AddLine (new Point (100, 100), new Point (200, 100)); - path.AddLine (new Point (200, 200), new Point (10, 100)); - - path.StartFigure(); - path.AddBezier( 10, 10, 50, 250, 100, 5, 200, 280); - path.StartFigure(); - path.AddRectangle (new Rectangle (10, 20, 200, 200)); - - path.StartFigure(); - path.AddLine (new Point (200, 200), new Point (200, 10)); - - RectangleF rectangle = new RectangleF (0f, 0f, 40f, 40f); - PointF [] warp = new PointF [] { new PointF (0f, 0f), - new PointF (50f, 50f), - new PointF (20f, 40f)}; - - Matrix matrix = new Matrix(); - matrix.Scale(1.5f, 0.5f); - - path.Warp (warp, rectangle, matrix, WarpMode.Perspective, 0.2f); - - PointF [] expectedPoints = new PointF [] { new PointF(262.5f, 112.5f), - new PointF(450f, 175f), - new PointF(525f, 225f), - new PointF(93.75f, 56.25f), - new PointF(26.25f, 11.25f), - new PointF(107.3218f, 55.58105f), - new PointF(165.7617f, 83.94531f), - new PointF(211.2817f, 102.5244f), - new PointF(253.5938f, 117.5f), - new PointF(302.4097f, 135.0537f), - new PointF(367.4414f, 161.3672f), - new PointF(458.4009f, 202.6221f), - new PointF(585f, 265f), - new PointF(33.75f, 16.25f), - new PointF(408.75f, 141.25f), - new PointF(558.75f, 241.25f), - new PointF(183.75f, 116.25f), - new PointF(525f, 225f), - new PointF(382.5f, 130f)}; - - for(int i = 0; i < path.PointCount; i++) { - DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]); - } - - byte [] expectedTypes = new byte [] { (byte) PathPointType.Start, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Start, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Start, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) (PathPointType.Line | PathPointType.CloseSubpath), - (byte) PathPointType.Start, - (byte) PathPointType.Line}; - - for (int i=0; i < expectedTypes.Length; i++) { - Assert.AreEqual (expectedTypes [i], path.PathTypes [i]); - } - - t.Graphics.DrawPath (p, path); - t.Show (); - //t.AssertCompare (); - } - - [Test] -#if TARGET_JVM - [Category ("NotWorking")] -#endif - public void Widen_Pen() - { - path = new GraphicsPath (); - path.AddBezier( 10, 10, 50, 250, 100, 5, 200, 280); - path.StartFigure(); - path.AddRectangle (new Rectangle (10, 20, 200, 200)); - - Pen pen = new Pen (Color.Red, 15); - - path.Widen (pen); - - PointF [] expectedPoints = new PointF [] { new PointF(17.37995f, 8.663473f), - new PointF(21.21328f, 29.83014f), - new PointF(21.17457f, 29.63168f), - new PointF(25.00791f, 47.96501f), - new PointF(24.96026f, 47.75257f), - new PointF(28.79359f, 63.75257f), - new PointF(28.69803f, 63.39326f), - new PointF(32.69803f, 77.05992f), - new PointF(32.56306f, 76.64414f), - new PointF(36.72973f, 88.31081f), - new PointF(36.5541f, 87.86461f), - new PointF(40.72076f, 97.53127f), - new PointF(40.39609f, 96.86954f), - new PointF(44.72942f, 104.7029f), - new PointF(44.40704f, 104.1731f), - new PointF(48.74038f, 110.6731f), - new PointF(48.0747f, 109.8161f), - new PointF(52.5747f, 114.8161f), - new PointF(51.63366f, 113.9359f), - new PointF(56.30032f, 117.6026f), - new PointF(55.45956f, 117.0298f), - new PointF(60.2929f, 119.8631f), - new PointF(59.36763f, 119.4032f), - new PointF(64.20096f, 121.4032f), - new PointF(62.98528f, 121.0175f), - new PointF(73.31861f, 123.3508f), - new PointF(72.46971f, 123.2098f), - new PointF(83.43214f, 124.3903f), - new PointF(95.72781f, 126.1469f), - new PointF(109.1111f, 129.9448f), - new PointF(116.4476f, 133.3309f), - new PointF(123.7762f, 137.5449f), - new PointF(131.4605f, 143.2166f), - new PointF(138.9887f, 150.2071f), - new PointF(146.8953f, 158.8165f), - new PointF(154.9268f, 169.1177f), - new PointF(163.0379f, 181.3707f), - new PointF(171.4102f, 195.7232f), - new PointF(179.9099f, 212.2126f), - new PointF(188.6968f, 231.3073f), - new PointF(197.8003f, 252.886f), - new PointF(207.0185f, 277.356f), - new PointF(192.9815f, 282.644f), - new PointF(183.8148f, 258.3106f), - new PointF(183.9231f, 258.5819f), - new PointF(174.9231f, 237.2486f), - new PointF(175.0201f, 237.4686f), - new PointF(166.3534f, 218.6353f), - new PointF(166.5002f, 218.9363f), - new PointF(158.1669f, 202.7696f), - new PointF(158.355f, 203.1124f), - new PointF(150.1883f, 189.1124f), - new PointF(150.4128f, 189.4732f), - new PointF(142.5794f, 177.6399f), - new PointF(142.9186f, 178.1115f), - new PointF(135.2519f, 168.2781f), - new PointF(135.6427f, 168.7397f), - new PointF(128.1427f, 160.573f), - new PointF(128.5633f, 160.9959f), - new PointF(121.5633f, 154.4959f), - new PointF(122.2128f, 155.0343f), - new PointF(115.2128f, 149.8676f), - new PointF(115.9281f, 150.3351f), - new PointF(109.2615f, 146.5018f), - new PointF(109.8571f, 146.8097f), - new PointF(103.3571f, 143.8097f), - new PointF(104.4525f, 144.2151f), - new PointF(92.11913f, 140.7151f), - new PointF(93.106f, 140.9246f), - new PointF(81.43933f, 139.2579f), - new PointF(81.69695f, 139.2902f), - new PointF(70.4351f, 138.0774f), - new PointF(59.05708f, 135.5082f), - new PointF(53.15385f, 133.0655f), - new PointF(47.43391f, 129.7124f), - new PointF(41.85787f, 125.3312f), - new PointF(36.56138f, 119.4462f), - new PointF(31.75414f, 112.2354f), - new PointF(27.09196f, 103.8076f), - new PointF(22.68428f, 93.58176f), - new PointF(18.36339f, 81.48326f), - new PointF(14.24973f, 67.42826f), - new PointF(10.3477f, 51.14154f), - new PointF(6.471401f, 32.6027f), - new PointF(2.620048f, 11.33653f), - new PointF(2.5f, 12.5f), - new PointF(217.5f, 12.5f), - new PointF(217.5f, 227.5f), - new PointF(2.5f, 227.5f), - new PointF(17.5f, 220f), - new PointF(10f, 212.5f), - new PointF(210f, 212.5f), - new PointF(202.5f, 220f), - new PointF(202.5f, 20f), - new PointF(210f, 27.5f), - new PointF(10f, 27.5f), - new PointF(17.5f, 20f)}; - - for(int i = 0; i < path.PointCount; i++) { - DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]); - } - - byte [] expectedTypes = new byte [] { (byte) PathPointType.Start, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) (PathPointType.Line | PathPointType.CloseSubpath), - (byte) PathPointType.Start, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) (PathPointType.Line | PathPointType.CloseSubpath), - (byte) PathPointType.Start, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) (PathPointType.Line | PathPointType.CloseSubpath)}; - - for (int i=0; i < expectedTypes.Length; i++) { - Assert.AreEqual (expectedTypes [i], path.PathTypes [i]); - } - - t.Graphics.DrawPath (p, path); - t.Show (); - //t.AssertCompare (); - } - - - [Test] -#if TARGET_JVM - [Category ("NotWorking")] -#endif - public void Widen_Pen_Matrix() - { - path = new GraphicsPath (); - path.AddBezier( 10, 10, 50, 250, 100, 5, 200, 280); - path.StartFigure(); - path.AddRectangle (new Rectangle (10, 20, 200, 200)); - - Pen pen = new Pen (Color.Red, 15); - - Matrix matrix = new Matrix(); - matrix.Scale(1.5f, 0.5f); - - path.Widen (pen, matrix); - - PointF [] expectedPoints = new PointF [] { new PointF(26.07226f, 4.336054f), - new PointF(31.73893f, 14.83605f), - new PointF(31.68019f, 14.73517f), - new PointF(37.51352f, 24.0685f), - new PointF(37.43172f, 23.94766f), - new PointF(43.26505f, 31.94765f), - new PointF(43.13037f, 31.77996f), - new PointF(49.13037f, 38.61329f), - new PointF(48.90903f, 38.3879f), - new PointF(55.07569f, 44.05457f), - new PointF(54.85265f, 43.86571f), - new PointF(61.01931f, 48.69905f), - new PointF(60.29364f, 48.22634f), - new PointF(73.29364f, 55.393f), - new PointF(71.52402f, 54.64954f), - new PointF(85.35734f, 59.14954f), - new PointF(82.3909f, 58.45626f), - new PointF(96.8909f, 60.78959f), - new PointF(94.50352f, 60.51069f), - new PointF(109.8369f, 61.67735f), - new PointF(108.7007f, 61.61112f), - new PointF(125.034f, 62.27779f), - new PointF(124.944f, 62.27424f), - new PointF(143.4256f, 62.9783f), - new PointF(163.835f, 65.00085f), - new PointF(185.6939f, 68.67461f), - new PointF(208.6403f, 74.99842f), - new PointF(232.2171f, 84.42915f), - new PointF(244.575f, 90.69513f), - new PointF(257.0276f, 97.85966f), - new PointF(269.7801f, 106.0213f), - new PointF(282.9691f, 115.6594f), - new PointF(296.6128f, 126.4395f), - new PointF(310.5198f, 138.671f), - new PointF(289.4801f, 141.329f), - new PointF(275.6468f, 129.1623f), - new PointF(275.8013f, 129.2909f), - new PointF(262.3013f, 118.6243f), - new PointF(262.4312f, 118.7229f), - new PointF(249.4311f, 109.2229f), - new PointF(249.6888f, 109.3989f), - new PointF(237.1888f, 101.3989f), - new PointF(237.4324f, 101.5466f), - new PointF(225.2657f, 94.54655f), - new PointF(225.5994f, 94.72665f), - new PointF(213.7661f, 88.72665f), - new PointF(214.5241f, 89.06734f), - new PointF(192.0241f, 80.06734f), - new PointF(193.4982f, 80.55679f), - new PointF(172.3315f, 74.72345f), - new PointF(174.4351f, 75.18177f), - new PointF(154.6017f, 71.84844f), - new PointF(156.4607f, 72.0945f), - new PointF(137.9607f, 70.26116f), - new PointF(139.8892f, 70.3924f), - new PointF(122.3442f, 69.72402f), - new PointF(105.3928f, 69.03212f), - new PointF(88.25542f, 67.7282f), - new PointF(70.95618f, 64.94441f), - new PointF(54.78223f, 59.68301f), - new PointF(40.62651f, 51.87922f), - new PointF(34.02815f, 46.70752f), - new PointF(27.63626f, 40.83389f), - new PointF(21.46311f, 33.80336f), - new PointF(15.52437f, 25.65881f), - new PointF(9.621692f, 16.21452f), - new PointF(3.927732f, 5.663945f), - new PointF(3.749999f, 6.249999f), - new PointF(326.25f, 6.249999f), - new PointF(326.2499f, 113.75f), - new PointF(3.749999f, 113.75f), - new PointF(26.25f, 110f), - new PointF(15f, 106.25f), - new PointF(315f, 106.25f), - new PointF(303.75f, 110f), - new PointF(303.75f, 9.999999f), - new PointF(315f, 13.75f), - new PointF(15f, 13.75f), - new PointF(26.25f, 9.999999f)}; - - for(int i = 0; i < path.PointCount; i++) { - DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]); - } - - byte [] expectedTypes = new byte [] { (byte) PathPointType.Start, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) (PathPointType.Line | PathPointType.CloseSubpath), - (byte) PathPointType.Start, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) (PathPointType.Line | PathPointType.CloseSubpath), - (byte) PathPointType.Start, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) (PathPointType.Line | PathPointType.CloseSubpath)}; - - for (int i=0; i < expectedTypes.Length; i++) { - Assert.AreEqual (expectedTypes [i], path.PathTypes [i]); - } - - t.Graphics.DrawPath (p, path); - t.Show (); - //t.AssertCompare (); - } - - - [Test] -#if TARGET_JVM - [Category ("NotWorking")] -#endif - public void Widen_Pen_Matrix_Float() - { - path = new GraphicsPath (); - path.AddBezier( 10, 10, 50, 250, 100, 5, 200, 280); - path.StartFigure(); - path.AddRectangle (new Rectangle (10, 20, 200, 200)); - - Pen pen = new Pen (Color.Red, 15); - - Matrix matrix = new Matrix(); - matrix.Scale(1.5f, 0.5f); - - path.Widen (pen, matrix, 0.2f); - - PointF [] expectedPoints = new PointF [] { new PointF(26.08857f, 4.367013f), - new PointF(28.88857f, 9.817012f), - new PointF(28.85975f, 9.763281f), - new PointF(31.70975f, 14.86328f), - new PointF(31.67857f, 14.80965f), - new PointF(34.57857f, 19.60965f), - new PointF(34.5436f, 19.55396f), - new PointF(37.4436f, 24.00396f), - new PointF(37.39977f, 23.93945f), - new PointF(40.29977f, 28.03945f), - new PointF(40.25008f, 27.972f), - new PointF(43.20008f, 31.82199f), - new PointF(43.09911f, 31.69899f), - new PointF(49.09911f, 38.54898f), - new PointF(48.90694f, 38.35032f), - new PointF(55.05694f, 44.15032f), - new PointF(54.77378f, 43.90996f), - new PointF(61.07379f, 48.75996f), - new PointF(60.64857f, 48.46797f), - new PointF(67.04858f, 52.41797f), - new PointF(66.42046f, 52.07551f), - new PointF(73.02045f, 55.27551f), - new PointF(72.11205f, 54.89137f), - new PointF(78.86205f, 57.39137f), - new PointF(77.63413f, 57.00044f), - new PointF(84.58413f, 58.90044f), - new PointF(83.11855f, 58.56083f), - new PointF(90.31853f, 59.96083f), - new PointF(88.90129f, 59.72806f), - new PointF(96.2513f, 60.72805f), - new PointF(94.81331f, 60.56914f), - new PointF(102.3633f, 61.21914f), - new PointF(101.4567f, 61.15424f), - new PointF(109.3067f, 61.60424f), - new PointF(108.7323f, 61.57637f), - new PointF(125.1848f, 62.23045f), - new PointF(143.1808f, 63.05786f), - new PointF(153.344f, 63.83537f), - new PointF(163.8406f, 65.00166f), - new PointF(174.5957f, 66.60938f), - new PointF(185.6805f, 68.76014f), - new PointF(197.0758f, 71.55418f), - new PointF(208.587f, 75.10439f), - new PointF(220.3038f, 79.37941f), - new PointF(232.2803f, 84.50476f), - new PointF(244.5031f, 90.61616f), - new PointF(256.9783f, 97.77407f), - new PointF(263.386f, 101.7725f), - new PointF(269.8497f, 106.0477f), - new PointF(276.4059f, 110.6218f), - new PointF(283.0547f, 115.5449f), - new PointF(289.7812f, 120.8047f), - new PointF(296.6029f, 126.3632f), - new PointF(303.5159f, 132.3174f), - new PointF(310.5394f, 138.5884f), - new PointF(289.4605f, 141.2115f), - new PointF(282.4605f, 134.9615f), - new PointF(282.5082f, 135.0034f), - new PointF(275.6582f, 129.1034f), - new PointF(275.7375f, 129.1699f), - new PointF(268.9875f, 123.6699f), - new PointF(269.051f, 123.7205f), - new PointF(262.401f, 118.5205f), - new PointF(262.4915f, 118.5893f), - new PointF(255.9415f, 113.7393f), - new PointF(256.049f, 113.8166f), - new PointF(249.599f, 109.3166f), - new PointF(249.7036f, 109.3877f), - new PointF(243.3536f, 105.1877f), - new PointF(243.477f, 105.2669f), - new PointF(237.227f, 101.3669f), - new PointF(237.4224f, 101.4837f), - new PointF(225.2224f, 94.48374f), - new PointF(225.5894f, 94.68011f), - new PointF(213.7894f, 88.78011f), - new PointF(214.2746f, 89.00435f), - new PointF(202.8246f, 84.10435f), - new PointF(203.3942f, 84.32931f), - new PointF(192.2942f, 80.27931f), - new PointF(192.9597f, 80.50254f), - new PointF(182.2597f, 77.20254f), - new PointF(183.2339f, 77.47076f), - new PointF(172.8339f, 74.92076f), - new PointF(173.8405f, 75.14091f), - new PointF(163.7905f, 73.19091f), - new PointF(164.8466f, 73.37167f), - new PointF(155.1466f, 71.92167f), - new PointF(156.1924f, 72.05755f), - new PointF(146.7424f, 71.00755f), - new PointF(147.7834f, 71.10496f), - new PointF(138.6334f, 70.40496f), - new PointF(139.6128f, 70.46482f), - new PointF(122.2128f, 69.66482f), - new PointF(122.4177f, 69.6736f), - new PointF(105.7794f, 69.01213f), - new PointF(97.18594f, 68.51952f), - new PointF(88.45159f, 67.76756f), - new PointF(79.66547f, 66.57217f), - new PointF(71.00809f, 64.88879f), - new PointF(62.7075f, 62.61956f), - new PointF(54.89606f, 59.72644f), - new PointF(47.53793f, 56.15886f), - new PointF(40.61982f, 51.88909f), - new PointF(33.97219f, 46.77147f), - new PointF(27.58867f, 40.75123f), - new PointF(21.44726f, 33.73978f), - new PointF(18.42414f, 29.79435f), - new PointF(15.47745f, 25.62836f), - new PointF(12.53827f, 21.11823f), - new PointF(9.605241f, 16.26356f), - new PointF(6.725243f, 11.10988f), - new PointF(3.911426f, 5.632986f), - new PointF(3.749999f, 6.249999f), - new PointF(326.25f, 6.249999f), - new PointF(326.2499f, 113.75f), - new PointF(3.749999f, 113.75f), - new PointF(26.25f, 110f), - new PointF(15f, 106.25f), - new PointF(315f, 106.25f), - new PointF(303.75f, 110f), - new PointF(303.75f, 9.999999f), - new PointF(315f, 13.75f), - new PointF(15f, 13.75f), - new PointF(26.25f, 9.999999f)}; - - for(int i = 0; i < path.PointCount; i++) { - DrawingTest.AssertAlmostEqual(expectedPoints [i], path.PathPoints [i]); - } - - byte [] expectedTypes = new byte [] { (byte) PathPointType.Start, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) (PathPointType.Line | PathPointType.CloseSubpath), - (byte) PathPointType.Start, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) (PathPointType.Line | PathPointType.CloseSubpath), - (byte) PathPointType.Start, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) (PathPointType.Line | PathPointType.CloseSubpath)}; - - for (int i=0; i < expectedTypes.Length; i++) { - Assert.AreEqual (expectedTypes [i], path.PathTypes [i]); - } - - t.Graphics.DrawPath (p, path); - t.Show (); - //t.AssertCompare (); - } - - #region Private helpers - - public void Print (GraphicsPath path) - { -// foreach(PointF point in path.PathPoints) { -// Console.WriteLine("new PointF({0}f, {1}f), ",point.X, point.Y); -// } -// foreach(PathPointType type in path.PathTypes) { -// Console.WriteLine("(byte) PathPointType.{0}, ",type); -// } - - for (int i=0; i < path.PointCount; i++) { - Console.WriteLine (" ({0},{1}) [{2}]",path.PathPoints[i].X,path.PathPoints[i].Y,ToString ((PathPointType)path.PathTypes[i])); - } - } - - public string ToString (PathPointType type) - { - foreach (PathPointType t in Enum.GetValues(typeof (PathPointType))) - if (type == t) - return type.ToString (); - - string s = (type & PathPointType.PathTypeMask).ToString (); - - foreach (PathPointType t in new PathPointType[] {PathPointType.PathMarker, PathPointType.CloseSubpath}) - if ((type & t) != 0) - s += " | " + t.ToString (); - - return s; - } - - #endregion // Private helpers - } -} diff --git a/mcs/class/System.Drawing/Test/DrawingTest/Test/GraphicsPathIterator.cs b/mcs/class/System.Drawing/Test/DrawingTest/Test/GraphicsPathIterator.cs deleted file mode 100644 index f51a0da5460..00000000000 --- a/mcs/class/System.Drawing/Test/DrawingTest/Test/GraphicsPathIterator.cs +++ /dev/null @@ -1,749 +0,0 @@ -using System; -using NUnit.Framework; -using System.Drawing.Drawing2D; -using System.Drawing; - -using DrawingTestHelper; - -namespace Test.Sys.Drawing -{ - [TestFixture] - public class GraphicsPathIteratorFixture - { - [Test] - public virtual void NextSubpath_Int_Int_Bool() - { - GraphicsPath path = new GraphicsPath (); - path.AddLine (new Point (100, 100), new Point (400, 100)); - path.AddLine (new Point (400, 200), new Point (10, 100)); - path.StartFigure (); - path.SetMarkers (); - path.AddBezier( 10, 10, 50, 250, 100, 5, 200, 280); - path.CloseFigure (); - path.StartFigure (); - path.SetMarkers (); - path.AddRectangle (new Rectangle (10, 20, 300, 400)); - path.StartFigure (); - path.SetMarkers (); - path.AddLine (new Point (400, 400), new Point (400, 10)); - - GraphicsPathIterator iterator = new GraphicsPathIterator (path); - - int start; - int end; - bool isClosed; - - int count = iterator.NextSubpath (out start, out end, out isClosed); - Assert.AreEqual (4, count); - Assert.AreEqual (0, start); - Assert.AreEqual (3, end); - Assert.IsFalse (isClosed); - - count = iterator.NextSubpath (out start, out end, out isClosed); - Assert.AreEqual (4, count); - Assert.AreEqual (4, start); - Assert.AreEqual (7, end); - Assert.IsTrue (isClosed); - - count = iterator.NextSubpath (out start, out end, out isClosed); - Assert.AreEqual (4, count); - Assert.AreEqual (8, start); - Assert.AreEqual (11, end); - Assert.IsTrue (isClosed); - - count = iterator.NextSubpath (out start, out end, out isClosed); - Assert.AreEqual (2, count); - Assert.AreEqual (12, start); - Assert.AreEqual (13, end); - Assert.IsFalse (isClosed); - - count = iterator.NextSubpath (out start, out end, out isClosed); - Assert.AreEqual (0, count); - Assert.AreEqual (0, start); - Assert.AreEqual (0, end); - Assert.IsTrue (isClosed); - } - - [Test] - public virtual void NextSubpath_GraphicsPath_Bool() - { - GraphicsPath path = new GraphicsPath (); - path.AddLine (new Point (100, 100), new Point (400, 100)); - path.AddLine (new Point (400, 200), new Point (10, 100)); - path.StartFigure (); - path.SetMarkers (); - path.AddBezier( 10, 10, 50, 250, 100, 5, 200, 280); - path.CloseFigure (); - path.StartFigure (); - path.SetMarkers (); - path.AddRectangle (new Rectangle (10, 20, 300, 400)); - path.StartFigure (); - path.SetMarkers (); - path.AddLine (new Point (400, 400), new Point (400, 10)); - - GraphicsPathIterator iterator = new GraphicsPathIterator (path); - GraphicsPath path2 = new GraphicsPath (); - - bool isClosed; - - int count = iterator.NextSubpath (path2, out isClosed); - Assert.AreEqual (4, count); - Assert.IsFalse (isClosed); - - PointF [] actualPoints = path2.PathPoints; - byte [] actualTypes = path2.PathTypes; - - PointF [] expectedPoints = new PointF [] { new PointF(100f, 100f), - new PointF(400f, 100f), - new PointF(400f, 200f), - new PointF(10f, 100f)}; - - for(int i = 0; i < expectedPoints.Length; i++) { - DrawingTest.AssertAlmostEqual(expectedPoints [i], actualPoints [i]); - } - - byte [] expectedTypes = new byte [] { (byte) PathPointType.Start, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) (PathPointType.Line | PathPointType.PathMarker)}; - - for (int i=0; i < expectedTypes.Length; i++) { - Assert.AreEqual (expectedTypes [i], actualTypes [i]); - } - - count = iterator.NextSubpath (path2, out isClosed); - Assert.AreEqual (4, count); - Assert.IsTrue (isClosed); - - actualPoints = path2.PathPoints; - actualTypes = path2.PathTypes; - - expectedPoints = new PointF [] {new PointF(10f, 10f), - new PointF(50f, 250f), - new PointF(100f, 5f), - new PointF(200f, 280f)}; - - for(int i = 0; i < expectedPoints.Length; i++) { - DrawingTest.AssertAlmostEqual(expectedPoints [i], actualPoints [i]); - } - - expectedTypes = new byte [] { (byte) PathPointType.Start, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) (PathPointType.Bezier3 | PathPointType.CloseSubpath | PathPointType.PathMarker)}; - - for (int i=0; i < expectedTypes.Length; i++) { - Assert.AreEqual (expectedTypes [i], actualTypes [i]); - } - - count = iterator.NextSubpath (path2, out isClosed); - Assert.AreEqual (4, count); - Assert.IsTrue (isClosed); - - actualPoints = path2.PathPoints; - actualTypes = path2.PathTypes; - - expectedPoints = new PointF [] {new PointF(10f, 20f), - new PointF(310f, 20f), - new PointF(310f, 420f), - new PointF(10f, 420f)}; - - for(int i = 0; i < expectedPoints.Length; i++) { - DrawingTest.AssertAlmostEqual(expectedPoints [i], actualPoints [i]); - } - - expectedTypes = new byte [] { (byte) PathPointType.Start, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) (PathPointType.Line | PathPointType.CloseSubpath | PathPointType.PathMarker)}; - - for (int i=0; i < expectedTypes.Length; i++) { - Assert.AreEqual (expectedTypes [i], actualTypes [i]); - } - - count = iterator.NextSubpath (path2, out isClosed); - Assert.AreEqual (2, count); - Assert.IsFalse (isClosed); - - actualPoints = path2.PathPoints; - actualTypes = path2.PathTypes; - - expectedPoints = new PointF [] {new PointF(400f, 400f), - new PointF(400f, 10f)}; - - for(int i = 0; i < expectedPoints.Length; i++) { - DrawingTest.AssertAlmostEqual(expectedPoints [i], actualPoints [i]); - } - - expectedTypes = new byte [] { (byte) PathPointType.Start, - (byte) PathPointType.Line}; - - for (int i=0; i < expectedTypes.Length; i++) { - Assert.AreEqual (expectedTypes [i], actualTypes [i]); - } - - count = iterator.NextSubpath (path2, out isClosed); - Assert.AreEqual (0, count); - - count = iterator.NextSubpath (path2, out isClosed); - Assert.AreEqual (0, count); - Assert.IsTrue (isClosed); - Assert.AreEqual (2, path2.PointCount); - - actualPoints = path2.PathPoints; - actualTypes = path2.PathTypes; - - expectedPoints = new PointF [] {new PointF(400f, 400f), - new PointF(400f, 10f)}; - - for(int i = 0; i < expectedPoints.Length; i++) { - DrawingTest.AssertAlmostEqual(expectedPoints [i], actualPoints [i]); - } - - expectedTypes = new byte [] { (byte) PathPointType.Start, - (byte) PathPointType.Line}; - - for (int i=0; i < expectedTypes.Length; i++) { - Assert.AreEqual (expectedTypes [i], actualTypes [i]); - } - - path = new GraphicsPath (); - path.AddBezier( 10, 10, 50, 250, 100, 5, 200, 280); - iterator = new GraphicsPathIterator (path); - - path2 = new GraphicsPath (); - count = iterator.NextSubpath (path2, out isClosed); - Assert.AreEqual (4, count); - Assert.IsFalse (isClosed); - - path2 = new GraphicsPath (); - count = iterator.NextSubpath (path2, out isClosed); - Assert.AreEqual (0, count); - Assert.IsTrue (isClosed); - } - - [Test] - public virtual void NextPathType() - { - GraphicsPath path = new GraphicsPath (); - path.AddLine (new Point (100, 100), new Point (400, 100)); - path.AddBezier( 100, 100, 500, 250, 100, 50, 250, 280); - path.AddLine (new Point (400, 200), new Point (10, 100)); - path.StartFigure (); - path.SetMarkers (); - path.AddBezier( 10, 10, 50, 250, 100, 5, 200, 280); - path.StartFigure (); - path.SetMarkers (); - path.AddRectangle (new Rectangle (10, 20, 300, 400)); - path.StartFigure (); - path.SetMarkers (); - path.AddLine (new Point (400, 400), new Point (400, 10)); - - GraphicsPathIterator iterator = new GraphicsPathIterator (path); - - byte pathType; - int start; - int end; - bool isClosed; - - int count = iterator.NextPathType (out pathType, out start, out end); - Assert.AreEqual (0, count); - Assert.AreEqual ((byte)PathPointType.Start, pathType); - Assert.AreEqual (0, start); - Assert.AreEqual (0, end); - - iterator.NextSubpath (out start, out end, out isClosed); - count = iterator.NextPathType (out pathType, out start, out end); - Assert.AreEqual (3, count); - Assert.AreEqual ((byte)PathPointType.Line, pathType); - Assert.AreEqual (0, start); - Assert.AreEqual (2, end); - - count = iterator.NextPathType (out pathType, out start, out end); - Assert.AreEqual (4, count); - Assert.AreEqual ((byte)PathPointType.Bezier3, pathType); - Assert.AreEqual (2, start); - Assert.AreEqual (5, end); - - count = iterator.NextPathType (out pathType, out start, out end); - Assert.AreEqual (3, count); - Assert.AreEqual ((byte)PathPointType.Line, pathType); - Assert.AreEqual (5, start); - Assert.AreEqual (7, end); - - // we don't want to be a bug compliant with .net - /* - count = iterator.NextPathType (out pathType, out start, out end); - Assert.AreEqual (0, count); - Assert.AreEqual ((byte)PathPointType.Line, pathType); - Assert.AreEqual (5, start); - Assert.AreEqual (7, end); - */ - - iterator.NextSubpath (out start, out end, out isClosed); - count = iterator.NextPathType (out pathType, out start, out end); - Assert.AreEqual (4, count); - Assert.AreEqual ((byte)PathPointType.Bezier3, pathType); - Assert.AreEqual (8, start); - Assert.AreEqual (11, end); - - iterator.NextSubpath (out start, out end, out isClosed); - count = iterator.NextPathType (out pathType, out start, out end); - Assert.AreEqual (4, count); - Assert.AreEqual ((byte)PathPointType.Line, pathType); - Assert.AreEqual (12, start); - Assert.AreEqual (15, end); - - iterator.NextSubpath (out start, out end, out isClosed); - count = iterator.NextPathType (out pathType, out start, out end); - Assert.AreEqual (2, count); - Assert.AreEqual ((byte)PathPointType.Line, pathType); - Assert.AreEqual (16, start); - Assert.AreEqual (17, end); - - iterator.NextSubpath (out start, out end, out isClosed); - count = iterator.NextPathType (out pathType, out start, out end); - Assert.AreEqual (0, count); - Assert.AreEqual ((byte)PathPointType.Line, pathType); - Assert.AreEqual (0, start); - Assert.AreEqual (0, end); - } - - [Test] - public virtual void NextMarker_Int32_Int32() - { - GraphicsPath path = new GraphicsPath (); - path.AddLine (new Point (100, 100), new Point (400, 100)); - path.AddLine (new Point (400, 200), new Point (10, 100)); - path.StartFigure (); - path.SetMarkers (); - path.AddBezier( 10, 10, 50, 250, 100, 5, 200, 280); - path.StartFigure (); - path.SetMarkers (); - path.AddRectangle (new Rectangle (10, 20, 300, 400)); - path.StartFigure (); - path.SetMarkers (); - path.AddLine (new Point (400, 400), new Point (400, 10)); - - GraphicsPathIterator iterator = new GraphicsPathIterator (path); - - int start; - int end; - int count = iterator.NextMarker (out start, out end); - Assert.AreEqual (4, count); - Assert.AreEqual (0, start); - Assert.AreEqual (3, end); - - count = iterator.NextMarker (out start, out end); - Assert.AreEqual (4, count); - Assert.AreEqual (4, start); - Assert.AreEqual (7, end); - - count = iterator.NextMarker (out start, out end); - Assert.AreEqual (4, count); - Assert.AreEqual (8, start); - Assert.AreEqual (11, end); - - count = iterator.NextMarker (out start, out end); - Assert.AreEqual (2, count); - Assert.AreEqual (12, start); - Assert.AreEqual (13, end); - - // FIXME - should return all 0'z? - /* - count = iterator.NextMarker (out start, out end); - Assert.AreEqual (0, count); - Assert.AreEqual (12, start); - Assert.AreEqual (13, end); - */ - } - - [Test] - public void NextSubpath_NextMarker() - { - GraphicsPath path = new GraphicsPath(); - - path.AddLine (10, 10, 50, 50); // figure #1 - path.AddLine (50, 50, 80, 80); - path.AddLine (90, 90, 100, 100); - path.SetMarkers (); // marker #1 - path.AddLine (150, 150, 180, 180); - path.SetMarkers (); // marker #2 - path.StartFigure (); // figure #2 - path.SetMarkers (); // marker #3 is actually marker #2 - path.AddRectangle (new Rectangle (200, 200, 200, 200)); - path.SetMarkers (); // marker #4 - path.AddLine (150, 150, 180, 180); - path.StartFigure (); // figure #3 - path.AddBezier (400, 400, 500, 500, 600, 600, 700, 700); - path.AddBezier (450, 450, 550, 550, 650, 650, 750, 750); - - GraphicsPathIterator iterator = new GraphicsPathIterator (path); - - int start; - int end; - bool isClosed; - int count = iterator.NextMarker (out start,out end); // marker #1 - Assert.AreEqual (5, count); - Assert.AreEqual (0, start); - Assert.AreEqual (4, end); - - count = iterator.NextSubpath (out start,out end,out isClosed); // figure #1 - Assert.AreEqual (7, count); - Assert.AreEqual (0, start); - Assert.AreEqual (6, end); - Assert.AreEqual (false, isClosed); - - count = iterator.NextMarker (out start,out end); // marker #2 (and #3) - Assert.AreEqual (2, count); - Assert.AreEqual (5, start); - Assert.AreEqual (6, end); - - count = iterator.NextSubpath (out start,out end,out isClosed); // figure #2 - Assert.AreEqual (4, count); - Assert.AreEqual (7, start); - Assert.AreEqual (10, end); - Assert.AreEqual (true, isClosed); - - count = iterator.NextSubpath (out start,out end,out isClosed); // figure #3 - Assert.AreEqual (2, count); - Assert.AreEqual (11, start); - Assert.AreEqual (12, end); - Assert.AreEqual (false, isClosed); - - count = iterator.NextMarker (out start,out end); // marker #5 (end) - Assert.AreEqual (4, count); - Assert.AreEqual (7, start); - Assert.AreEqual (10, end); - - count = iterator.NextMarker (out start,out end); // marker #5 (end) - Assert.AreEqual (10, count); - Assert.AreEqual (11, start); - Assert.AreEqual (20, end); - - // we dont want to be bug compliant with .net - /* - count = iterator.NextMarker (out start,out end); // no more markers - Assert.AreEqual (0, count); - Assert.AreEqual (11, start); - Assert.AreEqual (20, end); - */ - - count = iterator.NextSubpath (out start,out end,out isClosed); // figure #4 - Assert.AreEqual (8, count); - Assert.AreEqual (13, start); - Assert.AreEqual (20, end); - Assert.AreEqual (false, isClosed); - - // we dont want to be bug compliant with .net - /* - count = iterator.NextMarker (out start,out end); // no more markers - Assert.AreEqual (0, count); - Assert.AreEqual (13, start); - Assert.AreEqual (20, end); - */ - - count = iterator.NextSubpath (out start,out end,out isClosed); // no more figures - Assert.AreEqual (0, count); - Assert.AreEqual (0, start); - Assert.AreEqual (0, end); - Assert.AreEqual (true, isClosed); - - count = iterator.NextMarker (out start,out end); // no more markers - Assert.AreEqual (0, count); - Assert.AreEqual (0, start); - Assert.AreEqual (0, end); - } - - - [Test] - public virtual void NextMarker_GraphicsPath() - { - GraphicsPath path = new GraphicsPath (); - path.AddLine (new Point (100, 100), new Point (400, 100)); - path.AddLine (new Point (400, 200), new Point (10, 100)); - path.StartFigure (); - path.SetMarkers (); - path.AddBezier( 10, 10, 50, 250, 100, 5, 200, 280); - path.StartFigure (); - path.SetMarkers (); - path.AddRectangle (new Rectangle (10, 20, 300, 400)); - path.StartFigure (); - path.SetMarkers (); - path.AddLine (new Point (400, 400), new Point (400, 10)); - - GraphicsPath path2 = new GraphicsPath (); - path.AddLine (new Point (150, 150), new Point (450, 150)); - path.AddLine (new Point (450, 250), new Point (50, 150)); - - GraphicsPathIterator iterator = new GraphicsPathIterator (path); - - iterator.NextMarker (null); - iterator.NextMarker (path2); - - Assert.AreEqual (4, path2.PointCount); - PointF [] actualPoints = path2.PathPoints; - byte [] actualTypes = path2.PathTypes; - - PointF [] expectedPoints = new PointF [] { new PointF(100f, 100f), - new PointF(400f, 100f), - new PointF(400f, 200f), - new PointF(10f, 100f)}; - - for(int i = 0; i < expectedPoints.Length; i++) { - DrawingTest.AssertAlmostEqual(expectedPoints [i], actualPoints [i]); - } - - byte [] expectedTypes = new byte [] { (byte) PathPointType.Start, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) (PathPointType.Line | PathPointType.PathMarker)}; - - for (int i=0; i < expectedTypes.Length; i++) { - Assert.AreEqual (expectedTypes [i], actualTypes [i]); - } - - iterator.NextMarker (null); - iterator.NextMarker (null); - iterator.NextMarker (null); - iterator.NextMarker (path2); - - Assert.AreEqual (4, path2.PointCount); - actualPoints = path2.PathPoints; - actualTypes = path2.PathTypes; - - expectedPoints = new PointF [] {new PointF(10f, 10f), - new PointF(50f, 250f), - new PointF(100f, 5f), - new PointF(200f, 280f)}; - - for(int i = 0; i < expectedPoints.Length; i++) { - DrawingTest.AssertAlmostEqual(expectedPoints [i], actualPoints [i]); - } - - expectedTypes = new byte [] { (byte) PathPointType.Start, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) (PathPointType.Bezier3 | PathPointType.PathMarker)}; - - for (int i=0; i < expectedTypes.Length; i++) { - Assert.AreEqual (expectedTypes [i], actualTypes [i]); - } - - } - - [Test] - public virtual void Count() - { - GraphicsPath path = new GraphicsPath (); - - GraphicsPathIterator iterator = new GraphicsPathIterator (path); - Assert.AreEqual (0, iterator.Count); - - path.AddLine (new Point (100, 100), new Point (400, 100)); - path.AddLine (new Point (400, 200), new Point (10, 100)); - - path.StartFigure (); - path.AddBezier( 10, 10, 50, 250, 100, 5, 200, 280); - path.StartFigure (); - path.AddRectangle (new Rectangle (10, 20, 300, 400)); - - path.StartFigure (); - path.AddLine (new Point (400, 400), new Point (400, 10)); - - iterator = new GraphicsPathIterator (path); - Assert.AreEqual (14, iterator.Count); - } - - [Test] - public virtual void SubpathCount() - { - GraphicsPath path = new GraphicsPath (); - - GraphicsPathIterator iterator = new GraphicsPathIterator (path); - Assert.AreEqual (0, iterator.SubpathCount); - - path.AddLine (new Point (100, 100), new Point (400, 100)); - path.AddLine (new Point (400, 200), new Point (10, 100)); - - path.StartFigure (); - path.AddBezier( 10, 10, 50, 250, 100, 5, 200, 280); - path.StartFigure (); - path.AddRectangle (new Rectangle (10, 20, 300, 400)); - - path.StartFigure (); - path.AddLine (new Point (400, 400), new Point (400, 10)); - - iterator = new GraphicsPathIterator (path); - Assert.AreEqual (4, iterator.SubpathCount); - } - - [Test] - public virtual void HasCurve() - { - GraphicsPath path = new GraphicsPath (); - - GraphicsPathIterator iterator = new GraphicsPathIterator (path); - Assert.IsFalse (iterator.HasCurve ()); - - path.AddLine (new Point (100, 100), new Point (400, 100)); - path.AddLine (new Point (400, 200), new Point (10, 100)); - - iterator = new GraphicsPathIterator (path); - Assert.IsFalse (iterator.HasCurve ()); - - path.StartFigure (); - path.AddBezier( 10, 10, 50, 250, 100, 5, 200, 280); - path.StartFigure (); - path.AddRectangle (new Rectangle (10, 20, 300, 400)); - - path.StartFigure (); - path.AddLine (new Point (400, 400), new Point (400, 10)); - - iterator = new GraphicsPathIterator (path); - Assert.IsTrue (iterator.HasCurve ()); - } - - [Test] - public virtual void Rewind() - { - GraphicsPath path = new GraphicsPath (); - path.AddLine (new Point (100, 100), new Point (400, 100)); - path.AddLine (new Point (400, 200), new Point (10, 100)); - path.StartFigure (); - path.SetMarkers (); - path.AddBezier( 10, 10, 50, 250, 100, 5, 200, 280); - path.StartFigure (); - path.SetMarkers (); - path.AddRectangle (new Rectangle (10, 20, 300, 400)); - path.StartFigure (); - path.SetMarkers (); - path.AddLine (new Point (400, 400), new Point (400, 10)); - - GraphicsPathIterator iterator = new GraphicsPathIterator (path); - - int i; - int j; - iterator.NextMarker (out i, out j); - iterator.NextMarker (out i, out j); - - iterator.Rewind (); - iterator.NextMarker (out i, out j); - - Assert.AreEqual (0, i); - Assert.AreEqual (3, j); - } - - [Test] - public virtual void Enumerate() - { - GraphicsPath path = new GraphicsPath (); - path.AddLine (new Point (100, 100), new Point (400, 100)); - path.AddLine (new Point (400, 200), new Point (10, 100)); - - path.StartFigure (); - path.AddBezier( 10, 10, 50, 250, 100, 5, 200, 280); - path.StartFigure (); - path.AddRectangle (new Rectangle (10, 20, 300, 400)); - - path.StartFigure (); - path.AddLine (new Point (400, 400), new Point (400, 10)); - - path.Reverse (); - - GraphicsPathIterator iterator = new GraphicsPathIterator (path); - PointF [] actualPoints = new PointF [14]; - byte [] actualTypes = new byte [14]; - iterator.Enumerate (ref actualPoints, ref actualTypes); - - PointF [] expectedPoints = new PointF [] { new PointF(400f, 10f), - new PointF(400f, 400f), - new PointF(10f, 420f), - new PointF(310f, 420f), - new PointF(310f, 20f), - new PointF(10f, 20f), - new PointF(200f, 280f), - new PointF(100f, 5f), - new PointF(50f, 250f), - new PointF(10f, 10f), - new PointF(10f, 100f), - new PointF(400f, 200f), - new PointF(400f, 100f), - new PointF(100f, 100f)}; - - for(int i = 0; i < expectedPoints.Length; i++) { - DrawingTest.AssertAlmostEqual(expectedPoints [i], actualPoints [i]); - } - - byte [] expectedTypes = new byte [] { (byte) PathPointType.Start, - (byte) PathPointType.Line, - (byte) PathPointType.Start, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) (PathPointType.Line | PathPointType.CloseSubpath), - (byte) PathPointType.Start, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Bezier3, - (byte) PathPointType.Start, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) PathPointType.Line}; - - for (int i=0; i < expectedTypes.Length; i++) { - Assert.AreEqual (expectedTypes [i], actualTypes [i]); - } - } - - [Test] - public virtual void CopyData() - { - GraphicsPath path = new GraphicsPath (); - path.AddLine (new Point (100, 100), new Point (400, 100)); - path.AddLine (new Point (400, 200), new Point (10, 100)); - path.StartFigure (); - path.SetMarkers (); - path.AddRectangle (new Rectangle (10, 20, 300, 400)); - path.StartFigure (); - path.SetMarkers (); - path.AddLine (new Point (400, 400), new Point (400, 10)); - - GraphicsPathIterator pathIterator = new GraphicsPathIterator(path); - pathIterator.Rewind (); - PointF [] actualPoints = new PointF [10]; - byte [] actualTypes = new byte [10]; - pathIterator.CopyData (ref actualPoints, ref actualTypes, 0, 9); - - PointF [] expectedPoints = new PointF [] { new PointF(100f, 100f), - new PointF(400f, 100f), - new PointF(400f, 200f), - new PointF(10f, 100f), - new PointF(10f, 20f), - new PointF(310f, 20f), - new PointF(310f, 420f), - new PointF(10f, 420f), - new PointF(400f, 400f), - new PointF(400f, 10f)}; - - for(int i = 0; i < expectedPoints.Length; i++) { - DrawingTest.AssertAlmostEqual(expectedPoints [i], actualPoints [i]); - } - - byte [] expectedTypes = new byte [] { (byte) PathPointType.Start, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) (PathPointType.Line | PathPointType.PathMarker), - (byte) PathPointType.Start, - (byte) PathPointType.Line, - (byte) PathPointType.Line, - (byte) (PathPointType.Line | PathPointType.CloseSubpath | PathPointType.PathMarker), - (byte) PathPointType.Start, - (byte) PathPointType.Line}; - - for (int i=0; i < expectedTypes.Length; i++) { - Assert.AreEqual (expectedTypes [i], actualTypes [i]); - } - } - } -} - diff --git a/mcs/class/System.Drawing/Test/DrawingTest/Test/Image.cs b/mcs/class/System.Drawing/Test/DrawingTest/Test/Image.cs deleted file mode 100644 index 2f48076afea..00000000000 --- a/mcs/class/System.Drawing/Test/DrawingTest/Test/Image.cs +++ /dev/null @@ -1,293 +0,0 @@ -using System; -using NUnit.Framework; -using System.Drawing; -using System.Drawing.Imaging; -using System.Drawing.Drawing2D; -using DrawingTestHelper; -using System.IO; - -namespace Test.Sys.Drawing { - [TestFixture] - public class ImageFixture { - DrawingTest t; - [SetUp] - public void SetUp () { - t = DrawingTest.Create (256, 256); - Image im=new Bitmap (@"..\..\Bitmap1.png"); - t.Graphics.DrawImageUnscaled (im, 0, 0); - } - [Test] - public void Clone () { - Image im1 = (Image) t.Bitmap.Clone (); - Assert.IsFalse (Object.ReferenceEquals (im1, t.Bitmap)); - Assert.AreEqual (DrawingTest.CalculateNorm ((Bitmap)im1), - DrawingTest.CalculateNorm (t.Bitmap)); - t.Graphics.FillRectangle (Brushes.Beige, 0, 0, 100, 100); - Assert.IsFalse (DrawingTest.CalculateNorm ((Bitmap)im1) == - DrawingTest.CalculateNorm (t.Bitmap)); - } - [Test] - public void Clone2 () { - Image im1 = (Image) t.Bitmap.Clone (new Rectangle(0, 0, t.Bitmap.Width, t.Bitmap.Height), t.Bitmap.PixelFormat); - t.Graphics.FillRectangle (Brushes.Beige, 0, 0, 100, 100); - Assert.IsFalse (DrawingTest.CalculateNorm ((Bitmap)im1) == - DrawingTest.CalculateNorm (t.Bitmap)); - } - [Test] - public void GetHashCodeTest () { - Assert.IsFalse (t.Bitmap.GetHashCode () == 0); - Bitmap im1 = new Bitmap (10, 20); - Assert.IsFalse (t.Bitmap.GetHashCode () == im1.GetHashCode ()); - } - [Test] - public void GetBounds () { - GraphicsUnit unit = new GraphicsUnit(); - Assert.AreEqual (new RectangleF (0, 0, 256, 256), - t.Bitmap.GetBounds (ref unit)); - Assert.AreEqual (GraphicsUnit.Pixel, unit); - } - [Test] -#if TARGET_JVM - [Category ("NotWorking")] -#endif - public void GetEncoderParameterList () { - Assert.Fail ("Test not implemented - undocumented parameter"); - } - [Test] - public void GetFrameCount () { - Assert.AreEqual (1, t.Bitmap.GetFrameCount (FrameDimension.Page)); - } - [Test] - public void GetFrameCount2 () { - try { - t.Bitmap.GetFrameCount (FrameDimension.Time); - } - catch (ArgumentException) { - Assert.IsTrue( true ); - } - } - [Test] - public void GetFrameCount3 () { - try { - t.Bitmap.GetFrameCount (new FrameDimension (Guid.NewGuid ())); - } - catch (ArgumentException) { - Assert.IsTrue( true ); - } - } - [Test] -#if TARGET_JVM - [Category ("NotWorking")] -#endif - public void GetPropertyItem () { - Assert.Fail ("Test not implemented - undocumented parameter"); - } - [Test] -#if TARGET_JVM - [Category ("NotWorking")] -#endif - public void RemovePropertyItem () { - Assert.Fail ("Test not implemented - undocumented parameter"); - } - static bool ThumbnailCallback() { - return false; - } - [Test] -#if TARGET_JVM - [Category ("NotWorking")] // FIXME: IntPtr -#endif - public void GetThumbnailImage() { - t.Show (); - Image.GetThumbnailImageAbort myCallback = - new Image.GetThumbnailImageAbort(ThumbnailCallback); - Image myThumbnail = t.Bitmap.GetThumbnailImage( - 10, 10, myCallback, IntPtr.Zero); - t.Graphics.DrawImageUnscaled (myThumbnail, 100, 75); - t.Show (); - } - [Test] -#if TARGET_JVM - [Category ("NotWorking")] // FIXME: Image.RotateFlip is not implemented for now. -#endif - public void RotateFlip () { - t.Show (); - t.Bitmap.RotateFlip (RotateFlipType.Rotate90FlipY); - t.Show (); - Assert.IsTrue (t.Compare (10)); - } - [Test] - public void Save_string () { - t.Bitmap.Save ("test.png"); - using (FileStream r = new FileStream ("test.png", FileMode.Open)) { - Bitmap b1 = new Bitmap (r); - Assert.AreEqual (DrawingTest.CalculateNorm (t.Bitmap), - DrawingTest.CalculateNorm (b1)); - } - File.Delete ("test.png"); - } - [Test] - public void Save_Stream_ImageFormat () { - using (FileStream w = new FileStream ("test.png", FileMode.OpenOrCreate)) { - t.Bitmap.Save (w, ImageFormat.Png); - } - using (FileStream r = new FileStream ("test.png", FileMode.Open)) { - Bitmap b1 = new Bitmap (r); - Assert.AreEqual (DrawingTest.CalculateNorm (t.Bitmap), - DrawingTest.CalculateNorm (b1)); - } - File.Delete ("test.png"); - } - [Test] - public void Save_string_ImageFormat () { - t.Bitmap.Save ("test.png", ImageFormat.Png); - using (FileStream r = new FileStream ("test.png", FileMode.Open)) { - Bitmap b1 = new Bitmap (r); - Assert.AreEqual (DrawingTest.CalculateNorm (t.Bitmap), - DrawingTest.CalculateNorm (b1)); - } - File.Delete ("test.png"); - } - [Test] -#if TARGET_JVM - [Category("NotWorking")] -#endif - public void Save_Stream_ImageCodecInfo_EncoderParameters () { - using (FileStream w = new FileStream ("test.png", FileMode.OpenOrCreate)) { - foreach (ImageCodecInfo i in ImageCodecInfo.GetImageEncoders()) { - if (i.FilenameExtension.IndexOf ("png") != -1) { - t.Bitmap.Save (w, i, new EncoderParameters ()); - break; - } - } - } - using (FileStream r = new FileStream ("test.png", FileMode.Open)) { - Bitmap b1 = new Bitmap (r); - Assert.AreEqual (DrawingTest.CalculateNorm (t.Bitmap), - DrawingTest.CalculateNorm (b1)); - } - File.Delete ("test.png"); - } - [Test] -#if TARGET_JVM - [Category("NotWorking")] -#endif - public void Save_string_ImageCodecInfo_EncoderParameters () { - foreach (ImageCodecInfo i in ImageCodecInfo.GetImageEncoders()) { - if (i.FilenameExtension.IndexOf ("png") != -1) { - t.Bitmap.Save ("test.png", i, new EncoderParameters ()); - break; - } - } - using (FileStream r = new FileStream ("test.png", FileMode.Open)) { - Bitmap b1 = new Bitmap (r); - Assert.AreEqual (DrawingTest.CalculateNorm (t.Bitmap), - DrawingTest.CalculateNorm (b1)); - } - File.Delete ("test.png"); - } - [Test] -#if TARGET_JVM - [Category ("NotWorking")] -#endif - public void SaveAdd () { - Assert.Fail ("Test not implemented"); - } - [Test] -#if TARGET_JVM - [Category ("NotWorking")] -#endif - public void SelectActiveFrame () { - Assert.Fail ("Test not implemented"); - } - [Test] - [Category ("NotWorking")] - public void SetPropertyItem () { - Assert.Fail ("Test not implemented - undocumented parameter"); - } - [Test] - public new void ToString () { - Assert.IsTrue (t.Bitmap.ToString().ToLower().StartsWith("system.drawing.bitmap")); - } - [Test] - public void Height () { - Assert.AreEqual (256, t.Bitmap.Height); - } - [Test] - public void Width () { - Assert.AreEqual (256, t.Bitmap.Width); - } - [Test] -#if TARGET_JVM - [Category ("NotWorking")] // FIXME: Image.HorizontalResolution is not implemented for now. -#endif - public void HorizontalResolution () { - Assert.AreEqual (96, t.Bitmap.HorizontalResolution); - } - [Test] -#if TARGET_JVM - [Category ("NotWorking")] // FIXME: Image.VerticalResolution is not implemented for now. -#endif - public void VerticalResolution () { - Assert.AreEqual (96, t.Bitmap.VerticalResolution); - } - [Test] - public void PixelFormatTest () { - Assert.AreEqual (PixelFormat.Format32bppArgb, t.Bitmap.PixelFormat); - } - [Test] -#if TARGET_JVM - [Category ("NotWorking")] // FIXME: Image.PropertyIdList is not implemented for now. -#endif - public void PropertyIdList () { - Assert.AreEqual (new int [0], t.Bitmap.PropertyIdList); - } - [Test] -#if TARGET_JVM - [Category ("NotWorking")] // FIXME: Image.PropertyItems is not implemented for now. -#endif - public void PropertyItems () { - Assert.AreEqual (new PropertyItem [0], t.Bitmap.PropertyItems); - } - [Test] - public void FrameDimensionsList () { - Assert.AreEqual (new Guid [] {FrameDimension.Page.Guid}, - t.Bitmap.FrameDimensionsList); - } - [Test] - [Category ("Create")] - public void PNG_Interop() - { - - string file_name = @"..\..\bitmap_gh.png"; - using (FileStream r = new FileStream (file_name, FileMode.Open)) - { - Image im = new Bitmap (r); - t.Graphics.DrawImageUnscaled (im, 0, 0); - Assert.IsTrue(t.Compare(2)); - } - - file_name = @"..\..\bitmap_net.png"; - using (FileStream r = new FileStream (file_name, FileMode.Open)) - { - Image im = new Bitmap (r); - t.Graphics.DrawImageUnscaled (im, 0, 0); - Assert.IsTrue(t.Compare(2)); - } - } - [Test] - public void DefaultSaveFormat() - { - Bitmap b = new Bitmap(64, 64); - b.Save("saveFormat.xxx"); - - StreamReader sr = new StreamReader("saveFormat.xxx"); - char [] buffer = new char[4]; - sr.Read(buffer, 0, 4); - sr.Close(); - - Assert.AreEqual('P', buffer[0]); - Assert.AreEqual('N', buffer[1]); - Assert.AreEqual('G', buffer[2]); - } - } -} diff --git a/mcs/class/System.Drawing/Test/DrawingTest/Test/Makefile b/mcs/class/System.Drawing/Test/DrawingTest/Test/Makefile deleted file mode 100644 index 96ccddbc3fc..00000000000 --- a/mcs/class/System.Drawing/Test/DrawingTest/Test/Makefile +++ /dev/null @@ -1,17 +0,0 @@ -MCS=mcs -NUNIT_FLAGS=/exclude=NotWorking - -sources=AssemblyInfo.cs Bitmap.cs Brush.cs Graphics.cs Image.cs Pen.cs Region.cs - -DRAWING_TEST_HELPER=DrawingTestHelper.dll -EXOCORTEX=Exocortex.DSP.dll - -Test.dll: $(sources) $(DRAWING_TEST_HELPER) - $(MCS) -t:library $(sources) -r:$(DRAWING_TEST_HELPER) -r:$(EXOCORTEX) -r:nunit.framework -r:System.Drawing -out:Test.dll - -$(DRAWING_TEST_HELPER): - cd ../DrawingTestHelper && make - cp ../DrawingTestHelper/*.dll . - -run-test: Test.dll - MONO_PATH="../../../../../class/lib/default::$(MONO_PATH)" /home/andrews/monobuild/mono/runtime/mono-wrapper --debug ../../../../../class/lib/default/nunit-console.exe Test.dll $(NUNIT_FLAGS) diff --git a/mcs/class/System.Drawing/Test/DrawingTest/Test/Pen.cs b/mcs/class/System.Drawing/Test/DrawingTest/Test/Pen.cs deleted file mode 100644 index be0dda8967b..00000000000 --- a/mcs/class/System.Drawing/Test/DrawingTest/Test/Pen.cs +++ /dev/null @@ -1,892 +0,0 @@ -using System; -using System.Drawing; -using System.Drawing.Drawing2D; -using NUnit.Framework; -using DrawingTestHelper; - -namespace Test.Sys.Drawing -{ - /// - /// Summary description for Pen. - /// - [TestFixture] - public class PenFixture { - //TODO: Brush, CompoundArray, CustomEndCap, CustomStartCap, - //StartCap, EndCap, PenType, Transform - DrawingTest t; - Pen p; - protected int TOLERANCE = 3; - - - [SetUp] - public void SetUp () { - t = DrawingTest.Create (256, 256); - p = new Pen (Color.Blue); - p.Width = 10; - DrawingTest.ShowForms = false; - } - - #region InitAlignment - [Test] - public void InitAlignment () { - Pen p = new Pen (Color.Blue); - Assert.AreEqual (PenAlignment.Center, p.Alignment); - } - #endregion - - #region PenWidth - [Test] - public void PenWidth_1() - { - Assert.AreEqual(10, p.Width); - t.Graphics.DrawLine (p, 20, 200, 200, 20); - t.Show(); - Assert.IsTrue (t.Compare (TOLERANCE * 1.5f)); //FIXME: Pen width in GH is not the same as in .NET - } - [Test] - public void PenWidth_2() - { - p.Width = 25; - t.Graphics.DrawLine (p, 20, 200, 200, 20); - t.Show(); - Assert.IsTrue (t.Compare (TOLERANCE)); - } - [Test] - public void PenWidth_3 () - { - t.Graphics.DrawLine (p, 10, 100, 200, 100); - t.Show (); - Assert.IsTrue (t.Compare (TOLERANCE)); - } - #endregion - - #region DashStyle Tests - [Test] - public void DashStyleTest_1 () - { - Assert.AreEqual (DashStyle.Solid, p.DashStyle); - p.Width = 14; - t.Graphics.DrawLine (p, 20, 100, 230, 100); - t.Show (); - Assert.IsTrue (t.Compare (TOLERANCE)); - } - [Test] - public void DashStyleTest_2 () { - p.DashStyle = DashStyle.Dash; - p.Width = 14; - t.Graphics.DrawLine (p, 20, 100, 230, 100); - t.Show (); - Assert.IsTrue (t.Compare (TOLERANCE)); - } - [Test] - public void DashStyleTest_3 () { - p.DashStyle = DashStyle.DashDot; - p.Width = 14; - t.Graphics.FillRectangle (Brushes.Black, 0, 0, 256, 256); - t.Graphics.DrawLine (p, 20, 100, 230, 100); - t.Show (); - Assert.IsTrue (t.Compare (TOLERANCE)); - } - [Test] - public void DashStyleTest_4 () { - p.DashStyle = DashStyle.DashDotDot; - p.Width = 14; - t.Graphics.FillRectangle (Brushes.Black, 0, 0, 256, 256); - t.Graphics.DrawLine (p, 20, 100, 230, 100); - t.Show (); - Assert.IsTrue (t.Compare (TOLERANCE)); - } - [Test] - public void DashStyleTest_5 () { - p.DashStyle = DashStyle.Dot; - p.Width = 14; - t.Graphics.FillRectangle (Brushes.Black, 0, 0, 256, 256); - t.Graphics.DrawLine (p, 20, 100, 230, 100); - t.Show (); - Assert.IsTrue (t.Compare (TOLERANCE)); - } - [Test] - public void DashStyleTest_6 () { - p.DashStyle = DashStyle.Custom; - p.Width = 14; - t.Graphics.FillRectangle (Brushes.Black, 0, 0, 256, 256); - t.Graphics.DrawLine (p, 20, 100, 230, 100); - t.Show (); - Assert.IsTrue (t.Compare (TOLERANCE)); - } - #endregion - - #region DashCustomStyle - //The following tests DashOffset and DashPattern - [Test] -#if TARGET_JVM - [Category ("NotWorking")] //FIXME: Bug in dashed line -#endif - public void DashCustomStyle_1 () { - p.DashStyle = DashStyle.Custom; - p.Width = 10; - Assert.AreEqual (new float [] {1F}, p.DashPattern); - Assert.AreEqual (0F, p.DashOffset); - } - [Test] - public void DashCustomStyle_2 () { - p.DashPattern = new float [] {2, 3, 1.15F, 0.05F}; - t.Graphics.FillRectangle (Brushes.Black, 0, 0, 256, 256); - t.Graphics.DrawLine (p, 20, 100, 200, 100); - t.Show (); - Assert.IsTrue (t.Compare (TOLERANCE)); - } - [Test] - public void DashCustomStyle_3 () { - p.DashOffset = 10F; - t.Graphics.DrawLine (p, 20, 100, 200, 100); - t.Show (); - Assert.IsTrue (t.Compare (TOLERANCE)); - } - [Test] -#if TARGET_JVM - [Category ("NotWorking")] //FIXME: Bug in dashed line -#endif - public void DashCustomStyle_4 () { - p.DashPattern = new float [] {2, 3, 1.15F, 0.05F, 1.74321F}; - p.DashOffset = 10.2F; - t.Graphics.DrawLine (p, 20, 100, 200, 100); - t.Show (); - Assert.IsTrue (t.Compare (TOLERANCE)); - } - [Test] -#if TARGET_JVM - [Category ("NotWorking")] //FIXME: Bug in dashed line -#endif - public void DashCustomStyle_5 () { - p.DashPattern = new float [] {2, 3, 1.15F, 0.05F, 1.74321F}; - p.DashOffset = 10.2F; - t.Graphics.DrawLine (p, 20, 100, 200, 100); - t.Show (); - Assert.IsTrue (t.Compare (TOLERANCE)); - } - #endregion - - #region DashCapTest - [Test] -#if TARGET_JVM - [Category ("NotWorking")] //FIXME: Bug in dashed line -#endif - public void DashCapTest_Flat () { - p.Width = 15; - Assert.AreEqual (DashCap.Flat, p.DashCap); - p.DashStyle = DashStyle.DashDot; - t.Graphics.DrawLine (p, 10, 100, 230, 100); - t.Show (); - Assert.IsTrue (t.Compare (TOLERANCE)); - } - [Test] -#if TARGET_JVM - [Category ("NotWorking")] //FIXME: Bug in dashed line -#endif - public void DashCapTest_Round () { - p.Width = 15; - p.DashStyle = DashStyle.DashDot; - p.DashCap = DashCap.Round; - t.Graphics.DrawLine (p, 10, 100, 230, 100); - t.Show (); - Assert.IsTrue (t.Compare (TOLERANCE)); - } - [Test] -#if TARGET_JVM - [Category ("NotWorking")] // FIXME: DashCap.Triangle is not sopported by GH -#endif - public void DashCapTest_Triangle () { - p.Width = 15; - p.DashStyle = DashStyle.DashDot; - p.DashCap = DashCap.Triangle; - t.Graphics.DrawLine (p, 10, 100, 230, 100); - t.Show (); - Assert.IsTrue (t.Compare (TOLERANCE)); - } - #endregion - - #region LineJoin Round - [Test] - public void LineJoinTest_Round_1 () { - Point [] points = new Point [] { - new Point(100, 210), new Point (120, 50), - new Point (140, 210)}; - p.Width = 25; - p.LineJoin = LineJoin.Round; - t.Graphics.DrawPolygon (p, points); - t.Graphics.DrawPolygon (Pens.White, points); - t.Show (); - Assert.IsTrue (t.Compare (TOLERANCE)); - } - - [Test] - public void LineJoinTest_Round_2 () { - Point [] points = new Point [] { - new Point(50, 210), new Point (120, 50), - new Point (190, 210)}; - p.Width = 25; - p.LineJoin = LineJoin.Round; - t.Graphics.DrawPolygon (p, points); - t.Graphics.DrawPolygon (Pens.White, points); - t.Show (); - Assert.IsTrue (t.Compare (TOLERANCE)); - } - #endregion - - #region LineJoin Miter - [Test] -#if TARGET_JVM - [Category ("NotWorking")] // FIXME: Currently Only MiterClipper is sopported by GH -#endif - public void LineJoinTest_Miter_1 () { - p.LineJoin = LineJoin.Miter; - Point [] points = new Point [] { - new Point(100, 217), new Point (130, 100), - new Point (160, 217)}; - p.Width = 25; - t.Graphics.DrawLines (p, points); - t.Graphics.DrawLines (Pens.White, points); - t.Show (); - Assert.IsTrue (t.Compare (TOLERANCE)); - } - [Test] -#if TARGET_JVM - [Category ("NotWorking")] // FIXME: Currently Only MiterClipper is sopported by GH -#endif - public void LineJoinTest_Miter_2 () { - p.LineJoin = LineJoin.Miter; - Point [] points = new Point [] { - new Point(120, 237), new Point (130, 100), - new Point (140, 237)}; - p.Width = 10; - t.Graphics.DrawLines (p, points); - t.Graphics.DrawLines (Pens.White, points); - t.Show (); - Assert.IsTrue (t.Compare (TOLERANCE)); - } - [Test] -#if TARGET_JVM - [Category ("NotWorking")] // FIXME: Currently Only MiterClipper is sopported by GH -#endif - public void LineJoinTest_Miter_3 () { - p.LineJoin = LineJoin.Miter; - Point [] points = new Point [] { - new Point(50, 217), new Point (100, 100), - new Point (150, 217)}; - p.Width = 25; - t.Graphics.DrawLines (p, points); - t.Graphics.DrawLines (Pens.White, points); - t.Show (); - Assert.IsTrue (t.Compare (TOLERANCE)); - } - #endregion - - #region LineJoin MiterClipped - [Test] - public void LineJoinTest_MiterClipped_1 () { - p.LineJoin = LineJoin.MiterClipped; - Point [] points = new Point [] { - new Point(100, 217), new Point (130, 100), - new Point (160, 217)}; - p.Width = 25; - t.Graphics.DrawLines (p, points); - t.Graphics.DrawLines (Pens.White, points); - t.Show (); - Assert.IsTrue (t.Compare (TOLERANCE)); - } - [Test] - public void LineJoinTest_MiterClipped_2 () { - p.LineJoin = LineJoin.MiterClipped; - Point [] points = new Point [] { - new Point(120, 217), new Point (130, 80), - new Point (140, 217)}; - p.Width = 25; - t.Graphics.DrawLines (p, points); - t.Graphics.DrawLines (Pens.White, points); - t.Show (); - Assert.IsTrue (t.Compare (TOLERANCE)); - } - [Test] - public void LineJoinTest_MiterClipped_3 () { - p.LineJoin = LineJoin.MiterClipped; - Point [] points = new Point [] { - new Point(50, 217), new Point (100, 100), - new Point (150, 217)}; - p.Width = 25; - t.Graphics.DrawLines (p, points); - t.Graphics.DrawLines (Pens.White, points); - t.Show (); - Assert.IsTrue (t.Compare (TOLERANCE)); - } - #endregion - - #region "LineJoin Bevel" - [Test] - public void LineJoinTest_Bevel_1 () { - p.LineJoin = LineJoin.Bevel; - Point [] points = new Point [] { - new Point(90, 217), new Point (115, 55), - new Point (140, 217)}; - p.Width = 25; - t.Graphics.DrawLines (p, points); - t.Graphics.DrawLines (Pens.White, points); - t.Show (); - Assert.IsTrue (t.Compare (TOLERANCE)); - } - [Test] - public void LineJoinTest_Bevel_2 () { - p.LineJoin = LineJoin.Bevel; - Point [] points = new Point [] { - new Point(110, 217), new Point (120, 75), - new Point (130, 217)}; - p.Width = 25; - t.Graphics.DrawLines (p, points); - t.Graphics.DrawLines (Pens.White, points); - t.Show (); - Assert.IsTrue (t.Compare (TOLERANCE)); - } - [Test] - public void LineJoinTest_Bevel_3 () { - p.LineJoin = LineJoin.Bevel; - Point [] points = new Point [] { - new Point(50, 217), new Point (100, 100), - new Point (150, 217)}; - p.Width = 25; - t.Graphics.DrawLines (p, points); - t.Graphics.DrawLines (Pens.White, points); - t.Show (); - Assert.IsTrue (t.Compare (TOLERANCE)); - } - [Test] - public void LineJoinTest_Bevel_4 () { - p.LineJoin = LineJoin.Bevel; - Point [] points = new Point [] { - new Point(143, 210), new Point (170, 100), - new Point (180, 20)}; - p.Width = 25; - t.Graphics.DrawLines (p, points); - t.Graphics.DrawLines (Pens.White, points); - t.Show (); - Assert.IsTrue (t.Compare (TOLERANCE)); - } - [Test] - public void LineJoinTest_Bevel_5 () { - p.LineJoin = LineJoin.Bevel; - Point [] points = new Point [] { - new Point(50, 100), new Point (150, 100), - new Point (150, 20), new Point (200, 20)}; - p.Width = 25; - t.Graphics.DrawLines (p, points); - t.Graphics.DrawLines (Pens.White, points); - t.Show (); - Assert.IsTrue (t.Compare (TOLERANCE)); - } - #endregion - - #region PenAlignment - [Test] - public void PenAlignmentTest_1 () { - Assert.AreEqual (PenAlignment.Center, p.Alignment); - Point [] points = new Point [] { - new Point (30, 30), new Point (100, 100), new Point (170, 30), - new Point (170, 200), new Point (30, 200)}; - GraphicsPath path = new GraphicsPath (); - path.AddPolygon (points); - - p.Width = 25; - t.Graphics.DrawPath (p, path); - t.Graphics.DrawPath (Pens.White, path); - t.Show (); - Assert.IsTrue (t.Compare (TOLERANCE)); - } - [Test] - public void PenAlignmentTest_2 () { - Point [] points = new Point [] { - new Point (30, 30), new Point (100, 100), new Point (170, 30), - new Point (170, 200), new Point (30, 200)}; - GraphicsPath path = new GraphicsPath (); - path.AddPolygon (points); - - p.Width = 25; - p.Alignment = PenAlignment.Left; - t.Graphics.DrawPath (p, path); - t.Graphics.DrawPath (Pens.White, path); - t.Show (); - Assert.IsTrue (t.Compare (TOLERANCE)); - } - - [Test] -#if TARGET_JVM - [Category ("NotWorking")] //FIXME: Bug in pen aligment -#endif - public void PenAlignmentTest_3 () { - Point [] points = new Point [] { - new Point (30, 30), new Point (100, 100), new Point (170, 30), - new Point (170, 200), new Point (30, 200)}; - GraphicsPath path = new GraphicsPath (); - path.AddPolygon (points); - - p.Width = 25; - p.Alignment = PenAlignment.Inset; - t.Graphics.DrawPath (p, path); - t.Graphics.DrawPath (Pens.White, path); - t.Show (); - Assert.IsTrue (t.Compare (TOLERANCE)); - } - - [Test] - public void PenAlignmentTest_4 () { - Point [] points = new Point [] { - new Point (30, 30), new Point (100, 100), new Point (170, 30), - new Point (170, 200), new Point (30, 200)}; - GraphicsPath path = new GraphicsPath (); - path.AddPolygon (points); - - p.Width = 25; - p.Alignment = PenAlignment.Outset; - t.Graphics.DrawPath (p, path); - t.Graphics.DrawPath (Pens.White, path); - t.Show (); - Assert.IsTrue (t.Compare (TOLERANCE)); - } - - [Test] - public void PenAlignmentTest_5 () { - Point [] points = new Point [] { - new Point (30, 30), new Point (100, 100), new Point (170, 30), - new Point (170, 200), new Point (30, 200)}; - GraphicsPath path = new GraphicsPath (); - path.AddPolygon (points); - - p.Width = 25; - p.Alignment = PenAlignment.Right; - t.Graphics.DrawPath (p, path); - t.Graphics.DrawPath (Pens.White, path); - t.Show (); - Assert.IsTrue (t.Compare (TOLERANCE)); - } - #endregion - - #region Color test - [Test] - public void ColorTest_1 () { - Assert.AreEqual (Color.Blue, p.Color); - p.Width = 25; - t.Graphics.DrawLine (p, 10, 100, 230, 100); - t.Show (); - Assert.IsTrue (t.Compare (TOLERANCE)); - } - [Test] - public void ColorTest_2 () { - p.Color = Color.Red; - p.Width = 25; - t.Graphics.DrawLine (p, 10, 100, 230, 100); - t.Show (); - Assert.IsTrue (t.Compare (TOLERANCE)); - } - [Test] - public void ColorTest_3 () { - p.Color = Color.BurlyWood; - p.Width = 25; - t.Graphics.DrawLine (p, 10, 100, 230, 100); - t.Show (); - Assert.IsTrue (t.Compare (TOLERANCE)); - } - [Test] - public void ColorTest_4 () { - p.Color = Color.FromArgb (100, 120, 255); - p.Width = 25; - t.Graphics.DrawLine (p, 10, 100, 230, 100); - t.Show (); - Assert.IsTrue (t.Compare (TOLERANCE)); - } - [Test] - public void ColorTest_5 () { - p.Color = Color.FromArgb (128, Color.White); - p.Width = 25; - t.Graphics.DrawLine (p, 10, 100, 230, 100); - t.Show (); - Assert.IsTrue (t.Compare (TOLERANCE)); - } - #endregion - - #region MiterLimit - [Test] - public void MitterLimit_1 () { - p.LineJoin = LineJoin.MiterClipped; - Point [] points = new Point [] {new Point (0,30), new Point (180, 30), - new Point (0, 90)}; - - p.Width = 25; - Assert.AreEqual (10F, p.MiterLimit); - t.Graphics.DrawLines (p, points); - t.Graphics.DrawLines (Pens.White, points); - t.Show (); - Assert.IsTrue (t.Compare (TOLERANCE)); - } - [Test] - public void MitterLimit_2 () { - p.MiterLimit=1F; - p.LineJoin = LineJoin.MiterClipped; - Point [] points = new Point [] {new Point (0,30), new Point (180, 30), - new Point (0, 120)}; - - p.Width = 25; - t.Graphics.DrawLines (p, points); - t.Graphics.DrawLines (Pens.White, points); - t.Show (); - Assert.IsTrue (t.Compare (TOLERANCE)); - } - #endregion - - #region TRansform - [Test] - public void Transform () { - p.ScaleTransform (0.5F, 2); - t.Graphics.DrawArc (p, 70, 70, 100, 100, 0, 360); - t.Graphics.DrawArc (Pens.White, 70, 70, 100, 100, 0, 360); - t.Show (); - Assert.IsTrue (t.Compare (TOLERANCE)); - } - #endregion - - #region Line StartCap - [Test] -#if TARGET_JVM - [Category ("NotWorking")] //FIXME: cannot apply start or end line caps separately -#endif - public void StartCap_Flat() { - Assert.AreEqual(LineCap.Flat, p.StartCap); - p.StartCap = LineCap.Flat; - p.Width = 25; - t.Graphics.DrawLine (p, 50, 100, 150, 100); - t.Graphics.DrawLine (Pens.White, 50, 100, 150, 100); - t.Show (); - Assert.IsTrue (t.Compare (TOLERANCE)); - } - [Test] -#if TARGET_JVM - [Category ("NotWorking")] //FIXME: cannot apply start or end line caps separately -#endif - public void StartCap_Round() { - p.StartCap = LineCap.Round; - p.Width = 25; - t.Graphics.DrawLine (p, 50, 100, 150, 100); - t.Graphics.DrawLine (Pens.White, 50, 100, 150, 100); - t.Show (); - Assert.IsTrue (t.Compare (TOLERANCE)); - } - [Test] -#if TARGET_JVM - [Category ("NotWorking")] //FIXME: cannot apply start or end line caps separately -#endif - public void StartCap_Square() { - p.StartCap = LineCap.Square; - p.Width = 25; - t.Graphics.DrawLine (p, 50, 100, 150, 100); - t.Graphics.DrawLine (Pens.White, 50, 100, 150, 100); - t.Show (); - Assert.IsTrue (t.Compare (TOLERANCE)); - } - [Test] -#if TARGET_JVM - [Category ("NotWorking")] //FIXME: cannot apply start or end line caps separately -#endif - public void StartCap_AnchorMask() { - p.StartCap = LineCap.AnchorMask; - p.Width = 25; - t.Graphics.DrawLine (p, 50, 100, 150, 100); - t.Graphics.DrawLine (Pens.White, 50, 100, 150, 100); - t.Show (); - Assert.IsTrue (t.Compare (TOLERANCE)); - } - [Test] -#if TARGET_JVM - [Category ("NotWorking")] //FIXME: cannot apply start or end line caps separately -#endif - public void StartCap_ArrowAnchor() { - p.StartCap = LineCap.ArrowAnchor; - p.Width = 25; - t.Graphics.DrawLine (p, 50, 100, 150, 100); - t.Graphics.DrawLine (Pens.White, 50, 100, 150, 100); - t.Show (); - Assert.IsTrue (t.Compare (TOLERANCE)); - } - [Test] -#if TARGET_JVM - [Category ("NotWorking")] //FIXME: cannot apply start or end line caps separately -#endif - public void StartCap_DiamondAnchor() { - p.StartCap = LineCap.DiamondAnchor; - p.Width = 25; - t.Graphics.DrawLine (p, 50, 100, 150, 100); - t.Graphics.DrawLine (Pens.White, 50, 100, 150, 100); - t.Show (); - Assert.IsTrue (t.Compare (TOLERANCE)); - } - [Test] -#if TARGET_JVM - [Category ("NotWorking")] //FIXME: cannot apply start or end line caps separately -#endif - public void StartCap_NoAnchor() { - p.StartCap = LineCap.NoAnchor; - p.Width = 25; - t.Graphics.DrawLine (p, 50, 100, 150, 100); - t.Graphics.DrawLine (Pens.White, 50, 100, 150, 100); - t.Show (); - Assert.IsTrue (t.Compare (TOLERANCE)); - } - [Test] -#if TARGET_JVM - [Category ("NotWorking")] //FIXME: cannot apply start or end line caps separately -#endif - public void StartCap_RoundAnchor() { - p.StartCap = LineCap.RoundAnchor; - p.Width = 25; - t.Graphics.DrawLine (p, 50, 100, 150, 100); - t.Graphics.DrawLine (Pens.White, 50, 100, 150, 100); - t.Show (); - Assert.IsTrue (t.Compare (TOLERANCE)); - } - [Test] -#if TARGET_JVM - [Category ("NotWorking")] //FIXME: cannot apply start or end line caps separately -#endif - public void StartCap_SquareAnchor() { - p.StartCap = LineCap.SquareAnchor; - p.Width = 25; - t.Graphics.DrawLine (p, 50, 100, 150, 100); - t.Graphics.DrawLine (Pens.White, 50, 100, 150, 100); - t.Show (); - Assert.IsTrue (t.Compare (TOLERANCE)); - } - [Test] -#if TARGET_JVM - [Category ("NotWorking")] //FIXME: cannot apply start or end line caps separately -#endif - public void StartCap_Triangle() { - p.StartCap = LineCap.Triangle; - p.Width = 25; - t.Graphics.DrawLine (p, 50, 100, 150, 100); - t.Graphics.DrawLine (Pens.White, 50, 100, 150, 100); - t.Show (); - Assert.IsTrue (t.Compare (TOLERANCE)); - } - [Test] -#if TARGET_JVM - [Category ("NotWorking")] //FIXME: cannot apply start or end line caps separately -#endif - public void StartCap_Custom() { - p.StartCap = LineCap.Custom; - p.Width = 25; - t.Graphics.DrawLine (p, 50, 100, 150, 100); - t.Graphics.DrawLine (Pens.White, 50, 100, 150, 100); - t.Show (); - Assert.IsTrue (t.Compare (TOLERANCE)); - } - #endregion - - #region Line EndCap - [Test] -#if TARGET_JVM - [Category ("NotWorking")] //FIXME: cannot apply start or end line caps separately -#endif - public void EndCap_Flat() - { - Assert.AreEqual(LineCap.Flat, p.EndCap); - p.EndCap = LineCap.Flat; - p.Width = 25; - t.Graphics.DrawLine (p, 50, 100, 150, 100); - t.Graphics.DrawLine (Pens.White, 50, 100, 150, 100); - t.Show (); - Assert.IsTrue (t.Compare (TOLERANCE)); - } - [Test] -#if TARGET_JVM - [Category ("NotWorking")] //FIXME: cannot apply start or end line caps separately -#endif - public void EndCap_Round() - { - p.EndCap = LineCap.Round; - p.Width = 25; - t.Graphics.DrawLine (p, 50, 100, 150, 100); - t.Graphics.DrawLine (Pens.White, 50, 100, 150, 100); - t.Show (); - Assert.IsTrue (t.Compare (TOLERANCE)); - } - [Test] -#if TARGET_JVM - [Category ("NotWorking")] //FIXME: cannot apply start or end line caps separately -#endif - public void EndCap_Square() { - p.EndCap = LineCap.Square; - p.Width = 25; - t.Graphics.DrawLine (p, 50, 100, 150, 100); - t.Graphics.DrawLine (Pens.White, 50, 100, 150, 100); - t.Show (); - Assert.IsTrue (t.Compare (TOLERANCE)); - } - [Test] -#if TARGET_JVM - [Category ("NotWorking")] //FIXME: cannot apply start or end line caps separately -#endif - public void EndCap_AnchorMask() { - p.EndCap = LineCap.AnchorMask; - p.Width = 25; - t.Graphics.DrawLine (p, 50, 100, 150, 100); - t.Graphics.DrawLine (Pens.White, 50, 100, 150, 100); - t.Show (); - Assert.IsTrue (t.Compare (TOLERANCE)); - } - [Test] -#if TARGET_JVM - [Category ("NotWorking")] //FIXME: cannot apply start or end line caps separately -#endif - public void EndCap_ArrowAnchor() { - p.EndCap = LineCap.ArrowAnchor; - p.Width = 25; - t.Graphics.DrawLine (p, 50, 100, 150, 100); - t.Graphics.DrawLine (Pens.White, 50, 100, 150, 100); - t.Show (); - Assert.IsTrue (t.Compare (TOLERANCE)); - } - [Test] -#if TARGET_JVM - [Category ("NotWorking")] //FIXME: cannot apply start or end line caps separately -#endif - public void EndCap_DiamondAnchor() { - p.EndCap = LineCap.DiamondAnchor; - p.Width = 25; - t.Graphics.DrawLine (p, 50, 100, 150, 100); - t.Graphics.DrawLine (Pens.White, 50, 100, 150, 100); - t.Show (); - Assert.IsTrue (t.Compare (TOLERANCE)); - } - [Test] -#if TARGET_JVM - [Category ("NotWorking")] //FIXME: cannot apply start or end line caps separately -#endif - public void EndCap_NoAnchor() { - p.EndCap = LineCap.NoAnchor; - p.Width = 25; - t.Graphics.DrawLine (p, 50, 100, 150, 100); - t.Graphics.DrawLine (Pens.White, 50, 100, 150, 100); - t.Show (); - Assert.IsTrue (t.Compare (TOLERANCE)); - } - [Test] -#if TARGET_JVM - [Category ("NotWorking")] //FIXME: cannot apply start or end line caps separately -#endif - public void EndCap_RoundAnchor() { - p.EndCap = LineCap.RoundAnchor; - p.Width = 25; - t.Graphics.DrawLine (p, 50, 100, 150, 100); - t.Graphics.DrawLine (Pens.White, 50, 100, 150, 100); - t.Show (); - Assert.IsTrue (t.Compare (TOLERANCE)); - } - [Test] -#if TARGET_JVM - [Category ("NotWorking")] //FIXME: cannot apply start or end line caps separately -#endif - public void EndCap_SquareAnchor() { - p.EndCap = LineCap.SquareAnchor; - p.Width = 25; - t.Graphics.DrawLine (p, 50, 100, 150, 100); - t.Graphics.DrawLine (Pens.White, 50, 100, 150, 100); - t.Show (); - Assert.IsTrue (t.Compare (TOLERANCE)); - } - [Test] -#if TARGET_JVM - [Category ("NotWorking")] //FIXME: cannot apply start or end line caps separately -#endif - public void EndCap_Triangle() { - p.EndCap = LineCap.Triangle; - p.Width = 25; - t.Graphics.DrawLine (p, 50, 100, 150, 100); - t.Graphics.DrawLine (Pens.White, 50, 100, 150, 100); - t.Show (); - Assert.IsTrue (t.Compare (TOLERANCE)); - } - [Test] -#if TARGET_JVM - [Category ("NotWorking")] //FIXME: cannot apply start or end line caps separately -#endif - public void EndCap_Custom() { - p.EndCap = LineCap.Custom; - p.Width = 25; - t.Graphics.DrawLine (p, 50, 100, 150, 100); - t.Graphics.DrawLine (Pens.White, 50, 100, 150, 100); - t.Show (); - Assert.IsTrue (t.Compare (TOLERANCE)); - } - #endregion - - #region Basic LineCaps StartEnd - [Test] - public void StartEndCapBasic_Flat() { - Assert.AreEqual(LineCap.Flat, p.StartCap); - - p.Width = 21; - p.EndCap = LineCap.Flat; - p.StartCap = LineCap.Flat; - t.Graphics.DrawLine (p, 50, 100, 150, 100); - t.Graphics.DrawLine (Pens.White, 50, 100, 150, 100); - t.Show (); - Assert.IsTrue (t.Compare (TOLERANCE)); - } - [Test] - public void StartEndCapBasic_Round() { - p.Width = 21; - p.EndCap = LineCap.Round; - p.StartCap = LineCap.Round; - t.Graphics.DrawLine (p, 50, 100, 150, 100); - t.Graphics.DrawLine (Pens.White, 50, 100, 150, 100); - t.Show (); - Assert.IsTrue (t.Compare (TOLERANCE)); - } - [Test] - public void StartEndCapBasic_Square() { - p.Width = 21; - p.EndCap = LineCap.Square; - p.StartCap = LineCap.Square; - t.Graphics.DrawLine (p, 50, 100, 150, 100); - t.Graphics.DrawLine (Pens.White, 50, 100, 150, 100); - t.Show (); - Assert.IsTrue (t.Compare (TOLERANCE)); - } - [Test] - public void SetLineCap_Flat() { - Assert.AreEqual(LineCap.Flat, p.StartCap); - - p.Width = 21; - p.SetLineCap(LineCap.Flat, LineCap.Flat, DashCap.Flat); - t.Graphics.DrawLine (p, 50, 100, 150, 100); - t.Graphics.DrawLine (Pens.White, 50, 100, 150, 100); - t.Show (); - Assert.IsTrue (t.Compare (TOLERANCE)); - } - [Test] - public void SetLineCap_Round() { - p.Width = 21; - p.SetLineCap(LineCap.Round, LineCap.Round, DashCap.Round); - t.Graphics.DrawLine (p, 50, 100, 150, 100); - t.Graphics.DrawLine (Pens.White, 50, 100, 150, 100); - t.Show (); - Assert.IsTrue (t.Compare (TOLERANCE)); - } - [Test] - public void SetLineCap_Square() { - p.Width = 21; - p.SetLineCap(LineCap.Square, LineCap.Square, DashCap.Flat); - t.Graphics.DrawLine (p, 50, 100, 150, 100); - t.Graphics.DrawLine (Pens.White, 50, 100, 150, 100); - t.Show (); - Assert.IsTrue (t.Compare (TOLERANCE)); - } - #endregion - } -} diff --git a/mcs/class/System.Drawing/Test/DrawingTest/Test/Pens.cs b/mcs/class/System.Drawing/Test/DrawingTest/Test/Pens.cs deleted file mode 100644 index bede472781d..00000000000 --- a/mcs/class/System.Drawing/Test/DrawingTest/Test/Pens.cs +++ /dev/null @@ -1,350 +0,0 @@ -using System; -using System.Drawing; -using System.Drawing.Drawing2D; -using NUnit.Framework; -using DrawingTestHelper; -using System.Reflection; - -namespace Test.Sys.Drawing -{ - /// - /// Summary description for Pens. - /// - - [TestFixture] - public class PensFixture - { - - [SetUp] - public void SetUp () - { - } - - #region names array - private string [] ar_pens = { - "Transparent", - "AliceBlue", - "AntiqueWhite", - "Aqua", - "Aquamarine", - "Azure", - "Beige", - "Bisque", - "Black", - "BlanchedAlmond", - "Blue", - "BlueViolet", - "Brown", - "BurlyWood", - "CadetBlue", - "Chartreuse", - "Chocolate", - "Coral", - "CornflowerBlue", - "Cornsilk", - "Crimson", - "Cyan", - "DarkBlue", - "DarkCyan", - "DarkGoldenrod", - "DarkGray", - "DarkGreen", - "DarkKhaki", - "DarkMagenta", - "DarkOliveGreen", - "DarkOrange", - "DarkOrchid", - "DarkRed", - "DarkSalmon", - "DarkSeaGreen", - "DarkSlateBlue", - "DarkSlateGray", - "DarkTurquoise", - "DarkViolet", - "DeepPink", - "DeepSkyBlue", - "DimGray", - "DodgerBlue", - "Firebrick", - "FloralWhite", - "ForestGreen", - "Fuchsia", - "Gainsboro", - "GhostWhite", - "Gold", - "Goldenrod", - "Gray", - "Green", - "GreenYellow", - "Honeydew", - "HotPink", - "IndianRed", - "Indigo", - "Ivory", - "Khaki", - "Lavender", - "LavenderBlush", - "LawnGreen", - "LemonChiffon", - "LightBlue", - "LightCoral", - "LightCyan", - "LightGoldenrodYellow", - "LightGreen", - "LightGray", - "LightPink", - "LightSalmon", - "LightSeaGreen", - "LightSkyBlue", - "LightSlateGray", - "LightSteelBlue", - "LightYellow", - "Lime", - "LimeGreen", - "Linen", - "Magenta", - "Maroon", - "MediumAquamarine", - "MediumBlue", - "MediumOrchid", - "MediumPurple", - "MediumSeaGreen", - "MediumSlateBlue", - "MediumSpringGreen", - "MediumTurquoise", - "MediumVioletRed", - "MidnightBlue", - "MintCream", - "MistyRose", - "Moccasin", - "NavajoWhite", - "Navy", - "OldLace", - "Olive", - "OliveDrab", - "Orange", - "OrangeRed", - "Orchid", - "PaleGoldenrod", - "PaleGreen", - "PaleTurquoise", - "PaleVioletRed", - "PapayaWhip", - "PeachPuff", - "Peru", - "Pink", - "Plum", - "PowderBlue", - "Purple", - "Red", - "RosyBrown", - "RoyalBlue", - "SaddleBrown", - "Salmon", - "SandyBrown", - "SeaGreen", - "SeaShell", - "Sienna", - "Silver", - "SkyBlue", - "SlateBlue", - "SlateGray", - "Snow", - "SpringGreen", - "SteelBlue", - "Tan", - "Teal", - "Thistle", - "Tomato", - "Turquoise", - "Violet", - "Wheat", - "White", - "WhiteSmoke", - "Yellow", - "YellowGreen"}; - - string [] ar_system_pens = { - "ActiveCaptionText", - "Control", - "ControlText", - "ControlDark", - "ControlDarkDark", - "ControlLight", - "ControlLightLight", - "GrayText", - "Highlight", - "HighlightText", - "InactiveCaptionText", - "InfoText", - "MenuText", - "WindowFrame", - "WindowText"}; - #endregion - - - [Test] - public void PensPropertyCount() - { - Type t = typeof(Pens); - PropertyInfo [] pi = t.GetProperties(BindingFlags.Static | BindingFlags.Public); - - int i = 0; - foreach (PropertyInfo p in pi) - { - if (p.PropertyType == typeof(Pen)) - { - i++; - } - } - Assert.AreEqual(ar_pens.Length, i, "Number of Pens"); - } - - [Test] - public void SystemPensPropertyCount() - { - Type t = typeof(SystemPens); - PropertyInfo [] pi = t.GetProperties(BindingFlags.Static | BindingFlags.Public); - - int i = 0; - foreach (PropertyInfo p in pi) - { - if (p.PropertyType == typeof(Pen)) - { - i++; - } - } - Assert.AreEqual(ar_system_pens.Length, i, "Number of System Pens"); - } - - [Test] - public void PensProperties () - { - Type t = typeof(Pens); - foreach (string s in ar_pens) - { - MemberInfo [] mi = t.GetMember(s); - - if (mi.Length == 1) - { - if (mi[0].MemberType == MemberTypes.Property) - { - PropertyInfo p = (PropertyInfo)mi[0]; - Pen pen = (Pen)p.GetValue(null, null); - Assert.AreEqual("Color [" + s + "]", pen.Color.ToString()); - } - else - { - Assert.Fail(s + " is not property of Pens class"); - } - } - else - { - Assert.Fail("Property " + s + " not found in Pens class"); - } - } - } - - [Test] - public void SystemPensProperties () - { - Type t = typeof(SystemPens); - foreach (string s in ar_system_pens) - { - MemberInfo [] mi = t.GetMember(s); - - if (mi.Length == 1) - { - if (mi[0].MemberType == MemberTypes.Property) - { - PropertyInfo p = (PropertyInfo)mi[0]; - Pen pen = (Pen)p.GetValue(null, null); - Assert.AreEqual("Color [" + s + "]", pen.Color.ToString()); - } - else - { - Assert.Fail(s + " is not property of SystemPens class"); - } - } - else - { - Assert.Fail("Property " + s + " not found in SystemPens class"); - } - } - } - - [Test] - public void PenAssignValue () - { - Type t = typeof(Pens); - foreach (string s in ar_pens) - { - MemberInfo [] mi = t.GetMember(s); - - if (mi.Length == 1) - { - if (mi[0].MemberType == MemberTypes.Property) - { - PropertyInfo p = (PropertyInfo)mi[0]; - Pen pen = (Pen)p.GetValue(null, null); - - try - { - pen.Color = Color.AliceBlue; - Assert.Fail("Pen.Color must throw exception"); - } - catch(ArgumentException) - { - Assert.IsTrue(true); - } - } - else - { - Assert.Fail(s + " is not property of Pens class"); - } - } - else - { - Assert.Fail("Property " + s + " not found in Pens class"); - } - } - } - - [Test] - public void SystemPenAssignValue () - { - Type t = typeof(SystemPens); - foreach (string s in ar_system_pens) - { - MemberInfo [] mi = t.GetMember(s); - - if (mi.Length == 1) - { - if (mi[0].MemberType == MemberTypes.Property) - { - PropertyInfo p = (PropertyInfo)mi[0]; - Pen pen = (Pen)p.GetValue(null, null); - - try - { - pen.Color = Color.AliceBlue; - Assert.Fail("SystemPen.Color must throw exception"); - } - catch(ArgumentException) - { - Assert.IsTrue(true); - } - } - else - { - Assert.Fail(s + " is not property of SystemPen class"); - } - } - else - { - Assert.Fail("Property " + s + " not found in SystemPen class"); - } - } - } - } -} diff --git a/mcs/class/System.Drawing/Test/DrawingTest/Test/Region.cs b/mcs/class/System.Drawing/Test/DrawingTest/Test/Region.cs deleted file mode 100644 index d758c92632b..00000000000 --- a/mcs/class/System.Drawing/Test/DrawingTest/Test/Region.cs +++ /dev/null @@ -1,238 +0,0 @@ -using System; -using NUnit.Framework; -using System.Drawing; -using System.Drawing.Drawing2D; -using DrawingTestHelper; - -namespace Test.Sys.Drawing { - [TestFixture] - public class RegionFixture { - DrawingTest t; - RectangleF rect; - Region r; - [SetUp] - public void SetUp () - { - t = DrawingTest.Create (1000, 1000); - rect = new RectangleF (50, 50, 50, 50); - r = new Region(rect); - } - [Test] -#if TARGET_JVM - [Category ("NotWorking")] // FIXME: Region.GetRegionData is not implemented -#endif - public void ctor_RegionData () { - RegionData rgnData = r.GetRegionData (); - Region r1 = new Region (rgnData); - Assert.AreEqual (rgnData.Data, r1.GetRegionData ().Data); - } - [Test] - public void ctor_GraphicsPath () { - GraphicsPath path = new GraphicsPath (); - path.AddRectangle (rect); - Region r1 = new Region (path); - r1.Xor (r); - Assert.IsTrue (r1.IsEmpty (t.Graphics)); - } - [Test] -#if TARGET_JVM - [Category ("NotWorking")] // FIXME: Region.GetRegionData is not implemented -#endif - public void ctor_Rectangle () { - Region r1 = new Region (new Rectangle ((int)rect.X, (int)rect.Y, - (int)rect.Width, (int)rect.Height)); - Assert.AreEqual (r.GetRegionData ().Data, - r1.GetRegionData ().Data); - } - [Test] -#if TARGET_JVM - [Category ("NotWorking")] // FIXME: Region.GetRegionData is not implemented -#endif - public void ctor_RectangleF () { - Region r1 = new Region (rect); - Assert.AreEqual (r.GetRegionData ().Data, - r1.GetRegionData ().Data); - } - [Test] -#if TARGET_JVM - [Category ("NotWorking")] // FIXME: Bug in Region.IsInfinite -#endif - public void ctor_void () { - Region r1 = new Region (); - Assert.IsTrue (r1.IsInfinite (t.Graphics)); - } - [Test] - public void Clone () { - Region r1 = r.Clone (); - Assert.IsFalse (Object.ReferenceEquals (r1, r)); - Assert.AreEqual (r1.GetBounds (t.Graphics), r.GetBounds (t.Graphics)); - r1.Xor (r); - Assert.IsTrue (r1.IsEmpty (t.Graphics)); - Assert.IsFalse (r.IsEmpty (t.Graphics)); - } - [Test] - public void Complement () { - r.Complement (new Rectangle (70, 70, 80, 20)); - Assert.AreEqual (new RectangleF (100, 70, 50, 20), - r.GetBounds (t.Graphics)); - } - [Test] - public void Equals_Graphics () { - Region r1 = new Region (rect); - Assert.IsTrue (r.Equals (r1, t.Graphics)); - } - [Test] - public void Exclude () { - r.Exclude (new Rectangle (10, 10, 90, 60)); - Assert.AreEqual (new RectangleF (50, 70, 50, 30), - r.GetBounds (t.Graphics)); - } - [Test] - public void GetBounds () - { - Assert.AreEqual (rect, r.GetBounds (t.Graphics)); - } - [Test] -#if TARGET_JVM - [Category ("NotWorking")] // FIXME: Region.GetRegionData is not implemented -#endif - public void GetRegionData () { - byte [] actual = r.GetRegionData ().Data; - byte [] expected = new byte [] {28, 0, 0, 0, 186, 15, 11, 58, 1, 16, - 192, 219, 0, 0, 0, 0, 0, 0, 0, 16, - 0, 0, 72, 66, 0, 0, 72, 66, 0, 0, - 72, 66, 0, 0, 72, 66}; - Assert.AreEqual (expected, actual); - } - [Test] -#if TARGET_JVM - [Category ("NotWorking")] // FIXME: Bug in Region.GetRegionScans -#endif - public void GetRegionScans () { - Assert.AreEqual (new RectangleF [] {new Rectangle (50, 50, 50, 50)}, - r.GetRegionScans (new Matrix ())); - r.Union (new Rectangle (100, 100, 50, 50)); - RectangleF [] rs = new RectangleF [] { - new Rectangle (50, 50, 50, 50), - new Rectangle (100, 100, 50, 50)}; - Assert.AreEqual (rs, - r.GetRegionScans (new Matrix ())); - } - [Test] - public void Intersect () { - r.Intersect (new Rectangle (70, 70, 50, 50)); - Assert.AreEqual (new RectangleF (70, 70, 30, 30), - r.GetBounds (t.Graphics)); - } - [Test] - public void IsEmpty () { - Assert.IsFalse (r.IsEmpty (t.Graphics)); - r.Xor (r.Clone ()); - Assert.IsTrue (r.IsEmpty (t.Graphics)); - } - [Test] - public void IsInfinite () { - Assert.IsFalse (r.IsInfinite (t.Graphics)); - r.MakeInfinite (); - Assert.IsTrue (r.IsInfinite (t.Graphics)); - RectangleF infiniteRect = new RectangleF (-0x400000, -0x400000, 0x800000, 0x800000); - Assert.AreEqual (new RectangleF [] {infiniteRect}, - r.GetRegionScans (new Matrix ())); - r.Exclude (new Rectangle (10, 10, 10, 10)); - Assert.IsFalse (r.IsInfinite (t.Graphics)); - Assert.AreEqual (infiniteRect, r.GetBounds (t.Graphics)); - } - [Test] - public void IsVisible_int () { - Rectangle rectD = new Rectangle (50, 50, 10000, 10000); - r = new Region (rectD); - Assert.IsTrue (r.IsVisible (rectD, t.Graphics)); - Assert.IsTrue (r.IsVisible (rectD.X, rectD.Y, rectD.Height, rectD.Width, - t.Graphics)); - Assert.IsTrue (r.IsVisible (rectD)); - Assert.IsTrue (r.IsVisible (rectD.X, rectD.Y, rectD.Height, rectD.Width)); - Assert.IsFalse (r.IsVisible (new Point (rectD.Right, rectD.Bottom), - t.Graphics)); - Assert.IsTrue (r.IsVisible (new Point (rectD.X, rectD.Y))); - Assert.IsFalse (r.IsVisible (new Point (rectD.X-1, rectD.Y-1))); - Assert.IsTrue (r.IsVisible (100, 100, t.Graphics)); - Assert.IsTrue (r.IsVisible (100, 100)); - } - [Test] - [Category ("NotWorking")] - public void IsVisible_float () { - t.Graphics.PageScale = 10; - rect = new Rectangle (50, 50, 1000, 1000); - r = new Region (rect); - Assert.IsTrue (r.IsVisible (rect, t.Graphics)); - Assert.IsTrue (r.IsVisible (rect.X, rect.Y, rect.Height, rect.Width, - t.Graphics)); - Assert.IsTrue (r.IsVisible (rect)); - Assert.IsTrue (r.IsVisible (rect.X, rect.Y, rect.Height, rect.Width)); - Assert.IsFalse (r.IsVisible (new PointF (rect.Right, rect.Bottom), - t.Graphics)); - Assert.IsFalse (r.IsVisible (new PointF (rect.Right, rect.Bottom))); - Assert.IsFalse (r.IsVisible (new PointF (rect.Right-0.1F, - rect.Bottom-0.1F))); - Assert.IsTrue (r.IsVisible (new PointF (rect.Right-1, - rect.Bottom-1))); - Assert.IsTrue (r.IsVisible (100.0F, 100.0F, t.Graphics)); - Assert.IsTrue (r.IsVisible (100.0F, 100.0F)); - Assert.IsTrue (r.IsVisible (new PointF (rect.X, rect.Y))); - Assert.IsFalse (r.IsVisible (new PointF (rect.X-0.4F, - rect.Y-0.4F))); - } - [Test] - public void MakeEmpty () { - Assert.IsFalse (r.IsEmpty (t.Graphics)); - r.MakeEmpty (); - Assert.IsTrue (r.IsEmpty (t.Graphics)); - Assert.AreEqual (new RectangleF (0,0,0,0), r.GetBounds (t.Graphics)); - Assert.IsFalse (r.IsVisible (new Rectangle (0, 0, 0, 0))); - } - [Test] - public void MakeInfinite () { - Assert.IsFalse (r.IsInfinite (t.Graphics)); - r.MakeInfinite (); - Assert.IsTrue (r.IsInfinite (t.Graphics)); - RectangleF infiniteRect = new RectangleF (-0x400000, -0x400000, 0x800000, 0x800000); - Assert.AreEqual (new RectangleF [] {infiniteRect}, - r.GetRegionScans (new Matrix ())); - } - [Test] - public new void ToString () { - Assert.IsTrue (r.ToString ().ToLower().StartsWith("system.drawing.region")); - } - [Test] - public void Transform () { - } - [Test] - public void Translate () { - } - [Test] -#if TARGET_JVM - [Category ("NotWorking")] // FIXME: Bug in Region.GetRegionScans -#endif - public void Union () { - r.Union (new Rectangle (70, 70, 100, 100)); - RectangleF [] rs = new RectangleF [] { - new RectangleF (50, 50, 50, 20), - new RectangleF (50, 70, 120, 30), - new RectangleF (70, 100, 100, 70)}; - Assert.AreEqual (rs, r.GetRegionScans (new Matrix())); - } - [Test] -#if TARGET_JVM - [Category ("NotWorking")] // FIXME: Bug in Region.GetRegionScans -#endif - public void Xor () { - r.Xor (new Rectangle (0, 0, 70, 70)); - RectangleF [] rs = new RectangleF [] { - new RectangleF (0, 0, 70, 50), - new RectangleF (0, 50, 50, 20), - new RectangleF (70, 50, 30, 20), - new RectangleF (50, 70, 50, 30)}; - Assert.AreEqual (rs, r.GetRegionScans (new Matrix())); - } - } -} \ No newline at end of file diff --git a/mcs/class/System.Drawing/Test/DrawingTest/Test/SampIcon.ico b/mcs/class/System.Drawing/Test/DrawingTest/Test/SampIcon.ico deleted file mode 100644 index 698d20c06c4af35d1e041bb45c8b4b812123044a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1406 zcmeH{uTvXA6vw|Ig3xF6A>p)L?9v}5C{Y!;she%L_|acA_5U{;zX`5lNlxl`~?i3o%eR$+u66@eLJ&2 zgho6L@*GYlfdqgpGD=~UY?yyQWR%GtGhCh5P}LRa$^p6^7nP!nGqVWyx(TazgtLl* zvU-eu{}zSZF07IaUCYAKRkWJtXuA#uz7JcMp=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yp7VOlaB;$D7^Y}W%};;6Z5kU1^w!^zW(5ZM7G2Q8Rs6u3VW4filHaxDF|$~UB2Xa zKu_z|56v%(<(bz^jp;U??@(`6S)_wUm zhgV$`S&(=&gX_YEEECp@2-8_iCTpa88KuH{mof0Jb_;H33tc>%l>M+@){y?7QrO3d P0SG)@{an^LB{Ts5GM~1_ diff --git a/mcs/class/System.Drawing/Test/DrawingTest/Test/bitmap50.png b/mcs/class/System.Drawing/Test/DrawingTest/Test/bitmap50.png deleted file mode 100644 index ca244e0fc47861ed496b9ec6ef0b8c43bbb8a916..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 433 zcmV;i0Z#sjP)Px#1ZP1_K>z@;j|==^1poj5AY({UO#lFTCIA3{ga82g0001h=l}q9FaQARU;qF* zm;eA5aGbhPJOBUy7j#8fbW?9;ba!ELWdKlNX>N2bPDNB8b}}w8yXp<+0003DNklcZek(;SIERlfFG@%sAYl_IPH5@DqX5QnM=;w%E) zjHLI`0DN9~Z@twADG(lE&OMERc!Lpv9S89O)2QP=kP1^Cw(Dx@l_1+PQ568o2)Z@5 z5{7`F8$c~=2?GN`!N~4p29jY`ughtIAR@fCbCwbvW<-eqrKSB?QCgElLupZ3=aFGj zNw?c6ElP{hdaf$g2y28j!Wy~w&})1xVFbkZvLj4xbMpZKQ8R632O%LO4BSQ8VPr!L zI)Y4$C6;8wq9%Ts;?sj34-joPQ>@zH!%$C|Xk|Ato?d^CjP0i+(b^it00000NkvXXu0mjfGFGHD diff --git a/mcs/class/System.Drawing/Test/DrawingTest/Test/bitmap_gh.png b/mcs/class/System.Drawing/Test/DrawingTest/Test/bitmap_gh.png deleted file mode 100644 index 90bd4427ba2473ba6fb4951fd8aa64bdfbea8c86..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 23443 zcmdQ~=_;@RO91 z7}Nmw#2Ohqq@m=b1OR|WTTA0H0D!I^K>#`F^) z;RpbhPqj7FO#)}Ot#A9TwEq$pqo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1XFVmJlMKS zTUcbCHviX?Osmw0$k;qKX~)zPsU{5GGoae+WNHik%^pnBlb$0hHyrP=-Od}z8GmEF zO?(Uo_I7B^&2Q;Uc+Ci{my)X$=8pV(X>??nZUdO^_P7uMm>0vk`Q4SN4Xaew*dxEP z(AIBh#)ht#SKh9I9{W>xF9&a^yL8;tugssa{Sr1TI9h5F7b7l9vF%kg*Ohl0T=s~( zGR~Ck?J$vYfD>q+X8LE0#xF@3P diff --git a/mcs/class/System.Drawing/Test/DrawingTest/Test/bitmap_net.png b/mcs/class/System.Drawing/Test/DrawingTest/Test/bitmap_net.png deleted file mode 100644 index 74387b7d7b2f960bb332564821d2435c842f59b6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 27876 zcmeEt_cz?%6Zd_4 z0PlqXVAC7`q*4KZ(KVy-xeNfjwN!ngpzm$E(;|?_^6ao>Cq=;6&cTk?j*pj@_vX79 z?fysK$m++ANf-q)9y?ph7}Qz)Z1j8T=6J0qj-4vbxFsD zv?a(Nzx%)yXx|NQS3t??EdnT6-1Wgu)30y@?B-`sh8U)^37m;~4kBxQmA zZ!+-5eeWKo)sLJ7sKm3o(wL9ZO921>hyTy*Vf_Q(a_if@y}+~cldGMcxu$z&t!;Sr z)7FhYqZL6deg~(^3!^S_E2l$Em?J{=QvC=)FFkAYRD5sWbMrCgXsrv|4b+a{Ze~~y;;36+RS{eDZzQlar>B6?{$^}X;$PuuF-RsLXLgw3` z%PUM1hHxfbex>bvL8u^H@9iF$5e96Vug|#b&knD?C1@@`N&no2zZ&(&me%hMS1iM@ z^}DmOdk0%Srt-b->^lFvXBH{1A+QBKCPFG)45`Lo8M7`XrC!p!-bSr={u`Z@wFXdr_Iz}UE9?UQ%5w0$<(Qt0ouAI)$(k|Z4s=2 zBLnWD2z3C{ zk+ASgxwsVEAczBF!JXpa&=7Fg6s?+rkoj$F>|(=X8dV*8AjfLx{X42yiN0oPqTs-m zpzOAA&;LM0WfP{=#U^+tibVK2`6+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7bE%@5kozf-#+yP({v4#~UC1-%I@8F%l?Soq3Yc$yGEolui>+ Nlzk^tC1n=!e*mW$jVJ&B diff --git a/mcs/class/System.Drawing/Test/System.Drawing.Design/CategoryNameCollectionCas.cs b/mcs/class/System.Drawing/Test/System.Drawing.Design/CategoryNameCollectionCas.cs deleted file mode 100644 index 39fcc525c8f..00000000000 --- a/mcs/class/System.Drawing/Test/System.Drawing.Design/CategoryNameCollectionCas.cs +++ /dev/null @@ -1,83 +0,0 @@ -// -// CategoryNameCollectionCas.cs -// - CAS unit tests for System.Drawing.Design.CategoryNameCollection -// -// Author: -// Sebastien Pouliot -// -// Copyright (C) 2005 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using NUnit.Framework; - -using System; -using System.Drawing.Design; -using System.Reflection; -using System.Security; -using System.Security.Permissions; -using System.Security.Policy; - -namespace MonoCasTests.System.Drawing.Design { - - [TestFixture] - [Category ("CAS")] - public class CategoryNameCollectionCas { - - private ConstructorInfo ctor; - - [TestFixtureSetUp] - public void FixtureSetUp () - { - // this executes at fulltrust - ConstructorInfo[] infos = typeof (CategoryNameCollection).GetConstructors (); - ctor = infos[0]; - } - - [SetUp] - public void SetUp () - { - if (!SecurityManager.SecurityEnabled) - Assert.Ignore ("SecurityManager.SecurityEnabled is OFF"); - } - - [Test] - [PermissionSet (SecurityAction.Deny, Unrestricted = true)] - public void Create () - { - new CategoryNameCollection (new string[0]); - } - - // we use reflection to call CategoryNameCollection class as it's - // protected by a LinkDemand (which will be converted into full demand, - // i.e. a stack walk) when reflection is used (i.e. it gets testable). - - [Test] - [SecurityPermission (SecurityAction.Deny, SkipVerification = true)] - [ExpectedException (typeof (SecurityException))] - public void Create_LinkDemand () - { - // requires FullTrust, so denying anything break the requirements - Assert.IsNotNull (ctor, "constructor"); - ctor.Invoke (new object[1] { (string[])null }); - } - } -} diff --git a/mcs/class/System.Drawing/Test/System.Drawing.Design/ChangeLog b/mcs/class/System.Drawing/Test/System.Drawing.Design/ChangeLog deleted file mode 100644 index 66c0b0914c8..00000000000 --- a/mcs/class/System.Drawing/Test/System.Drawing.Design/ChangeLog +++ /dev/null @@ -1,18 +0,0 @@ -2005-09-16 Sebastien Pouliot - - * CategoryNameCollectionCas.cs: New. CAS unit tests to check for - LinkDemand for SkipVerification. - * PaintValueEventArgsCas.cs: New. CAS unit tests to check for - LinkDemand for SkipVerification. - * PropertyValueUIItemCas.cs: New. CAS unit tests to check for - LinkDemand for SkipVerification. - * ToolboxComponentsCreatedEventArgsCas.cs: New. CAS unit tests to - check for LinkDemand for SkipVerification. - * ToolboxComponentsCreatingEventArgsCas.cs: New. CAS unit tests to - check for LinkDemand for SkipVerification. - * ToolboxItemCas.cs: New. CAS unit tests to check for LinkDemand for - SkipVerification. - * ToolboxItemCollectionCas.cs: New. CAS unit tests to check for - LinkDemand for SkipVerification. - * UITypeEditorCas.cs: New. CAS unit tests to check for LinkDemand for - SkipVerification. diff --git a/mcs/class/System.Drawing/Test/System.Drawing.Design/PaintValueEventArgsCas.cs b/mcs/class/System.Drawing/Test/System.Drawing.Design/PaintValueEventArgsCas.cs deleted file mode 100644 index c28b515877b..00000000000 --- a/mcs/class/System.Drawing/Test/System.Drawing.Design/PaintValueEventArgsCas.cs +++ /dev/null @@ -1,85 +0,0 @@ -// -// PaintValueEventArgsCas.cs -// - CAS unit tests for System.Drawing.Design.PaintValueEventArgs -// -// Author: -// Sebastien Pouliot -// -// Copyright (C) 2005 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using NUnit.Framework; - -using System; -using System.Drawing; -using System.Drawing.Design; -using System.Reflection; -using System.Security; -using System.Security.Permissions; -using System.Security.Policy; - -namespace MonoCasTests.System.Drawing.Design { - - [TestFixture] - [Category ("CAS")] - public class PaintValueEventArgsCas { - - private ConstructorInfo ctor; - - [TestFixtureSetUp] - public void FixtureSetUp () - { - // this executes at fulltrust - ConstructorInfo[] infos = typeof (PaintValueEventArgs).GetConstructors (); - ctor = infos[0]; - } - - [SetUp] - public void SetUp () - { - if (!SecurityManager.SecurityEnabled) - Assert.Ignore ("SecurityManager.SecurityEnabled is OFF"); - } - - [Test] - [PermissionSet (SecurityAction.Deny, Unrestricted = true)] - public void Create () - { - Rectangle r = new Rectangle (); - new PaintValueEventArgs (null, null, Graphics.FromImage (new Bitmap (10, 10)), r); - } - - // we use reflection to call PaintValueEventArgs class as it's protected - // by a LinkDemand (which will be converted into full demand, i.e. a - // stack walk) when reflection is used (i.e. it gets testable). - - [Test] - [SecurityPermission (SecurityAction.Deny, SkipVerification = true)] - [ExpectedException (typeof (SecurityException))] - public void Create_LinkDemand () - { - // requires FullTrust, so denying anything break the requirements - Assert.IsNotNull (ctor, "constructor"); - ctor.Invoke (new object[4]); - } - } -} diff --git a/mcs/class/System.Drawing/Test/System.Drawing.Design/PropertyValueUIItemCas.cs b/mcs/class/System.Drawing/Test/System.Drawing.Design/PropertyValueUIItemCas.cs deleted file mode 100644 index be02541ed34..00000000000 --- a/mcs/class/System.Drawing/Test/System.Drawing.Design/PropertyValueUIItemCas.cs +++ /dev/null @@ -1,89 +0,0 @@ -// -// PropertyValueUIItemCas.cs -// - CAS unit tests for System.Drawing.Design.PropertyValueUIItem -// -// Author: -// Sebastien Pouliot -// -// Copyright (C) 2005 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using NUnit.Framework; - -using System; -using System.ComponentModel; -using System.Drawing; -using System.Drawing.Design; -using System.Reflection; -using System.Security; -using System.Security.Permissions; -using System.Security.Policy; - -namespace MonoCasTests.System.Drawing.Design { - - [TestFixture] - [NUnit.Framework.Category ("CAS")] - public class PropertyValueUIItemCas { - - private ConstructorInfo ctor; - - [TestFixtureSetUp] - public void FixtureSetUp () - { - // this executes at fulltrust - ConstructorInfo[] infos = typeof (PropertyValueUIItem).GetConstructors (); - ctor = infos[0]; - } - - [SetUp] - public void SetUp () - { - if (!SecurityManager.SecurityEnabled) - Assert.Ignore ("SecurityManager.SecurityEnabled is OFF"); - } - - private void PropertyValueUIItemInvoke (ITypeDescriptorContext context, PropertyDescriptor descriptor, PropertyValueUIItem invokedItem) - { - } - - [Test] - [PermissionSet (SecurityAction.Deny, Unrestricted = true)] - public void Create () - { - new PropertyValueUIItem (new Bitmap (10, 10), PropertyValueUIItemInvoke, null); - } - - // we use reflection to call PropertyValueUIItem class as it's protected - // by a LinkDemand (which will be converted into full demand, i.e. a stack - // walk) when reflection is used (i.e. it gets testable). - - [Test] - [SecurityPermission (SecurityAction.Deny, SkipVerification = true)] - [ExpectedException (typeof (SecurityException))] - public void Create_LinkDemand () - { - // requires FullTrust, so denying anything break the requirements - Assert.IsNotNull (ctor, "constructor"); - ctor.Invoke (new object [3]); - } - } -} diff --git a/mcs/class/System.Drawing/Test/System.Drawing.Design/ToolboxComponentsCreatedEventArgsCas.cs b/mcs/class/System.Drawing/Test/System.Drawing.Design/ToolboxComponentsCreatedEventArgsCas.cs deleted file mode 100644 index e2fc4d73db2..00000000000 --- a/mcs/class/System.Drawing/Test/System.Drawing.Design/ToolboxComponentsCreatedEventArgsCas.cs +++ /dev/null @@ -1,83 +0,0 @@ -// -// ToolboxComponentsCreatedEventArgsCas.cs - CAS unit tests -// for System.Drawing.Design.ToolboxComponentsCreatedEventArgs -// -// Author: -// Sebastien Pouliot -// -// Copyright (C) 2005 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using NUnit.Framework; - -using System; -using System.Drawing.Design; -using System.Reflection; -using System.Security; -using System.Security.Permissions; -using System.Security.Policy; - -namespace MonoCasTests.System.Drawing.Design { - - [TestFixture] - [Category ("CAS")] - public class ToolboxComponentsCreatedEventArgsCas { - - private ConstructorInfo ctor; - - [TestFixtureSetUp] - public void FixtureSetUp () - { - // this executes at fulltrust - ConstructorInfo[] infos = typeof (ToolboxComponentsCreatedEventArgs).GetConstructors (); - ctor = infos[0]; - } - - [SetUp] - public void SetUp () - { - if (!SecurityManager.SecurityEnabled) - Assert.Ignore ("SecurityManager.SecurityEnabled is OFF"); - } - - [Test] - [PermissionSet (SecurityAction.Deny, Unrestricted = true)] - public void Create () - { - new ToolboxComponentsCreatedEventArgs (null); - } - - // we use reflection to call ToolboxComponentsCreatedEventArgs class as - // it's protected by a LinkDemand (which will be converted into full demand, - // i.e. a stack walk) when reflection is used (i.e. it gets testable). - - [Test] - [SecurityPermission (SecurityAction.Deny, SkipVerification = true)] - [ExpectedException (typeof (SecurityException))] - public void Create_LinkDemand () - { - // requires FullTrust, so denying anything break the requirements - Assert.IsNotNull (ctor, "constructor"); - ctor.Invoke (new object[1] { null }); - } - } -} diff --git a/mcs/class/System.Drawing/Test/System.Drawing.Design/ToolboxComponentsCreatingEventArgsCas.cs b/mcs/class/System.Drawing/Test/System.Drawing.Design/ToolboxComponentsCreatingEventArgsCas.cs deleted file mode 100644 index b7b4264e394..00000000000 --- a/mcs/class/System.Drawing/Test/System.Drawing.Design/ToolboxComponentsCreatingEventArgsCas.cs +++ /dev/null @@ -1,83 +0,0 @@ -// -// ToolboxComponentsCreatingEventArgsCas.cs - CAS unit tests -// for System.Drawing.Design.ToolboxComponentsCreatingEventArgs -// -// Author: -// Sebastien Pouliot -// -// Copyright (C) 2005 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using NUnit.Framework; - -using System; -using System.Drawing.Design; -using System.Reflection; -using System.Security; -using System.Security.Permissions; -using System.Security.Policy; - -namespace MonoCasTests.System.Drawing.Design { - - [TestFixture] - [Category ("CAS")] - public class ToolboxComponentsCreatingEventArgsCas { - - private ConstructorInfo ctor; - - [TestFixtureSetUp] - public void FixtureSetUp () - { - // this executes at fulltrust - ConstructorInfo[] infos = typeof (ToolboxComponentsCreatingEventArgs).GetConstructors (); - ctor = infos[0]; - } - - [SetUp] - public void SetUp () - { - if (!SecurityManager.SecurityEnabled) - Assert.Ignore ("SecurityManager.SecurityEnabled is OFF"); - } - - [Test] - [PermissionSet (SecurityAction.Deny, Unrestricted = true)] - public void Create () - { - new ToolboxComponentsCreatingEventArgs (null); - } - - // we use reflection to call ToolboxComponentsCreatingEventArgs class as - // it's protected by a LinkDemand (which will be converted into full demand, - // i.e. a stack walk) when reflection is used (i.e. it gets testable). - - [Test] - [SecurityPermission (SecurityAction.Deny, SkipVerification = true)] - [ExpectedException (typeof (SecurityException))] - public void Create_LinkDemand () - { - // requires FullTrust, so denying anything break the requirements - Assert.IsNotNull (ctor, "constructor"); - ctor.Invoke (new object[1] { null }); - } - } -} diff --git a/mcs/class/System.Drawing/Test/System.Drawing.Design/ToolboxItemCas.cs b/mcs/class/System.Drawing/Test/System.Drawing.Design/ToolboxItemCas.cs deleted file mode 100644 index 2efc1ca2fd7..00000000000 --- a/mcs/class/System.Drawing/Test/System.Drawing.Design/ToolboxItemCas.cs +++ /dev/null @@ -1,82 +0,0 @@ -// -// ToolboxItemCas.cs - CAS unit tests for System.Drawing.Design.ToolboxItem -// -// Author: -// Sebastien Pouliot -// -// Copyright (C) 2005 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using NUnit.Framework; - -using System; -using System.Drawing.Design; -using System.Reflection; -using System.Security; -using System.Security.Permissions; -using System.Security.Policy; - -namespace MonoCasTests.System.Drawing.Design { - - [TestFixture] - [Category ("CAS")] - public class ToolboxItemCas { - - private ConstructorInfo ctor; - - [TestFixtureSetUp] - public void FixtureSetUp () - { - // this executes at fulltrust - ConstructorInfo[] infos = typeof (ToolboxItem).GetConstructors (); - ctor = infos[0]; - } - - [SetUp] - public void SetUp () - { - if (!SecurityManager.SecurityEnabled) - Assert.Ignore ("SecurityManager.SecurityEnabled is OFF"); - } - - [Test] - [PermissionSet (SecurityAction.Deny, Unrestricted = true)] - public void Create () - { - new ToolboxItem (); - } - - // we use reflection to call ToolboxItem class as it's protected by a - // LinkDemand (which will be converted into full demand, i.e. a stack - // walk) when reflection is used (i.e. it gets testable). - - [Test] - [SecurityPermission (SecurityAction.Deny, SkipVerification = true)] - [ExpectedException (typeof (SecurityException))] - public void Create_LinkDemand () - { - // requires FullTrust, so denying anything break the requirements - Assert.IsNotNull (ctor, "constructor"); - ctor.Invoke (null); - } - } -} diff --git a/mcs/class/System.Drawing/Test/System.Drawing.Design/ToolboxItemCollectionCas.cs b/mcs/class/System.Drawing/Test/System.Drawing.Design/ToolboxItemCollectionCas.cs deleted file mode 100644 index 3a175310e3e..00000000000 --- a/mcs/class/System.Drawing/Test/System.Drawing.Design/ToolboxItemCollectionCas.cs +++ /dev/null @@ -1,83 +0,0 @@ -// -// ToolboxItemCollectionCas.cs -// - CAS unit tests for System.Drawing.Design.ToolboxItemCollection -// -// Author: -// Sebastien Pouliot -// -// Copyright (C) 2005 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using NUnit.Framework; - -using System; -using System.Drawing.Design; -using System.Reflection; -using System.Security; -using System.Security.Permissions; -using System.Security.Policy; - -namespace MonoCasTests.System.Drawing.Design { - - [TestFixture] - [Category ("CAS")] - public class ToolboxItemCollectionCas { - - private ConstructorInfo ctor; - - [TestFixtureSetUp] - public void FixtureSetUp () - { - // this executes at fulltrust - ConstructorInfo[] infos = typeof (ToolboxItemCollection).GetConstructors (); - ctor = infos[0]; - } - - [SetUp] - public void SetUp () - { - if (!SecurityManager.SecurityEnabled) - Assert.Ignore ("SecurityManager.SecurityEnabled is OFF"); - } - - [Test] - [PermissionSet (SecurityAction.Deny, Unrestricted = true)] - public void Create () - { - new ToolboxItemCollection (new ToolboxItem [0]); - } - - // we use reflection to call ToolboxItemCollection class as it's protected - // by a LinkDemand (which will be converted into full demand, i.e. a stack - // walk) when reflection is used (i.e. it gets testable). - - [Test] - [SecurityPermission (SecurityAction.Deny, SkipVerification = true)] - [ExpectedException (typeof (SecurityException))] - public void Create_LinkDemand () - { - // requires FullTrust, so denying anything break the requirements - Assert.IsNotNull (ctor, "constructor"); - ctor.Invoke (new object[1] { new ToolboxItem[0] }); - } - } -} diff --git a/mcs/class/System.Drawing/Test/System.Drawing.Design/UITypeEditorCas.cs b/mcs/class/System.Drawing/Test/System.Drawing.Design/UITypeEditorCas.cs deleted file mode 100644 index ff56d40d4e8..00000000000 --- a/mcs/class/System.Drawing/Test/System.Drawing.Design/UITypeEditorCas.cs +++ /dev/null @@ -1,82 +0,0 @@ -// -// UITypeEditorCas.cs - CAS unit tests for System.Drawing.Design.UITypeEditor -// -// Author: -// Sebastien Pouliot -// -// Copyright (C) 2005 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using NUnit.Framework; - -using System; -using System.Drawing.Design; -using System.Reflection; -using System.Security; -using System.Security.Permissions; -using System.Security.Policy; - -namespace MonoCasTests.System.Drawing.Design { - - [TestFixture] - [Category ("CAS")] - public class UITypeEditorCas { - - private ConstructorInfo ctor; - - [TestFixtureSetUp] - public void FixtureSetUp () - { - // this executes at fulltrust - ConstructorInfo[] infos = typeof (UITypeEditor).GetConstructors (); - ctor = infos[0]; - } - - [SetUp] - public void SetUp () - { - if (!SecurityManager.SecurityEnabled) - Assert.Ignore ("SecurityManager.SecurityEnabled is OFF"); - } - - [Test] - [PermissionSet (SecurityAction.Deny, Unrestricted = true)] - public void Create () - { - new UITypeEditor (); - } - - // we use reflection to call UITypeEditor class as it's protected by a - // LinkDemand (which will be converted into full demand, i.e. a stack - // walk) when reflection is used (i.e. it gets testable). - - [Test] - [SecurityPermission (SecurityAction.Deny, SkipVerification = true)] - [ExpectedException (typeof (SecurityException))] - public void Create_LinkDemand () - { - // requires FullTrust, so denying anything break the requirements - Assert.IsNotNull (ctor, "constructor"); - ctor.Invoke (null); - } - } -} diff --git a/mcs/class/System.Drawing/Test/System.Drawing.Drawing2D/ChangeLog b/mcs/class/System.Drawing/Test/System.Drawing.Drawing2D/ChangeLog deleted file mode 100644 index 23a1a51ee0a..00000000000 --- a/mcs/class/System.Drawing/Test/System.Drawing.Drawing2D/ChangeLog +++ /dev/null @@ -1,38 +0,0 @@ -2005-09-16 Sebastien Pouliot - - * TestBlend.cs, TestColorBlend.cs, TestHatchBrush.cs, TestMatrix.cs: - Deny UnmanagedCode permission to all tests. This shows (when executed - under MS runtime) that S.D API is safe and doesn't requires high - privileges to run - even if we know that, deep down, this calls into - GDI+. - -2005-08-25 Jordi Mas i Hernandez - - * TestMatrix.cs: New test cases - -2005-08-24 Jordi Mas i Hernandez - - * TestMatrix.cs: New Matrix unit case - -2004-06-03 Ravindra - - * TestHatchBrush.cs: Added missing test cases for all the hatch - styles. - -2004-05-18 Ravindra - - * TestHatchBrush.cs: Added a test case for HatchBrush.cs. - * TestBlend.cs: dos2unix format and namespace changed to - MonoTests.System.Drawing.Drawing2D. - * TestColorBlend.cs: dos2unix format and namespace changed to - MonoTests.System.Drawing.Drawing2D. - -2004-03-17 Ravindra - - * TestBlend.cs: Added. - * TestColorBlend.cs: Added. - -2004-03-17 Ravindra - * System.Drawing.Drawing2D: Created a repository for - System.Drawing.Drawing2D tests. - * ChangeLog: Added. diff --git a/mcs/class/System.Drawing/Test/System.Drawing.Drawing2D/TestBlend.cs b/mcs/class/System.Drawing/Test/System.Drawing.Drawing2D/TestBlend.cs deleted file mode 100644 index f66ea61094b..00000000000 --- a/mcs/class/System.Drawing/Test/System.Drawing.Drawing2D/TestBlend.cs +++ /dev/null @@ -1,83 +0,0 @@ -// -// Tests for System.Drawing.Drawing2D.Blend.cs -// -// Author: -// Ravindra (rkumar@novell.com) -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using NUnit.Framework; -using System; -using System.Drawing; -using System.Drawing.Drawing2D; -using System.Security.Permissions; - -namespace MonoTests.System.Drawing.Drawing2D -{ - [TestFixture] - [SecurityPermission (SecurityAction.Deny, UnmanagedCode = true)] - public class BlendTest : Assertion - { - [TearDown] - public void TearDown () { } - - [SetUp] - public void SetUp () { } - - [Test] - public void TestConstructors () - { - Blend blend0 = new Blend (); - - AssertEquals ("C#1", 1, blend0.Factors.Length); - AssertEquals ("C#2", 1, blend0.Positions.Length); - - Blend blend1 = new Blend (1); - - AssertEquals ("C#3", 1, blend1.Factors.Length); - AssertEquals ("C#4", 1, blend1.Positions.Length); - } - - [Test] - public void TestProperties () - { - Blend blend0 = new Blend (); - - AssertEquals ("P#1", 0, blend0.Factors[0]); - AssertEquals ("P#2", 0, blend0.Positions[0]); - - Blend blend1 = new Blend (1); - float[] positions = {0.0F, 0.5F, 1.0F}; - float[] factors = {0.0F, 0.5F, 1.0F}; - blend1.Factors = factors; - blend1.Positions = positions; - - AssertEquals ("P#3", factors[0], blend1.Factors[0]); - AssertEquals ("P#4", factors[1], blend1.Factors[1]); - AssertEquals ("P#5", factors[2], blend1.Factors[2]); - AssertEquals ("P#6", positions[0], blend1.Positions[0]); - AssertEquals ("P#7", positions[1], blend1.Positions[1]); - AssertEquals ("P#8", positions[2], blend1.Positions[2]); - } - } -} diff --git a/mcs/class/System.Drawing/Test/System.Drawing.Drawing2D/TestColorBlend.cs b/mcs/class/System.Drawing/Test/System.Drawing.Drawing2D/TestColorBlend.cs deleted file mode 100644 index 2ddc9b539e6..00000000000 --- a/mcs/class/System.Drawing/Test/System.Drawing.Drawing2D/TestColorBlend.cs +++ /dev/null @@ -1,83 +0,0 @@ -// -// Tests for System.Drawing.Drawing2D.ColorBlend.cs -// -// Author: -// Ravindra (rkumar@novell.com) -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using NUnit.Framework; -using System; -using System.Drawing; -using System.Drawing.Drawing2D; -using System.Security.Permissions; - -namespace MonoTests.System.Drawing.Drawing2D -{ - [TestFixture] - [SecurityPermission (SecurityAction.Deny, UnmanagedCode = true)] - public class ColorBlendTest : Assertion - { - [TearDown] - public void TearDown () { } - - [SetUp] - public void SetUp () { } - - [Test] - public void TestConstructors () - { - ColorBlend cb0 = new ColorBlend (); - - AssertEquals ("C#1", 1, cb0.Colors.Length); - AssertEquals ("C#2", 1, cb0.Positions.Length); - - ColorBlend cb1 = new ColorBlend (1); - - AssertEquals ("C#3", 1, cb1.Colors.Length); - AssertEquals ("C#4", 1, cb1.Positions.Length); - } - - [Test] - public void TestProperties () - { - ColorBlend cb0 = new ColorBlend (); - - AssertEquals ("P#1", Color.Empty, cb0.Colors[0]); - AssertEquals ("P#2", 0, cb0.Positions[0]); - - ColorBlend cb1 = new ColorBlend (1); - float[] positions = {0.0F, 0.5F, 1.0F}; - Color[] colors = {Color.Red, Color.White, Color.Black}; - cb1.Colors = colors; - cb1.Positions = positions; - - AssertEquals ("P#3", colors[0], cb1.Colors[0]); - AssertEquals ("P#4", colors[1], cb1.Colors[1]); - AssertEquals ("P#5", colors[2], cb1.Colors[2]); - AssertEquals ("P#6", positions[0], cb1.Positions[0]); - AssertEquals ("P#7", positions[1], cb1.Positions[1]); - AssertEquals ("P#8", positions[2], cb1.Positions[2]); - } - } -} diff --git a/mcs/class/System.Drawing/Test/System.Drawing.Drawing2D/TestHatchBrush.cs b/mcs/class/System.Drawing/Test/System.Drawing.Drawing2D/TestHatchBrush.cs deleted file mode 100644 index 1972f82c7cc..00000000000 --- a/mcs/class/System.Drawing/Test/System.Drawing.Drawing2D/TestHatchBrush.cs +++ /dev/null @@ -1,621 +0,0 @@ -// -// System.Drawing.Drawing2D.TestHatchBrush.cs -// -// Author: -// Ravindra (rkumar@novell.com) -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - - -using System; -using System.Drawing; -using System.Drawing.Imaging; -using System.Drawing.Drawing2D; -using System.Security.Permissions; -using NUnit.Framework; - -namespace MonoTests.System.Drawing.Drawing2D -{ - [TestFixture] - [SecurityPermission (SecurityAction.Deny, UnmanagedCode = true)] - public class HatchBrushTest : Assertion - { - Graphics gr; - Bitmap bmp; - Font font; - Color bgColor; // background color - Color fgColor; // foreground color - int currentTop; // the location for next drawing operation - int spacing; // space between two consecutive drawing operations - int fontSize; // text size - int textStart; // text starting location - int lineStart; // line starting location - int length; // length of the line - int penWidth; // width of the Pen used to draw lines - - [SetUp] - public void GetReady () { } - - [TearDown] - public void Clear () { } - - public HatchBrushTest () - { - fontSize = 16; - textStart = 10; - lineStart = 200; - length = 400; - penWidth = 50; - currentTop = 0; - spacing = 50; - - bgColor = Color.Yellow; - fgColor = Color.Red; - } - - [Test] - public void TestProperties () - { - HatchBrush hbr = new HatchBrush(HatchStyle.SolidDiamond, fgColor); - - AssertEquals ("Props#1", hbr.HatchStyle, HatchStyle.SolidDiamond); - AssertEquals ("Props#2", hbr.ForegroundColor.ToArgb(), fgColor.ToArgb()); - AssertEquals ("Props#3", hbr.BackgroundColor.ToArgb(), Color.Black.ToArgb()); - - hbr = new HatchBrush(HatchStyle.Cross, fgColor, bgColor); - - AssertEquals ("Props#4", hbr.HatchStyle, HatchStyle.Cross); - AssertEquals ("Props#5", hbr.ForegroundColor.ToArgb(), fgColor.ToArgb()); - AssertEquals ("Props#6", hbr.BackgroundColor.ToArgb(), bgColor.ToArgb()); - } - - [Test] - public void TestClone () - { - HatchBrush hbr = new HatchBrush(HatchStyle.Cross, fgColor, bgColor); - - HatchBrush clone = (HatchBrush) hbr.Clone (); - - AssertEquals ("Clone#1", hbr.HatchStyle, clone.HatchStyle); - AssertEquals ("Clone#2", hbr.ForegroundColor, clone.ForegroundColor); - AssertEquals ("Clone#3", hbr.BackgroundColor, clone.BackgroundColor); - } - - [Test] - public void TestDrawing () - { - // create a bitmap with big enough dimensions - // to accomodate all the tests - bmp = new Bitmap (700, 6000); // width, height - gr = Graphics.FromImage (bmp); - font = new Font (new FontFamily ("Arial"), fontSize); - - // make the background white - gr.Clear (Color.White); - - // draw figures using hatch brush constructed - // using different constructors - Constructors (); - - // draw figures using different hatchstyles - HatchStyles (); - - // save the drawing - string file = "TestHatchBrush" + getOutSufix() + ".png"; - bmp.Save (file, ImageFormat.Png); - } - - private void Constructors () - { - int top = currentTop; - SolidBrush br = new SolidBrush (Color.Black); - - top += spacing; - - gr.DrawString ("Test Constructors", font, br, textStart, top); - - // #1 - top += spacing; - gr.DrawString ("Test #1 Horizontal, BackgroundColor=Black, ForegroundColor=White", font, br, textStart, top); - - top += spacing; - Pen pen = new Pen (new HatchBrush (HatchStyle.Horizontal, Color.White), penWidth); - gr.DrawLine (pen, lineStart, top, lineStart + length, top); - - // #2 - top += spacing; - gr.DrawString ("Test #2 Vertical, BackgroundColor=Blue, ForegroundColor=Red", font, br, textStart, top); - - top += spacing; - pen = new Pen (new HatchBrush (HatchStyle.Vertical, Color.Red, Color.Blue), penWidth); - gr.DrawLine (pen, lineStart, top, lineStart + length, top); - - currentTop = top; - } - - private void HatchStyles () - { - int top = currentTop; - HatchBrush hbr; - Pen pen; - SolidBrush br = new SolidBrush (Color.Black); - - top += spacing; - - gr.DrawString ("Test HatchStyles", font, br, textStart, top); - - // #1 - top += spacing; - gr.DrawString ("Test #1 Horizontal", font, br, textStart, top); - - top += spacing; - hbr = new HatchBrush (HatchStyle.Horizontal, fgColor, bgColor); - pen = new Pen (hbr, penWidth); - gr.DrawLine (pen, lineStart, top, lineStart + length, top); - - // #2 - top += spacing; - gr.DrawString ("Test #2 Min", font, br, textStart, top); - - top += spacing; - pen.Brush = new HatchBrush (HatchStyle.Min, fgColor, bgColor); - gr.DrawLine (pen, lineStart, top, lineStart + length, top); - - // #3 - top += spacing; - gr.DrawString ("Test #3 DarkHorizontal", font, br, textStart, top); - - top += spacing; - pen.Brush = new HatchBrush (HatchStyle.DarkHorizontal, fgColor, bgColor); - gr.DrawLine (pen, lineStart, top, lineStart + length, top); - - // #4 - top += spacing; - gr.DrawString ("Test #4 LightHorizontal", font, br, textStart, top); - - top += spacing; - pen.Brush = new HatchBrush (HatchStyle.LightHorizontal, fgColor, bgColor); - gr.DrawLine (pen, lineStart, top, lineStart + length, top); - - // #5 - top += spacing; - gr.DrawString ("Test #5 NarrowHorizontal", font, br, textStart, top); - - top += spacing; - pen.Brush = new HatchBrush (HatchStyle.NarrowHorizontal, fgColor, bgColor); - gr.DrawLine (pen, lineStart,top, lineStart + length,top); - - // #6 - top += spacing; - gr.DrawString ("Test #6 Vertical", font, br, textStart, top); - - top += spacing; - pen.Brush = new HatchBrush (HatchStyle.Vertical, fgColor, bgColor); - gr.DrawLine (pen, lineStart, top, lineStart + length, top); - - // #7 - top += spacing; - gr.DrawString ("Test #7 DarkVertical", font, br, textStart, top); - - top += spacing; - pen.Brush = new HatchBrush (HatchStyle.DarkVertical, fgColor, bgColor); - gr.DrawLine (pen, lineStart, top, lineStart + length, top); - - // #8 - top += spacing; - gr.DrawString ("Test #8 LightVertical", font, br, textStart, top); - - top += spacing; - pen.Brush = new HatchBrush (HatchStyle.LightVertical, fgColor, bgColor); - gr.DrawLine (pen, lineStart, top, lineStart + length, top); - - // #9 - top += spacing; - gr.DrawString ("Test #9 NarrowVertical", font, br, textStart, top); - - top += spacing; - pen.Brush = new HatchBrush (HatchStyle.NarrowVertical, fgColor, bgColor); - gr.DrawLine (pen, lineStart, top, lineStart + length, top); - - // #10 - top += spacing; - gr.DrawString ("Test #10 Cross", font, br, textStart, top); - - top += spacing; - pen.Brush = new HatchBrush (HatchStyle.Cross, fgColor, bgColor); - gr.DrawLine (pen, lineStart, top, lineStart + length, top); - - // #11 - top += spacing; - gr.DrawString ("Test #11 LargeGrid", font, br, textStart, top); - - top += spacing; - pen.Brush = new HatchBrush (HatchStyle.LargeGrid, fgColor, bgColor); - gr.DrawLine (pen, lineStart, top, lineStart + length, top); - - // #12 - top += spacing; - gr.DrawString ("Test #12 SmallGrid", font, br, textStart, top); - - top += spacing; - pen.Brush = new HatchBrush (HatchStyle.SmallGrid, fgColor, bgColor); - gr.DrawLine (pen, lineStart, top, lineStart + length, top); - - // #13 - top += spacing; - gr.DrawString ("Test #13 DottedGrid", font, br, textStart, top); - - top += spacing; - pen.Brush = new HatchBrush (HatchStyle.DottedGrid, fgColor, bgColor); - gr.DrawLine (pen, lineStart,top, lineStart + length,top); - - // #14 - top += spacing; - gr.DrawString ("Test #14 DiagonalCross", font, br, textStart, top); - - top += spacing; - pen.Brush = new HatchBrush (HatchStyle.DiagonalCross, fgColor, bgColor); - gr.DrawLine (pen, lineStart, top, lineStart + length, top); - - // #15 - top += spacing; - gr.DrawString ("Test #15 BackwardDiagonal", font, br, textStart, top); - - top += spacing; - pen.Brush = new HatchBrush (HatchStyle.BackwardDiagonal, fgColor, bgColor); - gr.DrawLine (pen, lineStart, top, lineStart + length, top); - - // #16 - top += spacing; - gr.DrawString ("Test #16 ForwardDiagonal", font, br, textStart, top); - - top += spacing; - pen.Brush = new HatchBrush (HatchStyle.ForwardDiagonal, fgColor, bgColor); - gr.DrawLine (pen, lineStart, top, lineStart + length, top); - - // #17 - top += spacing; - gr.DrawString ("Test #17 LightDownwardDiagonal", font, br, textStart, top); - - top += spacing; - pen.Brush = new HatchBrush (HatchStyle.LightDownwardDiagonal, fgColor, bgColor); - gr.DrawLine (pen, lineStart, top, lineStart + length, top); - - // #18 - top += spacing; - gr.DrawString ("Test #18 DarkDownwardDiagonal", font, br, textStart, top); - - top += spacing; - pen.Brush = new HatchBrush (HatchStyle.DarkDownwardDiagonal, fgColor, bgColor); - gr.DrawLine (pen, lineStart, top, lineStart + length, top); - - // #19 - top += spacing; - gr.DrawString ("Test #19 WideDownwardDiagonal", font, br, textStart, top); - - top += spacing; - pen.Brush = new HatchBrush (HatchStyle.WideDownwardDiagonal, fgColor, bgColor); - gr.DrawLine (pen, lineStart, top, lineStart + length, top); - - // #20 - top += spacing; - gr.DrawString ("Test #20 LightUpwardDiagonal", font, br, textStart, top); - - top += spacing; - pen.Brush = new HatchBrush (HatchStyle.LightUpwardDiagonal, fgColor, bgColor); - gr.DrawLine (pen, lineStart, top, lineStart + length, top); - - // #21 - top += spacing; - gr.DrawString ("Test #21 DarkUpwardDiagonal", font, br, textStart, top); - - top += spacing; - pen.Brush = new HatchBrush (HatchStyle.DarkUpwardDiagonal, fgColor, bgColor); - gr.DrawLine (pen, lineStart, top, lineStart + length, top); - - // #22 - top += spacing; - gr.DrawString ("Test #22 WideUpwardDiagonal", font, br, textStart, top); - - top += spacing; - pen.Brush = new HatchBrush (HatchStyle.WideUpwardDiagonal, fgColor, bgColor); - gr.DrawLine (pen, lineStart, top, lineStart + length, top); - - // #23 - top += spacing; - gr.DrawString ("Test #23 DashedHorizontal", font, br, textStart, top); - - top += spacing; - pen.Brush = new HatchBrush (HatchStyle.DashedHorizontal, fgColor, bgColor); - gr.DrawLine (pen, lineStart, top, lineStart + length, top); - - // #24 - top += spacing; - gr.DrawString ("Test #24 DashedVertical", font, br, textStart, top); - - top += spacing; - hbr = new HatchBrush (HatchStyle.DashedVertical, fgColor, bgColor); - gr.FillRectangle (hbr, lineStart, top, length, penWidth); - - // #25 - top += spacing; - gr.DrawString ("Test #25 DashedDownwardDiagonal", font, br, textStart, top); - - top += spacing; - hbr = new HatchBrush (HatchStyle.DashedDownwardDiagonal, fgColor, bgColor); - gr.FillRectangle (hbr, lineStart, top, length, penWidth); - - // #26 - top += spacing; - gr.DrawString ("Test #26 DashedUpwardDiagonal", font, br, textStart, top); - - top += spacing; - pen = new Pen (new HatchBrush (HatchStyle.DashedUpwardDiagonal, fgColor, bgColor), penWidth); - gr.DrawLine (pen, lineStart, top, lineStart + length, top); - - // #27 - top += spacing; - gr.DrawString ("Test #27 05Percent", font, br, textStart, top); - - top += spacing; - pen = new Pen (new HatchBrush (HatchStyle.Percent05, fgColor, bgColor), penWidth); - gr.DrawLine (pen, lineStart, top, lineStart + length, top); - - // #28 - top += spacing; - gr.DrawString ("Test #28 10Percent", font, br, textStart, top); - - top += spacing; - pen = new Pen (new HatchBrush (HatchStyle.Percent10, fgColor, bgColor), penWidth); - gr.DrawLine (pen, lineStart, top, lineStart + length, top); - - // #29 - top += spacing; - gr.DrawString ("Test #29 20Percent", font, br, textStart, top); - - top += spacing; - pen = new Pen (new HatchBrush (HatchStyle.Percent20, fgColor, bgColor), penWidth); - gr.DrawLine (pen, lineStart, top, lineStart + length, top); - - // #30 - top += spacing; - gr.DrawString ("Test #30 25Percent", font, br, textStart, top); - - top += spacing; - pen = new Pen (new HatchBrush (HatchStyle.Percent25, fgColor, bgColor), penWidth); - gr.DrawLine (pen, lineStart, top, lineStart + length, top); - - // #31 - top += spacing; - gr.DrawString ("Test #31 30Percent", font, br, textStart, top); - - top += spacing; - pen = new Pen (new HatchBrush (HatchStyle.Percent30, fgColor, bgColor), penWidth); - gr.DrawLine (pen, lineStart, top, lineStart + length, top); - - // #32 - top += spacing; - gr.DrawString ("Test #32 40Percent", font, br, textStart, top); - - top += spacing; - pen = new Pen (new HatchBrush (HatchStyle.Percent40, fgColor, bgColor), penWidth); - gr.DrawLine (pen, lineStart, top, lineStart + length, top); - - // #33 - top += spacing; - gr.DrawString ("Test #33 50Percent", font, br, textStart, top); - - top += spacing; - pen = new Pen (new HatchBrush (HatchStyle.Percent50, fgColor, bgColor), penWidth); - gr.DrawLine (pen, lineStart, top, lineStart + length, top); - - // #34 - top += spacing; - gr.DrawString ("Test #34 60Percent", font, br, textStart, top); - - top += spacing; - pen = new Pen (new HatchBrush (HatchStyle.Percent60, fgColor, bgColor), penWidth); - gr.DrawLine (pen, lineStart, top, lineStart + length, top); - - // #35 - top += spacing; - gr.DrawString ("Test #35 70Percent", font, br, textStart, top); - - top += spacing; - pen = new Pen (new HatchBrush (HatchStyle.Percent70, fgColor, bgColor), penWidth); - gr.DrawLine (pen, lineStart, top, lineStart + length, top); - - // #36 - top += spacing; - gr.DrawString ("Test #36 75Percent", font, br, textStart, top); - - top += spacing; - pen = new Pen (new HatchBrush (HatchStyle.Percent75, fgColor, bgColor), penWidth); - gr.DrawLine (pen, lineStart, top, lineStart + length, top); - - // #37 - top += spacing; - gr.DrawString ("Test #37 80Percent", font, br, textStart, top); - - top += spacing; - pen = new Pen (new HatchBrush (HatchStyle.Percent70, fgColor, bgColor), penWidth); - gr.DrawLine (pen, lineStart, top, lineStart + length, top); - - // #38 - top += spacing; - gr.DrawString ("Test #38 90Percent", font, br, textStart, top); - - top += spacing; - pen = new Pen (new HatchBrush (HatchStyle.Percent70, fgColor, bgColor), penWidth); - gr.DrawLine (pen, lineStart, top, lineStart + length, top); - - // #39 - top += spacing; - gr.DrawString ("Test #39 SmallConfetti", font, br, textStart, top); - - top += spacing; - pen = new Pen (new HatchBrush (HatchStyle.SmallConfetti, fgColor, bgColor), penWidth); - gr.DrawLine (pen, lineStart, top, lineStart + length, top); - - // #40 - top += spacing; - gr.DrawString ("Test #40 LargeConfetti", font, br, textStart, top); - - top += spacing; - pen = new Pen (new HatchBrush (HatchStyle.LargeConfetti, fgColor, bgColor), penWidth); - gr.DrawLine (pen, lineStart, top, lineStart + length, top); - - // #41 - top += spacing; - gr.DrawString ("Test #41 ZigZag", font, br, textStart, top); - - top += spacing; - pen = new Pen (new HatchBrush (HatchStyle.ZigZag, fgColor, bgColor), penWidth); - gr.DrawLine (pen, lineStart, top, lineStart + length, top); - - // #42 - top += spacing; - gr.DrawString ("Test #42 Wave", font, br, textStart, top); - - top += spacing; - pen = new Pen (new HatchBrush (HatchStyle.Wave, fgColor, bgColor), penWidth); - gr.DrawLine (pen, lineStart, top, lineStart + length, top); - - // #43 - top += spacing; - gr.DrawString ("Test #43 HorizontalBrick", font, br, textStart, top); - - top += spacing; - pen = new Pen (new HatchBrush (HatchStyle.HorizontalBrick, fgColor, bgColor), penWidth); - gr.DrawLine (pen, lineStart, top, lineStart + length, top); - - // #44 - top += spacing; - gr.DrawString ("Test #44 DiagonalBrick", font, br, textStart, top); - - top += spacing; - pen = new Pen (new HatchBrush (HatchStyle.DiagonalBrick, fgColor, bgColor), penWidth); - gr.DrawLine (pen, lineStart, top, lineStart + length, top); - - // #45 - top += spacing; - gr.DrawString ("Test #45 Weave", font, br, textStart, top); - - top += spacing; - pen = new Pen (new HatchBrush (HatchStyle.Weave, fgColor, bgColor), penWidth); - gr.DrawLine (pen, lineStart, top, lineStart + length, top); - - // #46 - top += spacing; - gr.DrawString ("Test #46 Plaid", font, br, textStart, top); - - top += spacing; - pen = new Pen (new HatchBrush (HatchStyle.Plaid, fgColor, bgColor), penWidth); - gr.DrawLine (pen, lineStart, top, lineStart + length, top); - - // #47 - top += spacing; - gr.DrawString ("Test #47 Divot", font, br, textStart, top); - - top += spacing; - pen = new Pen (new HatchBrush (HatchStyle.Divot, fgColor, bgColor), penWidth); - gr.DrawLine (pen, lineStart, top, lineStart + length, top); - - // #48 - top += spacing; - gr.DrawString ("Test #48 SmallCheckerBoard", font, br, textStart, top); - - top += spacing; - pen.Brush = new HatchBrush (HatchStyle.SmallCheckerBoard, fgColor, bgColor); - gr.DrawLine (pen, lineStart, top, lineStart + length, top); - - // #49 - top += spacing; - gr.DrawString ("Test #49 LargeCheckerBoard", font, br, textStart, top); - - top += spacing; - pen.Brush = new HatchBrush (HatchStyle.LargeCheckerBoard, fgColor, bgColor); - gr.DrawLine (pen, lineStart, top, lineStart + length, top); - - // #50 - top += spacing; - gr.DrawString ("Test #50 OutlinedDiamond", font, br, textStart, top); - - top += spacing; - pen.Brush = new HatchBrush (HatchStyle.OutlinedDiamond, fgColor, bgColor); - gr.DrawLine (pen, lineStart, top, lineStart + length, top); - - // #51 - top += spacing; - gr.DrawString ("Test #51 SolidDiamond", font, br, textStart, top); - - top += spacing; - pen.Brush = new HatchBrush (HatchStyle.SolidDiamond, fgColor, bgColor); - gr.DrawLine (pen, lineStart, top, lineStart + length, top); - - // #52 - top += spacing; - gr.DrawString ("Test #52 DottedDiamond", font, br, textStart, top); - - top += spacing; - pen.Brush = new HatchBrush (HatchStyle.DottedDiamond, fgColor, bgColor); - gr.DrawLine (pen, lineStart, top, lineStart + length, top); - - // #53 - top += spacing; - gr.DrawString ("Test #53 Shingle", font, br, textStart, top); - - top += spacing; - pen.Brush = new HatchBrush (HatchStyle.Shingle, fgColor, bgColor); - gr.DrawLine (pen, lineStart, top, lineStart + length, top); - - // #54 - top += spacing; - gr.DrawString ("Test #54 Trellis", font, br, textStart, top); - - top += spacing; - pen.Brush = new HatchBrush (HatchStyle.Trellis, fgColor, bgColor); - gr.DrawLine (pen, lineStart, top, lineStart + length, top); - - // #55 - top += spacing; - gr.DrawString ("Test #55 Sphere", font, br, textStart, top); - - top += spacing; - pen.Brush = new HatchBrush (HatchStyle.Sphere, fgColor, bgColor); - gr.DrawLine (pen, lineStart, top, lineStart + length, top); - - currentTop = top; - } - - internal string getOutSufix() - { - if (Environment.GetEnvironmentVariable("MSNet")==null) - return "-mono"; - - return ""; - } - } -} diff --git a/mcs/class/System.Drawing/Test/System.Drawing.Drawing2D/TestMatrix.cs b/mcs/class/System.Drawing/Test/System.Drawing.Drawing2D/TestMatrix.cs deleted file mode 100644 index 5b02ee7c43f..00000000000 --- a/mcs/class/System.Drawing/Test/System.Drawing.Drawing2D/TestMatrix.cs +++ /dev/null @@ -1,308 +0,0 @@ -// -// Tests for System.Drawing.Drawing2D.Matrix.cs -// -// Author: -// Jordi Mas i Hernandez -// -// Copyright (C) 2005 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using NUnit.Framework; -using System; -using System.Drawing; -using System.Drawing.Drawing2D; -using System.Security.Permissions; - -namespace MonoTests.System.Drawing.Drawing2D -{ - [TestFixture] - [SecurityPermission (SecurityAction.Deny, UnmanagedCode = true)] - public class MatrixTest : Assertion - { - [TearDown] - public void TearDown () { } - - [SetUp] - public void SetUp () { } - - [Test] - public void Constructors () - { - { - Matrix matrix = new Matrix (); - AssertEquals ("C#1", 6, matrix.Elements.Length); - } - - { - - Matrix matrix = new Matrix (10, 20, 30, 40, 50, 60); - AssertEquals ("C#2", 6, matrix.Elements.Length); - AssertEquals ("C#3", 10, matrix.Elements[0]); - AssertEquals ("C#4", 20, matrix.Elements[1]); - AssertEquals ("C#5", 30, matrix.Elements[2]); - AssertEquals ("C#6", 40, matrix.Elements[3]); - AssertEquals ("C#7", 50, matrix.Elements[4]); - AssertEquals ("C#8", 60, matrix.Elements[5]); - } - } - - // Properties - - [Test] - public void Invertible () - { - Matrix matrix = new Matrix (123, 24, 82, 16, 47, 30); - AssertEquals ("I#1", false, matrix.IsInvertible); - - matrix = new Matrix (156, 46, 0, 0, 106, 19); - AssertEquals ("I#2", false, matrix.IsInvertible); - - matrix = new Matrix (146, 66, 158, 104, 42, 150); - AssertEquals ("I#3", true, matrix.IsInvertible); - - matrix = new Matrix (119, 140, 145, 74, 102, 58); - AssertEquals ("I#4", true, matrix.IsInvertible); - } - - [Test] - public void IsIdentity () - { - Matrix matrix = new Matrix (123, 24, 82, 16, 47, 30); - AssertEquals ("N#1", false, matrix.IsIdentity); - - matrix = new Matrix (1, 0, 0, 1, 0, 0); - AssertEquals ("N#2", true, matrix.IsIdentity); - } - - [Test] - public void IsOffsetX () - { - Matrix matrix = new Matrix (123, 24, 82, 16, 47, 30); - AssertEquals ("X#1", 47, matrix.OffsetX); - } - - [Test] - public void IsOffsetY () - { - Matrix matrix = new Matrix (123, 24, 82, 16, 47, 30); - AssertEquals ("Y#1", 30, matrix.OffsetY); - } - - // Elements Property is checked implicity in other test - - // - // Methods - // - - - [Test] - public void Clone () - { - Matrix matsrc = new Matrix (10, 20, 30, 40, 50, 60); - Matrix matrix = matsrc.Clone (); - - AssertEquals ("D#1", 6, matrix.Elements.Length); - AssertEquals ("D#2", 10, matrix.Elements[0]); - AssertEquals ("D#3", 20, matrix.Elements[1]); - AssertEquals ("D#4", 30, matrix.Elements[2]); - AssertEquals ("D#5", 40, matrix.Elements[3]); - AssertEquals ("D#6", 50, matrix.Elements[4]); - AssertEquals ("D#7", 60, matrix.Elements[5]); - } - - [Test] - public void Reset () - { - Matrix matrix = new Matrix (51, 52, 53, 54, 55, 56); - matrix.Reset (); - - AssertEquals ("F#1", 6, matrix.Elements.Length); - AssertEquals ("F#2", 1, matrix.Elements[0]); - AssertEquals ("F#3", 0, matrix.Elements[1]); - AssertEquals ("F#4", 0, matrix.Elements[2]); - AssertEquals ("F#5", 1, matrix.Elements[3]); - AssertEquals ("F#6", 0, matrix.Elements[4]); - AssertEquals ("F#7", 0, matrix.Elements[5]); - } - - [Test] - public void Rotate () - { - Matrix matrix = new Matrix (10, 20, 30, 40, 50, 60); - matrix.Rotate (180); - - AssertEquals ("H#1", -10, matrix.Elements[0]); - AssertEquals ("H#2", -20, matrix.Elements[1]); - AssertEquals ("H#3", -30, matrix.Elements[2]); - AssertEquals ("H#4", -40, matrix.Elements[3]); - AssertEquals ("H#5", 50, matrix.Elements[4]); - AssertEquals ("H#6", 60, matrix.Elements[5]); - } - - [Test] - public void RotateAt () - { - Matrix matrix = new Matrix (10, 20, 30, 40, 50, 60); - matrix.RotateAt (180, new PointF (10, 10)); - - AssertEquals ("I#1", -10, matrix.Elements[0]); - AssertEquals ("I#2", -20, matrix.Elements[1]); - AssertEquals ("I#3", -30, matrix.Elements[2]); - AssertEquals ("I#4", -40, matrix.Elements[3]); - AssertEquals ("I#5", 850, matrix.Elements[4]); - AssertEquals ("I#6", 1260, matrix.Elements[5]); - } - - [Test] - public void Multiply () - { - Matrix matrix = new Matrix (10, 20, 30, 40, 50, 60); - matrix.Multiply (new Matrix (10, 20, 30, 40, 50, 60)); - - AssertEquals ("J#1", 700, matrix.Elements[0]); - AssertEquals ("J#2", 1000, matrix.Elements[1]); - AssertEquals ("J#3", 1500, matrix.Elements[2]); - AssertEquals ("J#4", 2200, matrix.Elements[3]); - AssertEquals ("J#5", 2350, matrix.Elements[4]); - AssertEquals ("J#6", 3460, matrix.Elements[5]); - } - - [Test] - public void Equals () - { - Matrix mat1 = new Matrix (10, 20, 30, 40, 50, 60); - Matrix mat2 = new Matrix (10, 20, 30, 40, 50, 60); - Matrix mat3 = new Matrix (10, 20, 30, 40, 50, 10); - - AssertEquals ("E#1", true, mat1.Equals (mat2)); - AssertEquals ("E#2", false, mat2.Equals (mat3)); - AssertEquals ("E#3", false, mat1.Equals (mat3)); - } - - [Test] - public void Invert () - { - Matrix matrix = new Matrix (1, 2, 3, 4, 5, 6); - matrix.Invert (); - - AssertEquals ("V#1", -2, matrix.Elements[0]); - AssertEquals ("V#2", 1, matrix.Elements[1]); - AssertEquals ("V#3", 1.5, matrix.Elements[2]); - AssertEquals ("V#4", -0.5, matrix.Elements[3]); - AssertEquals ("V#5", 1, matrix.Elements[4]); - AssertEquals ("V#6", -2, matrix.Elements[5]); - } - - [Test] - public void Scale () - { - Matrix matrix = new Matrix (10, 20, 30, 40, 50, 60); - matrix.Scale (2, 4); - - AssertEquals ("S#1", 20, matrix.Elements[0]); - AssertEquals ("S#2", 40, matrix.Elements[1]); - AssertEquals ("S#3", 120, matrix.Elements[2]); - AssertEquals ("S#4", 160, matrix.Elements[3]); - AssertEquals ("S#5", 50, matrix.Elements[4]); - AssertEquals ("S#6", 60, matrix.Elements[5]); - } - - [Test] - public void Shear () - { - Matrix matrix = new Matrix (10, 20, 30, 40, 50, 60); - matrix.Shear (2, 4); - - AssertEquals ("H#1", 130, matrix.Elements[0]); - AssertEquals ("H#2", 180, matrix.Elements[1]); - AssertEquals ("H#3", 50, matrix.Elements[2]); - AssertEquals ("H#4", 80, matrix.Elements[3]); - AssertEquals ("H#5", 50, matrix.Elements[4]); - AssertEquals ("H#6", 60, matrix.Elements[5]); - - matrix = new Matrix (5, 3, 9, 2, 2, 1); - matrix.Shear (10, 20); - - AssertEquals ("H#7", 185, matrix.Elements[0]); - AssertEquals ("H#8", 43, matrix.Elements[1]); - AssertEquals ("H#9", 59, matrix.Elements[2]); - AssertEquals ("H#10", 32, matrix.Elements[3]); - AssertEquals ("H#11", 2, matrix.Elements[4]); - AssertEquals ("H#12", 1, matrix.Elements[5]); - } - - [Test] - public void TransformPoints () - { - Matrix matrix = new Matrix (2, 4, 6, 8, 10, 12); - PointF [] pointsF = new PointF [] {new PointF (2, 4), new PointF (4, 8)}; - matrix.TransformPoints (pointsF); - - AssertEquals ("K#1", 38, pointsF[0].X); - AssertEquals ("K#2", 52, pointsF[0].Y); - AssertEquals ("K#3", 66, pointsF[1].X); - AssertEquals ("K#4", 92, pointsF[1].Y); - - Point [] points = new Point [] {new Point (2, 4), new Point (4, 8)}; - matrix.TransformPoints (points); - AssertEquals ("K#5", 38, pointsF[0].X); - AssertEquals ("K#6", 52, pointsF[0].Y); - AssertEquals ("K#7", 66, pointsF[1].X); - AssertEquals ("K#8", 92, pointsF[1].Y); - } - - [Test] - public void TransformVectors () - { - Matrix matrix = new Matrix (2, 4, 6, 8, 10, 12); - PointF [] pointsF = new PointF [] {new PointF (2, 4), new PointF (4, 8)}; - matrix.TransformVectors (pointsF); - - AssertEquals ("N#1", 28, pointsF[0].X); - AssertEquals ("N#2", 40, pointsF[0].Y); - AssertEquals ("N#3", 56, pointsF[1].X); - AssertEquals ("N#4", 80, pointsF[1].Y); - - Point [] points = new Point [] {new Point (2, 4), new Point (4, 8)}; - matrix.TransformVectors (points); - AssertEquals ("N#5", 28, pointsF[0].X); - AssertEquals ("N#6", 40, pointsF[0].Y); - AssertEquals ("N#7", 56, pointsF[1].X); - AssertEquals ("N#8", 80, pointsF[1].Y); - } - - [Test] - public void Translate () - { - Matrix matrix = new Matrix (2, 4, 6, 8, 10, 12); - matrix.Translate (5, 10); - - AssertEquals ("Y#1", 2, matrix.Elements[0]); - AssertEquals ("Y#2", 4, matrix.Elements[1]); - AssertEquals ("Y#3", 6, matrix.Elements[2]); - AssertEquals ("Y#4", 8, matrix.Elements[3]); - AssertEquals ("Y#5", 80, matrix.Elements[4]); - AssertEquals ("Y#6", 112, matrix.Elements[5]); - - } - } -} diff --git a/mcs/class/System.Drawing/Test/System.Drawing.Imaging/ChangeLog b/mcs/class/System.Drawing/Test/System.Drawing.Imaging/ChangeLog deleted file mode 100644 index 62e7f8142f5..00000000000 --- a/mcs/class/System.Drawing/Test/System.Drawing.Imaging/ChangeLog +++ /dev/null @@ -1,40 +0,0 @@ -2005-09-16 Sebastien Pouliot - - * TestBmpCodec.cs, TestColorMatrix.cs, TestImageAttributes.cs, - TestImageCodecInfo.cs, TestJpegCodec.cs: Deny UnmanagedCode permission - to all tests. This shows (when executed under MS runtime) that S.D API - is safe and doesn't requires high privileges to run - even if we know - that, deep down, this calls into GDI+. - -2005-08-19 Jordi Mas i Hernandez - - * TestBmpCodec.cs: Enable PixelFormat tests - -2005-08-16 Andrew Skiba - - * TestImageCodecInfo.cs: use regular expressions for results that may vary - while still in correct format, so same tests can be used for jvm - -2005-08-09 Andrew Skiba - - * TestImageCodecInfo.cs: FormatID, CodecName, DllName, FilenameExtension, - Flags, FormatDescription, MimeType properties checked - -2005-08-09 Andrew Skiba - - * TestImageCodecInfo.cs: refactor to make possible to add tests for all - properties, not only FormatID. - -2004-03-22 Jordi Mas i Hernandez - - * TestColorMatrix.cs: added test case - * TestImageAttributes.cs: added test case - -2004-06-10 Sanjay Gupta - - * TestBmpCodec.cs, TestImageCodecInfo.cs, TestJpedCodec.cs: Removed - dependency on obsolete class, Assertion from NUnit. - -2004-03-17 Ravindra - * Created this repository for System.Drawing.Imaging tests. - * ChangeLog: Added. diff --git a/mcs/class/System.Drawing/Test/System.Drawing.Imaging/TestBmpCodec.cs b/mcs/class/System.Drawing/Test/System.Drawing.Imaging/TestBmpCodec.cs deleted file mode 100644 index dac4ffe1695..00000000000 --- a/mcs/class/System.Drawing/Test/System.Drawing.Imaging/TestBmpCodec.cs +++ /dev/null @@ -1,159 +0,0 @@ -// -// BMPCodec class testing unit -// -// Author: -// -// Jordi Mas i Hernàndez (jordi@ximian.com) -// -// (C) 2004 Ximian, Inc. http://www.ximian.com -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -using System; -using System.Drawing; -using System.Drawing.Imaging; -using NUnit.Framework; -using System.IO; -using System.Security.Cryptography; -using System.Security.Permissions; -using System.Text; - -namespace MonoTests.System.Drawing -{ - - [TestFixture] - [SecurityPermission (SecurityAction.Deny, UnmanagedCode = true)] - public class TestBmpCodec - { - - [TearDown] - public void Clean() {} - - [SetUp] - public void GetReady() - { - - } - - /* Get suffix to add to the filename */ - internal string getOutSufix() - { - if (Environment.GetEnvironmentVariable("MSNet")==null) - return "-mono"; - - return ""; - } - - /* Get the input directory depending on the runtime*/ - internal string getInFile(string file) - { - string sRslt, local; - - local = "../System.Drawing/" + file; - - sRslt = Path.GetFullPath (local); - - if (File.Exists(sRslt)==false) - sRslt = "Test/System.Drawing/" + file; - - return sRslt; - } - - /* Checks bitmap features on a know 24-bits bitmap */ - [Test] - public void Bitmap24bitFeatures() - { - string sInFile = getInFile ("bitmaps/almogaver24bits.bmp"); - Bitmap bmp = new Bitmap(sInFile); - RectangleF rect; - GraphicsUnit unit = GraphicsUnit.World; - - rect = bmp.GetBounds(ref unit); - - Assert.AreEqual (PixelFormat.Format24bppRgb, bmp.PixelFormat); - Assert.AreEqual (173, bmp.Width); - Assert.AreEqual (183, bmp.Height); - - Assert.AreEqual (0, rect.X); - Assert.AreEqual (0, rect.Y); - Assert.AreEqual (173, rect.Width); - Assert.AreEqual (183, rect.Height); - - Assert.AreEqual (173, bmp.Size.Width); - Assert.AreEqual (183, bmp.Size.Height); - } - - - - /* Checks bitmap features on a know 32-bits bitmap (codec)*/ - [Test] - public void Bitmap32bitFeatures() - { - string sInFile = getInFile ("bitmaps/almogaver32bits.bmp"); - Bitmap bmp = new Bitmap(sInFile); - RectangleF rect; - GraphicsUnit unit = GraphicsUnit.World; - - rect = bmp.GetBounds(ref unit); - - Assert.AreEqual (173, bmp.Width); - Assert.AreEqual (183, bmp.Height); - - Assert.AreEqual (0, rect.X); - Assert.AreEqual (0, rect.Y); - Assert.AreEqual (173, rect.Width); - Assert.AreEqual (183, rect.Height); - - Assert.AreEqual (173, bmp.Size.Width); - Assert.AreEqual (183, bmp.Size.Height); - } - - [Test] - public void Save() - { - string sOutFile = "linerect" + getOutSufix() + ".bmp"; - - // Save - Bitmap bmp = new Bitmap(100,100, PixelFormat.Format32bppRgb); - Graphics gr = Graphics.FromImage(bmp); - - Pen p = new Pen(Color.Red, 2); - gr.DrawLine(p, 10.0F, 10.0F, 90.0F, 90.0F); - gr.DrawRectangle(p, 10.0F, 10.0F, 80.0F, 80.0F); - p.Dispose(); - bmp.Save(sOutFile, ImageFormat.Bmp); - gr.Dispose(); - bmp.Dispose(); - - // Load - Bitmap bmpLoad = new Bitmap(sOutFile); - - Color color = bmpLoad.GetPixel(10,10); - - //Assert.AreEqual (Color.FromArgb(255,255,0,0), color); - } - - - } -} diff --git a/mcs/class/System.Drawing/Test/System.Drawing.Imaging/TestColorMatrix.cs b/mcs/class/System.Drawing/Test/System.Drawing.Imaging/TestColorMatrix.cs deleted file mode 100644 index ceb64b45593..00000000000 --- a/mcs/class/System.Drawing/Test/System.Drawing.Imaging/TestColorMatrix.cs +++ /dev/null @@ -1,172 +0,0 @@ -// -// Copyright (C) 2005 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// -// Author: -// Jordi Mas i Hernandez (jordi@ximian.com) -// - -using System; -using System.Drawing; -using System.Drawing.Imaging; -using NUnit.Framework; -using System.IO; -using System.Security.Cryptography; -using System.Security.Permissions; -using System.Text; - -namespace MonoTests.System.Drawing -{ - - [TestFixture] - [SecurityPermission (SecurityAction.Deny, UnmanagedCode = true)] - public class TestColorMatrix - { - - [TearDown] - public void Clean() {} - - [SetUp] - public void GetReady() - { - - } - - - [Test] - public void DefaultConstructor () - { - ColorMatrix cm = new ColorMatrix (); - - Assert.AreEqual (cm.Matrix00, 1); - Assert.AreEqual (cm.Matrix11, 1); - Assert.AreEqual (cm.Matrix22, 1); - Assert.AreEqual (cm.Matrix33, 1); - Assert.AreEqual (cm.Matrix44, 1); - Assert.AreEqual (cm.Matrix01, 0); - Assert.AreEqual (cm.Matrix02, 0); - Assert.AreEqual (cm.Matrix03, 0); - Assert.AreEqual (cm.Matrix04, 0); - Assert.AreEqual (cm.Matrix10, 0); - Assert.AreEqual (cm.Matrix12, 0); - Assert.AreEqual (cm.Matrix13, 0); - Assert.AreEqual (cm.Matrix14, 0); - Assert.AreEqual (cm.Matrix20, 0); - Assert.AreEqual (cm.Matrix21, 0); - Assert.AreEqual (cm.Matrix23, 0); - Assert.AreEqual (cm.Matrix24, 0); - Assert.AreEqual (cm.Matrix30, 0); - Assert.AreEqual (cm.Matrix31, 0); - Assert.AreEqual (cm.Matrix32, 0); - Assert.AreEqual (cm.Matrix34, 0); - Assert.AreEqual (cm.Matrix40, 0); - Assert.AreEqual (cm.Matrix41, 0); - Assert.AreEqual (cm.Matrix42, 0); - Assert.AreEqual (cm.Matrix43, 0); - - } - - [Test] - public void ConstructorArrayAndMethods () - { - ColorMatrix cm = new ColorMatrix (new float[][] { - new float[] {0.393f, 0.349f, 0.272f, 0, 0}, - new float[] {0.769f, 0.686f, 0.534f, 0, 0}, - new float[] {0.189f, 0.168f, 0.131f, 0, 0}, - new float[] { 0, 0, 0, 1, 0}, - new float[] { 0, 0, 0, 0, 1} - }); - - Assert.AreEqual (cm.Matrix00, 0.393f); - Assert.AreEqual (cm.Matrix01, 0.349f); - Assert.AreEqual (cm.Matrix02, 0.272f); - Assert.AreEqual (cm.Matrix03, 0); - Assert.AreEqual (cm.Matrix04, 0); - - Assert.AreEqual (cm.Matrix10, 0.769f); - Assert.AreEqual (cm.Matrix11, 0.686f); - Assert.AreEqual (cm.Matrix12, 0.534f); - Assert.AreEqual (cm.Matrix13, 0); - Assert.AreEqual (cm.Matrix14, 0); - - Assert.AreEqual (cm.Matrix20, 0.189f); - Assert.AreEqual (cm.Matrix21, 0.168f); - Assert.AreEqual (cm.Matrix22, 0.131f); - Assert.AreEqual (cm.Matrix23, 0); - Assert.AreEqual (cm.Matrix24, 0); - - Assert.AreEqual (cm.Matrix30, 0); - Assert.AreEqual (cm.Matrix31, 0); - Assert.AreEqual (cm.Matrix32, 0); - Assert.AreEqual (cm.Matrix33, 1); - Assert.AreEqual (cm.Matrix34, 0); - - Assert.AreEqual (cm.Matrix40, 0); - Assert.AreEqual (cm.Matrix41, 0); - Assert.AreEqual (cm.Matrix42, 0); - Assert.AreEqual (cm.Matrix43, 0); - Assert.AreEqual (cm.Matrix44, 1); - } - - [Test] - public void Property () - { - ColorMatrix cm = new ColorMatrix (new float[][] { - new float[] {1, 0, 0, 0, 0}, - new float[] {0.5f, 1, 0, 0, 0}, - new float[] {0, 0.1f, 1.5f, 0, 0}, - new float[] {0.5f, 3, 0.5f, 1, 0}, - new float[] {0, 0, 0, 0, 0} - }); - - Assert.AreEqual (cm[0,0], 1); - Assert.AreEqual (cm[0,1], 0); - Assert.AreEqual (cm[0,2], 0); - Assert.AreEqual (cm[0,3], 0); - Assert.AreEqual (cm[0,4], 0); - - Assert.AreEqual (cm[1,0], 0.5f); - Assert.AreEqual (cm[1,1], 1); - Assert.AreEqual (cm[1,2], 0); - Assert.AreEqual (cm[1,3], 0); - Assert.AreEqual (cm[1,4], 0); - - Assert.AreEqual (cm[2,0], 0); - Assert.AreEqual (cm[2,1], 0.1f); - Assert.AreEqual (cm[2,2], 1.5f); - Assert.AreEqual (cm[2,3], 0); - Assert.AreEqual (cm[2,4], 0); - - Assert.AreEqual (cm[3,0], 0.5f); - Assert.AreEqual (cm[3,1], 3); - Assert.AreEqual (cm[3,2], 0.5f); - Assert.AreEqual (cm[3,3], 1); - Assert.AreEqual (cm[3,4], 0); - - Assert.AreEqual (cm[4,0], 0); - Assert.AreEqual (cm[4,1], 0); - Assert.AreEqual (cm[4,2], 0); - Assert.AreEqual (cm[4,3], 0); - Assert.AreEqual (cm[4,4], 0); - } - } -} diff --git a/mcs/class/System.Drawing/Test/System.Drawing.Imaging/TestImageAttributes.cs b/mcs/class/System.Drawing/Test/System.Drawing.Imaging/TestImageAttributes.cs deleted file mode 100644 index 644458c6bb4..00000000000 --- a/mcs/class/System.Drawing/Test/System.Drawing.Imaging/TestImageAttributes.cs +++ /dev/null @@ -1,103 +0,0 @@ -// -// Copyright (C) 2005 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// -// Author: -// Jordi Mas i Hernandez (jordi@ximian.com) -// - -using System; -using System.Drawing; -using System.Drawing.Imaging; -using NUnit.Framework; -using System.IO; -using System.Security.Cryptography; -using System.Security.Permissions; -using System.Text; - -namespace MonoTests.System.Drawing -{ - - [TestFixture] - [SecurityPermission (SecurityAction.Deny, UnmanagedCode = true)] - public class TestImageAttributes - { - - [TearDown] - public void Clean() {} - - [SetUp] - public void GetReady() - { - - } - - private static Color ProcessColorMatrix (Color color, ColorMatrix colorMatrix) - { - Bitmap bmp = new Bitmap (64, 64); - Graphics gr = Graphics.FromImage (bmp); - ImageAttributes imageAttr = new ImageAttributes (); - - bmp.SetPixel (0,0, color); - - imageAttr.SetColorMatrix (colorMatrix); - gr.DrawImage (bmp, new Rectangle (0, 0, 64,64), 0,0, 64,64, GraphicsUnit.Pixel, imageAttr); - return bmp.GetPixel (0,0); - } - - - // Text Color Matrix processing - [Test] - public void ColorMatrix () - { - Color clr_src, clr_rslt; - - ColorMatrix cm = new ColorMatrix (new float[][] { - new float[] {2, 0, 0, 0, 0}, //R - new float[] {0, 1, 0, 0, 0}, //G - new float[] {0, 0, 1, 0, 0}, //B - new float[] {0, 0, 0, 1, 0}, //A - new float[] {0.2f, 0, 0, 0, 0}, //Translation - }); - - clr_src = Color.FromArgb (255, 100, 20, 50); - clr_rslt = ProcessColorMatrix (clr_src, cm); - - Assert.AreEqual (clr_rslt, Color.FromArgb (255, 251, 20, 50)); - - - cm = new ColorMatrix (new float[][] { - new float[] {1, 0, 0, 0, 0}, //R - new float[] {0, 1, 0, 0, 0}, //G - new float[] {0, 0, 1.5f, 0, 0}, //B - new float[] {0, 0, 0.5f, 1, 0}, //A - new float[] {0, 0, 0, 0, 0}, //Translation - }); - - clr_src = Color.FromArgb (255, 100, 40, 25); - clr_rslt = ProcessColorMatrix (clr_src, cm); - Assert.AreEqual (clr_rslt, Color.FromArgb (255, 100, 40, 165)); - } - - - } -} diff --git a/mcs/class/System.Drawing/Test/System.Drawing.Imaging/TestImageCodecInfo.cs b/mcs/class/System.Drawing/Test/System.Drawing.Imaging/TestImageCodecInfo.cs deleted file mode 100644 index 39ef67ef733..00000000000 --- a/mcs/class/System.Drawing/Test/System.Drawing.Imaging/TestImageCodecInfo.cs +++ /dev/null @@ -1,183 +0,0 @@ -// -// ImageCodecInfo class testing unit -// -// Author: -// -// Jordi Mas i Hernàndez (jordi@ximian.com) -// -// (C) 2004 Ximian, Inc. http://www.ximian.com -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -using System; -using System.Drawing; -using System.Drawing.Imaging; -using NUnit.Framework; -using System.Collections; -using System.Security.Permissions; -using System.Text.RegularExpressions; - -namespace MonoTests.System.Drawing -{ - - [TestFixture] - [SecurityPermission (SecurityAction.Deny, UnmanagedCode = true)] - public class TestImageCodecInfo - { - Hashtable decoders; - Hashtable encoders; - - ImageCodecInfo GetEncoder (Guid clsid) - { - return (ImageCodecInfo) encoders [clsid]; - } - - ImageCodecInfo GetDecoder (Guid clsid) { - return (ImageCodecInfo) decoders [clsid]; - } - - [TestFixtureSetUp] - public void FixtureGetReady() - { - ImageCodecInfo [] arrEnc = ImageCodecInfo.GetImageDecoders (); - ImageCodecInfo [] arrDec = ImageCodecInfo.GetImageEncoders (); - decoders = new Hashtable (); - encoders = new Hashtable (); - - foreach (ImageCodecInfo decoder in arrDec) - decoders[decoder.Clsid] = decoder; - - foreach (ImageCodecInfo encoder in arrEnc) - encoders[encoder.Clsid] = encoder; - } - - static void Check (ImageCodecInfo e, ImageCodecInfo d, Guid FormatID, string CodecName, string DllName, - string FilenameExtension, ImageCodecFlags Flags, string FormatDescription, - string MimeType, int Version) - { - Regex extRegex = new Regex (@"^(\*\.\w+(;(\*\.\w+))*;)?"+ - Regex.Escape (FilenameExtension)+@"(;\*\.\w+(;(\*\.\w+))*)?$", - RegexOptions.IgnoreCase | RegexOptions.Singleline); - - if (e != null) { - Assert.AreEqual (FormatID, e.FormatID, "Encoder.FormatID"); - Assert.IsTrue (e.CodecName.IndexOf (CodecName)>=0, - "Encoder.CodecName contains "+CodecName); - Assert.AreEqual (DllName, e.DllName, "Encoder.DllName"); - Assert.IsTrue (extRegex.IsMatch (e.FilenameExtension), - "Encoder.FilenameExtension is a right list with "+FilenameExtension); - Assert.AreEqual (Flags, e.Flags, "Encoder.Flags"); - Assert.IsTrue (e.FormatDescription.IndexOf (FormatDescription)>=0, - "Encoder.FormatDescription contains "+FormatDescription); - Assert.IsTrue (e.MimeType.IndexOf (MimeType)>=0, - "Encoder.MimeType contains "+MimeType); - } - if (d != null) { - Assert.AreEqual (FormatID, d.FormatID, "Decoder.FormatID"); - Assert.IsTrue (d.CodecName.IndexOf (CodecName)>=0, - "Decoder.CodecName contains "+CodecName); - Assert.AreEqual (DllName, d.DllName, "Decoder.DllName"); - Assert.IsTrue (extRegex.IsMatch (d.FilenameExtension), - "Decoder.FilenameExtension is a right list with "+FilenameExtension); - Assert.AreEqual (Flags, d.Flags, "Decoder.Flags"); - Assert.IsTrue (d.FormatDescription.IndexOf (FormatDescription)>=0, - "Decoder.FormatDescription contains "+FormatDescription); - Assert.IsTrue (d.MimeType.IndexOf (MimeType)>=0, - "Decoder.MimeType contains "+MimeType); - } - /* - if (SignatureMasks == null) { - Assert.AreEqual (null, e.SignatureMasks, "Encoder.SignatureMasks"); - Assert.AreEqual (null, d.SignatureMasks, "Decoder.SignatureMasks"); - } - else { - Assert.AreEqual (SignatureMasks.Length, e.SignatureMasks.Length, "Encoder.SignatureMasks.Length"); - Assert.AreEqual (SignatureMasks.Length, d.SignatureMasks.Length, "Decoder.SignatureMasks.Length"); - for (int i = 0; i < SignatureMasks.Length; i++) { - Assert.AreEqual (SignatureMasks[i].Length, e.SignatureMasks[i].Length, - "Encoder.SignatureMasks["+i.ToString ()+"].Length"); - Assert.AreEqual (SignatureMasks[i].Length, d.SignatureMasks[i].Length, - "Decoder.SignatureMasks["+i.ToString ()+"].Length"); - for (int j = 0; j < SignatureMasks[i].Length; j++) { - Assert.AreEqual (SignatureMasks[i][j], e.SignatureMasks[i][j], - "Encoder.SignatureMasks["+i.ToString ()+"]["+j.ToString ()+"]"); - Assert.AreEqual (SignatureMasks[i][j], d.SignatureMasks[i][j], - "Decoder.SignatureMasks["+i.ToString ()+"]["+j.ToString ()+"]"); - } - } - } - */ - - } - - [Test] - public void BMPCodec() - { - Guid g = new Guid ("557cf400-1a04-11d3-9a73-0000f81ef32e"); - Check (GetEncoder (g), GetDecoder (g), ImageFormat.Bmp.Guid, - "BMP", null, "*.BMP", - ImageCodecFlags.Builtin|ImageCodecFlags.Encoder|ImageCodecFlags.Decoder|ImageCodecFlags.SupportBitmap, - "BMP", "image/bmp", 1); - } - - [Test] - public void GifCodec() - { - Guid g = new Guid ("557cf402-1a04-11d3-9a73-0000f81ef32e"); - Check (GetEncoder (g), GetDecoder (g), ImageFormat.Gif.Guid, - "GIF", null, "*.GIF", - ImageCodecFlags.Builtin|ImageCodecFlags.Encoder|ImageCodecFlags.Decoder|ImageCodecFlags.SupportBitmap, - "GIF", "image/gif", 1); - } - - [Test] - public void JpegCodec() - { - Guid g = new Guid ("557cf401-1a04-11d3-9a73-0000f81ef32e"); - Check (GetEncoder (g), GetDecoder (g), ImageFormat.Jpeg.Guid, - "JPEG", null, "*.JPG", - ImageCodecFlags.Builtin|ImageCodecFlags.Encoder|ImageCodecFlags.Decoder|ImageCodecFlags.SupportBitmap, - "JPEG", "image/jpeg", 1); - } - - [Test] - public void PngCodec() - { - Guid g = new Guid ("557cf406-1a04-11d3-9a73-0000f81ef32e"); - Check (GetEncoder (g), GetDecoder (g), ImageFormat.Png.Guid, - "PNG", null, "*.PNG", - ImageCodecFlags.Builtin|ImageCodecFlags.Encoder|ImageCodecFlags.Decoder|ImageCodecFlags.SupportBitmap, - "PNG", "image/png", 1); - } - [Test] - public void IconCodec() { - Guid g = new Guid ("557cf407-1a04-11d3-9a73-0000f81ef32e"); - Check (null, GetDecoder (g), ImageFormat.Bmp.Guid, - "ICO", null, "*.ICO", - ImageCodecFlags.Builtin|ImageCodecFlags.Encoder|ImageCodecFlags.SupportBitmap, - "ICO", "image/x-icon", 1); - } - - } -} diff --git a/mcs/class/System.Drawing/Test/System.Drawing.Imaging/TestJpegCodec.cs b/mcs/class/System.Drawing/Test/System.Drawing.Imaging/TestJpegCodec.cs deleted file mode 100644 index 54aaa327b4b..00000000000 --- a/mcs/class/System.Drawing/Test/System.Drawing.Imaging/TestJpegCodec.cs +++ /dev/null @@ -1,133 +0,0 @@ -// -// JpegCodec class testing unit -// -// Author: -// -// Jordi Mas i Hernàndez (jordi@ximian.com) -// -// (C) 2004 Ximian, Inc. http://www.ximian.com -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -using System; -using System.Drawing; -using System.Drawing.Imaging; -using NUnit.Framework; -using System.IO; -using System.Security.Permissions; - -namespace MonoTests.System.Drawing -{ - - [TestFixture] - [SecurityPermission (SecurityAction.Deny, UnmanagedCode = true)] - public class TestJpegCodec - { - - [TearDown] - public void Clean() {} - - [SetUp] - public void GetReady() - { - - } - - /* Get suffix to add to the filename */ - internal string getOutSufix() - { - if (Environment.GetEnvironmentVariable("MSNet")==null) - return "-mono"; - - return ""; - } - - /* Get the input directory depending on the runtime*/ - internal string getInFile(string file) - { - string sRslt, local; - - local = "../System.Drawing/" + file; - - sRslt = Path.GetFullPath (local); - - if (File.Exists(sRslt)==false) - sRslt = "Test/System.Drawing/" + file; - - return sRslt; - } - - /* Checks bitmap features on a know 24-bits bitmap */ - //[Test] - public void Bitmap24bitFeatures() - { - string sInFile = getInFile ("bitmaps/nature24bits.jpg"); - Bitmap bmp = new Bitmap(sInFile); - RectangleF rect; - GraphicsUnit unit = GraphicsUnit.World; - - rect = bmp.GetBounds(ref unit); - - Assert.AreEqual (PixelFormat.Format24bppRgb, bmp.PixelFormat); - Assert.AreEqual (110, bmp.Width); - Assert.AreEqual (100, bmp.Height); - - Assert.AreEqual (0, rect.X); - Assert.AreEqual (0, rect.Y); - Assert.AreEqual (110, rect.Width); - Assert.AreEqual (100, rect.Height); - - Assert.AreEqual (110, bmp.Size.Width); - Assert.AreEqual (100, bmp.Size.Height); - - } - - //[Test] - public void Save() - { - string sOutFile = "linerect" + getOutSufix() + ".jpeg"; - - // Save - Bitmap bmp = new Bitmap(100,100, PixelFormat.Format32bppRgb); - Graphics gr = Graphics.FromImage(bmp); - - Pen p = new Pen(Color.Red, 2); - gr.DrawLine(p, 10.0F, 10.0F, 90.0F, 90.0F); - gr.DrawRectangle(p, 10.0F, 10.0F, 80.0F, 80.0F); - p.Dispose(); - bmp.Save(sOutFile, ImageFormat.Bmp); - gr.Dispose(); - bmp.Dispose(); - - // Load - Bitmap bmpLoad = new Bitmap(sOutFile); - - Color color = bmpLoad.GetPixel(10,10); - - //Assert.AreEqual (Color.FromArgb(255,255,0,0), color); - } - - - } -} diff --git a/mcs/class/System.Drawing/Test/System.Drawing.Imaging/tests-ms.sh b/mcs/class/System.Drawing/Test/System.Drawing.Imaging/tests-ms.sh deleted file mode 100755 index 98b2c00dbe8..00000000000 --- a/mcs/class/System.Drawing/Test/System.Drawing.Imaging/tests-ms.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/sh - -if [ $# -eq 0 ]; then - echo "You should give a list of test names such as: " - echo "$0 System.Drawing.TestStringFormat" - echo "or" - echo "$0 all" - exit 1 -fi - -export MSNet=Yes -cp ../../System.Drawing_test.dll . -topdir=../../../.. -NUNITCONSOLE=$topdir/class/lib/nunit-console.exe -MONO_PATH=$topdir/nunit20:$topdir/class/lib:. - -for i in $@; do - if [ "$i" = "all" ]; then - fixture="" - else - fixture="/fixture:MonoTests.${i}" - fi - MONO_PATH=$MONO_PATH \ - ${NUNITCONSOLE} System.Drawing_test.dll $fixture -done - - - diff --git a/mcs/class/System.Drawing/Test/System.Drawing.Imaging/tests.sh b/mcs/class/System.Drawing/Test/System.Drawing.Imaging/tests.sh deleted file mode 100755 index 511cfcd6ee6..00000000000 --- a/mcs/class/System.Drawing/Test/System.Drawing.Imaging/tests.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh - -if [ $# -eq 0 ]; then - echo "You should give a list of test names such as: " - echo "$0 System.Drawing.TestStringFormat" - echo "or" - echo "$0 all" - exit 1 -fi - -cp ../../System.Drawing_test_default.dll . - -topdir=../../../.. -NUNITCONSOLE=$topdir/class/lib/default/nunit-console.exe -MONO_PATH=$topdir/nunit20:$topdir/class/lib/default:. - - -for i in $@; do - if [ "$i" = "all" ]; then - fixture="" - else - fixture="/fixture:MonoTests.${i}" - fi - MONO_PATH=$MONO_PATH \ - mono --debug ${NUNITCONSOLE} System.Drawing_test_default.dll $fixture -done - - - diff --git a/mcs/class/System.Drawing/Test/System.Drawing.Printing/ChangeLog b/mcs/class/System.Drawing/Test/System.Drawing.Printing/ChangeLog deleted file mode 100644 index 6e9d1f0d55e..00000000000 --- a/mcs/class/System.Drawing/Test/System.Drawing.Printing/ChangeLog +++ /dev/null @@ -1,24 +0,0 @@ -2005-09-16 Sebastien Pouliot - - * PrintingPermissionTest.cs: Before 2.0 some test cases throws - ArgumentException. - -2005-08-26 Atsushi Enomoto - - * PrintingPermissionTest.cs, PrintingPermissionAttributeTest.cs : - removed BOM. LF as eol. - -2005-05-30 Sebastien Pouliot - - * PrintingPermissionTest.cs: Added tests for unification as this - assembly is signed by the "MS final" key (not the ECMA key). - -2004-09-09 Sebastien Pouliot - - * PrintingPermissionAttributeTest.cs: New. Unit tests for Printing - PermissionAttribute. - * PrintingPermissionTest.cs: New. Unit tests for PrintingPermission. - -2004-03-17 Ravindra - * Created this repository for System.Drawing.Printing tests. - * ChangeLog: Added. diff --git a/mcs/class/System.Drawing/Test/System.Drawing.Printing/PrintingPermissionAttributeTest.cs b/mcs/class/System.Drawing/Test/System.Drawing.Printing/PrintingPermissionAttributeTest.cs deleted file mode 100644 index 22f08840053..00000000000 --- a/mcs/class/System.Drawing/Test/System.Drawing.Printing/PrintingPermissionAttributeTest.cs +++ /dev/null @@ -1,142 +0,0 @@ -// -// PrintingPermissionAttributeTest.cs - -// NUnit Test Cases for PrintingPermissionAttribute -// -// Author: -// Sebastien Pouliot -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using NUnit.Framework; -using System; -using System.Drawing.Printing; -using System.Security; -using System.Security.Permissions; - -namespace MonoTests.System.Drawing.Printing { - - [TestFixture] - public class PrintingPermissionAttributeTest { - - [Test] - public void Default () - { - PrintingPermissionAttribute a = new PrintingPermissionAttribute (SecurityAction.Assert); - Assert.AreEqual (a.ToString (), a.TypeId.ToString (), "TypeId"); - Assert.IsFalse (a.Unrestricted, "Unrestricted"); - Assert.AreEqual (PrintingPermissionLevel.NoPrinting, a.Level, "PrintingPermissionLevel"); - - PrintingPermission sp = (PrintingPermission)a.CreatePermission (); - Assert.IsFalse (sp.IsUnrestricted (), "IsUnrestricted"); - } - - [Test] - public void Action () - { - PrintingPermissionAttribute a = new PrintingPermissionAttribute (SecurityAction.Assert); - Assert.AreEqual (SecurityAction.Assert, a.Action, "Action=Assert"); - a.Action = SecurityAction.Demand; - Assert.AreEqual (SecurityAction.Demand, a.Action, "Action=Demand"); - a.Action = SecurityAction.Deny; - Assert.AreEqual (SecurityAction.Deny, a.Action, "Action=Deny"); - a.Action = SecurityAction.InheritanceDemand; - Assert.AreEqual (SecurityAction.InheritanceDemand, a.Action, "Action=InheritanceDemand"); - a.Action = SecurityAction.LinkDemand; - Assert.AreEqual (SecurityAction.LinkDemand, a.Action, "Action=LinkDemand"); - a.Action = SecurityAction.PermitOnly; - Assert.AreEqual (SecurityAction.PermitOnly, a.Action, "Action=PermitOnly"); - a.Action = SecurityAction.RequestMinimum; - Assert.AreEqual (SecurityAction.RequestMinimum, a.Action, "Action=RequestMinimum"); - a.Action = SecurityAction.RequestOptional; - Assert.AreEqual (SecurityAction.RequestOptional, a.Action, "Action=RequestOptional"); - a.Action = SecurityAction.RequestRefuse; - Assert.AreEqual (SecurityAction.RequestRefuse, a.Action, "Action=RequestRefuse"); -#if NET_2_0 - a.Action = SecurityAction.DemandChoice; - Assert.AreEqual (SecurityAction.DemandChoice, a.Action, "Action=DemandChoice"); - a.Action = SecurityAction.InheritanceDemandChoice; - Assert.AreEqual (SecurityAction.InheritanceDemandChoice, a.Action, "Action=InheritanceDemandChoice"); - a.Action = SecurityAction.LinkDemandChoice; - Assert.AreEqual (SecurityAction.LinkDemandChoice, a.Action, "Action=LinkDemandChoice"); -#endif - } - - [Test] - public void Action_Invalid () - { - PrintingPermissionAttribute a = new PrintingPermissionAttribute ((SecurityAction)Int32.MinValue); - // no validation in attribute - } - - [Test] - public void Unrestricted () - { - PrintingPermissionAttribute a = new PrintingPermissionAttribute (SecurityAction.Assert); - a.Unrestricted = true; - PrintingPermission wp = (PrintingPermission)a.CreatePermission (); - Assert.IsTrue (wp.IsUnrestricted (), "IsUnrestricted"); - Assert.AreEqual (PrintingPermissionLevel.NoPrinting, a.Level, "NoPrinting"); - - a.Unrestricted = false; - wp = (PrintingPermission)a.CreatePermission (); - Assert.IsFalse (wp.IsUnrestricted (), "!IsUnrestricted"); - } - - [Test] - public void Level () - { - PrintingPermissionAttribute a = new PrintingPermissionAttribute (SecurityAction.Assert); - a.Level = PrintingPermissionLevel.NoPrinting; - Assert.AreEqual (PrintingPermissionLevel.NoPrinting, a.Level, "NoPrinting"); - a.Level = PrintingPermissionLevel.SafePrinting; - Assert.AreEqual (PrintingPermissionLevel.SafePrinting, a.Level, "SafePrinting"); - a.Level = PrintingPermissionLevel.DefaultPrinting; - Assert.AreEqual (PrintingPermissionLevel.DefaultPrinting, a.Level, "DefaultPrintin."); - a.Level = PrintingPermissionLevel.AllPrinting; - Assert.AreEqual (PrintingPermissionLevel.AllPrinting, a.Level, "AllPrinting"); - } - - [Test] - [ExpectedException (typeof (ArgumentException))] - public void Level_Invalid () - { - PrintingPermissionAttribute a = new PrintingPermissionAttribute (SecurityAction.Assert); - a.Level = (PrintingPermissionLevel) Int32.MinValue; - } - - [Test] - public void Attributes () - { - Type t = typeof (PrintingPermissionAttribute); - Assert.IsFalse (t.IsSerializable, "IsSerializable"); - - object [] attrs = t.GetCustomAttributes (typeof (AttributeUsageAttribute), false); - Assert.AreEqual (1, attrs.Length, "AttributeUsage"); - AttributeUsageAttribute aua = (AttributeUsageAttribute)attrs [0]; - Assert.IsTrue (aua.AllowMultiple, "AllowMultiple"); - Assert.IsTrue (aua.Inherited, "Inherited"); - AttributeTargets at = AttributeTargets.All; - Assert.AreEqual (at, aua.ValidOn, "ValidOn"); - } - } -} diff --git a/mcs/class/System.Drawing/Test/System.Drawing.Printing/PrintingPermissionTest.cs b/mcs/class/System.Drawing/Test/System.Drawing.Printing/PrintingPermissionTest.cs deleted file mode 100644 index 1f38dfd130a..00000000000 --- a/mcs/class/System.Drawing/Test/System.Drawing.Printing/PrintingPermissionTest.cs +++ /dev/null @@ -1,482 +0,0 @@ -// -// PrintingPermissionTest.cs - NUnit Test Cases for PrintingPermission -// -// Author: -// Sebastien Pouliot -// -// Copyright (C) 2004-2005 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using NUnit.Framework; -using System; -using System.IO; -using System.Drawing.Printing; -using System.Security; -using System.Security.Permissions; - -namespace MonoTests.System.Drawing.Printing { - - [TestFixture] - public class PrintingPermissionTest { - - static PrintingPermissionLevel[] AllLevel = { - PrintingPermissionLevel.NoPrinting, - PrintingPermissionLevel.SafePrinting, - PrintingPermissionLevel.DefaultPrinting, - PrintingPermissionLevel.AllPrinting, - }; - - static PrintingPermissionLevel[] AllLevelExceptNoLevel = { - PrintingPermissionLevel.SafePrinting, - PrintingPermissionLevel.DefaultPrinting, - PrintingPermissionLevel.AllPrinting, - }; - - static PrintingPermissionLevel[] AllLevelExceptAllLevel = { - PrintingPermissionLevel.NoPrinting, - PrintingPermissionLevel.SafePrinting, - PrintingPermissionLevel.DefaultPrinting, - }; - - static PrintingPermissionLevel[] AllLevelExceptNoAndAllLevel = { - PrintingPermissionLevel.SafePrinting, - PrintingPermissionLevel.DefaultPrinting, - }; - - [Test] - public void PermissionState_None () - { - PermissionState ps = PermissionState.None; - PrintingPermission pp = new PrintingPermission (ps); - Assert.AreEqual (PrintingPermissionLevel.NoPrinting, pp.Level, "Level"); - Assert.IsFalse (pp.IsUnrestricted (), "IsUnrestricted"); - - SecurityElement se = pp.ToXml (); - // only class and version are present - Assert.AreEqual ("NoPrinting", se.Attribute ("Level"), "Xml-Level"); - Assert.IsNull (se.Children, "Xml-Children"); - - PrintingPermission copy = (PrintingPermission)pp.Copy (); - Assert.IsFalse (Object.ReferenceEquals (pp, copy), "ReferenceEquals"); - Assert.AreEqual (pp.Level, copy.Level, "Level"); - Assert.AreEqual (pp.IsUnrestricted (), copy.IsUnrestricted (), "IsUnrestricted ()"); - } - - [Test] - public void PermissionState_Unrestricted () - { - PermissionState ps = PermissionState.Unrestricted; - PrintingPermission pp = new PrintingPermission (ps); - Assert.AreEqual (PrintingPermissionLevel.AllPrinting, pp.Level, "Level"); - Assert.IsTrue (pp.IsUnrestricted (), "IsUnrestricted"); - - SecurityElement se = pp.ToXml (); - // only class and version are present - Assert.AreEqual ("true", se.Attribute ("Unrestricted"), "Xml-Unrestricted"); - Assert.IsNull (se.Children, "Xml-Children"); - - PrintingPermission copy = (PrintingPermission)pp.Copy (); - Assert.IsFalse (Object.ReferenceEquals (pp, copy), "ReferenceEquals"); - Assert.AreEqual (pp.Level, copy.Level, "Level"); - Assert.AreEqual (pp.IsUnrestricted (), copy.IsUnrestricted (), "IsUnrestricted ()"); - } - - [Test] - [ExpectedException (typeof (ArgumentException))] - public void PermissionState_Bad () - { - PermissionState ps = (PermissionState)77; - PrintingPermission pp = new PrintingPermission (ps); - } - - [Test] - [ExpectedException (typeof (ArgumentException))] - public void PrintingPermissionLevels_Bad () - { - PrintingPermissionLevel ppl = (PrintingPermissionLevel)(PrintingPermissionLevel.AllPrinting + 1); - PrintingPermission pp = new PrintingPermission (ppl); - } - - [Test] - [ExpectedException (typeof (ArgumentException))] - public void Level_PrintingPermissionLevels_Bad () - { - PrintingPermissionLevel ppl = (PrintingPermissionLevel)(PrintingPermissionLevel.AllPrinting + 1); - PrintingPermission pp = new PrintingPermission (PermissionState.None); - pp.Level = ppl; - } - - [Test] - public void Copy () - { - PrintingPermission pp = new PrintingPermission (PermissionState.None); - foreach (PrintingPermissionLevel ppl in AllLevel) { - pp.Level = ppl; - PrintingPermission copy = (PrintingPermission)pp.Copy (); - Assert.AreEqual (ppl, copy.Level, ppl.ToString ()); - } - } - - [Test] - public void Intersect_Null () - { - PrintingPermission pp = new PrintingPermission (PermissionState.None); - // No intersection with null - foreach (PrintingPermissionLevel ppl in AllLevel) { - pp.Level = ppl; - Assert.IsNull (pp.Intersect (null), ppl.ToString ()); - } - } - - [Test] - public void Intersect_None () - { - PrintingPermission sp1 = new PrintingPermission (PermissionState.None); - PrintingPermission sp2 = new PrintingPermission (PermissionState.None); - foreach (PrintingPermissionLevel ppl in AllLevelExceptNoLevel) { - sp2.Level = ppl; - // 1. Intersect None with ppl - PrintingPermission result = (PrintingPermission)sp1.Intersect (sp2); - Assert.IsNull (result, "None N " + ppl.ToString ()); - // 2. Intersect ppl with None - result = (PrintingPermission)sp2.Intersect (sp1); - Assert.IsNull (result, "None N " + ppl.ToString ()); - } - } - - [Test] - public void Intersect_Self () - { - PrintingPermission pp = new PrintingPermission (PermissionState.None); - foreach (PrintingPermissionLevel ppl in AllLevelExceptNoLevel) { - pp.Level = ppl; - PrintingPermission result = (PrintingPermission)pp.Intersect (pp); - Assert.AreEqual (ppl, result.Level, ppl.ToString ()); - } - } - - [Test] - public void Intersect_Unrestricted () - { - // Intersection with unrestricted == Copy - // a. source (this) is unrestricted - PrintingPermission sp1 = new PrintingPermission (PermissionState.Unrestricted); - PrintingPermission sp2 = new PrintingPermission (PermissionState.None); - foreach (PrintingPermissionLevel ppl in AllLevelExceptNoLevel) { - sp2.Level = ppl; - PrintingPermission result = (PrintingPermission)sp1.Intersect (sp2); - Assert.AreEqual (sp2.Level, result.Level, "target " + ppl.ToString ()); - } - // b. destination (target) is unrestricted - foreach (PrintingPermissionLevel ppl in AllLevelExceptNoLevel) { - sp2.Level = ppl; - PrintingPermission result = (PrintingPermission)sp2.Intersect (sp1); - Assert.AreEqual (sp2.Level, result.Level, "source " + ppl.ToString ()); - } - // exceptions for NoLevel - sp2.Level = PrintingPermissionLevel.NoPrinting; - Assert.IsNull (sp1.Intersect (sp2), "target NoLevel"); - Assert.IsNull (sp2.Intersect (sp1), "source NoLevel"); - } - - [Test] - public void IsSubset_Null () - { - PrintingPermission pp = new PrintingPermission (PermissionState.None); - Assert.IsTrue (pp.IsSubsetOf (null), "NoLevel"); - foreach (PrintingPermissionLevel ppl in AllLevelExceptNoLevel) { - pp.Level = ppl; - Assert.IsFalse (pp.IsSubsetOf (null), ppl.ToString ()); - } - } - - [Test] - public void IsSubset_None () - { - // IsSubset with none - // a. source (this) is none -> target is never a subset - PrintingPermission sp1 = new PrintingPermission (PermissionState.None); - PrintingPermission sp2 = new PrintingPermission (PermissionState.None); - foreach (PrintingPermissionLevel ppl in AllLevel) { - sp2.Level = ppl; - Assert.IsTrue (sp1.IsSubsetOf (sp2), "target " + ppl.ToString ()); - } - // b. destination (target) is none -> target is always a subset - foreach (PrintingPermissionLevel ppl in AllLevelExceptNoLevel) { - sp2.Level = ppl; - Assert.IsFalse (sp2.IsSubsetOf (sp1), "source " + ppl.ToString ()); - } - // exception of NoLevel - sp2.Level = PrintingPermissionLevel.NoPrinting; - Assert.IsTrue (sp2.IsSubsetOf (sp1), "source NoLevel"); - } - - [Test] - public void IsSubset_Self () - { - PrintingPermission pp = new PrintingPermission (PermissionState.None); - foreach (PrintingPermissionLevel ppl in AllLevel) { - pp.Level = ppl; - PrintingPermission result = (PrintingPermission)pp.Intersect (pp); - Assert.IsTrue (pp.IsSubsetOf (pp), ppl.ToString ()); - } - } - - [Test] - public void IsSubset_Unrestricted () - { - // IsSubset with unrestricted - // a. source (this) is unrestricted -> target is never a subset - PrintingPermission sp1 = new PrintingPermission (PermissionState.Unrestricted); - PrintingPermission sp2 = new PrintingPermission (PermissionState.None); - foreach (PrintingPermissionLevel ppl in AllLevelExceptAllLevel) { - sp2.Level = ppl; - Assert.IsFalse (sp1.IsSubsetOf (sp2), "target " + ppl.ToString ()); - } - // exception of AllLevel - sp2.Level = PrintingPermissionLevel.AllPrinting; - Assert.IsTrue (sp1.IsSubsetOf (sp2), "target AllLevel"); - // b. destination (target) is unrestricted -> target is always a subset - foreach (PrintingPermissionLevel ppl in AllLevel) { - sp2.Level = ppl; - Assert.IsTrue (sp2.IsSubsetOf (sp1), "source " + ppl.ToString ()); - } - } - - [Test] - public void Union_Null () - { - PrintingPermission pp = new PrintingPermission (PermissionState.None); - // Union with null is a simple copy - foreach (PrintingPermissionLevel ppl in AllLevel) { - pp.Level = ppl; - PrintingPermission union = (PrintingPermission)pp.Union (null); - Assert.AreEqual (ppl, union.Level, ppl.ToString ()); - } - } - - [Test] - public void Union_None () - { - // Union with none is same - PrintingPermission pp1 = new PrintingPermission (PermissionState.None); - PrintingPermission pp2 = new PrintingPermission (PermissionState.None); - PrintingPermission union = null; - - // a. source (this) is none - pp2.Level = PrintingPermissionLevel.NoPrinting; - union = (PrintingPermission)pp1.Union (pp2); - Assert.IsNull (union, "target NoPrinting"); - foreach (PrintingPermissionLevel ppl in AllLevelExceptNoAndAllLevel) { - pp2.Level = ppl; - union = (PrintingPermission)pp1.Union (pp2); - Assert.IsFalse (union.IsUnrestricted (), "target " + ppl.ToString ()); - } - pp2.Level = PrintingPermissionLevel.AllPrinting; - union = (PrintingPermission)pp1.Union (pp2); - Assert.IsTrue (union.IsUnrestricted (), "target AllPrinting"); - - // b. destination (target) is none - pp2.Level = PrintingPermissionLevel.NoPrinting; - union = (PrintingPermission)pp2.Union (pp1); - Assert.IsNull (union, "source NoPrinting"); - foreach (PrintingPermissionLevel ppl in AllLevelExceptNoAndAllLevel) { - pp2.Level = ppl; - union = (PrintingPermission)pp2.Union (pp1); - Assert.IsFalse (union.IsUnrestricted (), "source " + ppl.ToString ()); - } - pp2.Level = PrintingPermissionLevel.AllPrinting; - union = (PrintingPermission)pp2.Union (pp1); - Assert.IsTrue (union.IsUnrestricted (), "source AllPrinting"); - } - - [Test] - public void Union_Self () - { - PrintingPermission pp = new PrintingPermission (PermissionState.None); - foreach (PrintingPermissionLevel ppl in AllLevelExceptNoLevel) { - pp.Level = ppl; - PrintingPermission result = (PrintingPermission)pp.Union (pp); - Assert.AreEqual (ppl, result.Level, ppl.ToString ()); - } - // union of NoPrinting with NoPrinting == null - pp.Level = PrintingPermissionLevel.NoPrinting; - Assert.IsNull (pp.Union (pp), "NoPrinting"); - } - - [Test] - public void Union_Unrestricted () - { - // Union with unrestricted is unrestricted - PrintingPermission sp1 = new PrintingPermission (PermissionState.Unrestricted); - PrintingPermission sp2 = new PrintingPermission (PermissionState.None); - // a. source (this) is unrestricted - foreach (PrintingPermissionLevel ppl in AllLevel) { - sp2.Level = ppl; - PrintingPermission union = (PrintingPermission)sp1.Union (sp2); - Assert.IsTrue (union.IsUnrestricted (), "target " + ppl.ToString ()); - } - // b. destination (target) is unrestricted - foreach (PrintingPermissionLevel ppl in AllLevel) { - sp2.Level = ppl; - PrintingPermission union = (PrintingPermission)sp2.Union (sp1); - Assert.IsTrue (union.IsUnrestricted (), "source " + ppl.ToString ()); - } - } - - [Test] - [ExpectedException (typeof (ArgumentNullException))] - public void FromXml_Null () - { - PrintingPermission pp = new PrintingPermission (PermissionState.None); - pp.FromXml (null); - } - - [Test] - public void FromXml_WrongTag () - { - PrintingPermission pp = new PrintingPermission (PermissionState.None); - SecurityElement se = pp.ToXml (); - se.Tag = "IMono"; - pp.FromXml (se); - // note: normally IPermission classes (in corlib) DO care about the - // IPermission tag - } - - [Test] - public void FromXml_WrongTagCase () - { - PrintingPermission pp = new PrintingPermission (PermissionState.None); - SecurityElement se = pp.ToXml (); - se.Tag = "IPERMISSION"; // instead of IPermission - pp.FromXml (se); - // note: normally IPermission classes (in corlib) DO care about the - // IPermission tag - } - - [Test] -#if !NET_2_0 - [ExpectedException (typeof (ArgumentException))] -#endif - public void FromXml_WrongClass () - { - PrintingPermission pp = new PrintingPermission (PermissionState.None); - SecurityElement se = pp.ToXml (); - - SecurityElement w = new SecurityElement (se.Tag); - w.AddAttribute ("class", "Wrong" + se.Attribute ("class")); - w.AddAttribute ("version", se.Attribute ("version")); - pp.FromXml (w); - // doesn't care of the class name at that stage - // anyway the class has already be created so... - } - - [Test] - [ExpectedException (typeof (ArgumentException))] - public void FromXml_NoClass () - { - PrintingPermission pp = new PrintingPermission (PermissionState.None); - SecurityElement se = pp.ToXml (); - - SecurityElement w = new SecurityElement (se.Tag); - w.AddAttribute ("version", se.Attribute ("version")); - pp.FromXml (w); - // note: normally IPermission classes (in corlib) DO NOT care about - // attribute "class" name presence in the XML - } - - [Test] - [ExpectedException (typeof (ArgumentException))] - public void FromXml_WrongVersion () - { - PrintingPermission pp = new PrintingPermission (PermissionState.None); - SecurityElement se = pp.ToXml (); - se.Attributes.Remove ("version"); - se.Attributes.Add ("version", "2"); - pp.FromXml (se); - } - - [Test] -#if !NET_2_0 - [ExpectedException (typeof (ArgumentException))] -#endif - public void FromXml_NoVersion () - { - PrintingPermission pp = new PrintingPermission (PermissionState.None); - SecurityElement se = pp.ToXml (); - - SecurityElement w = new SecurityElement (se.Tag); - w.AddAttribute ("class", se.Attribute ("class")); - pp.FromXml (w); - } - - // Unification tests (with the MS final key) - // note: corlib already test the ECMA key support for unification - private const string PermissionPattern = ""; - private const string fx10version = "1.0.3300.0"; - private const string fx11version = "1.0.5000.0"; - private const string fx20version = "2.0.0.0"; - - private void Unification (string xml) - { - PermissionSetAttribute psa = new PermissionSetAttribute (SecurityAction.Assert); - psa.XML = xml; - string pset = psa.CreatePermissionSet ().ToString (); - string currentVersion = typeof (string).Assembly.GetName ().Version.ToString (); - Assert.IsTrue ((pset.IndexOf (currentVersion) > 0), currentVersion); - } - - [Test] - public void Unification_FromFx10 () - { - Unification (String.Format (PermissionPattern, fx10version)); - } - - [Test] - public void Unification_FromFx11 () - { - Unification (String.Format (PermissionPattern, fx11version)); - } - - [Test] - public void Unification_FromFx20 () - { - Unification (String.Format (PermissionPattern, fx20version)); - } - -#if NET_2_0 - [Test] - [Category ("NotWorking")] - [ExpectedException (typeof (FileLoadException))] - public void Unification_FromFx99 () - { - Type.GetType (String.Format (PermissionPattern, "9.99.999.9999")); - } -#else - [Test] - public void Unification_FromFx99 () - { - Unification (String.Format (PermissionPattern, "9.99.999.9999")); - } -#endif - } -} diff --git a/mcs/class/System.Drawing/Test/System.Drawing.Text/ChangeLog b/mcs/class/System.Drawing/Test/System.Drawing.Text/ChangeLog deleted file mode 100644 index b56d47cc206..00000000000 --- a/mcs/class/System.Drawing/Test/System.Drawing.Text/ChangeLog +++ /dev/null @@ -1,3 +0,0 @@ -2004-03-17 Ravindra - * Created this repository for System.Drawing.Text tests. - * ChangeLog: Added. diff --git a/mcs/class/System.Drawing/Test/System.Drawing/BitmapCas.cs b/mcs/class/System.Drawing/Test/System.Drawing/BitmapCas.cs deleted file mode 100644 index fefbf4a0b1b..00000000000 --- a/mcs/class/System.Drawing/Test/System.Drawing/BitmapCas.cs +++ /dev/null @@ -1,133 +0,0 @@ -// -// BitmapCas.cs - CAS unit tests for System.Drawing.Bitmap -// -// Author: -// Sebastien Pouliot -// -// Copyright (C) 2005 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using NUnit.Framework; - -using System; -using System.Drawing; -using System.Reflection; -using System.Security; -using System.Security.Permissions; -using System.Security.Policy; - -namespace MonoCasTests.System.Drawing { - - [TestFixture] - [Category ("CAS")] - public class BitmapCas { - - private MethodInfo getHbitmap1; - private MethodInfo getHbitmap2; - private MethodInfo getHicon; - - [TestFixtureSetUp] - public void FixtureSetUp () - { - // this executes at fulltrust - getHbitmap1 = typeof (Bitmap).GetMethod ("GetHbitmap", new Type[0]); - getHbitmap2 = typeof (Bitmap).GetMethod ("GetHbitmap", new Type[1] { typeof (Color) }); - getHicon = typeof (Bitmap).GetMethod ("GetHicon"); - } - - [SetUp] - public void SetUp () - { - if (!SecurityManager.SecurityEnabled) - Assert.Ignore ("SecurityManager.SecurityEnabled is OFF"); - } - - [Test] - [SecurityPermission (SecurityAction.Deny, UnmanagedCode = true)] - public void GetHbitmap () - { - Bitmap b = new Bitmap (10, 10); - try { - Assert.IsTrue (b.GetHbitmap () != IntPtr.Zero, "GetHbitmap"); - } - catch (NotImplementedException) { - // not available on Mono - } - try { - Assert.IsTrue (b.GetHbitmap (Color.Aqua) != IntPtr.Zero, "GetHbitmap(Color)"); - } - catch (NotImplementedException) { - // not available on Mono - } - } - - [Test] - [SecurityPermission (SecurityAction.Deny, UnmanagedCode = true)] - public void GetHicon () - { - Bitmap b = new Bitmap (10, 10); - try { - Assert.IsTrue (b.GetHicon () != IntPtr.Zero, "GetHicon"); - } - catch (NotImplementedException) { - // not available on Mono - } - } - - // we use reflection to call Bitmap as it's GetHbitmap and GetHicon methods - // are protected by a LinkDemand (which will be converted into full demand, - // i.e. a stack walk) when reflection is used (i.e. it gets testable). - - [Test] - [SecurityPermission (SecurityAction.Deny, UnmanagedCode = true)] - [ExpectedException (typeof (SecurityException))] - public void GetHbitmap_Empty_LinkDemand () - { - // requires FullTrust, so denying anything break the requirements - Assert.IsNotNull (getHbitmap1, "GetHbitmap"); - Bitmap b = new Bitmap (10, 10); - getHbitmap1.Invoke (b, null); - } - - [Test] - [SecurityPermission (SecurityAction.Deny, UnmanagedCode = true)] - [ExpectedException (typeof (SecurityException))] - public void GetHbitmap_Color_LinkDemand () - { - // requires FullTrust, so denying anything break the requirements - Assert.IsNotNull (getHbitmap2, "GetHbitmap(Color)"); - Bitmap b = new Bitmap (10, 10); - getHbitmap2.Invoke (b, new object[1] { Color.Aqua }); - } - - [Test] - [SecurityPermission (SecurityAction.Deny, UnmanagedCode = true)] - [ExpectedException (typeof (SecurityException))] - public void GetHicon_LinkDemand () - { - // requires FullTrust, so denying anything break the requirements - Assert.IsNotNull (getHicon, "GetHicon"); - Bitmap b = new Bitmap (10, 10); - getHicon.Invoke (b, null); - } - } -} diff --git a/mcs/class/System.Drawing/Test/System.Drawing/ChangeLog b/mcs/class/System.Drawing/Test/System.Drawing/ChangeLog deleted file mode 100644 index 5c648d4309f..00000000000 --- a/mcs/class/System.Drawing/Test/System.Drawing/ChangeLog +++ /dev/null @@ -1,311 +0,0 @@ -2005-09-19 Miguel de Icaza - - * TestGraphics.cs (LoadIndexed): Add test for the indexed bug. - -2005-09-16 Sebastien Pouliot - - * BitmapCas.cs: New. CAS unit tests for Bitmap. - * GraphicsCas.cs: New. CAS unit tests for Graphics. - * ColorConverter.cs, ColorTranslator.cs, TestBrushes.cs, TestBitmap.cs - TestColor.cs, TestFont.cs, TestIcon.cs, TestIconConverter.cs, - TestImage.cs, TestImageConverter.cs, TestImageFormatConverter.cs, - TestPens.cs, TestPoint.cs, TestPointF.cs, TestPointConverter.cs, - TestRectangle.cs, TestRectangleF.cs, TestRectangleConverter.cs, - TestRegion.cs, TestSizeConverter.cs, TestSize.cs, TestSizeF.cs, - TestStringFormat.cs, TestSystemBrushes.cs, TestSystemPens.cs: Deny - UnmanagedCode permission to all tests. This shows (when executed under - MS runtime) that S.D API is safe and doesn't requires high privileges - to run - even if we know that, deep down, this calls into GDI+. - -2005-09-14 Jordi Mas i Hernandez - - * TestGraphics.cs: Adds default properties, properties set/get and save - and restore status test - -2005-09-13 Jordi Mas i Hernandez - - * TestGraphics.cs: resets graphics object status before every SetClip test - -2005-09-12 Gert Driesen - - * TestImageConverter.cs: Re-enabled GetProperties test. - * TestPointConverter.cs: same. - * TestRectangleConverter.cs: same. - * TestSizeConverter.cs: same. - -2005-09-06 Jordi Mas i Hernandez - - * TestImagge.cs: File not found exception, related to fix r49744 - * TestBimap.cs: File not found exception, related to fix r49744 - -2005-09-06 Jordi Mas i Hernandez - - * TestGraphics.cs: New test case, only clipping for now - -2005-08-26 Gert Driesen - - * TestPointConverter.cs: Use Assert class instead of deriving from - deprecated Assertion class. Tests now pass on both Mono and MS.NET. - * TestRectangleConverter.cs: same. - * TestSizeConverter.cs: same. - -2005-08-26 Gert Driesen - - * ColorConverter.cs: Add hex string tests. Fixed tests to pass on - MS.NET. - -2005-08-23 Jordi Mas i Hernandez - - * TestPens.cs: Add test for Equals method - * TestBrushes.cs: Add test for Equals method - -2005-08-19 Jordi Mas i Hernandez - - * TestPointConverter.cs: Fixes and changes to make the test locale unsensitive - * TestRectangleConverter.cs: Fixes and changes to make the test locale unsensitive - * TestSizeConverter.cs: Fixes and changes to make the test locale unsensitive - * ColorConverter.cs: Fixes and changes to make the test locale unsensitive - -2005-08-17 Jordi Mas i Hernandez - - * TestRegion.cs: Adds many new cases for the new region implementation - -2005-08-16 Gert Driesen - - * ColorConverter.cs: Mono now also throws ArgumentException when - color value is not between 0 and 255. - * TestColor.cs: Added tests for invalid color values. - * TestRectangleConverter.cs: Fixed tests for conversion to/from - string. Added tests that verify results using specific cultures. - -2005-08-14 Gert Driesen - - * ColorConverter.cs: Merged tests from TestColorConverter.cs. Fixed - tests using current culture. - * TestColorConverter.cs: Merged tests with ColorConverter.cs and - removed. - -2005-08-14 Gert Driesen - - * TestColor.cs: Added test for ToString() on uninitialized color. - * TestColorConverter.cs: Added tests for ColorConverter. - -2005-08-10 Jordi Mas i Hernandez - - * TestRegion.cs: new cases for Combine and Intersect - -2005-08-10 Zoltan Varga - - * TestRectangle.cs: Add new test. - -2005-08-09 Andrew Skiba - - * ColorConverter.cs, ColorTranslator.cs: added - * TestPointConverter.cs, TestRectangleConverter.cs, TestSizeConverter.cs: new - tests for convert to/from string - -2005-08-07 Andrew Skiba - - * Color.cs: many new testcases added - -2005-08-07 Andrew Skiba - - * Size.cs, SizeF.cs: GetHashCode and ToString tests - -2005-08-07 Andrew Skiba - - * TestRectangle.cs, TestRectangleF.cs: add new testcases - -2005-08-07 Andrew Skiba - - * TestPoint.cs: GetHashCode and ToString tests added - * TestPointF.cs: GetHashCode and ToString tests added, Addition and Substraction - tests improved - -2005-08-07 Andrew Skiba - - * TestPens.cs, TestSystemBrushes.cs, TestSystemPens.cs: don't rethrow exceptions, keep - the original stack trace. - -2005-07-27 Andrew Skiba - - * TestColor.cs: added tests for equality operators, IsEmpty property and fixed GetHBS - tests to use tolerance. - -2005-05-10 Juraj Skripsky - - * TestColor.cs: Added tests for GetHue, GetBrightness - and GetSaturation. - -2005-02-24 Jordi Mas i Hernandez - * TestRegion.cs: added new IsVisible cases - -2004-06-22 Sanjay Gupta - - * TestIconConverter.cs, TestImageConverter.cs: Commented out some tests. - -2004-06-17 Ravindra - - * graphicsUi.cs: Formatted and moved to - Samples/System.Drawing directory. - * image1.cs: Formatted and renamed to bmpsave.cs. Moved to - Samples/System.Drawing directory. - * hering.cs: Formatted and moved to Samples/General directory. - * BmpPaint.cs: Ficed, formatted and moved to - Samples/System.Drawing directory. - * font1.cs: Formatted and renamed to font.cs. Moved to - Samples/System.Drawing directory. - -2004-06-10 Sanjay Gupta - - * TestBitmap.cs: Corrected issues from my previous checkin. - -2004-06-10 Sanjay Gupta - - * TestImageFormatConverter.cs, TestStringFormat.cs: Removed - dependency on obsolete class, Assertion from NUnit. - -2004-06-09 Sanjay Gupta - - * TestImageConverter.cs: Removed dependency on obsolete class, - Assertion from NUnit. - -2004-06-09 Sanjay Gupta - - * TestBitmap.cs, TestIcon.cs, TestIconConverter.cs: Removed - dependency on obsolete class, Assertion from NUnit. - -2004-05-27 Ravindra - - * TestRectangleConverter.cs: Ignored the test that is failing - because of bug #58435. - * TestPointConverter.cs: Same. - * TestSizeConverter.cs: Same. - * TestImageConverter.cs: Same. - -2004-05-26 Sanjay Gupta - - * TestImageFormatConverter.cs: Minor modification. Removed duplicate - assertion numbers. - -2004-05-26 Ravindra - - * TestColor.cs: Added a test for testing ARGB values for all - the static color properties. - -2004-05-20 Sanjay Gupta - - * TestIcon.cs: Added. - * bitmaps/smiley.ico: Added. - -2004-05-18 Sanjay Gupta - - * TestImageFormatConverter.cs: Fixed issues with test case. - -2004-05-18 Sanjay Gupta - - * TestImageConverter.cs: Fixed issues with test case. - -2004-05-18 Sanjay Gupta - - * TestIconConverter.cs: Fixed issues with test case. - -2004-05-18 Ravindra - - * TestHatchBrush.cs: Removed. Now, we have a better test for HatchBrush - this under Test/System.Drawing.Drawing2D directory. - -2004-05-17 Sanjay Gupta - - * TestIconConverter.cs: Added. - * bitmaps/VisualPng.ico: Added - * bitmaps/VisualPng1.ico: Added - -2004-05-14 Sanjay Gupta - - * TestBitmap.cs: Modified method signature to static to be used in other file. - * TestImageConverter.cs: Added. - * TestImageFormatConverter.cs: Added - -2004-05-12 Jordi Mas - * TestBitmap.cs: added lockbitmap tests - -2004-05-07 Jordi Mas - * TestBitmap.cs: added rotation tests - -2004-04-23 Ravindra - - * TestSystemPens.cs: Removed some unused exception variables. - * TestRectangleConverter.cs: Removed culture dependent tests. - * TestPointConverter.cs: Removed culture dependent tests. - * TestSizeConverter.cs: Removed culture dependent tests. - (These tests were not right because a constant culture specific string - was being parsed by using current culture of the thread. It resulted in - test failures when cultures do not match.) - -2004-04-22 Ravindra - - * TestPointConverter.cs: Added. - * TestSizeConverter.cs: Added. - -2004-04-22 Ravindra - - * TestRectangleConverter.cs: Added. - -2004-04-21 Ravindra - - * TestPens.cs: Added. - -2004-04-21 Ravindra - - * TestBrushes.cs: Added. - -2004-04-16 Ravindra - - * TestSystemPens.cs: Added. - -2004-03-13 Ravindra - - * TestSystemBrushes.cs: Added test fail conditions. - -2004-03-12 Ravindra - - * TestSystemBrushes.cs: Added. - -2004-03-17 Ravindra - * TestHatchBrush.cs: Added. - -2004-01-26 Ravindra - * TestPointF.cs: Added. - * TestSize.cs: Added. - * TestSizeF: Added. - -2004-01-16 Ravindra - * BmpPaint.cs did not run on .NET. - Modified to make it run on .NET. Specs say - "Do not save an image to the same stream - that was used to construct the image." - -2003-07-30 Alexandre Pigolkine - * BmpPaint.cs modified - -2003-06-28 Alexandre Pigolkine - * hering.cs save as Jpeg also - -2003-06-22 Alexandre Pigolkine - * font1.cs added - -2003-06-17 Alexandre Pigolkine - * hering.cs added - -2003-06-15 Alexandre Pigolkine - * BmpPaint.cs ImageFormat specified for Save() - * image1.cs added - -2003-06-06 Alexandre Pigolkine - * BmpPaint.cs added - -2001-10-31 Mike Kestner - - * TestPoint.cs : Tests I've had in my node forever. - diff --git a/mcs/class/System.Drawing/Test/System.Drawing/ColorConverter.cs b/mcs/class/System.Drawing/Test/System.Drawing/ColorConverter.cs deleted file mode 100644 index 379366379af..00000000000 --- a/mcs/class/System.Drawing/Test/System.Drawing/ColorConverter.cs +++ /dev/null @@ -1,382 +0,0 @@ -using System; -using System.Collections; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Drawing; -using System.Globalization; -using System.Security.Permissions; - -using NUnit.Framework; - -namespace MonoTests.System.Drawing { - - [TestFixture] - [SecurityPermission (SecurityAction.Deny, UnmanagedCode = true)] - public class ColorConverterFixture - { - Color col; - Color colnamed; - ColorConverter colconv; - String colStr; - String colStrInvariant; - String colnamedStr; - - [SetUp] - public void SetUp () { - col = Color.FromArgb (10, 20, 30); - colStr = string.Format ("10{0} 20{0} 30", CultureInfo.CurrentCulture.TextInfo.ListSeparator); - colStrInvariant = string.Format ("10{0} 20{0} 30", CultureInfo.InvariantCulture.TextInfo.ListSeparator); - - colnamed = Color.ForestGreen; - colnamedStr = "ForestGreen"; - - colconv = (ColorConverter) TypeDescriptor.GetConverter (col); - } - - [Test] - public void CanConvertFrom () { - Assert.IsTrue (colconv.CanConvertFrom (typeof (String)), "CCF#1"); - Assert.IsTrue (colconv.CanConvertFrom (null, typeof (String)), "CCF#1a"); - Assert.IsFalse (colconv.CanConvertFrom (null, typeof (Rectangle)), "CCF#2"); - Assert.IsFalse (colconv.CanConvertFrom (null, typeof (RectangleF)), "CCF#3"); - Assert.IsFalse (colconv.CanConvertFrom (null, typeof (Point)), "CCF#4"); - Assert.IsFalse (colconv.CanConvertFrom (null, typeof (PointF)), "CCF#5"); - Assert.IsFalse (colconv.CanConvertFrom (null, typeof (Color)), "CCF#6"); - Assert.IsFalse (colconv.CanConvertFrom (null, typeof (SizeF)), "CCF#7"); - Assert.IsFalse (colconv.CanConvertFrom (null, typeof (Object)), "CCF#8"); - Assert.IsFalse ( colconv.CanConvertFrom (null, typeof (int)), "CCF#9"); - Assert.IsTrue (colconv.CanConvertFrom (null, typeof (InstanceDescriptor)), "CCF#10"); - } - - [Test] - public void CanConvertTo () { - Assert.IsTrue (colconv.CanConvertTo (typeof (String)), "CCT#1"); - Assert.IsTrue (colconv.CanConvertTo (null, typeof (String)), "CCT#1a"); - Assert.IsFalse (colconv.CanConvertTo (null, typeof (Rectangle)), "CCT#2"); - Assert.IsFalse (colconv.CanConvertTo (null, typeof (RectangleF)), "CCT#3"); - Assert.IsFalse (colconv.CanConvertTo (null, typeof (Point)), "CCT#4"); - Assert.IsFalse (colconv.CanConvertTo (null, typeof (PointF)), "CCT#5"); - Assert.IsFalse (colconv.CanConvertTo (null, typeof (Color)), "CCT#6"); - Assert.IsFalse (colconv.CanConvertTo (null, typeof (SizeF)), "CCT#7"); - Assert.IsFalse (colconv.CanConvertTo (null, typeof (Object)), "CCT#8"); - Assert.IsFalse (colconv.CanConvertTo (null, typeof (int)), "CCT#9"); - Assert.IsTrue (colconv.CanConvertTo (typeof (InstanceDescriptor)), "CCT#10"); - } - - [Test] - public void ConvertFrom () - { - Color color = (Color) colconv.ConvertFrom (null, CultureInfo.InvariantCulture, - "#0x23190A44"); - Assert.AreEqual (35, color.A, "CF1#1"); - Assert.AreEqual (25, color.R, "CF1#2"); - Assert.AreEqual (10, color.G, "CF1#3"); - Assert.AreEqual (68, color.B, "CF1#4"); - - color = (Color) colconv.ConvertFrom (null, CultureInfo.InvariantCulture, - "#0X190A44"); - Assert.AreEqual (0, color.A, "CF2#1"); - Assert.AreEqual (25, color.R, "CF2#2"); - Assert.AreEqual (10, color.G, "CF2#3"); - Assert.AreEqual (68, color.B, "CF2#4"); - - color = (Color) colconv.ConvertFrom (null, CultureInfo.InvariantCulture, - "0x190A44"); - Assert.AreEqual (255, color.A, "CF3#1"); - Assert.AreEqual (25, color.R, "CF3#2"); - Assert.AreEqual (10, color.G, "CF3#3"); - Assert.AreEqual (68, color.B, "CF3#4"); - - color = (Color) colconv.ConvertFrom (null, CultureInfo.InvariantCulture, - "0X190A44"); - Assert.AreEqual (255, color.A, "CF4#1"); - Assert.AreEqual (25, color.R, "CF4#2"); - Assert.AreEqual (10, color.G, "CF4#3"); - Assert.AreEqual (68, color.B, "CF4#4"); - - color = (Color) colconv.ConvertFrom (null, CultureInfo.InvariantCulture, - "111111"); - Assert.AreEqual (0, color.A, "CF5#1"); - Assert.AreEqual (1, color.R, "CF5#2"); - Assert.AreEqual (178, color.G, "CF5#3"); - Assert.AreEqual (7, color.B, "CF5#4"); - - color = (Color) colconv.ConvertFrom (null, CultureInfo.InvariantCulture, - "10"); - Assert.AreEqual (0, color.A, "CF6#1"); - Assert.AreEqual (0, color.R, "CF6#2"); - Assert.AreEqual (0, color.G, "CF6#3"); - Assert.AreEqual (10, color.B, "CF6#4"); - - color = (Color) colconv.ConvertFrom (null, CultureInfo.InvariantCulture, - "0"); - Assert.AreEqual (0, color.A, "CF7#1"); - Assert.AreEqual (0, color.R, "CF7#2"); - Assert.AreEqual (0, color.G, "CF7#3"); - Assert.AreEqual (0, color.B, "CF7#4"); - - Assert.AreEqual (col, (Color) colconv.ConvertFrom (null, - CultureInfo.InvariantCulture, colStrInvariant), "CF#1"); - Assert.AreEqual (colnamed, (Color) colconv.ConvertFrom (null, - CultureInfo.InvariantCulture, colnamedStr), "CF#2"); - - Assert.AreEqual (Color.Empty, colconv.ConvertFrom (string.Empty), "CF#3"); - Assert.AreEqual (Color.Empty, colconv.ConvertFrom (" "), "CF#4"); - Assert.AreEqual (Color.Red, colconv.ConvertFrom ("Red"), "CF#5"); - Assert.AreEqual (Color.Red, colconv.ConvertFrom (" Red "), "CF#6"); - - } - - [Test] - [ExpectedException (typeof (ArgumentException))] - public void ConvertFrom_x1 () - { - colconv.ConvertFrom (null, CultureInfo.InvariantCulture, "10, 20"); - } - - [Test] - [ExpectedException (typeof (ArgumentException))] - public void ConvertFrom_x2 () - { - colconv.ConvertFrom (null, CultureInfo.InvariantCulture, "-10, 20, 30"); - } - - [Test] - [ExpectedException (typeof (ArgumentException))] - public void ConvertFrom_x3 () - { - colconv.ConvertFrom (null, CultureInfo.InvariantCulture, - "1, 1, 1, 1, 1"); - } - - [Test] - [ExpectedException (typeof (Exception))] - public void ConvertFrom_x4 () - { - colconv.ConvertFrom (null, CultureInfo.InvariantCulture, - "*1, 1"); - } - - [Test] - [ExpectedException (typeof (NotSupportedException))] - public void ConvertFrom_x5 () - { - colconv.ConvertFrom (null, CultureInfo.InvariantCulture, - new Point (10, 10)); - } - - [Test] - [ExpectedException (typeof (NotSupportedException))] - public void ConvertFrom_x6 () - { - colconv.ConvertFrom (null, CultureInfo.InvariantCulture, - new PointF (10, 10)); - } - - [Test] - [ExpectedException (typeof (NotSupportedException))] - public void ConvertFrom_x7 () - { - colconv.ConvertFrom (null, CultureInfo.InvariantCulture, - new Size (10, 10)); - } - - [Test] - [ExpectedException (typeof (NotSupportedException))] - public void ConvertFrom_x8 () - { - colconv.ConvertFrom (null, CultureInfo.InvariantCulture, - new SizeF (10, 10)); - } - - [Test] - [ExpectedException (typeof (NotSupportedException))] - public void ConvertFrom_x9 () - { - colconv.ConvertFrom (null, CultureInfo.InvariantCulture, 0x10); - } - - [Test] - public void ConvertTo () - { - Assert.AreEqual (colStrInvariant, colconv.ConvertTo (null, CultureInfo.InvariantCulture, - Color.FromArgb (10, 20, 30), typeof (String)), "CT#1"); - Assert.AreEqual (colStrInvariant, colconv.ConvertTo (null, CultureInfo.InvariantCulture, - Color.FromArgb (255, 10, 20, 30), typeof (String)), "CT#2"); - Assert.AreEqual ("10, 20, 30, 40", colconv.ConvertTo (null, CultureInfo.InvariantCulture, - Color.FromArgb (10, 20, 30, 40), typeof (String)), "CT#3"); - Assert.AreEqual (colnamedStr, colconv.ConvertTo (null, CultureInfo.InvariantCulture, - colnamed, typeof (String)), "CT#4"); - - Assert.AreEqual (string.Empty, colconv.ConvertTo (Color.Empty, typeof (string)), "CT#5"); - Assert.AreEqual ("Red", colconv.ConvertTo (Color.Red, typeof (string)), "CT#6"); - Assert.AreEqual (string.Empty, colconv.ConvertTo (null, typeof (string)), "CT#7"); - Assert.AreEqual ("test", colconv.ConvertTo ("test", typeof (string)), "CT#8"); - } - - [Test] - [ExpectedException (typeof (NotSupportedException))] - public void ConvertTo_x1 () - { - colconv.ConvertTo (null, CultureInfo.InvariantCulture, col, - typeof (Color)); - } - - [Test] - [ExpectedException (typeof (NotSupportedException))] - public void ConvertTo_x2 () - { - colconv.ConvertTo (null, CultureInfo.InvariantCulture, col, - typeof (SizeF)); - } - - [Test] - [ExpectedException (typeof (NotSupportedException))] - public void ConvertTo_x3 () - { - colconv.ConvertTo (null, CultureInfo.InvariantCulture, col, - typeof (Point)); - } - - [Test] - [ExpectedException (typeof (NotSupportedException))] - public void ConvertTo_x4 () - { - colconv.ConvertTo (null, CultureInfo.InvariantCulture, col, - typeof (PointF)); - } - - [Test] - [ExpectedException (typeof (NotSupportedException))] - public void ConvertTo_x5 () - { - colconv.ConvertTo (null, CultureInfo.InvariantCulture, col, - typeof (int)); - } - - [Test] - public void GetCreateInstanceSupported () - { - Assert.IsTrue (!colconv.GetCreateInstanceSupported (), "GCIS#1"); - Assert.IsTrue (!colconv.GetCreateInstanceSupported (null), "GCIS#2"); - } - - [Test] - public void CreateInstance () - { - Hashtable ht = new Hashtable (); - ht.Add ("R", 10); ht.Add ("G", 20); ht.Add ("B", 30); - - Assert.AreEqual (null, colconv.CreateInstance (ht), "CI#1"); - - ht.Add ("Name", "ForestGreen"); - - Assert.AreEqual (null, colconv.CreateInstance (null, ht), "CI#2"); - } - - [Test] - public void GetPropertiesSupported () - { - Assert.IsTrue (!colconv.GetPropertiesSupported (), "GPS#1"); - Assert.IsTrue (!colconv.GetPropertiesSupported (null), "GPS#2"); - } - - [Test] - public void GetProperties () - { - Attribute [] attrs; - - Assert.AreEqual (null, colconv.GetProperties (col), "GP1#1"); - - Assert.AreEqual (null, colconv.GetProperties (null, col, null), "GP2#1"); - - attrs = Attribute.GetCustomAttributes (typeof (Color), true); - Assert.AreEqual (null, colconv.GetProperties (null, col, attrs), "GP3#5"); - } - - [Test] - public void ConvertFromInvariantString_string () - { - Assert.AreEqual (col, colconv.ConvertFromInvariantString (colStrInvariant), "CFISS#1"); - Assert.AreEqual (colnamed, colconv.ConvertFromInvariantString (colnamedStr), "CFISS#2"); - } - - [Test] - [ExpectedException (typeof (ArgumentException))] - public void ConvertFromInvariantString_InvalidComponentCount () - { - colconv.ConvertFromInvariantString ("1, 2, 3, 4, 5"); - } - - [Test] - public void ConvertFromInvariantString_InvalidNumber () - { - try { - colconv.ConvertFromInvariantString ("hello"); - Assert.Fail ("#1"); - } catch (Exception ex) { - Assert.AreEqual (typeof (Exception), ex.GetType (), "#2"); - Assert.IsNotNull (ex.InnerException, "#3"); - Assert.AreEqual (typeof (FormatException), ex.InnerException.GetType (), "#3"); - } - } - - [Test] - public void ConvertFromString_string () - { - Assert.AreEqual (col, colconv.ConvertFromString (colStr), "CFSS#1"); - Assert.AreEqual (colnamed, colconv.ConvertFromString (colnamedStr), "CFSS#2"); - } - - [Test] - [ExpectedException (typeof (ArgumentException))] - public void ConvertFromString_InvalidComponentCount () - { - CultureInfo culture = CultureInfo.CurrentCulture; - colconv.ConvertFromString (string.Format (culture, - "1{0} 2{0} 3{0} 4{0} 5", culture.TextInfo.ListSeparator[0])); - } - - [Test] - public void ConvertFromString_InvalidNumber () - { - try { - colconv.ConvertFromString ("hello"); - Assert.Fail ("#1"); - } catch (Exception ex) { - Assert.AreEqual (typeof (Exception), ex.GetType (), "#2"); - Assert.IsNotNull (ex.InnerException, "#3"); - Assert.AreEqual (typeof (FormatException), ex.InnerException.GetType (), "#3"); - } - } - - [Test] - public void ConvertToInvariantString_string () { - Assert.AreEqual (colStrInvariant, colconv.ConvertToInvariantString (col), "CFISS#1"); - Assert.AreEqual (colnamedStr, colconv.ConvertToInvariantString (colnamed), "CFISS#2"); - } - - [Test] - public void ConvertToString_string () { - Assert.AreEqual (colStr, colconv.ConvertToString (col), "CFISS#1"); - Assert.AreEqual (colnamedStr, colconv.ConvertToString (colnamed), "CFISS#3"); - } - - [Test] - public void GetStandardValuesSupported () { - Assert.IsTrue (colconv.GetStandardValuesSupported ()); - } - - [Test] - public void GetStandardValues () { - Assert.AreEqual (167, colconv.GetStandardValues ().Count); - Assert.AreEqual (167, colconv.GetStandardValues (null).Count); - } - - [Test] - public void GetStandardValuesExclusive () { - Assert.AreEqual (false, colconv.GetStandardValuesExclusive ()); - } - } -} - diff --git a/mcs/class/System.Drawing/Test/System.Drawing/ColorTranslator.cs b/mcs/class/System.Drawing/Test/System.Drawing/ColorTranslator.cs deleted file mode 100644 index 552b77c77b0..00000000000 --- a/mcs/class/System.Drawing/Test/System.Drawing/ColorTranslator.cs +++ /dev/null @@ -1,128 +0,0 @@ -using System; -using System.Drawing; -using System.Security.Permissions; -using NUnit.Framework; - -namespace MonoTests.System.Drawing { - - [TestFixture] - [SecurityPermission (SecurityAction.Deny, UnmanagedCode = true)] - public class ColorTranslatorFixture { - [Test] - public void FromHtml () - { - Color [] colors = new Color [] { -Color.Aqua, Color.Black, Color.Blue, Color.Fuchsia, Color.Gray, -Color.Green, Color.Lime, Color.Maroon, Color.Navy, Color.Olive, -Color.Purple, Color.Red, Color.Silver, Color.Teal, Color.White, -Color.Yellow, - -SystemColors.ActiveBorder, SystemColors.ActiveCaption, -SystemColors.Control, -//SystemColors.ControlLightLight, -SystemColors.ActiveCaptionText, SystemColors.GrayText, -//SystemColors.InactiveBorder, SystemColors.InactiveCaption, -SystemColors.InfoText, SystemColors.Menu, -SystemColors.ControlDarkDark, -//SystemColors.ControlText, SystemColors.ControlDark, -SystemColors.Window, -SystemColors.AppWorkspace, SystemColors.Desktop, -//SystemColors.ControlDark, -SystemColors.ControlText, -SystemColors.Highlight, SystemColors.HighlightText, -//SystemColors.InactiveCaptionText, -SystemColors.Info, -SystemColors.MenuText, SystemColors.ScrollBar, -//SystemColors.ControlLight, SystemColors.ControlLightLight - }; - string [] htmlColors = new string [] { -"Aqua", "Black", "Blue", "Fuchsia", "Gray", "Green", -"Lime", "Maroon", "Navy", "Olive", "Purple", "Red", -"Silver", "Teal", "White", "Yellow", - -"activeborder", "activecaption", "buttonface", -//"buhighlight", -"captiontext", "graytext", -//"iborder", "Icaption", -"infotext", "menu", "threeddarkshadow", -//"thrface", "Threedshadow", -"window", "appworkspace", -"background", -//"bshadow", -"buttontext", "highlight", -"highlighttext", -//"icaptiontext", -"infobackground", -"menutext", "scrollbar", -//"thhighlight", "thlightshadow" - }; - - for (int i=0; i -// -// Copyright (C) 2005 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using NUnit.Framework; - -using System; -using System.Drawing; -using System.Reflection; -using System.Security; -using System.Security.Permissions; -using System.Security.Policy; - -namespace MonoCasTests.System.Drawing { - - [TestFixture] - [Category ("CAS")] - public class GraphicsCas { - - private MethodInfo fromHdcInternal; - private MethodInfo fromHwndInternal; - private MethodInfo releaseHdcInternal; - private Bitmap bitmap; - - [TestFixtureSetUp] - public void FixtureSetUp () - { - // this executes at fulltrust - fromHdcInternal = typeof (Graphics).GetMethod ("FromHdcInternal"); - fromHwndInternal = typeof (Graphics).GetMethod ("FromHwndInternal"); - releaseHdcInternal = typeof (Graphics).GetMethod ("ReleaseHdcInternal"); - bitmap = new Bitmap (10, 10); - } - - [SetUp] - public void SetUp () - { - if (!SecurityManager.SecurityEnabled) - Assert.Ignore ("SecurityManager.SecurityEnabled is OFF"); - } - - private Graphics GetGraphics () - { - return Graphics.FromImage (bitmap); - } - - [Test] - [SecurityPermission (SecurityAction.Deny, UnmanagedCode = true)] - public void FromHdcInternal () - { - try { - Graphics.FromHdcInternal (IntPtr.Zero); - } - catch (SecurityException) { - Assert.Fail ("SecurityException"); - } - catch (Exception) { - } - } - - [Test] - [SecurityPermission (SecurityAction.Deny, UnmanagedCode = true)] - [Category ("NotWorking")] - public void FromHwndInternal () - { - try { - Graphics.FromHwndInternal (IntPtr.Zero); - } - catch (SecurityException) { - Assert.Fail ("SecurityException"); - } - catch (Exception) { - } - } - - [Test] - [SecurityPermission (SecurityAction.Deny, UnmanagedCode = true)] - public void ReleaseHdcInternal () - { - try { - Graphics g = GetGraphics (); - g.ReleaseHdcInternal (IntPtr.Zero); - } - catch (SecurityException) { - Assert.Fail ("SecurityException"); - } - catch (Exception) { - } - } - - // we use reflection to call Graphics as it's *Internal methods are - // protected by a LinkDemand (which will be converted into full demand, - // i.e. a stack walk) when reflection is used (i.e. it gets testable). - - [Test] - [SecurityPermission (SecurityAction.Deny, UnmanagedCode = true)] - [ExpectedException (typeof (SecurityException))] - public void FromHdcInternal_LinkDemand () - { - // requires FullTrust, so denying anything break the requirements - Assert.IsNotNull (fromHdcInternal, "FromHdcInternal"); - fromHdcInternal.Invoke (null, new object[1] { IntPtr.Zero }); - } - - [Test] - [SecurityPermission (SecurityAction.Deny, UnmanagedCode = true)] - [ExpectedException (typeof (SecurityException))] - public void FromHwndInternal_LinkDemand () - { - // requires FullTrust, so denying anything break the requirements - Assert.IsNotNull (fromHwndInternal, "FromHwndInternal"); - fromHwndInternal.Invoke (null, new object[1] { IntPtr.Zero }); - } - - [Test] - [SecurityPermission (SecurityAction.Deny, UnmanagedCode = true)] - [ExpectedException (typeof (SecurityException))] - public void ReleaseHdcInternal_LinkDemand () - { - // requires FullTrust, so denying anything break the requirements - Assert.IsNotNull (releaseHdcInternal, "ReleaseHdcInternal"); - Graphics g = GetGraphics (); - releaseHdcInternal.Invoke (g, new object[1] { IntPtr.Zero }); - } - } -} diff --git a/mcs/class/System.Drawing/Test/System.Drawing/README b/mcs/class/System.Drawing/Test/System.Drawing/README deleted file mode 100644 index 957903d11bb..00000000000 --- a/mcs/class/System.Drawing/Test/System.Drawing/README +++ /dev/null @@ -1,12 +0,0 @@ -README - -* To run the tests using the Mono rutime - -cd mcs/class/System.Drawing -make run-test - -* test-ms.sh runs the test using the MS .Net runtime and stores the bimaps -created by tests in the directory called MsNet. - - - diff --git a/mcs/class/System.Drawing/Test/System.Drawing/TestBitmap.cs b/mcs/class/System.Drawing/Test/System.Drawing/TestBitmap.cs deleted file mode 100644 index 16f0b4a0056..00000000000 --- a/mcs/class/System.Drawing/Test/System.Drawing/TestBitmap.cs +++ /dev/null @@ -1,345 +0,0 @@ -// -// Bitmap class testing unit -// -// Author: -// -// Jordi Mas i Hernàndez (jmas@softcatala.org> -// -// (C) 2004 Ximian, Inc. http://www.ximian.com -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -using System; -using System.Drawing; -using System.Drawing.Imaging; -using NUnit.Framework; -using System.IO; -using System.Security.Cryptography; -using System.Text; -using System.Runtime.InteropServices; -using System.Security.Permissions; - -namespace MonoTests.System.Drawing{ - - [TestFixture] - [SecurityPermission (SecurityAction.Deny, UnmanagedCode = true)] - public class TestBitmap { - - [TearDown] - public void Clean() {} - - [SetUp] - public void GetReady() - { - - } - - [Test] - public void TestPixels() - { - // Tests GetSetPixel/SetPixel - Bitmap bmp= new Bitmap(100,100, PixelFormat.Format32bppRgb); - bmp.SetPixel(0,0,Color.FromArgb(255,128,128,128)); - Color color = bmp.GetPixel(0,0); - - Assert.AreEqual (Color.FromArgb(255,128,128,128), color); - - bmp.SetPixel(99,99,Color.FromArgb(255,255,0,155)); - Color color2 = bmp.GetPixel(99,99); - Assert.AreEqual (Color.FromArgb(255,255,0,155), color2); - } - - /* Get the output directory depending on the runtime and location*/ - public static string getOutSubDir() - { - string sSub, sRslt; - - if (Environment.GetEnvironmentVariable("MSNet")==null) - sSub = "mono/"; - else - sSub = "MSNet/"; - - sRslt = Path.GetFullPath (sSub); - - if (Directory.Exists(sRslt) == false) - sRslt = "Test/System.Drawing/" + sSub; - - if (sRslt.Length > 0) - if (sRslt[sRslt.Length-1] != '\\' && sRslt[sRslt.Length-1] != '/') - sRslt += "/"; - - return sRslt; - } - - /* Get the input directory depending on the runtime*/ - public static string getInFile(string file) - { - string sRslt; - - sRslt = Path.GetFullPath (file); - - if (File.Exists(file)==false) - sRslt = "Test/System.Drawing/" + file; - - return sRslt; - } - - //[Test] - public void MakeTransparent() - { - string sInFile = getInFile("bitmaps/maketransparent.bmp"); - string sOutFile = getOutSubDir() + "transparent.bmp"; - - Bitmap bmp = new Bitmap(sInFile); - - bmp.MakeTransparent(); - bmp.Save(sOutFile); - - Color color = bmp.GetPixel(1,1); - Assert.AreEqual (Color.Black.R, color.R); - Assert.AreEqual (Color.Black.G, color.G); - Assert.AreEqual (Color.Black.B, color.B); - } - - [Test] - public void Clone() - { - string sInFile = getInFile ("bitmaps/almogaver24bits.bmp"); - string sOutFile = getOutSubDir() + "clone24.bmp"; - - Rectangle rect = new Rectangle(0,0,50,50); - Bitmap bmp = new Bitmap(sInFile); - - Bitmap bmpNew = bmp.Clone (rect, PixelFormat.Format32bppArgb); - - Color colororg0 = bmp.GetPixel(0,0); - Color colororg50 = bmp.GetPixel(49,49); - Color colornew0 = bmpNew.GetPixel(0,0); - Color colornew50 = bmpNew.GetPixel(49,49); - - Assert.AreEqual (colororg0, colornew0); - Assert.AreEqual (colororg50, colornew50); - } - - [Test] - public void CloneImage() - { - string sInFile = getInFile ("bitmaps/almogaver24bits.bmp"); - Bitmap bmp = new Bitmap(sInFile); - - Bitmap bmpNew = (Bitmap) bmp.Clone (); - - Assert.AreEqual (bmp.Width, bmpNew.Width); - Assert.AreEqual (bmp.Height, bmpNew.Height); - Assert.AreEqual (bmp.PixelFormat, bmpNew.PixelFormat); - - } - - [Test] - public void Frames() - { - string sInFile = getInFile ("bitmaps/almogaver24bits.bmp"); - Bitmap bmp = new Bitmap(sInFile); - int cnt = bmp.GetFrameCount(FrameDimension.Page); - int active = bmp.SelectActiveFrame (FrameDimension.Page, 0); - - Assert.AreEqual (1, cnt); - Assert.AreEqual (0, active); - } - - [Test] - [ExpectedException (typeof (ArgumentException))] - public void FileDoesNotExists () - { - Bitmap bmp = new Bitmap ("FileDoesNotExists.jpg"); - } - - static string ByteArrayToString(byte[] arrInput) - { - int i; - StringBuilder sOutput = new StringBuilder(arrInput.Length); - for (i=0;i < arrInput.Length -1; i++) - { - sOutput.Append(arrInput[i].ToString("X2")); - } - return sOutput.ToString(); - } - - - public string RotateBmp (Bitmap src, RotateFlipType rotate) - { - int witdh = 150, height = 150, index = 0; - byte[] pixels = new byte [witdh * height * 3]; - Bitmap bmp_rotate; - byte[] hash; - Color clr; - - - bmp_rotate = src.Clone (new RectangleF (0,0, witdh, height), PixelFormat.Format32bppArgb); - bmp_rotate.RotateFlip (rotate); - - for (int y = 0; y < height; y++) { - for (int x = 0; x < witdh; x++) { - clr = bmp_rotate.GetPixel (x,y); - pixels[index++] = clr.R; pixels[index++] = clr.G; pixels[index++] = clr.B; - } - } - - hash = new MD5CryptoServiceProvider().ComputeHash (pixels); - return ByteArrayToString (hash); - } - - - /* - Rotate bitmap in diffent ways, and check the result - pixels using MD5 - */ - [Test] - public void Rotate() - { - string sInFile = getInFile ("bitmaps/almogaver24bits.bmp"); - Bitmap bmp = new Bitmap(sInFile); - - Assert.AreEqual ("312958A3C67402E1299413794988A3", RotateBmp (bmp, RotateFlipType.Rotate90FlipNone)); - Assert.AreEqual ("BF70D8DA4F1545AEDD77D0296B47AE", RotateBmp (bmp, RotateFlipType.Rotate180FlipNone)); - Assert.AreEqual ("15AD2ADBDC7090C0EC744D0F7ACE2F", RotateBmp (bmp, RotateFlipType.Rotate270FlipNone)); - Assert.AreEqual ("2E10FEC1F4FD64ECC51D7CE68AEB18", RotateBmp (bmp, RotateFlipType.RotateNoneFlipX)); - Assert.AreEqual ("E63204779B566ED01162B90B49BD9E", RotateBmp (bmp, RotateFlipType.Rotate90FlipX)); - Assert.AreEqual ("B1ECB17B5093E13D04FF55CFCF7763", RotateBmp (bmp, RotateFlipType.Rotate180FlipX)); - Assert.AreEqual ("71A173882C16755D86F4BC26532374", RotateBmp (bmp, RotateFlipType.Rotate270FlipX)); - - } - - public void LockBmp (PixelFormat fmt, PixelFormat fmtlock, string output, - int lwidth , int lheight, ref string hash1, ref string hash2) - { - int width = 100, height = 100, bbps, cur, pos; - Bitmap bmp = new Bitmap (width, height, fmt); - Graphics gr = Graphics.FromImage (bmp); - byte[] hash; - Color clr; - byte[] btv = new byte[1]; - int y, x, len = width * height * 4, index = 0; - byte[] pixels = new byte [len]; - hash1 = hash2 =""; - - bbps = Image.GetPixelFormatSize (fmt); - - Pen p = new Pen (Color.FromArgb (255, 100, 200, 250), 2); - gr.DrawRectangle(p, 1.0F, 1.0F, 80.0F, 80.0F); - - BitmapData bd = bmp.LockBits (new Rectangle (0, 0, lwidth, lheight), ImageLockMode.ReadOnly, fmtlock); - - pos = bd.Scan0.ToInt32(); - for (y = 0; y < bd.Height; y++) { - for (x = 0; x < bd.Width; x++) { - - /* Read the pixels*/ - for (int bt =0; bt < bbps/8; bt++, index++) { - cur = pos; - cur+= y * bd.Stride; - cur+= x * bbps/8; - cur+= bt; - Marshal.Copy ((IntPtr)cur, btv, 0, 1); - pixels[index] = btv[0]; - - /* Make change of all the colours = 250 to 10*/ - if (btv[0] == 250) { - btv[0] = 10; - Marshal.Copy (btv, 0, (IntPtr)cur, 1); - } - } - } - } - - for (int i = index; i < len; i++) - pixels[index] = 0; - - hash = new MD5CryptoServiceProvider().ComputeHash (pixels); - bmp.UnlockBits (bd); - - hash1 = ByteArrayToString (hash); - - /* MD5 of the changed bitmap*/ - for (y = 0, index = 0; y < height; y++) { - for (x = 0; x < width; x++) { - clr = bmp.GetPixel (x,y); - pixels[index++] = clr.R; pixels[index++] = clr.G; pixels[index++] = clr.B; - } - } - - hash = new MD5CryptoServiceProvider().ComputeHash (pixels); - hash2 = ByteArrayToString (hash); - - /*bmp.Save (output, ImageFormat.Bmp);*/ - } - /* - Tests the LockBitmap functions. Makes a hash of the block of pixels that it returns - firsts, changes them, and then using GetPixel does another check of the changes. - The results match the .Net framework - */ - //[Test] - public void LockBitmap () - { - string hash = ""; - string hashchg = ""; - - /* Locks the whole bitmap*/ - LockBmp (PixelFormat.Format32bppArgb, PixelFormat.Format32bppArgb, "output32bppArgb.bmp", 100, 100, ref hash, ref hashchg); - Assert.AreEqual ("AF5BFD4E98D6708FF4C9982CC9C68F", hash); - Assert.AreEqual ("BBEE27DC85563CB58EE11E8951230F", hashchg); - - LockBmp (PixelFormat.Format32bppPArgb, PixelFormat.Format32bppPArgb, "output32bppPArgb.bmp", 100, 100, ref hash, ref hashchg); - Assert.AreEqual ("AF5BFD4E98D6708FF4C9982CC9C68F", hash); - Assert.AreEqual ("BBEE27DC85563CB58EE11E8951230F", hashchg); - - LockBmp (PixelFormat.Format32bppRgb, PixelFormat.Format32bppRgb, "output32bppRgb.bmp", 100, 100, ref hash, ref hashchg); - Assert.AreEqual ("AF5BFD4E98D6708FF4C9982CC9C68F", hash); - Assert.AreEqual ("BBEE27DC85563CB58EE11E8951230F", hashchg); - - LockBmp (PixelFormat.Format24bppRgb, PixelFormat.Format24bppRgb, "output24bppRgb.bmp", 100, 100, ref hash, ref hashchg); - Assert.AreEqual ("A8A071D0B3A3743905B4E193A62769", hash); - Assert.AreEqual ("EEE846FA8F892339C64082DFF775CF", hashchg); - - /* Locks a portion of the bitmap*/ - LockBmp (PixelFormat.Format32bppArgb, PixelFormat.Format32bppArgb, "output32bppArgb.bmp", 50, 50, ref hash, ref hashchg); - Assert.AreEqual ("C361FBFD82A4F3C278605AE9EC5385", hash); - Assert.AreEqual ("8C2C04B361E1D5875EE8ACF5073F4E", hashchg); - - LockBmp (PixelFormat.Format32bppPArgb, PixelFormat.Format32bppPArgb, "output32bppPArgb.bmp", 50, 50, ref hash, ref hashchg); - Assert.AreEqual ("C361FBFD82A4F3C278605AE9EC5385", hash); - Assert.AreEqual ("8C2C04B361E1D5875EE8ACF5073F4E", hashchg); - - LockBmp (PixelFormat.Format32bppRgb, PixelFormat.Format32bppRgb, "output32bppRgb.bmp", 50, 50, ref hash, ref hashchg); - Assert.AreEqual ("C361FBFD82A4F3C278605AE9EC5385", hash); - Assert.AreEqual ("8C2C04B361E1D5875EE8ACF5073F4E", hashchg); - - LockBmp (PixelFormat.Format24bppRgb, PixelFormat.Format24bppRgb, "output24bppRgb.bmp", 50, 50, ref hash, ref hashchg); - Assert.AreEqual ("FFE86628478591D1A1EB30E894C34F", hash); - Assert.AreEqual ("8C2C04B361E1D5875EE8ACF5073F4E", hashchg); - - } - - } -} diff --git a/mcs/class/System.Drawing/Test/System.Drawing/TestBrushes.cs b/mcs/class/System.Drawing/Test/System.Drawing/TestBrushes.cs deleted file mode 100644 index d1bad184fa0..00000000000 --- a/mcs/class/System.Drawing/Test/System.Drawing/TestBrushes.cs +++ /dev/null @@ -1,1074 +0,0 @@ -// Tests for System.Drawing.Brushes.cs -// -// Author: -// Ravindra (rkumar@novell.com) -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - - -using NUnit.Framework; -using System; -using System.Drawing; -using System.Security.Permissions; - -namespace MonoTests.System.Drawing -{ - [TestFixture] - [SecurityPermission (SecurityAction.Deny, UnmanagedCode = true)] - public class BrushesTest : Assertion - { - [SetUp] - public void SetUp () { } - - [TearDown] - public void TearDown () { } - - [Test] - public void TestEquals () - { - Brush brush1 = Brushes.Blue; - Brush brush2 = Brushes.Blue; - - AssertEquals ("Equals", true, brush1.Equals (brush2)); - } - - [Test] - public void TestProperties () - { - Brush br; - SolidBrush solid; - - br = Brushes.AliceBlue; - Assert ("P1#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P1#2", solid.Color, Color.AliceBlue); - solid.Color = Color.Red; - AssertEquals ("P1#3", solid.Color, Color.Red); - - br = Brushes.AntiqueWhite; - Assert ("P2#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P2#2", solid.Color, Color.AntiqueWhite); - solid.Color = Color.Red; - AssertEquals ("P2#3", solid.Color, Color.Red); - - br = Brushes.Aqua; - Assert ("P3#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P3#2", solid.Color, Color.Aqua); - solid.Color = Color.Red; - AssertEquals ("P3#3", solid.Color, Color.Red); - - br = Brushes.Aquamarine; - Assert ("P4#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P4#2", solid.Color, Color.Aquamarine); - solid.Color = Color.Red; - AssertEquals ("P4#3", solid.Color, Color.Red); - - br = Brushes.Azure; - Assert ("P5#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P5#2", solid.Color, Color.Azure); - solid.Color = Color.Red; - AssertEquals ("P5#3", solid.Color, Color.Red); - - br = Brushes.Beige; - Assert ("P6#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P6#2", solid.Color, Color.Beige); - solid.Color = Color.Red; - AssertEquals ("P6#3", solid.Color, Color.Red); - - br = Brushes.Bisque; - Assert ("P7#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P7#2", solid.Color, Color.Bisque); - solid.Color = Color.Red; - AssertEquals ("P7#3", solid.Color, Color.Red); - - br = Brushes.Black; - Assert ("P8#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P8#2", solid.Color, Color.Black); - solid.Color = Color.Red; - AssertEquals ("P8#3", solid.Color, Color.Red); - - br = Brushes.BlanchedAlmond; - Assert ("P9#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P9#2", solid.Color, Color.BlanchedAlmond); - solid.Color = Color.Red; - AssertEquals ("P9#3", solid.Color, Color.Red); - - br = Brushes.Blue; - Assert ("P10#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P10#2", solid.Color, Color.Blue); - solid.Color = Color.Red; - AssertEquals ("P10#3", solid.Color, Color.Red); - - br = Brushes.BlueViolet; - Assert ("P11#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P11#2", solid.Color, Color.BlueViolet); - solid.Color = Color.Red; - AssertEquals ("P11#3", solid.Color, Color.Red); - - br = Brushes.Brown; - Assert ("P12#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P12#2", solid.Color, Color.Brown); - solid.Color = Color.Red; - AssertEquals ("P12#3", solid.Color, Color.Red); - - br = Brushes.BurlyWood; - Assert ("P13#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P13#2", solid.Color, Color.BurlyWood); - solid.Color = Color.Red; - AssertEquals ("P13#3", solid.Color, Color.Red); - - br = Brushes.CadetBlue; - Assert ("P14#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P14#2", solid.Color, Color.CadetBlue); - solid.Color = Color.Red; - AssertEquals ("P14#3", solid.Color, Color.Red); - - br = Brushes.Chartreuse; - Assert ("P15#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P15#2", solid.Color, Color.Chartreuse); - solid.Color = Color.Red; - AssertEquals ("P15#3", solid.Color, Color.Red); - - br = Brushes.Chocolate; - Assert ("P16#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P16#2", solid.Color, Color.Chocolate); - solid.Color = Color.Red; - AssertEquals ("P16#3", solid.Color, Color.Red); - - br = Brushes.Coral; - Assert ("P17#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P17#2", solid.Color, Color.Coral); - solid.Color = Color.Red; - AssertEquals ("P17#3", solid.Color, Color.Red); - - br = Brushes.CornflowerBlue; - Assert ("P18#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P18#2", solid.Color, Color.CornflowerBlue); - solid.Color = Color.Red; - AssertEquals ("P18#3", solid.Color, Color.Red); - - br = Brushes.Cornsilk; - Assert ("P19#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P19#2", solid.Color, Color.Cornsilk); - solid.Color = Color.Red; - AssertEquals ("P19#3", solid.Color, Color.Red); - - br = Brushes.Crimson; - Assert ("P20#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P20#2", solid.Color, Color.Crimson); - solid.Color = Color.Red; - AssertEquals ("P20#3", solid.Color, Color.Red); - - br = Brushes.Cyan; - Assert ("P21#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P21#2", solid.Color, Color.Cyan); - solid.Color = Color.Red; - AssertEquals ("P21#3", solid.Color, Color.Red); - - br = Brushes.DarkBlue; - Assert ("P22#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P22#2", solid.Color, Color.DarkBlue); - solid.Color = Color.Red; - AssertEquals ("P22#3", solid.Color, Color.Red); - - br = Brushes.DarkCyan; - Assert ("P23#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P23#2", solid.Color, Color.DarkCyan); - solid.Color = Color.Red; - AssertEquals ("P23#3", solid.Color, Color.Red); - - br = Brushes.DarkGoldenrod; - Assert ("P24#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P24#2", solid.Color, Color.DarkGoldenrod); - solid.Color = Color.Red; - AssertEquals ("P24#3", solid.Color, Color.Red); - - br = Brushes.DarkGray; - Assert ("P25#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P25#2", solid.Color, Color.DarkGray); - solid.Color = Color.Red; - AssertEquals ("P25#3", solid.Color, Color.Red); - - br = Brushes.DarkGreen; - Assert ("P26#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P26#2", solid.Color, Color.DarkGreen); - solid.Color = Color.Red; - AssertEquals ("P26#3", solid.Color, Color.Red); - - br = Brushes.DarkKhaki; - Assert ("P27#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P27#2", solid.Color, Color.DarkKhaki); - solid.Color = Color.Red; - AssertEquals ("P27#3", solid.Color, Color.Red); - - br = Brushes.DarkMagenta; - Assert ("P28#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P28#2", solid.Color, Color.DarkMagenta); - solid.Color = Color.Red; - AssertEquals ("P28#3", solid.Color, Color.Red); - - br = Brushes.DarkOliveGreen; - Assert ("P29#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P29#2", solid.Color, Color.DarkOliveGreen); - solid.Color = Color.Red; - AssertEquals ("P29#3", solid.Color, Color.Red); - - br = Brushes.DarkOrange; - Assert ("P30#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P30#2", solid.Color, Color.DarkOrange); - solid.Color = Color.Red; - AssertEquals ("P30#3", solid.Color, Color.Red); - - br = Brushes.DarkOrchid; - Assert ("P31#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P31#2", solid.Color, Color.DarkOrchid); - solid.Color = Color.Red; - AssertEquals ("P31#3", solid.Color, Color.Red); - - br = Brushes.DarkRed; - Assert ("P32#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P32#2", solid.Color, Color.DarkRed); - solid.Color = Color.Red; - AssertEquals ("P32#3", solid.Color, Color.Red); - - br = Brushes.DarkSalmon; - Assert ("P33#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P33#2", solid.Color, Color.DarkSalmon); - solid.Color = Color.Red; - AssertEquals ("P33#3", solid.Color, Color.Red); - - br = Brushes.DarkSeaGreen; - Assert ("P34#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P34#2", solid.Color, Color.DarkSeaGreen); - solid.Color = Color.Red; - AssertEquals ("P34#3", solid.Color, Color.Red); - - br = Brushes.DarkSlateBlue; - Assert ("P35#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P35#2", solid.Color, Color.DarkSlateBlue); - solid.Color = Color.Red; - AssertEquals ("P35#3", solid.Color, Color.Red); - - br = Brushes.DarkSlateGray; - Assert ("P36#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P36#2", solid.Color, Color.DarkSlateGray); - solid.Color = Color.Red; - AssertEquals ("P36#3", solid.Color, Color.Red); - - br = Brushes.DarkTurquoise; - Assert ("P37#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P37#2", solid.Color, Color.DarkTurquoise); - solid.Color = Color.Red; - AssertEquals ("P37#3", solid.Color, Color.Red); - - br = Brushes.DarkViolet; - Assert ("P38#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P38#2", solid.Color, Color.DarkViolet); - solid.Color = Color.Red; - AssertEquals ("P38#3", solid.Color, Color.Red); - - br = Brushes.DeepPink; - Assert ("P39#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P39#2", solid.Color, Color.DeepPink); - solid.Color = Color.Red; - AssertEquals ("P39#3", solid.Color, Color.Red); - - br = Brushes.DeepSkyBlue; - Assert ("P40#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P40#2", solid.Color, Color.DeepSkyBlue); - solid.Color = Color.Red; - AssertEquals ("P40#3", solid.Color, Color.Red); - - br = Brushes.DimGray; - Assert ("P41#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P41#2", solid.Color, Color.DimGray); - solid.Color = Color.Red; - AssertEquals ("P41#3", solid.Color, Color.Red); - - br = Brushes.DodgerBlue; - Assert ("P42#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P42#2", solid.Color, Color.DodgerBlue); - solid.Color = Color.Red; - AssertEquals ("P42#3", solid.Color, Color.Red); - - br = Brushes.Firebrick; - Assert ("P43#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P43#2", solid.Color, Color.Firebrick); - solid.Color = Color.Red; - AssertEquals ("P43#3", solid.Color, Color.Red); - - br = Brushes.FloralWhite; - Assert ("P44#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P44#2", solid.Color, Color.FloralWhite); - solid.Color = Color.Red; - AssertEquals ("P44#3", solid.Color, Color.Red); - - br = Brushes.ForestGreen; - Assert ("P45#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P45#2", solid.Color, Color.ForestGreen); - solid.Color = Color.Red; - AssertEquals ("P45#3", solid.Color, Color.Red); - - br = Brushes.Fuchsia; - Assert ("P46#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P46#2", solid.Color, Color.Fuchsia); - solid.Color = Color.Red; - AssertEquals ("P46#3", solid.Color, Color.Red); - - br = Brushes.Gainsboro; - Assert ("P47#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P47#2", solid.Color, Color.Gainsboro); - solid.Color = Color.Red; - AssertEquals ("P47#3", solid.Color, Color.Red); - - br = Brushes.GhostWhite; - Assert ("P48#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P48#2", solid.Color, Color.GhostWhite); - solid.Color = Color.Red; - AssertEquals ("P48#3", solid.Color, Color.Red); - - br = Brushes.Gold; - Assert ("P49#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P49#2", solid.Color, Color.Gold); - solid.Color = Color.Red; - AssertEquals ("P49#3", solid.Color, Color.Red); - - br = Brushes.Goldenrod; - Assert ("P50#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P50#2", solid.Color, Color.Goldenrod); - solid.Color = Color.Red; - AssertEquals ("P50#3", solid.Color, Color.Red); - - br = Brushes.Gray; - Assert ("P51#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P51#2", solid.Color, Color.Gray); - solid.Color = Color.Red; - AssertEquals ("P51#3", solid.Color, Color.Red); - - br = Brushes.Green; - Assert ("P52#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P52#2", solid.Color, Color.Green); - solid.Color = Color.Red; - AssertEquals ("P52#3", solid.Color, Color.Red); - - br = Brushes.GreenYellow; - Assert ("P53#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P53#2", solid.Color, Color.GreenYellow); - solid.Color = Color.Red; - AssertEquals ("P53#3", solid.Color, Color.Red); - - br = Brushes.Honeydew; - Assert ("P54#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P54#2", solid.Color, Color.Honeydew); - solid.Color = Color.Red; - AssertEquals ("P54#3", solid.Color, Color.Red); - - br = Brushes.HotPink; - Assert ("P55#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P55#2", solid.Color, Color.HotPink); - solid.Color = Color.Red; - AssertEquals ("P55#3", solid.Color, Color.Red); - - br = Brushes.IndianRed; - Assert ("P56#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P56#2", solid.Color, Color.IndianRed); - solid.Color = Color.Red; - AssertEquals ("P56#3", solid.Color, Color.Red); - - br = Brushes.Indigo; - Assert ("P57#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P57#2", solid.Color, Color.Indigo); - solid.Color = Color.Red; - AssertEquals ("P57#3", solid.Color, Color.Red); - - br = Brushes.Ivory; - Assert ("P58#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P58#2", solid.Color, Color.Ivory); - solid.Color = Color.Red; - AssertEquals ("P58#3", solid.Color, Color.Red); - - br = Brushes.Khaki; - Assert ("P59#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P59#2", solid.Color, Color.Khaki); - solid.Color = Color.Red; - AssertEquals ("P59#3", solid.Color, Color.Red); - - br = Brushes.Lavender; - Assert ("P60#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P60#2", solid.Color, Color.Lavender); - solid.Color = Color.Red; - AssertEquals ("P60#3", solid.Color, Color.Red); - - br = Brushes.LavenderBlush; - Assert ("P61#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P61#2", solid.Color, Color.LavenderBlush); - solid.Color = Color.Red; - AssertEquals ("P61#3", solid.Color, Color.Red); - - br = Brushes.LawnGreen; - Assert ("P62#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P62#2", solid.Color, Color.LawnGreen); - solid.Color = Color.Red; - AssertEquals ("P62#3", solid.Color, Color.Red); - - br = Brushes.LemonChiffon; - Assert ("P63#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P63#2", solid.Color, Color.LemonChiffon); - solid.Color = Color.Red; - AssertEquals ("P63#3", solid.Color, Color.Red); - - br = Brushes.LightBlue; - Assert ("P64#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P64#2", solid.Color, Color.LightBlue); - solid.Color = Color.Red; - AssertEquals ("P64#3", solid.Color, Color.Red); - - br = Brushes.LightCoral; - Assert ("P65#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P65#2", solid.Color, Color.LightCoral); - solid.Color = Color.Red; - AssertEquals ("P65#3", solid.Color, Color.Red); - - br = Brushes.LightCyan; - Assert ("P66#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P66#2", solid.Color, Color.LightCyan); - solid.Color = Color.Red; - AssertEquals ("P66#3", solid.Color, Color.Red); - - br = Brushes.LightGoldenrodYellow; - Assert ("P67#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P67#2", solid.Color, Color.LightGoldenrodYellow); - solid.Color = Color.Red; - AssertEquals ("P67#3", solid.Color, Color.Red); - - br = Brushes.LightGray; - Assert ("P68#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P68#2", solid.Color, Color.LightGray); - solid.Color = Color.Red; - AssertEquals ("P68#3", solid.Color, Color.Red); - - br = Brushes.LightGreen; - Assert ("P69#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P69#2", solid.Color, Color.LightGreen); - solid.Color = Color.Red; - AssertEquals ("P69#3", solid.Color, Color.Red); - - br = Brushes.LightPink; - Assert ("P70#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P70#2", solid.Color, Color.LightPink); - solid.Color = Color.Red; - AssertEquals ("P70#3", solid.Color, Color.Red); - - br = Brushes.LightSalmon; - Assert ("P71#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P71#2", solid.Color, Color.LightSalmon); - solid.Color = Color.Red; - AssertEquals ("P71#3", solid.Color, Color.Red); - - br = Brushes.LightSeaGreen; - Assert ("P72#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P72#2", solid.Color, Color.LightSeaGreen); - solid.Color = Color.Red; - AssertEquals ("P72#3", solid.Color, Color.Red); - - br = Brushes.LightSkyBlue; - Assert ("P73#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P73#2", solid.Color, Color.LightSkyBlue); - solid.Color = Color.Red; - AssertEquals ("P73#3", solid.Color, Color.Red); - - br = Brushes.LightSlateGray; - Assert ("P74#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P74#2", solid.Color, Color.LightSlateGray); - solid.Color = Color.Red; - AssertEquals ("P74#3", solid.Color, Color.Red); - - br = Brushes.LightSteelBlue; - Assert ("P75#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P75#2", solid.Color, Color.LightSteelBlue); - solid.Color = Color.Red; - AssertEquals ("P75#3", solid.Color, Color.Red); - - br = Brushes.LightYellow; - Assert ("P76#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P76#2", solid.Color, Color.LightYellow); - solid.Color = Color.Red; - AssertEquals ("P76#3", solid.Color, Color.Red); - - br = Brushes.Lime; - Assert ("P77#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P77#2", solid.Color, Color.Lime); - solid.Color = Color.Red; - AssertEquals ("P77#3", solid.Color, Color.Red); - - br = Brushes.LimeGreen; - Assert ("P78#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P78#2", solid.Color, Color.LimeGreen); - solid.Color = Color.Red; - AssertEquals ("P78#3", solid.Color, Color.Red); - - br = Brushes.Linen; - Assert ("P79#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P79#2", solid.Color, Color.Linen); - solid.Color = Color.Red; - AssertEquals ("P79#3", solid.Color, Color.Red); - - br = Brushes.Magenta; - Assert ("P80#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P80#2", solid.Color, Color.Magenta); - solid.Color = Color.Red; - AssertEquals ("P80#3", solid.Color, Color.Red); - - br = Brushes.Maroon; - Assert ("P81#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P81#2", solid.Color, Color.Maroon); - solid.Color = Color.Red; - AssertEquals ("P81#3", solid.Color, Color.Red); - - br = Brushes.MediumAquamarine; - Assert ("P82#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P82#2", solid.Color, Color.MediumAquamarine); - solid.Color = Color.Red; - AssertEquals ("P82#3", solid.Color, Color.Red); - - br = Brushes.MediumBlue; - Assert ("P83#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P83#2", solid.Color, Color.MediumBlue); - solid.Color = Color.Red; - AssertEquals ("P83#3", solid.Color, Color.Red); - - br = Brushes.MediumOrchid; - Assert ("P84#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P84#2", solid.Color, Color.MediumOrchid); - solid.Color = Color.Red; - AssertEquals ("P84#3", solid.Color, Color.Red); - - br = Brushes.MediumPurple; - Assert ("P85#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P85#2", solid.Color, Color.MediumPurple); - solid.Color = Color.Red; - AssertEquals ("P85#3", solid.Color, Color.Red); - - br = Brushes.MediumSeaGreen; - Assert ("P86#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P86#2", solid.Color, Color.MediumSeaGreen); - solid.Color = Color.Red; - AssertEquals ("P86#3", solid.Color, Color.Red); - - br = Brushes.MediumSlateBlue; - Assert ("P87#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P87#2", solid.Color, Color.MediumSlateBlue); - solid.Color = Color.Red; - AssertEquals ("P87#3", solid.Color, Color.Red); - - br = Brushes.MediumSpringGreen; - Assert ("P88#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P88#2", solid.Color, Color.MediumSpringGreen); - solid.Color = Color.Red; - AssertEquals ("P88#3", solid.Color, Color.Red); - - br = Brushes.MediumTurquoise; - Assert ("P89#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P89#2", solid.Color, Color.MediumTurquoise); - solid.Color = Color.Red; - AssertEquals ("P89#3", solid.Color, Color.Red); - - br = Brushes.MediumVioletRed; - Assert ("P90#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P90#2", solid.Color, Color.MediumVioletRed); - solid.Color = Color.Red; - AssertEquals ("P90#3", solid.Color, Color.Red); - - br = Brushes.MidnightBlue; - Assert ("P91#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P91#2", solid.Color, Color.MidnightBlue); - solid.Color = Color.Red; - AssertEquals ("P91#3", solid.Color, Color.Red); - - br = Brushes.MintCream; - Assert ("P92#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P92#2", solid.Color, Color.MintCream); - solid.Color = Color.Red; - AssertEquals ("P92#3", solid.Color, Color.Red); - - br = Brushes.MistyRose; - Assert ("P93#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P93#2", solid.Color, Color.MistyRose); - solid.Color = Color.Red; - AssertEquals ("P93#3", solid.Color, Color.Red); - - br = Brushes.Moccasin; - Assert ("P94#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P94#2", solid.Color, Color.Moccasin); - solid.Color = Color.Red; - AssertEquals ("P94#3", solid.Color, Color.Red); - - br = Brushes.NavajoWhite; - Assert ("P95#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P95#2", solid.Color, Color.NavajoWhite); - solid.Color = Color.Red; - AssertEquals ("P95#3", solid.Color, Color.Red); - - br = Brushes.Navy; - Assert ("P96#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P96#2", solid.Color, Color.Navy); - solid.Color = Color.Red; - AssertEquals ("P96#3", solid.Color, Color.Red); - - br = Brushes.OldLace; - Assert ("P97#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P97#2", solid.Color, Color.OldLace); - solid.Color = Color.Red; - AssertEquals ("P97#3", solid.Color, Color.Red); - - br = Brushes.Olive; - Assert ("P98#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P98#2", solid.Color, Color.Olive); - solid.Color = Color.Red; - AssertEquals ("P98#3", solid.Color, Color.Red); - - br = Brushes.OliveDrab; - Assert ("P99#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P99#2", solid.Color, Color.OliveDrab); - solid.Color = Color.Red; - AssertEquals ("P99#3", solid.Color, Color.Red); - - br = Brushes.Orange; - Assert ("P100#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P100#2", solid.Color, Color.Orange); - solid.Color = Color.Red; - AssertEquals ("P100#3", solid.Color, Color.Red); - - br = Brushes.OrangeRed; - Assert ("P101#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P101#2", solid.Color, Color.OrangeRed); - solid.Color = Color.Red; - AssertEquals ("P101#3", solid.Color, Color.Red); - - br = Brushes.Orchid; - Assert ("P102#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P102#2", solid.Color, Color.Orchid); - solid.Color = Color.Red; - AssertEquals ("P102#3", solid.Color, Color.Red); - - br = Brushes.PaleGoldenrod; - Assert ("P103#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P103#2", solid.Color, Color.PaleGoldenrod); - solid.Color = Color.Red; - AssertEquals ("P103#3", solid.Color, Color.Red); - - br = Brushes.PaleGreen; - Assert ("P104#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P104#2", solid.Color, Color.PaleGreen); - solid.Color = Color.Red; - AssertEquals ("P104#3", solid.Color, Color.Red); - - br = Brushes.PaleTurquoise; - Assert ("P105#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P105#2", solid.Color, Color.PaleTurquoise); - solid.Color = Color.Red; - AssertEquals ("P105#3", solid.Color, Color.Red); - - br = Brushes.PaleVioletRed; - Assert ("P106#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P106#2", solid.Color, Color.PaleVioletRed); - solid.Color = Color.Red; - AssertEquals ("P106#3", solid.Color, Color.Red); - - br = Brushes.PapayaWhip; - Assert ("P107#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P107#2", solid.Color, Color.PapayaWhip); - solid.Color = Color.Red; - AssertEquals ("P107#3", solid.Color, Color.Red); - - br = Brushes.PeachPuff; - Assert ("P108#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P108#2", solid.Color, Color.PeachPuff); - solid.Color = Color.Red; - AssertEquals ("P108#3", solid.Color, Color.Red); - - br = Brushes.Peru; - Assert ("P109#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P109#2", solid.Color, Color.Peru); - solid.Color = Color.Red; - AssertEquals ("P109#3", solid.Color, Color.Red); - - br = Brushes.Pink; - Assert ("P110#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P110#2", solid.Color, Color.Pink); - solid.Color = Color.Red; - AssertEquals ("P110#3", solid.Color, Color.Red); - - br = Brushes.Plum; - Assert ("P111#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P111#2", solid.Color, Color.Plum); - solid.Color = Color.Red; - AssertEquals ("P111#3", solid.Color, Color.Red); - - br = Brushes.PowderBlue; - Assert ("P112#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P112#2", solid.Color, Color.PowderBlue); - solid.Color = Color.Red; - AssertEquals ("P112#3", solid.Color, Color.Red); - - br = Brushes.Purple; - Assert ("P113#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P113#2", solid.Color, Color.Purple); - solid.Color = Color.Red; - AssertEquals ("P113#3", solid.Color, Color.Red); - - br = Brushes.Red; - Assert ("P114#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P114#2", solid.Color, Color.Red); - solid.Color = Color.White; - AssertEquals ("P114#3", solid.Color, Color.White); - - br = Brushes.RosyBrown; - Assert ("P115#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P115#2", solid.Color, Color.RosyBrown); - solid.Color = Color.Red; - AssertEquals ("P115#3", solid.Color, Color.Red); - - br = Brushes.RoyalBlue; - Assert ("P116#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P116#2", solid.Color, Color.RoyalBlue); - solid.Color = Color.Red; - AssertEquals ("P116#3", solid.Color, Color.Red); - - br = Brushes.SaddleBrown; - Assert ("P117#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P117#2", solid.Color, Color.SaddleBrown); - solid.Color = Color.Red; - AssertEquals ("P117#3", solid.Color, Color.Red); - - br = Brushes.Salmon; - Assert ("P118#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P118#2", solid.Color, Color.Salmon); - solid.Color = Color.Red; - AssertEquals ("P118#3", solid.Color, Color.Red); - - br = Brushes.SandyBrown; - Assert ("P119#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P119#2", solid.Color, Color.SandyBrown); - solid.Color = Color.Red; - AssertEquals ("P119#3", solid.Color, Color.Red); - - br = Brushes.SeaGreen; - Assert ("P120#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P120#2", solid.Color, Color.SeaGreen); - solid.Color = Color.Red; - AssertEquals ("P120#3", solid.Color, Color.Red); - - br = Brushes.SeaShell; - Assert ("P121#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P121#2", solid.Color, Color.SeaShell); - solid.Color = Color.Red; - AssertEquals ("P121#3", solid.Color, Color.Red); - - br = Brushes.Sienna; - Assert ("P122#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P122#2", solid.Color, Color.Sienna); - solid.Color = Color.Red; - AssertEquals ("P122#3", solid.Color, Color.Red); - - br = Brushes.Silver; - Assert ("P123#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P123#2", solid.Color, Color.Silver); - solid.Color = Color.Red; - AssertEquals ("P123#3", solid.Color, Color.Red); - - br = Brushes.SkyBlue; - Assert ("P124#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P124#2", solid.Color, Color.SkyBlue); - solid.Color = Color.Red; - AssertEquals ("P124#3", solid.Color, Color.Red); - - br = Brushes.SlateBlue; - Assert ("P125#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P125#2", solid.Color, Color.SlateBlue); - solid.Color = Color.Red; - AssertEquals ("P125#3", solid.Color, Color.Red); - - br = Brushes.SlateGray; - Assert ("P126#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P126#2", solid.Color, Color.SlateGray); - solid.Color = Color.Red; - AssertEquals ("P126#3", solid.Color, Color.Red); - - br = Brushes.Snow; - Assert ("P127#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P127#2", solid.Color, Color.Snow); - solid.Color = Color.Red; - AssertEquals ("P127#3", solid.Color, Color.Red); - - br = Brushes.SpringGreen; - Assert ("P128#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P128#2", solid.Color, Color.SpringGreen); - solid.Color = Color.Red; - AssertEquals ("P128#3", solid.Color, Color.Red); - - br = Brushes.SteelBlue; - Assert ("P129#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P129#2", solid.Color, Color.SteelBlue); - solid.Color = Color.Red; - AssertEquals ("P129#3", solid.Color, Color.Red); - - br = Brushes.Tan; - Assert ("P130#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P130#2", solid.Color, Color.Tan); - solid.Color = Color.Red; - AssertEquals ("P130#3", solid.Color, Color.Red); - - br = Brushes.Teal; - Assert ("P131#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P131#2", solid.Color, Color.Teal); - solid.Color = Color.Red; - AssertEquals ("P131#3", solid.Color, Color.Red); - - br = Brushes.Thistle; - Assert ("P132#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P132#2", solid.Color, Color.Thistle); - solid.Color = Color.Red; - AssertEquals ("P132#3", solid.Color, Color.Red); - - br = Brushes.Tomato; - Assert ("P133#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P133#2", solid.Color, Color.Tomato); - solid.Color = Color.Red; - AssertEquals ("P133#3", solid.Color, Color.Red); - - br = Brushes.Transparent; - Assert ("P134#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P134#2", solid.Color, Color.Transparent); - solid.Color = Color.Red; - AssertEquals ("P134#3", solid.Color, Color.Red); - - br = Brushes.Turquoise; - Assert ("P135#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P135#2", solid.Color, Color.Turquoise); - solid.Color = Color.Red; - AssertEquals ("P135#3", solid.Color, Color.Red); - - br = Brushes.Violet; - Assert ("P136#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P136#2", solid.Color, Color.Violet); - solid.Color = Color.Red; - AssertEquals ("P136#3", solid.Color, Color.Red); - - br = Brushes.Wheat; - Assert ("P137#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P137#2", solid.Color, Color.Wheat); - solid.Color = Color.Red; - AssertEquals ("P137#3", solid.Color, Color.Red); - - br = Brushes.White; - Assert ("P138#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P138#2", solid.Color, Color.White); - solid.Color = Color.Red; - AssertEquals ("P138#3", solid.Color, Color.Red); - - br = Brushes.WhiteSmoke; - Assert ("P139#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P139#2", solid.Color, Color.WhiteSmoke); - solid.Color = Color.Red; - AssertEquals ("P139#3", solid.Color, Color.Red); - - br = Brushes.Yellow; - Assert ("P140#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P140#2", solid.Color, Color.Yellow); - solid.Color = Color.Red; - AssertEquals ("P140#3", solid.Color, Color.Red); - - br = Brushes.YellowGreen; - Assert ("P141#1", br is SolidBrush); - solid = (SolidBrush) br; - AssertEquals ("P141#2", solid.Color, Color.YellowGreen); - solid.Color = Color.Red; - AssertEquals ("P141#3", solid.Color, Color.Red); - } - } -} - -// Following code was used to generate the TestProperties method. -// -//Type type = typeof (Brushes); -//PropertyInfo [] properties = type.GetProperties (); -//int count = 1; -//foreach (PropertyInfo property in properties) { -// Console.WriteLine(); -// Console.WriteLine("\t\t\tbr = Brushes." + property.Name + ";"); -// Console.WriteLine("\t\t\tAssert (\"P" + count + "#1\", br is SolidBrush);"); -// Console.WriteLine("\t\t\tsolid = (SolidBrush) br;"); -// Console.WriteLine("\t\t\tAssertEquals (\"P" + count + "#2\", solid.Color, Color." + property.Name + ");"); -// -// if (property.Name != "Red") { -// Console.WriteLine("\t\t\tsolid.Color = Color.Red;"); -// Console.WriteLine("\t\t\tAssertEquals (\"P" + count + "#3\", solid.Color, Color.Red);"); -// } else { -// Console.WriteLine("\t\t\tsolid.Color = Color.White;"); -// Console.WriteLine("\t\t\tAssertEquals (\"P" + count + "#3\", solid.Color, Color.White);"); -// } -// -// count++; -//} diff --git a/mcs/class/System.Drawing/Test/System.Drawing/TestColor.cs b/mcs/class/System.Drawing/Test/System.Drawing/TestColor.cs deleted file mode 100644 index fc7878c3a26..00000000000 --- a/mcs/class/System.Drawing/Test/System.Drawing/TestColor.cs +++ /dev/null @@ -1,1161 +0,0 @@ -// -// Tests for System.Drawing.Color.cs -// -// Author: -// Ravindra (rkumar@novell.com) -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - - -using System; -using System.Drawing; -using System.Security.Permissions; -using NUnit.Framework; - -namespace MonoTests.System.Drawing -{ - [TestFixture] - [SecurityPermission (SecurityAction.Deny, UnmanagedCode = true)] - public class ColorTest : Assertion - { - [SetUp] - public void GetReady () { } - - [TearDown] - public void Clean () { } - - [Test] - public void TestArgbValues () - { - Color color; - - color = Color.Transparent; - AssertEquals ("#Transparent.A", 0, color.A); - AssertEquals ("#Transparent.R", 255, color.R); - AssertEquals ("#Transparent.G", 255, color.G); - AssertEquals ("#Transparent.B", 255, color.B); - - color = Color.AliceBlue; - AssertEquals ("#AliceBlue.A", 255, color.A); - AssertEquals ("#AliceBlue.R", 240, color.R); - AssertEquals ("#AliceBlue.G", 248, color.G); - AssertEquals ("#AliceBlue.B", 255, color.B); - - color = Color.AntiqueWhite; - AssertEquals ("#AntiqueWhite.A", 255, color.A); - AssertEquals ("#AntiqueWhite.R", 250, color.R); - AssertEquals ("#AntiqueWhite.G", 235, color.G); - AssertEquals ("#AntiqueWhite.B", 215, color.B); - - color = Color.Aqua; - AssertEquals ("#Aqua.A", 255, color.A); - AssertEquals ("#Aqua.R", 0, color.R); - AssertEquals ("#Aqua.G", 255, color.G); - AssertEquals ("#Aqua.B", 255, color.B); - - color = Color.Aquamarine; - AssertEquals ("#Aquamarine.A", 255, color.A); - AssertEquals ("#Aquamarine.R", 127, color.R); - AssertEquals ("#Aquamarine.G", 255, color.G); - AssertEquals ("#Aquamarine.B", 212, color.B); - - color = Color.Azure; - AssertEquals ("#Azure.A", 255, color.A); - AssertEquals ("#Azure.R", 240, color.R); - AssertEquals ("#Azure.G", 255, color.G); - AssertEquals ("#Azure.B", 255, color.B); - - color = Color.Beige; - AssertEquals ("#Beige.A", 255, color.A); - AssertEquals ("#Beige.R", 245, color.R); - AssertEquals ("#Beige.G", 245, color.G); - AssertEquals ("#Beige.B", 220, color.B); - - color = Color.Bisque; - AssertEquals ("#Bisque.A", 255, color.A); - AssertEquals ("#Bisque.R", 255, color.R); - AssertEquals ("#Bisque.G", 228, color.G); - AssertEquals ("#Bisque.B", 196, color.B); - - color = Color.Black; - AssertEquals ("#Black.A", 255, color.A); - AssertEquals ("#Black.R", 0, color.R); - AssertEquals ("#Black.G", 0, color.G); - AssertEquals ("#Black.B", 0, color.B); - - color = Color.BlanchedAlmond; - AssertEquals ("#BlanchedAlmond.A", 255, color.A); - AssertEquals ("#BlanchedAlmond.R", 255, color.R); - AssertEquals ("#BlanchedAlmond.G", 235, color.G); - AssertEquals ("#BlanchedAlmond.B", 205, color.B); - - color = Color.Blue; - AssertEquals ("#Blue.A", 255, color.A); - AssertEquals ("#Blue.R", 0, color.R); - AssertEquals ("#Blue.G", 0, color.G); - AssertEquals ("#Blue.B", 255, color.B); - - color = Color.BlueViolet; - AssertEquals ("#BlueViolet.A", 255, color.A); - AssertEquals ("#BlueViolet.R", 138, color.R); - AssertEquals ("#BlueViolet.G", 43, color.G); - AssertEquals ("#BlueViolet.B", 226, color.B); - - color = Color.Brown; - AssertEquals ("#Brown.A", 255, color.A); - AssertEquals ("#Brown.R", 165, color.R); - AssertEquals ("#Brown.G", 42, color.G); - AssertEquals ("#Brown.B", 42, color.B); - - color = Color.BurlyWood; - AssertEquals ("#BurlyWood.A", 255, color.A); - AssertEquals ("#BurlyWood.R", 222, color.R); - AssertEquals ("#BurlyWood.G", 184, color.G); - AssertEquals ("#BurlyWood.B", 135, color.B); - - color = Color.CadetBlue; - AssertEquals ("#CadetBlue.A", 255, color.A); - AssertEquals ("#CadetBlue.R", 95, color.R); - AssertEquals ("#CadetBlue.G", 158, color.G); - AssertEquals ("#CadetBlue.B", 160, color.B); - - color = Color.Chartreuse; - AssertEquals ("#Chartreuse.A", 255, color.A); - AssertEquals ("#Chartreuse.R", 127, color.R); - AssertEquals ("#Chartreuse.G", 255, color.G); - AssertEquals ("#Chartreuse.B", 0, color.B); - - color = Color.Chocolate; - AssertEquals ("#Chocolate.A", 255, color.A); - AssertEquals ("#Chocolate.R", 210, color.R); - AssertEquals ("#Chocolate.G", 105, color.G); - AssertEquals ("#Chocolate.B", 30, color.B); - - color = Color.Coral; - AssertEquals ("#Coral.A", 255, color.A); - AssertEquals ("#Coral.R", 255, color.R); - AssertEquals ("#Coral.G", 127, color.G); - AssertEquals ("#Coral.B", 80, color.B); - - color = Color.CornflowerBlue; - AssertEquals ("#CornflowerBlue.A", 255, color.A); - AssertEquals ("#CornflowerBlue.R", 100, color.R); - AssertEquals ("#CornflowerBlue.G", 149, color.G); - AssertEquals ("#CornflowerBlue.B", 237, color.B); - - color = Color.Cornsilk; - AssertEquals ("#Cornsilk.A", 255, color.A); - AssertEquals ("#Cornsilk.R", 255, color.R); - AssertEquals ("#Cornsilk.G", 248, color.G); - AssertEquals ("#Cornsilk.B", 220, color.B); - - color = Color.Crimson; - AssertEquals ("#Crimson.A", 255, color.A); - AssertEquals ("#Crimson.R", 220, color.R); - AssertEquals ("#Crimson.G", 20, color.G); - AssertEquals ("#Crimson.B", 60, color.B); - - color = Color.Cyan; - AssertEquals ("#Cyan.A", 255, color.A); - AssertEquals ("#Cyan.R", 0, color.R); - AssertEquals ("#Cyan.G", 255, color.G); - AssertEquals ("#Cyan.B", 255, color.B); - - color = Color.DarkBlue; - AssertEquals ("#DarkBlue.A", 255, color.A); - AssertEquals ("#DarkBlue.R", 0, color.R); - AssertEquals ("#DarkBlue.G", 0, color.G); - AssertEquals ("#DarkBlue.B", 139, color.B); - - color = Color.DarkCyan; - AssertEquals ("#DarkCyan.A", 255, color.A); - AssertEquals ("#DarkCyan.R", 0, color.R); - AssertEquals ("#DarkCyan.G", 139, color.G); - AssertEquals ("#DarkCyan.B", 139, color.B); - - color = Color.DarkGoldenrod; - AssertEquals ("#DarkGoldenrod.A", 255, color.A); - AssertEquals ("#DarkGoldenrod.R", 184, color.R); - AssertEquals ("#DarkGoldenrod.G", 134, color.G); - AssertEquals ("#DarkGoldenrod.B", 11, color.B); - - color = Color.DarkGray; - AssertEquals ("#DarkGray.A", 255, color.A); - AssertEquals ("#DarkGray.R", 169, color.R); - AssertEquals ("#DarkGray.G", 169, color.G); - AssertEquals ("#DarkGray.B", 169, color.B); - - color = Color.DarkGreen; - AssertEquals ("#DarkGreen.A", 255, color.A); - AssertEquals ("#DarkGreen.R", 0, color.R); - AssertEquals ("#DarkGreen.G", 100, color.G); - AssertEquals ("#DarkGreen.B", 0, color.B); - - color = Color.DarkKhaki; - AssertEquals ("#DarkKhaki.A", 255, color.A); - AssertEquals ("#DarkKhaki.R", 189, color.R); - AssertEquals ("#DarkKhaki.G", 183, color.G); - AssertEquals ("#DarkKhaki.B", 107, color.B); - - color = Color.DarkMagenta; - AssertEquals ("#DarkMagenta.A", 255, color.A); - AssertEquals ("#DarkMagenta.R", 139, color.R); - AssertEquals ("#DarkMagenta.G", 0, color.G); - AssertEquals ("#DarkMagenta.B", 139, color.B); - - color = Color.DarkOliveGreen; - AssertEquals ("#DarkOliveGreen.A", 255, color.A); - AssertEquals ("#DarkOliveGreen.R", 85, color.R); - AssertEquals ("#DarkOliveGreen.G", 107, color.G); - AssertEquals ("#DarkOliveGreen.B", 47, color.B); - - color = Color.DarkOrange; - AssertEquals ("#DarkOrange.A", 255, color.A); - AssertEquals ("#DarkOrange.R", 255, color.R); - AssertEquals ("#DarkOrange.G", 140, color.G); - AssertEquals ("#DarkOrange.B", 0, color.B); - - color = Color.DarkOrchid; - AssertEquals ("#DarkOrchid.A", 255, color.A); - AssertEquals ("#DarkOrchid.R", 153, color.R); - AssertEquals ("#DarkOrchid.G", 50, color.G); - AssertEquals ("#DarkOrchid.B", 204, color.B); - - color = Color.DarkRed; - AssertEquals ("#DarkRed.A", 255, color.A); - AssertEquals ("#DarkRed.R", 139, color.R); - AssertEquals ("#DarkRed.G", 0, color.G); - AssertEquals ("#DarkRed.B", 0, color.B); - - color = Color.DarkSalmon; - AssertEquals ("#DarkSalmon.A", 255, color.A); - AssertEquals ("#DarkSalmon.R", 233, color.R); - AssertEquals ("#DarkSalmon.G", 150, color.G); - AssertEquals ("#DarkSalmon.B", 122, color.B); - - color = Color.DarkSeaGreen; - AssertEquals ("#DarkSeaGreen.A", 255, color.A); - AssertEquals ("#DarkSeaGreen.R", 143, color.R); - AssertEquals ("#DarkSeaGreen.G", 188, color.G); - AssertEquals ("#DarkSeaGreen.B", 139, color.B); - - color = Color.DarkSlateBlue; - AssertEquals ("#DarkSlateBlue.A", 255, color.A); - AssertEquals ("#DarkSlateBlue.R", 72, color.R); - AssertEquals ("#DarkSlateBlue.G", 61, color.G); - AssertEquals ("#DarkSlateBlue.B", 139, color.B); - - color = Color.DarkSlateGray; - AssertEquals ("#DarkSlateGray.A", 255, color.A); - AssertEquals ("#DarkSlateGray.R", 47, color.R); - AssertEquals ("#DarkSlateGray.G", 79, color.G); - AssertEquals ("#DarkSlateGray.B", 79, color.B); - - color = Color.DarkTurquoise; - AssertEquals ("#DarkTurquoise.A", 255, color.A); - AssertEquals ("#DarkTurquoise.R", 0, color.R); - AssertEquals ("#DarkTurquoise.G", 206, color.G); - AssertEquals ("#DarkTurquoise.B", 209, color.B); - - color = Color.DarkViolet; - AssertEquals ("#DarkViolet.A", 255, color.A); - AssertEquals ("#DarkViolet.R", 148, color.R); - AssertEquals ("#DarkViolet.G", 0, color.G); - AssertEquals ("#DarkViolet.B", 211, color.B); - - color = Color.DeepPink; - AssertEquals ("#DeepPink.A", 255, color.A); - AssertEquals ("#DeepPink.R", 255, color.R); - AssertEquals ("#DeepPink.G", 20, color.G); - AssertEquals ("#DeepPink.B", 147, color.B); - - color = Color.DeepSkyBlue; - AssertEquals ("#DeepSkyBlue.A", 255, color.A); - AssertEquals ("#DeepSkyBlue.R", 0, color.R); - AssertEquals ("#DeepSkyBlue.G", 191, color.G); - AssertEquals ("#DeepSkyBlue.B", 255, color.B); - - color = Color.DimGray; - AssertEquals ("#DimGray.A", 255, color.A); - AssertEquals ("#DimGray.R", 105, color.R); - AssertEquals ("#DimGray.G", 105, color.G); - AssertEquals ("#DimGray.B", 105, color.B); - - color = Color.DodgerBlue; - AssertEquals ("#DodgerBlue.A", 255, color.A); - AssertEquals ("#DodgerBlue.R", 30, color.R); - AssertEquals ("#DodgerBlue.G", 144, color.G); - AssertEquals ("#DodgerBlue.B", 255, color.B); - - color = Color.Firebrick; - AssertEquals ("#Firebrick.A", 255, color.A); - AssertEquals ("#Firebrick.R", 178, color.R); - AssertEquals ("#Firebrick.G", 34, color.G); - AssertEquals ("#Firebrick.B", 34, color.B); - - color = Color.FloralWhite; - AssertEquals ("#FloralWhite.A", 255, color.A); - AssertEquals ("#FloralWhite.R", 255, color.R); - AssertEquals ("#FloralWhite.G", 250, color.G); - AssertEquals ("#FloralWhite.B", 240, color.B); - - color = Color.ForestGreen; - AssertEquals ("#ForestGreen.A", 255, color.A); - AssertEquals ("#ForestGreen.R", 34, color.R); - AssertEquals ("#ForestGreen.G", 139, color.G); - AssertEquals ("#ForestGreen.B", 34, color.B); - - color = Color.Fuchsia; - AssertEquals ("#Fuchsia.A", 255, color.A); - AssertEquals ("#Fuchsia.R", 255, color.R); - AssertEquals ("#Fuchsia.G", 0, color.G); - AssertEquals ("#Fuchsia.B", 255, color.B); - - color = Color.Gainsboro; - AssertEquals ("#Gainsboro.A", 255, color.A); - AssertEquals ("#Gainsboro.R", 220, color.R); - AssertEquals ("#Gainsboro.G", 220, color.G); - AssertEquals ("#Gainsboro.B", 220, color.B); - - color = Color.GhostWhite; - AssertEquals ("#GhostWhite.A", 255, color.A); - AssertEquals ("#GhostWhite.R", 248, color.R); - AssertEquals ("#GhostWhite.G", 248, color.G); - AssertEquals ("#GhostWhite.B", 255, color.B); - - color = Color.Gold; - AssertEquals ("#Gold.A", 255, color.A); - AssertEquals ("#Gold.R", 255, color.R); - AssertEquals ("#Gold.G", 215, color.G); - AssertEquals ("#Gold.B", 0, color.B); - - color = Color.Goldenrod; - AssertEquals ("#Goldenrod.A", 255, color.A); - AssertEquals ("#Goldenrod.R", 218, color.R); - AssertEquals ("#Goldenrod.G", 165, color.G); - AssertEquals ("#Goldenrod.B", 32, color.B); - - color = Color.Gray; - AssertEquals ("#Gray.A", 255, color.A); - AssertEquals ("#Gray.R", 128, color.R); - AssertEquals ("#Gray.G", 128, color.G); - AssertEquals ("#Gray.B", 128, color.B); - - color = Color.Green; - AssertEquals ("#Green.A", 255, color.A); - AssertEquals ("#Green.R", 0, color.R); - // This test should compare Green.G with 255, but - // MS is using a value of 128 for Green.G - AssertEquals ("#Green.G", 128, color.G); - AssertEquals ("#Green.B", 0, color.B); - - color = Color.GreenYellow; - AssertEquals ("#GreenYellow.A", 255, color.A); - AssertEquals ("#GreenYellow.R", 173, color.R); - AssertEquals ("#GreenYellow.G", 255, color.G); - AssertEquals ("#GreenYellow.B", 47, color.B); - - color = Color.Honeydew; - AssertEquals ("#Honeydew.A", 255, color.A); - AssertEquals ("#Honeydew.R", 240, color.R); - AssertEquals ("#Honeydew.G", 255, color.G); - AssertEquals ("#Honeydew.B", 240, color.B); - - color = Color.HotPink; - AssertEquals ("#HotPink.A", 255, color.A); - AssertEquals ("#HotPink.R", 255, color.R); - AssertEquals ("#HotPink.G", 105, color.G); - AssertEquals ("#HotPink.B", 180, color.B); - - color = Color.IndianRed; - AssertEquals ("#IndianRed.A", 255, color.A); - AssertEquals ("#IndianRed.R", 205, color.R); - AssertEquals ("#IndianRed.G", 92, color.G); - AssertEquals ("#IndianRed.B", 92, color.B); - - color = Color.Indigo; - AssertEquals ("#Indigo.A", 255, color.A); - AssertEquals ("#Indigo.R", 75, color.R); - AssertEquals ("#Indigo.G", 0, color.G); - AssertEquals ("#Indigo.B", 130, color.B); - - color = Color.Ivory; - AssertEquals ("#Ivory.A", 255, color.A); - AssertEquals ("#Ivory.R", 255, color.R); - AssertEquals ("#Ivory.G", 255, color.G); - AssertEquals ("#Ivory.B", 240, color.B); - - color = Color.Khaki; - AssertEquals ("#Khaki.A", 255, color.A); - AssertEquals ("#Khaki.R", 240, color.R); - AssertEquals ("#Khaki.G", 230, color.G); - AssertEquals ("#Khaki.B", 140, color.B); - - color = Color.Lavender; - AssertEquals ("#Lavender.A", 255, color.A); - AssertEquals ("#Lavender.R", 230, color.R); - AssertEquals ("#Lavender.G", 230, color.G); - AssertEquals ("#Lavender.B", 250, color.B); - - color = Color.LavenderBlush; - AssertEquals ("#LavenderBlush.A", 255, color.A); - AssertEquals ("#LavenderBlush.R", 255, color.R); - AssertEquals ("#LavenderBlush.G", 240, color.G); - AssertEquals ("#LavenderBlush.B", 245, color.B); - - color = Color.LawnGreen; - AssertEquals ("#LawnGreen.A", 255, color.A); - AssertEquals ("#LawnGreen.R", 124, color.R); - AssertEquals ("#LawnGreen.G", 252, color.G); - AssertEquals ("#LawnGreen.B", 0, color.B); - - color = Color.LemonChiffon; - AssertEquals ("#LemonChiffon.A", 255, color.A); - AssertEquals ("#LemonChiffon.R", 255, color.R); - AssertEquals ("#LemonChiffon.G", 250, color.G); - AssertEquals ("#LemonChiffon.B", 205, color.B); - - color = Color.LightBlue; - AssertEquals ("#LightBlue.A", 255, color.A); - AssertEquals ("#LightBlue.R", 173, color.R); - AssertEquals ("#LightBlue.G", 216, color.G); - AssertEquals ("#LightBlue.B", 230, color.B); - - color = Color.LightCoral; - AssertEquals ("#LightCoral.A", 255, color.A); - AssertEquals ("#LightCoral.R", 240, color.R); - AssertEquals ("#LightCoral.G", 128, color.G); - AssertEquals ("#LightCoral.B", 128, color.B); - - color = Color.LightCyan; - AssertEquals ("#LightCyan.A", 255, color.A); - AssertEquals ("#LightCyan.R", 224, color.R); - AssertEquals ("#LightCyan.G", 255, color.G); - AssertEquals ("#LightCyan.B", 255, color.B); - - color = Color.LightGoldenrodYellow; - AssertEquals ("#LightGoldenrodYellow.A", 255, color.A); - AssertEquals ("#LightGoldenrodYellow.R", 250, color.R); - AssertEquals ("#LightGoldenrodYellow.G", 250, color.G); - AssertEquals ("#LightGoldenrodYellow.B", 210, color.B); - - color = Color.LightGreen; - AssertEquals ("#LightGreen.A", 255, color.A); - AssertEquals ("#LightGreen.R", 144, color.R); - AssertEquals ("#LightGreen.G", 238, color.G); - AssertEquals ("#LightGreen.B", 144, color.B); - - color = Color.LightGray; - AssertEquals ("#LightGray.A", 255, color.A); - AssertEquals ("#LightGray.R", 211, color.R); - AssertEquals ("#LightGray.G", 211, color.G); - AssertEquals ("#LightGray.B", 211, color.B); - - color = Color.LightPink; - AssertEquals ("#LightPink.A", 255, color.A); - AssertEquals ("#LightPink.R", 255, color.R); - AssertEquals ("#LightPink.G", 182, color.G); - AssertEquals ("#LightPink.B", 193, color.B); - - color = Color.LightSalmon; - AssertEquals ("#LightSalmon.A", 255, color.A); - AssertEquals ("#LightSalmon.R", 255, color.R); - AssertEquals ("#LightSalmon.G", 160, color.G); - AssertEquals ("#LightSalmon.B", 122, color.B); - - color = Color.LightSeaGreen; - AssertEquals ("#LightSeaGreen.A", 255, color.A); - AssertEquals ("#LightSeaGreen.R", 32, color.R); - AssertEquals ("#LightSeaGreen.G", 178, color.G); - AssertEquals ("#LightSeaGreen.B", 170, color.B); - - color = Color.LightSkyBlue; - AssertEquals ("#LightSkyBlue.A", 255, color.A); - AssertEquals ("#LightSkyBlue.R", 135, color.R); - AssertEquals ("#LightSkyBlue.G", 206, color.G); - AssertEquals ("#LightSkyBlue.B", 250, color.B); - - color = Color.LightSlateGray; - AssertEquals ("#LightSlateGray.A", 255, color.A); - AssertEquals ("#LightSlateGray.R", 119, color.R); - AssertEquals ("#LightSlateGray.G", 136, color.G); - AssertEquals ("#LightSlateGray.B", 153, color.B); - - color = Color.LightSteelBlue; - AssertEquals ("#LightSteelBlue.A", 255, color.A); - AssertEquals ("#LightSteelBlue.R", 176, color.R); - AssertEquals ("#LightSteelBlue.G", 196, color.G); - AssertEquals ("#LightSteelBlue.B", 222, color.B); - - color = Color.LightYellow; - AssertEquals ("#LightYellow.A", 255, color.A); - AssertEquals ("#LightYellow.R", 255, color.R); - AssertEquals ("#LightYellow.G", 255, color.G); - AssertEquals ("#LightYellow.B", 224, color.B); - - color = Color.Lime; - AssertEquals ("#Lime.A", 255, color.A); - AssertEquals ("#Lime.R", 0, color.R); - AssertEquals ("#Lime.G", 255, color.G); - AssertEquals ("#Lime.B", 0, color.B); - - color = Color.LimeGreen; - AssertEquals ("#LimeGreen.A", 255, color.A); - AssertEquals ("#LimeGreen.R", 50, color.R); - AssertEquals ("#LimeGreen.G", 205, color.G); - AssertEquals ("#LimeGreen.B", 50, color.B); - - color = Color.Linen; - AssertEquals ("#Linen.A", 255, color.A); - AssertEquals ("#Linen.R", 250, color.R); - AssertEquals ("#Linen.G", 240, color.G); - AssertEquals ("#Linen.B", 230, color.B); - - color = Color.Magenta; - AssertEquals ("#Magenta.A", 255, color.A); - AssertEquals ("#Magenta.R", 255, color.R); - AssertEquals ("#Magenta.G", 0, color.G); - AssertEquals ("#Magenta.B", 255, color.B); - - color = Color.Maroon; - AssertEquals ("#Maroon.A", 255, color.A); - AssertEquals ("#Maroon.R", 128, color.R); - AssertEquals ("#Maroon.G", 0, color.G); - AssertEquals ("#Maroon.B", 0, color.B); - - color = Color.MediumAquamarine; - AssertEquals ("#MediumAquamarine.A", 255, color.A); - AssertEquals ("#MediumAquamarine.R", 102, color.R); - AssertEquals ("#MediumAquamarine.G", 205, color.G); - AssertEquals ("#MediumAquamarine.B", 170, color.B); - - color = Color.MediumBlue; - AssertEquals ("#MediumBlue.A", 255, color.A); - AssertEquals ("#MediumBlue.R", 0, color.R); - AssertEquals ("#MediumBlue.G", 0, color.G); - AssertEquals ("#MediumBlue.B", 205, color.B); - - color = Color.MediumOrchid; - AssertEquals ("#MediumOrchid.A", 255, color.A); - AssertEquals ("#MediumOrchid.R", 186, color.R); - AssertEquals ("#MediumOrchid.G", 85, color.G); - AssertEquals ("#MediumOrchid.B", 211, color.B); - - color = Color.MediumPurple; - AssertEquals ("#MediumPurple.A", 255, color.A); - AssertEquals ("#MediumPurple.R", 147, color.R); - AssertEquals ("#MediumPurple.G", 112, color.G); - AssertEquals ("#MediumPurple.B", 219, color.B); - - color = Color.MediumSeaGreen; - AssertEquals ("#MediumSeaGreen.A", 255, color.A); - AssertEquals ("#MediumSeaGreen.R", 60, color.R); - AssertEquals ("#MediumSeaGreen.G", 179, color.G); - AssertEquals ("#MediumSeaGreen.B", 113, color.B); - - color = Color.MediumSlateBlue; - AssertEquals ("#MediumSlateBlue.A", 255, color.A); - AssertEquals ("#MediumSlateBlue.R", 123, color.R); - AssertEquals ("#MediumSlateBlue.G", 104, color.G); - AssertEquals ("#MediumSlateBlue.B", 238, color.B); - - color = Color.MediumSpringGreen; - AssertEquals ("#MediumSpringGreen.A", 255, color.A); - AssertEquals ("#MediumSpringGreen.R", 0, color.R); - AssertEquals ("#MediumSpringGreen.G", 250, color.G); - AssertEquals ("#MediumSpringGreen.B", 154, color.B); - - color = Color.MediumTurquoise; - AssertEquals ("#MediumTurquoise.A", 255, color.A); - AssertEquals ("#MediumTurquoise.R", 72, color.R); - AssertEquals ("#MediumTurquoise.G", 209, color.G); - AssertEquals ("#MediumTurquoise.B", 204, color.B); - - color = Color.MediumVioletRed; - AssertEquals ("#MediumVioletRed.A", 255, color.A); - AssertEquals ("#MediumVioletRed.R", 199, color.R); - AssertEquals ("#MediumVioletRed.G", 21, color.G); - AssertEquals ("#MediumVioletRed.B", 133, color.B); - - color = Color.MidnightBlue; - AssertEquals ("#MidnightBlue.A", 255, color.A); - AssertEquals ("#MidnightBlue.R", 25, color.R); - AssertEquals ("#MidnightBlue.G", 25, color.G); - AssertEquals ("#MidnightBlue.B", 112, color.B); - - color = Color.MintCream; - AssertEquals ("#MintCream.A", 255, color.A); - AssertEquals ("#MintCream.R", 245, color.R); - AssertEquals ("#MintCream.G", 255, color.G); - AssertEquals ("#MintCream.B", 250, color.B); - - color = Color.MistyRose; - AssertEquals ("#MistyRose.A", 255, color.A); - AssertEquals ("#MistyRose.R", 255, color.R); - AssertEquals ("#MistyRose.G", 228, color.G); - AssertEquals ("#MistyRose.B", 225, color.B); - - color = Color.Moccasin; - AssertEquals ("#Moccasin.A", 255, color.A); - AssertEquals ("#Moccasin.R", 255, color.R); - AssertEquals ("#Moccasin.G", 228, color.G); - AssertEquals ("#Moccasin.B", 181, color.B); - - color = Color.NavajoWhite; - AssertEquals ("#NavajoWhite.A", 255, color.A); - AssertEquals ("#NavajoWhite.R", 255, color.R); - AssertEquals ("#NavajoWhite.G", 222, color.G); - AssertEquals ("#NavajoWhite.B", 173, color.B); - - color = Color.Navy; - AssertEquals ("#Navy.A", 255, color.A); - AssertEquals ("#Navy.R", 0, color.R); - AssertEquals ("#Navy.G", 0, color.G); - AssertEquals ("#Navy.B", 128, color.B); - - color = Color.OldLace; - AssertEquals ("#OldLace.A", 255, color.A); - AssertEquals ("#OldLace.R", 253, color.R); - AssertEquals ("#OldLace.G", 245, color.G); - AssertEquals ("#OldLace.B", 230, color.B); - - color = Color.Olive; - AssertEquals ("#Olive.A", 255, color.A); - AssertEquals ("#Olive.R", 128, color.R); - AssertEquals ("#Olive.G", 128, color.G); - AssertEquals ("#Olive.B", 0, color.B); - - color = Color.OliveDrab; - AssertEquals ("#OliveDrab.A", 255, color.A); - AssertEquals ("#OliveDrab.R", 107, color.R); - AssertEquals ("#OliveDrab.G", 142, color.G); - AssertEquals ("#OliveDrab.B", 35, color.B); - - color = Color.Orange; - AssertEquals ("#Orange.A", 255, color.A); - AssertEquals ("#Orange.R", 255, color.R); - AssertEquals ("#Orange.G", 165, color.G); - AssertEquals ("#Orange.B", 0, color.B); - - color = Color.OrangeRed; - AssertEquals ("#OrangeRed.A", 255, color.A); - AssertEquals ("#OrangeRed.R", 255, color.R); - AssertEquals ("#OrangeRed.G", 69, color.G); - AssertEquals ("#OrangeRed.B", 0, color.B); - - color = Color.Orchid; - AssertEquals ("#Orchid.A", 255, color.A); - AssertEquals ("#Orchid.R", 218, color.R); - AssertEquals ("#Orchid.G", 112, color.G); - AssertEquals ("#Orchid.B", 214, color.B); - - color = Color.PaleGoldenrod; - AssertEquals ("#PaleGoldenrod.A", 255, color.A); - AssertEquals ("#PaleGoldenrod.R", 238, color.R); - AssertEquals ("#PaleGoldenrod.G", 232, color.G); - AssertEquals ("#PaleGoldenrod.B", 170, color.B); - - color = Color.PaleGreen; - AssertEquals ("#PaleGreen.A", 255, color.A); - AssertEquals ("#PaleGreen.R", 152, color.R); - AssertEquals ("#PaleGreen.G", 251, color.G); - AssertEquals ("#PaleGreen.B", 152, color.B); - - color = Color.PaleTurquoise; - AssertEquals ("#PaleTurquoise.A", 255, color.A); - AssertEquals ("#PaleTurquoise.R", 175, color.R); - AssertEquals ("#PaleTurquoise.G", 238, color.G); - AssertEquals ("#PaleTurquoise.B", 238, color.B); - - color = Color.PaleVioletRed; - AssertEquals ("#PaleVioletRed.A", 255, color.A); - AssertEquals ("#PaleVioletRed.R", 219, color.R); - AssertEquals ("#PaleVioletRed.G", 112, color.G); - AssertEquals ("#PaleVioletRed.B", 147, color.B); - - color = Color.PapayaWhip; - AssertEquals ("#PapayaWhip.A", 255, color.A); - AssertEquals ("#PapayaWhip.R", 255, color.R); - AssertEquals ("#PapayaWhip.G", 239, color.G); - AssertEquals ("#PapayaWhip.B", 213, color.B); - - color = Color.PeachPuff; - AssertEquals ("#PeachPuff.A", 255, color.A); - AssertEquals ("#PeachPuff.R", 255, color.R); - AssertEquals ("#PeachPuff.G", 218, color.G); - AssertEquals ("#PeachPuff.B", 185, color.B); - - color = Color.Peru; - AssertEquals ("#Peru.A", 255, color.A); - AssertEquals ("#Peru.R", 205, color.R); - AssertEquals ("#Peru.G", 133, color.G); - AssertEquals ("#Peru.B", 63, color.B); - - color = Color.Pink; - AssertEquals ("#Pink.A", 255, color.A); - AssertEquals ("#Pink.R", 255, color.R); - AssertEquals ("#Pink.G", 192, color.G); - AssertEquals ("#Pink.B", 203, color.B); - - color = Color.Plum; - AssertEquals ("#Plum.A", 255, color.A); - AssertEquals ("#Plum.R", 221, color.R); - AssertEquals ("#Plum.G", 160, color.G); - AssertEquals ("#Plum.B", 221, color.B); - - color = Color.PowderBlue; - AssertEquals ("#PowderBlue.A", 255, color.A); - AssertEquals ("#PowderBlue.R", 176, color.R); - AssertEquals ("#PowderBlue.G", 224, color.G); - AssertEquals ("#PowderBlue.B", 230, color.B); - - color = Color.Purple; - AssertEquals ("#Purple.A", 255, color.A); - AssertEquals ("#Purple.R", 128, color.R); - AssertEquals ("#Purple.G", 0, color.G); - AssertEquals ("#Purple.B", 128, color.B); - - color = Color.Red; - AssertEquals ("#Red.A", 255, color.A); - AssertEquals ("#Red.R", 255, color.R); - AssertEquals ("#Red.G", 0, color.G); - AssertEquals ("#Red.B", 0, color.B); - - color = Color.RosyBrown; - AssertEquals ("#RosyBrown.A", 255, color.A); - AssertEquals ("#RosyBrown.R", 188, color.R); - AssertEquals ("#RosyBrown.G", 143, color.G); - AssertEquals ("#RosyBrown.B", 143, color.B); - - color = Color.RoyalBlue; - AssertEquals ("#RoyalBlue.A", 255, color.A); - AssertEquals ("#RoyalBlue.R", 65, color.R); - AssertEquals ("#RoyalBlue.G", 105, color.G); - AssertEquals ("#RoyalBlue.B", 225, color.B); - - color = Color.SaddleBrown; - AssertEquals ("#SaddleBrown.A", 255, color.A); - AssertEquals ("#SaddleBrown.R", 139, color.R); - AssertEquals ("#SaddleBrown.G", 69, color.G); - AssertEquals ("#SaddleBrown.B", 19, color.B); - - color = Color.Salmon; - AssertEquals ("#Salmon.A", 255, color.A); - AssertEquals ("#Salmon.R", 250, color.R); - AssertEquals ("#Salmon.G", 128, color.G); - AssertEquals ("#Salmon.B", 114, color.B); - - color = Color.SandyBrown; - AssertEquals ("#SandyBrown.A", 255, color.A); - AssertEquals ("#SandyBrown.R", 244, color.R); - AssertEquals ("#SandyBrown.G", 164, color.G); - AssertEquals ("#SandyBrown.B", 96, color.B); - - color = Color.SeaGreen; - AssertEquals ("#SeaGreen.A", 255, color.A); - AssertEquals ("#SeaGreen.R", 46, color.R); - AssertEquals ("#SeaGreen.G", 139, color.G); - AssertEquals ("#SeaGreen.B", 87, color.B); - - color = Color.SeaShell; - AssertEquals ("#SeaShell.A", 255, color.A); - AssertEquals ("#SeaShell.R", 255, color.R); - AssertEquals ("#SeaShell.G", 245, color.G); - AssertEquals ("#SeaShell.B", 238, color.B); - - color = Color.Sienna; - AssertEquals ("#Sienna.A", 255, color.A); - AssertEquals ("#Sienna.R", 160, color.R); - AssertEquals ("#Sienna.G", 82, color.G); - AssertEquals ("#Sienna.B", 45, color.B); - - color = Color.Silver; - AssertEquals ("#Silver.A", 255, color.A); - AssertEquals ("#Silver.R", 192, color.R); - AssertEquals ("#Silver.G", 192, color.G); - AssertEquals ("#Silver.B", 192, color.B); - - color = Color.SkyBlue; - AssertEquals ("#SkyBlue.A", 255, color.A); - AssertEquals ("#SkyBlue.R", 135, color.R); - AssertEquals ("#SkyBlue.G", 206, color.G); - AssertEquals ("#SkyBlue.B", 235, color.B); - - color = Color.SlateBlue; - AssertEquals ("#SlateBlue.A", 255, color.A); - AssertEquals ("#SlateBlue.R", 106, color.R); - AssertEquals ("#SlateBlue.G", 90, color.G); - AssertEquals ("#SlateBlue.B", 205, color.B); - - color = Color.SlateGray; - AssertEquals ("#SlateGray.A", 255, color.A); - AssertEquals ("#SlateGray.R", 112, color.R); - AssertEquals ("#SlateGray.G", 128, color.G); - AssertEquals ("#SlateGray.B", 144, color.B); - - color = Color.Snow; - AssertEquals ("#Snow.A", 255, color.A); - AssertEquals ("#Snow.R", 255, color.R); - AssertEquals ("#Snow.G", 250, color.G); - AssertEquals ("#Snow.B", 250, color.B); - - color = Color.SpringGreen; - AssertEquals ("#SpringGreen.A", 255, color.A); - AssertEquals ("#SpringGreen.R", 0, color.R); - AssertEquals ("#SpringGreen.G", 255, color.G); - AssertEquals ("#SpringGreen.B", 127, color.B); - - color = Color.SteelBlue; - AssertEquals ("#SteelBlue.A", 255, color.A); - AssertEquals ("#SteelBlue.R", 70, color.R); - AssertEquals ("#SteelBlue.G", 130, color.G); - AssertEquals ("#SteelBlue.B", 180, color.B); - - color = Color.Tan; - AssertEquals ("#Tan.A", 255, color.A); - AssertEquals ("#Tan.R", 210, color.R); - AssertEquals ("#Tan.G", 180, color.G); - AssertEquals ("#Tan.B", 140, color.B); - - color = Color.Teal; - AssertEquals ("#Teal.A", 255, color.A); - AssertEquals ("#Teal.R", 0, color.R); - AssertEquals ("#Teal.G", 128, color.G); - AssertEquals ("#Teal.B", 128, color.B); - - color = Color.Thistle; - AssertEquals ("#Thistle.A", 255, color.A); - AssertEquals ("#Thistle.R", 216, color.R); - AssertEquals ("#Thistle.G", 191, color.G); - AssertEquals ("#Thistle.B", 216, color.B); - - color = Color.Tomato; - AssertEquals ("#Tomato.A", 255, color.A); - AssertEquals ("#Tomato.R", 255, color.R); - AssertEquals ("#Tomato.G", 99, color.G); - AssertEquals ("#Tomato.B", 71, color.B); - - color = Color.Turquoise; - AssertEquals ("#Turquoise.A", 255, color.A); - AssertEquals ("#Turquoise.R", 64, color.R); - AssertEquals ("#Turquoise.G", 224, color.G); - AssertEquals ("#Turquoise.B", 208, color.B); - - color = Color.Violet; - AssertEquals ("#Violet.A", 255, color.A); - AssertEquals ("#Violet.R", 238, color.R); - AssertEquals ("#Violet.G", 130, color.G); - AssertEquals ("#Violet.B", 238, color.B); - - color = Color.Wheat; - AssertEquals ("#Wheat.A", 255, color.A); - AssertEquals ("#Wheat.R", 245, color.R); - AssertEquals ("#Wheat.G", 222, color.G); - AssertEquals ("#Wheat.B", 179, color.B); - - color = Color.White; - AssertEquals ("#White.A", 255, color.A); - AssertEquals ("#White.R", 255, color.R); - AssertEquals ("#White.G", 255, color.G); - AssertEquals ("#White.B", 255, color.B); - - color = Color.WhiteSmoke; - AssertEquals ("#WhiteSmoke.A", 255, color.A); - AssertEquals ("#WhiteSmoke.R", 245, color.R); - AssertEquals ("#WhiteSmoke.G", 245, color.G); - AssertEquals ("#WhiteSmoke.B", 245, color.B); - - color = Color.Yellow; - AssertEquals ("#Yellow.A", 255, color.A); - AssertEquals ("#Yellow.R", 255, color.R); - AssertEquals ("#Yellow.G", 255, color.G); - AssertEquals ("#Yellow.B", 0, color.B); - - color = Color.YellowGreen; - AssertEquals ("#YellowGreen.A", 255, color.A); - AssertEquals ("#YellowGreen.R", 154, color.R); - AssertEquals ("#YellowGreen.G", 205, color.G); - AssertEquals ("#YellowGreen.B", 50, color.B); - } - - static bool FloatsAlmostEqual (float v1, float v2) - { - float error = Math.Abs(v1-v2)/(v1+v2+float.Epsilon); - return error < 0.0001; - } - - [Test] - public void TestHBSValues () - { - AssertEquals ("BrightnessBlack", 0.0f, Color.Black.GetBrightness ()); - AssertEquals ("BrightnessWhite", 1.0f, Color.White.GetBrightness ()); - - Color c1 = Color.FromArgb (0, 13, 45, 7); //just some random color - Assert ("Hue1", FloatsAlmostEqual (110.5263f, c1.GetHue ())); - Assert ("Brightness1", FloatsAlmostEqual (0.1019608f, c1.GetBrightness ())); - Assert ("Saturation1", FloatsAlmostEqual (0.7307692f, c1.GetSaturation ())); - - Color c2 = Color.FromArgb (0, 112, 75, 29); //another random color - Assert ("Hue2", FloatsAlmostEqual (33.25302f, c2.GetHue ())); - Assert ("Brightness2", FloatsAlmostEqual (0.2764706f, c2.GetBrightness ())); - Assert ("Saturation2", FloatsAlmostEqual (0.5886525f, c2.GetSaturation ())); - } - [Test] - public void TestEquals () - { - Color color = Color.Red; - Color color1 = Color.FromArgb (color.R, color.G, color.B); - Assert ("Named color not == unnamed color", !(color==color1)); - Assert ("Named color not equals unnamed color", !color.Equals (color1)); - Assert ("Named color != unnamed color", color!=color1); - color = Color.FromArgb (0, color1); - Assert ("Alpha takes part in comparison", !color.Equals (color1)); - } - [Test] - public void TestIsEmpty () - { - Color color = Color.Empty; - Assert ("Empty color", color.IsEmpty); - Assert ("Not empty color", !Color.FromArgb (0, Color.Black).IsEmpty); - } - [Test] - public void IsKnownColor () - { - Assert ("KnownColor", Color.FromKnownColor(KnownColor.AliceBlue).IsKnownColor); - Assert ("KnownColor", Color.FromName("AliceBlue").IsKnownColor); - AssertEquals ("Not KnownColor", false, - Color.FromArgb (50, 100, 150, 200).IsKnownColor); - } - [Test] - public void IsNamedColor () - { - Assert ("NamedColor", Color.AliceBlue.IsNamedColor); - Assert ("NamedColor", Color.FromKnownColor(KnownColor.AliceBlue).IsNamedColor); - Assert ("NamedColor", Color.FromName("AliceBlue").IsNamedColor); - AssertEquals ("Not NamedColor", false, - Color.FromArgb (50, 100, 150, 200).IsNamedColor); - } - [Test] - public void IsSystemColor () { - Assert ("SystemColor#1", Color.FromKnownColor(KnownColor.ActiveBorder).IsSystemColor); - Assert ("SystemColor#2", Color.FromName("ActiveBorder").IsSystemColor); - AssertEquals ("Not SystemColor#1", false, - Color.FromArgb (50, 100, 150, 200).IsSystemColor); - AssertEquals ("Not SystemColor#2", false, - Color.FromKnownColor(KnownColor.AliceBlue).IsSystemColor); - AssertEquals ("Not SystemColor#3", false, - Color.FromName("AliceBlue").IsSystemColor); - } - [Test] - public void Name () - { - AssertEquals ("Color.Name#1", "AliceBlue", Color.AliceBlue.Name); - AssertEquals ("Color.Name#2", "ActiveBorder", - Color.FromKnownColor (KnownColor.ActiveBorder).Name); - AssertEquals ("Color.Name#3", "1122ccff", - Color.FromArgb(0x11, 0x22, 0xcc, 0xff).Name); - } - [Test] - public void GetHashCodeTest () - { - Color c = Color.AliceBlue; - AssertEquals ("GHC#1", false, Color.FromArgb (c.A, c.R, c.G, c.B).GetHashCode () == - c.GetHashCode ()); - AssertEquals ("GHC#2", c.GetHashCode (), Color.FromName ("AliceBlue").GetHashCode ()); - } - [Test] - public void ToArgb () - { - AssertEquals (0x11cc8833, Color.FromArgb (0x11, 0xcc, 0x88, 0x33).ToArgb()); - AssertEquals (unchecked((int)0xf1cc8833), Color.FromArgb (0xf1, 0xcc, 0x88, 0x33).ToArgb()); - } - - [Test] - public void ToKnownColor () - { - AssertEquals ("TKC#1", KnownColor.ActiveBorder, Color.FromName ("ActiveBorder").ToKnownColor ()); - AssertEquals ("TKC#2", KnownColor.AliceBlue, Color.AliceBlue.ToKnownColor ()); - KnownColor zero = Color.FromArgb (1, 2, 3, 4).ToKnownColor (); - AssertEquals ("TKC#3", (KnownColor)0, zero); - } - - [Test] - public void ToStringTest () - { - AssertEquals ("TS#1", "Color [AliceBlue]", Color.AliceBlue.ToString ()); - AssertEquals ("TS#2", "Color [ActiveBorder]", - Color.FromKnownColor (KnownColor.ActiveBorder).ToString ()); - AssertEquals ("TS#3", "Color [A=1, R=2, G=3, B=4]", - Color.FromArgb(1, 2, 3, 4).ToString ()); - AssertEquals ("TS#4", "Color [Empty]", Color.Empty.ToString ()); - } - - [Test] - public void Equality () - { - Color c = Color.AliceBlue; - Assert ("EQ#1", c == Color.FromName ("AliceBlue")); - AssertEquals ("EQ#2", false, c == Color.FromArgb (c.A, c.R, c.G, c.B)); - Assert ("EQ#3", c.Equals (Color.FromName ("AliceBlue"))); - AssertEquals ("EQ#4", false, c.Equals(Color.FromArgb (c.A, c.R, c.G, c.B))); - AssertEquals ("EQ#5", false, c != Color.FromName ("AliceBlue")); - Assert("EQ#6", c != Color.FromArgb (c.A, c.R, c.G, c.B)); - } - - [Test] - [ExpectedException (typeof (ArgumentException))] - public void FromArgb_InvalidAlpha1 () - { - Color.FromArgb (-1, Color.Red); - } - - [Test] - [ExpectedException (typeof (ArgumentException))] - public void FromArgb_InvalidAlpha2 () - { - Color.FromArgb (256, Color.Red); - } - - [Test] - [ExpectedException (typeof (ArgumentException))] - public void FromArgb_InvalidAlpha3 () - { - Color.FromArgb (-1, 0, 0, 0); - } - - [Test] - [ExpectedException (typeof (ArgumentException))] - public void FromArgb_InvalidAlpha4 () - { - Color.FromArgb (256, 0, 0, 0); - } - - [Test] - [ExpectedException (typeof (ArgumentException))] - public void FromArgb_InvalidRed1 () - { - Color.FromArgb (-1, 0, 0); - } - - [Test] - [ExpectedException (typeof (ArgumentException))] - public void FromArgb_InvalidRed2 () - { - Color.FromArgb (256, 0, 0); - } - - [Test] - [ExpectedException (typeof (ArgumentException))] - public void FromArgb_InvalidRed3 () - { - Color.FromArgb (0, -1, 0, 0); - } - - [Test] - [ExpectedException (typeof (ArgumentException))] - public void FromArgb_InvalidRed4 () - { - Color.FromArgb (0, 256, 0, 0); - } - - [Test] - [ExpectedException (typeof (ArgumentException))] - public void FromArgb_InvalidGreen1 () - { - Color.FromArgb (0, -1, 0); - } - - [Test] - [ExpectedException (typeof (ArgumentException))] - public void FromArgb_InvalidGreen2 () - { - Color.FromArgb (0, 256, 0); - } - - [Test] - [ExpectedException (typeof (ArgumentException))] - public void FromArgb_InvalidGreen3 () - { - Color.FromArgb (0, 0, -1, 0); - } - - [Test] - [ExpectedException (typeof (ArgumentException))] - public void FromArgb_InvalidGreen4 () - { - Color.FromArgb (0, 0, 256, 0); - } - - [Test] - [ExpectedException (typeof (ArgumentException))] - public void FromArgb_InvalidBlue1 () - { - Color.FromArgb (0, 0, -1); - } - - [Test] - [ExpectedException (typeof (ArgumentException))] - public void FromArgb_InvalidBlue2 () - { - Color.FromArgb (0, 0, 256); - } - - [Test] - [ExpectedException (typeof (ArgumentException))] - public void FromArgb_InvalidBlue3 () - { - Color.FromArgb (0, 0, 0, -1); - } - - [Test] - [ExpectedException (typeof (ArgumentException))] - public void FromArgb_InvalidBlue4 () - { - Color.FromArgb (0, 0, 0, 256); - } - } -} - -// Following code was used to generate the TestArgbValues method on MS. -// -// Type cType = typeof (Color); -// PropertyInfo [] properties = cType.GetProperties (BindingFlags.Public | BindingFlags.Static); -//// Console.WriteLine ("number: " + properties.Length); -// -// Console.WriteLine("\t\t[Test]"); -// Console.WriteLine("\t\tpublic void TestArgbValues ()"); -// Console.WriteLine("\t\t{"); -// Console.WriteLine("\t\t\tColor color;"); -// foreach (PropertyInfo property in properties) { -// -// Console.WriteLine(); -// Console.WriteLine("\t\t\tcolor = Color.{0};", property.Name); -// Color color = Color.FromName (property.Name); -// Console.WriteLine("\t\t\tAssertEquals (\"#{0}.A\", {1}, color.A);", property.Name, color.A); -// Console.WriteLine("\t\t\tAssertEquals (\"#{0}.R\", {1}, color.R);", property.Name, color.R); -// Console.WriteLine("\t\t\tAssertEquals (\"#{0}.G\", {1}, color.G);", property.Name, color.G); -// Console.WriteLine("\t\t\tAssertEquals (\"#{0}.B\", {1}, color.B);", property.Name, color.B); -// } -// Console.WriteLine("\t\t}"); diff --git a/mcs/class/System.Drawing/Test/System.Drawing/TestFont.cs b/mcs/class/System.Drawing/Test/System.Drawing/TestFont.cs deleted file mode 100644 index e73206e7664..00000000000 --- a/mcs/class/System.Drawing/Test/System.Drawing/TestFont.cs +++ /dev/null @@ -1,77 +0,0 @@ -// -// Test Font class testing unit -// -// Author: -// -// Jordi Mas i Hernandez, jordi@ximian.com -// -// (C) 2004 Ximian, Inc. http://www.ximian.com -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -using System; -using System.Drawing; -using System.Drawing.Imaging; -using System.Security.Permissions; -using NUnit.Framework; - -namespace MonoTests.System.Drawing{ - - [TestFixture] - [SecurityPermission (SecurityAction.Deny, UnmanagedCode = true)] - public class FontTest : Assertion { - - [TearDown] - public void Clean() {} - - [SetUp] - public void GetReady() - { - - } - - // Test basic Font clone, properties and contructor - [Test] - public void TestClone() - { - Font f = new Font("Arial",12); - Font f2 = (Font) f.Clone(); - - AssertEquals (f.Bold, f2.Bold); - AssertEquals (f.FontFamily, f2.FontFamily); - AssertEquals (f.GdiCharSet, f2.GdiCharSet); - AssertEquals (f.GdiVerticalFont, f2.GdiVerticalFont); - AssertEquals (f.Height, f2.Height); - AssertEquals (f.Italic, f2.Italic); - AssertEquals (f.Name, f2.Name); - AssertEquals (f.Size, f2.Size); - AssertEquals (f.SizeInPoints, f2.SizeInPoints); - AssertEquals (f.Strikeout, f2.Strikeout); - AssertEquals (f.Style, f2.Style); - AssertEquals (f.Underline, f2.Underline); - AssertEquals (f.Unit, f2.Unit); - } - - } -} diff --git a/mcs/class/System.Drawing/Test/System.Drawing/TestGraphics.cs b/mcs/class/System.Drawing/Test/System.Drawing/TestGraphics.cs deleted file mode 100644 index b93688af1b4..00000000000 --- a/mcs/class/System.Drawing/Test/System.Drawing/TestGraphics.cs +++ /dev/null @@ -1,310 +0,0 @@ -// -// Graphics class testing unit -// -// Author: -// Jordi Mas, jordi@ximian.com -// -// -// Copyright (C) 2005 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - - - -using NUnit.Framework; -using System; -using System.Drawing; -using System.Drawing.Text; -using System.Drawing.Drawing2D; -using System.IO; -using System.Reflection; - -namespace MonoTests.System.Drawing -{ - [TestFixture] - public class GraphicsTest : Assertion - { - private RectangleF[] rects; - - [TearDown] - public void TearDown () {} - - [SetUp] - public void SetUp () - { - - } - - [Test] - public void DefaultProperties () - { - Bitmap bmp = new Bitmap (200, 200); - Graphics g = Graphics.FromImage (bmp); - Region r = new Region (); - - AssertEquals ("DefaultProperties1", r.GetBounds (g) , g.ClipBounds); - AssertEquals ("DefaultProperties2", CompositingMode.SourceOver, g.CompositingMode); - AssertEquals ("DefaultProperties3", CompositingQuality.Default, g.CompositingQuality); - AssertEquals ("DefaultProperties4", InterpolationMode.Bilinear, g.InterpolationMode); - AssertEquals ("DefaultProperties5", 1, g.PageScale); - AssertEquals ("DefaultProperties6", GraphicsUnit.Display, g.PageUnit); - AssertEquals ("DefaultProperties7", PixelOffsetMode.Default, g.PixelOffsetMode); - AssertEquals ("DefaultProperties8", new Point (0, 0) , g.RenderingOrigin); - AssertEquals ("DefaultProperties9", SmoothingMode.None, g.SmoothingMode); - AssertEquals ("DefaultProperties10", TextRenderingHint.SystemDefault, g.TextRenderingHint); - - r.Dispose (); - } - - [Test] - public void SetGetProperties () - { - Bitmap bmp = new Bitmap (200, 200); - Graphics g = Graphics.FromImage (bmp); - - g.CompositingMode = CompositingMode.SourceCopy; - g.CompositingQuality = CompositingQuality.GammaCorrected; - g.InterpolationMode = InterpolationMode.HighQualityBilinear; - g.PageScale = 2; - g.PageUnit = GraphicsUnit.Inch; - g.PixelOffsetMode = PixelOffsetMode.Half; - g.RenderingOrigin = new Point (10, 20); - g.SmoothingMode = SmoothingMode.AntiAlias; - g.TextRenderingHint = TextRenderingHint.SystemDefault; - - //Clipping set/get tested in clipping functions - AssertEquals ("SetGetProperties2", CompositingMode.SourceCopy, g.CompositingMode); - AssertEquals ("SetGetProperties3", CompositingQuality.GammaCorrected, g.CompositingQuality); - AssertEquals ("SetGetProperties4", InterpolationMode.HighQualityBilinear, g.InterpolationMode); - AssertEquals ("SetGetProperties5", 2, g.PageScale); - AssertEquals ("SetGetProperties6", GraphicsUnit.Inch, g.PageUnit); - AssertEquals ("SetGetProperties7", PixelOffsetMode.Half, g.PixelOffsetMode); - AssertEquals ("SetGetProperties8", new Point (10, 20), g.RenderingOrigin); - AssertEquals ("SetGetProperties9", SmoothingMode.AntiAlias, g.SmoothingMode); - AssertEquals ("SetGetProperties10", TextRenderingHint.SystemDefault, g.TextRenderingHint); - } - - // Properties - [Test] - public void Clip () - { - RectangleF[] rects ; - Bitmap bmp = new Bitmap (200, 200); - Graphics g = Graphics.FromImage (bmp); - g.Clip = new Region (new Rectangle (50, 40, 210, 220)); - rects = g.Clip.GetRegionScans (new Matrix ()); - - AssertEquals ("Clip1", 1, rects.Length); - AssertEquals ("Clip2", 50, rects[0].X); - AssertEquals ("Clip3", 40, rects[0].Y); - AssertEquals ("Clip4", 210, rects[0].Width); - AssertEquals ("Clip5", 220, rects[0].Height); - } - - [Test] - public void ExcludeClip () - { - Bitmap bmp = new Bitmap (200, 200); - Graphics g = Graphics.FromImage (bmp); - - g.Clip = new Region (new RectangleF (10, 10, 100, 100)); - g.ExcludeClip (new Rectangle (40, 60, 100, 20)); - rects = g.Clip.GetRegionScans (new Matrix ()); - - AssertEquals ("ExcludeClip1", 3, rects.Length); - - AssertEquals ("ExcludeClip2", 10, rects[0].X); - AssertEquals ("ExcludeClip3", 10, rects[0].Y); - AssertEquals ("ExcludeClip4", 100, rects[0].Width); - AssertEquals ("ExcludeClip5", 50, rects[0].Height); - - AssertEquals ("ExcludeClip6", 10, rects[1].X); - AssertEquals ("ExcludeClip7", 60, rects[1].Y); - AssertEquals ("ExcludeClip8", 30, rects[1].Width); - AssertEquals ("ExcludeClip9", 20, rects[1].Height); - - AssertEquals ("ExcludeClip10", 10, rects[2].X); - AssertEquals ("ExcludeClip11", 80, rects[2].Y); - AssertEquals ("ExcludeClip12", 100, rects[2].Width); - AssertEquals ("ExcludeClip13", 30, rects[2].Height); - } - - [Test] - public void IntersectClip () - { - Bitmap bmp = new Bitmap (200, 200); - Graphics g = Graphics.FromImage (bmp); - - g.Clip = new Region (new RectangleF (260, 30, 60, 80)); - g.IntersectClip (new Rectangle (290, 40, 60, 80)); - rects = g.Clip.GetRegionScans (new Matrix ()); - - AssertEquals ("IntersectClip", 1, rects.Length); - - AssertEquals ("IntersectClip", 290, rects[0].X); - AssertEquals ("IntersectClip", 40, rects[0].Y); - AssertEquals ("IntersectClip", 30, rects[0].Width); - AssertEquals ("IntersectClip", 70, rects[0].Height); - } - - [Test] - public void ResetClip () - { - Bitmap bmp = new Bitmap (200, 200); - Graphics g = Graphics.FromImage (bmp); - - g.Clip = new Region (new RectangleF (260, 30, 60, 80)); - g.IntersectClip (new Rectangle (290, 40, 60, 80)); - g.ResetClip (); - rects = g.Clip.GetRegionScans (new Matrix ()); - - AssertEquals ("ResetClip", 1, rects.Length); - - AssertEquals ("ResetClip", -4194304, rects[0].X); - AssertEquals ("ResetClip", -4194304, rects[0].Y); - AssertEquals ("ResetClip", 8388608, rects[0].Width); - AssertEquals ("ResetClip", 8388608, rects[0].Height); - } - - [Test] - public void SetClip () - { - RectangleF[] rects ; - Bitmap bmp = new Bitmap (200, 200); - Graphics g = Graphics.FromImage (bmp); - - // Region - g.SetClip (new Region (new Rectangle (50, 40, 210, 220)), CombineMode.Replace); - rects = g.Clip.GetRegionScans (new Matrix ()); - AssertEquals ("SetClip1", 1, rects.Length); - AssertEquals ("SetClip2", 50, rects[0].X); - AssertEquals ("SetClip3", 40, rects[0].Y); - AssertEquals ("SetClip4", 210, rects[0].Width); - AssertEquals ("SetClip5", 220, rects[0].Height); - - // RectangleF - g = Graphics.FromImage (bmp); - g.SetClip (new RectangleF (50, 40, 210, 220)); - rects = g.Clip.GetRegionScans (new Matrix ()); - AssertEquals ("SetClip6", 1, rects.Length); - AssertEquals ("SetClip7", 50, rects[0].X); - AssertEquals ("SetClip8", 40, rects[0].Y); - AssertEquals ("SetClip9", 210, rects[0].Width); - AssertEquals ("SetClip10", 220, rects[0].Height); - - // Rectangle - g = Graphics.FromImage (bmp); - g.SetClip (new Rectangle (50, 40, 210, 220)); - rects = g.Clip.GetRegionScans (new Matrix ()); - AssertEquals ("SetClip10", 1, rects.Length); - AssertEquals ("SetClip11", 50, rects[0].X); - AssertEquals ("SetClip12", 40, rects[0].Y); - AssertEquals ("SetClip13", 210, rects[0].Width); - AssertEquals ("SetClip14", 220, rects[0].Height); - } - - [Test] - public void SetSaveReset () - { - Bitmap bmp = new Bitmap (200, 200); - Graphics g = Graphics.FromImage (bmp); - GraphicsState state_default, state_modified; - - state_default = g.Save (); // Default - - g.CompositingMode = CompositingMode.SourceCopy; - g.CompositingQuality = CompositingQuality.GammaCorrected; - g.InterpolationMode = InterpolationMode.HighQualityBilinear; - g.PageScale = 2; - g.PageUnit = GraphicsUnit.Inch; - g.PixelOffsetMode = PixelOffsetMode.Half; - g.Clip = new Region (new Rectangle (0, 0, 100, 100)); - g.RenderingOrigin = new Point (10, 20); - g.SmoothingMode = SmoothingMode.AntiAlias; - g.TextRenderingHint = TextRenderingHint.ClearTypeGridFit; - - - state_modified = g.Save (); // Modified - - g.CompositingMode = CompositingMode.SourceOver; - g.CompositingQuality = CompositingQuality.Default; - g.InterpolationMode = InterpolationMode.Bilinear; - g.PageScale = 5; - g.PageUnit = GraphicsUnit.Display; - g.PixelOffsetMode = PixelOffsetMode.Default; - g.Clip = new Region (new Rectangle (1, 2, 20, 25)); - g.RenderingOrigin = new Point (5, 6); - g.SmoothingMode = SmoothingMode.None; - g.TextRenderingHint = TextRenderingHint.SystemDefault; - - g.Restore (state_modified); - - AssertEquals ("SetSaveReset1", CompositingMode.SourceCopy, g.CompositingMode); - AssertEquals ("SetSaveReset2", CompositingQuality.GammaCorrected, g.CompositingQuality); - AssertEquals ("SetSaveReset3", InterpolationMode.HighQualityBilinear, g.InterpolationMode); - AssertEquals ("SetSaveReset4", 2, g.PageScale); - AssertEquals ("SetSaveReset5", GraphicsUnit.Inch, g.PageUnit); - AssertEquals ("SetSaveReset6", PixelOffsetMode.Half, g.PixelOffsetMode); - AssertEquals ("SetSaveReset7", new Point (10, 20), g.RenderingOrigin); - AssertEquals ("SetSaveReset8", SmoothingMode.AntiAlias, g.SmoothingMode); - AssertEquals ("SetSaveReset9", TextRenderingHint.ClearTypeGridFit, g.TextRenderingHint); - AssertEquals ("SetSaveReset10", 0, (int) g.ClipBounds.X); - AssertEquals ("SetSaveReset10", 0, (int) g.ClipBounds.Y); - - g.Restore (state_default); - - AssertEquals ("SetSaveReset11", CompositingMode.SourceOver, g.CompositingMode); - AssertEquals ("SetSaveReset12", CompositingQuality.Default, g.CompositingQuality); - AssertEquals ("SetSaveReset13", InterpolationMode.Bilinear, g.InterpolationMode); - AssertEquals ("SetSaveReset14", 1, g.PageScale); - AssertEquals ("SetSaveReset15", GraphicsUnit.Display, g.PageUnit); - AssertEquals ("SetSaveReset16", PixelOffsetMode.Default, g.PixelOffsetMode); - AssertEquals ("SetSaveReset17", new Point (0, 0) , g.RenderingOrigin); - AssertEquals ("SetSaveReset18", SmoothingMode.None, g.SmoothingMode); - AssertEquals ("SetSaveReset19", TextRenderingHint.SystemDefault, g.TextRenderingHint); - - Region r = new Region (); - AssertEquals ("SetSaveReset20", r.GetBounds (g) , g.ClipBounds); - - g.Dispose (); - } - - [Test] - public void LoadIndexed () - { - // - // Tests that we can load an indexed file - // - - Stream str = Assembly.GetExecutingAssembly ().GetManifestResourceStream ("indexed.png"); - Image x = Image.FromStream (str); - Graphics g = Graphics.FromImage (x); - } - - [Test] - [ExpectedException (typeof (ArgumentNullException))] - public void FromImage () - { - Graphics g = Graphics.FromImage (null); - } - } -} - diff --git a/mcs/class/System.Drawing/Test/System.Drawing/TestIcon.cs b/mcs/class/System.Drawing/Test/System.Drawing/TestIcon.cs deleted file mode 100644 index 6b9bb2a299c..00000000000 --- a/mcs/class/System.Drawing/Test/System.Drawing/TestIcon.cs +++ /dev/null @@ -1,112 +0,0 @@ -// -// Icon class testing unit -// -// Author: -// -// Sanjay Gupta -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; -using System.Drawing; -using NUnit.Framework; -using System.IO; -using System.Security.Permissions; - -namespace MonoTests.System.Drawing{ - - [TestFixture] - [SecurityPermission (SecurityAction.Deny, UnmanagedCode = true)] - public class TestIcon { - - Icon icon; - Icon newIcon; - FileStream fs; - FileStream fs1; - - [SetUp] - public void SetUp () - { - String path = TestBitmap.getInFile ("bitmaps/smiley.ico"); - icon = new Icon (path); - fs1 = new FileStream (path, FileMode.Open); - } - - [Test] - public void TestConstructors () - { - newIcon = new Icon (fs1, 48, 48); - Assert.AreEqual (48, newIcon.Height, "C#1a"); - Assert.AreEqual (48, newIcon.Width, "C#1b"); - - newIcon = new Icon (icon, 16, 16); - Assert.AreEqual (16, newIcon.Height, "C#2a"); - Assert.AreEqual (16, newIcon.Width, "C#2b"); - } - - [Test] - public void TestProperties () - { - Assert.AreEqual (32, icon.Height, "P#1"); - Assert.AreEqual (32, icon.Width, "P#2"); - Assert.AreEqual (32, icon.Size.Width, "P#3"); - Assert.AreEqual (32, icon.Size.Height, "P#4"); - - } - - [Test] - public void TestMethods () - { - /* - - TODO: This does not work on Win32 - - newIcon = (Icon) icon.Clone (); - Assert.AreEqual (32, newIcon.Height, "M#1a"); - Assert.AreEqual (32, newIcon.Width, "M#1b"); - - Bitmap bmp = icon.ToBitmap(); - Assert.AreEqual (32, bmp.Height, "M#2a"); - Assert.AreEqual (32, bmp.Width, "M#2b"); - */ - - fs = new FileStream ("newIcon.ico", FileMode.Create); - icon.Save (fs); - - Assert.AreEqual (fs1.Length, fs.Length, "M#3"); - } - - [TearDown] - public void TearDown () - { - if (fs != null) - fs.Close(); - if (fs1 != null) - fs1.Close(); - if (File.Exists ("newIcon.ico")) - File.Delete("newIcon.ico"); - } - } -} diff --git a/mcs/class/System.Drawing/Test/System.Drawing/TestIconConverter.cs b/mcs/class/System.Drawing/Test/System.Drawing/TestIconConverter.cs deleted file mode 100644 index a588e8fe9a9..00000000000 --- a/mcs/class/System.Drawing/Test/System.Drawing/TestIconConverter.cs +++ /dev/null @@ -1,424 +0,0 @@ -// -// Tests for System.Drawing.IconConverter.cs -// -// Author: -// Sanjay Gupta (gsanjay@novell.com) -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - - -using NUnit.Framework; -using System; -using System.Drawing; -using System.Drawing.Imaging; -using System.Collections; -using System.ComponentModel; -using System.Globalization; -using System.IO; -using System.Security.Permissions; - -namespace MonoTests.System.Drawing -{ - [TestFixture] - [SecurityPermission (SecurityAction.Deny, UnmanagedCode = true)] - public class IconConverterTest - { - Icon icon; - IconConverter icoConv; - IconConverter icoConvFrmTD; - String iconStr; - byte [] iconBytes; - - [TearDown] - public void TearDown () {} - - [SetUp] - public void SetUp () - { - icon = new Icon (TestBitmap.getInFile ("bitmaps/VisualPng.ico")); - iconStr = icon.ToString (); - - icoConv = new IconConverter(); - icoConvFrmTD = (IconConverter) TypeDescriptor.GetConverter (icon); - - Stream stream = new FileStream (TestBitmap.getInFile ("bitmaps/VisualPng1.ico"), FileMode.Open); - int length = (int) stream.Length; - iconBytes = new byte [length]; - - try { - if (stream.Read (iconBytes, 0, length) != length) - Assert.Fail ("SU#1: Read Failure"); - } catch (Exception e) { - Assert.Fail ("SU#2 Exception thrown while reading. Exception is: "+e.Message); - } finally { - stream.Close (); - } - - stream.Close (); - - } - - [Test] - public void TestCanConvertFrom () - { - Assert.IsTrue (icoConv.CanConvertFrom (typeof (byte [])), "CCF#1"); - Assert.IsTrue (icoConv.CanConvertFrom (null, typeof (byte [])), "CCF#1a"); - Assert.IsTrue (icoConv.CanConvertFrom (null, iconBytes.GetType ()), "CCF#1b"); - Assert.IsTrue (! icoConv.CanConvertFrom (null, typeof (String)), "CCF#2"); - Assert.IsTrue (! icoConv.CanConvertFrom (null, typeof (Rectangle)), "CCF#3"); - Assert.IsTrue (! icoConv.CanConvertFrom (null, typeof (Point)), "CCF#4"); - Assert.IsTrue (! icoConv.CanConvertFrom (null, typeof (PointF)), "CCF#5"); - Assert.IsTrue (! icoConv.CanConvertFrom (null, typeof (Size)), "CCF#6"); - Assert.IsTrue (! icoConv.CanConvertFrom (null, typeof (SizeF)), "CCF#7"); - Assert.IsTrue (! icoConv.CanConvertFrom (null, typeof (Object)), "CCF#8"); - Assert.IsTrue (! icoConv.CanConvertFrom (null, typeof (int)), "CCF#9"); - Assert.IsTrue (! icoConv.CanConvertFrom (null, typeof (Metafile)), "CCF#10"); - - Assert.IsTrue (icoConvFrmTD.CanConvertFrom (typeof (byte [])), "CCF#1A"); - Assert.IsTrue (icoConvFrmTD.CanConvertFrom (null, typeof (byte [])), "CCF#1aA"); - Assert.IsTrue (icoConvFrmTD.CanConvertFrom (null, iconBytes.GetType ()), "CCF#1bA"); - Assert.IsTrue (! icoConvFrmTD.CanConvertFrom (null, typeof (String)), "CCF#2A"); - Assert.IsTrue (! icoConvFrmTD.CanConvertFrom (null, typeof (Rectangle)), "CCF#3A"); - Assert.IsTrue (! icoConvFrmTD.CanConvertFrom (null, typeof (Point)), "CCF#4A"); - Assert.IsTrue (! icoConvFrmTD.CanConvertFrom (null, typeof (PointF)), "CCF#5A"); - Assert.IsTrue (! icoConvFrmTD.CanConvertFrom (null, typeof (Size)), "CCF#6A"); - Assert.IsTrue (! icoConvFrmTD.CanConvertFrom (null, typeof (SizeF)), "CCF#7A"); - Assert.IsTrue (! icoConvFrmTD.CanConvertFrom (null, typeof (Object)), "CCF#8A"); - Assert.IsTrue (! icoConvFrmTD.CanConvertFrom (null, typeof (int)), "CCF#9A"); - Assert.IsTrue (! icoConvFrmTD.CanConvertFrom (null, typeof (Metafile)), "CCF#10A"); - - } - - [Test] - public void TestCanConvertTo () - { - Assert.IsTrue (icoConv.CanConvertTo (typeof (String)), "CCT#1"); - Assert.IsTrue (icoConv.CanConvertTo (null, typeof (String)), "CCT#1a"); - Assert.IsTrue (icoConv.CanConvertTo (null, iconStr.GetType ()), "CCT#1b"); - Assert.IsTrue (icoConv.CanConvertTo (typeof (byte [])), "CCT#2"); - Assert.IsTrue (icoConv.CanConvertTo (null, typeof (byte [])), "CCT#2a"); - Assert.IsTrue (icoConv.CanConvertTo (null, iconBytes.GetType ()), "CCT#2b"); - Assert.IsTrue (! icoConv.CanConvertTo (null, typeof (Rectangle)), "CCT#3"); - Assert.IsTrue (! icoConv.CanConvertTo (null, typeof (Point)), "CCT#4"); - Assert.IsTrue (! icoConv.CanConvertTo (null, typeof (PointF)), "CCT#5"); - Assert.IsTrue (! icoConv.CanConvertTo (null, typeof (Size)), "CCT#6"); - Assert.IsTrue (! icoConv.CanConvertTo (null, typeof (SizeF)), "CCT#7"); - Assert.IsTrue (! icoConv.CanConvertTo (null, typeof (Object)), "CCT#8"); - Assert.IsTrue (! icoConv.CanConvertTo (null, typeof (int)), "CCT#9"); - - Assert.IsTrue (icoConvFrmTD.CanConvertTo (typeof (String)), "CCT#1A"); - Assert.IsTrue (icoConvFrmTD.CanConvertTo (null, typeof (String)), "CCT#1aA"); - Assert.IsTrue (icoConvFrmTD.CanConvertTo (null, iconStr.GetType ()), "CCT#1bA"); - Assert.IsTrue (icoConvFrmTD.CanConvertTo (typeof (byte [])), "CCT#2A"); - Assert.IsTrue (icoConvFrmTD.CanConvertTo (null, typeof (byte [])), "CCT#2aA"); - Assert.IsTrue (icoConvFrmTD.CanConvertTo (null, iconBytes.GetType ()), "CCT#2bA"); - Assert.IsTrue (! icoConvFrmTD.CanConvertTo (null, typeof (Rectangle)), "CCT#3A"); - Assert.IsTrue (! icoConvFrmTD.CanConvertTo (null, typeof (Point)), "CCT#4A"); - Assert.IsTrue (! icoConvFrmTD.CanConvertTo (null, typeof (PointF)), "CCT#5A"); - Assert.IsTrue (! icoConvFrmTD.CanConvertTo (null, typeof (Size)), "CCT#6A"); - Assert.IsTrue (! icoConvFrmTD.CanConvertTo (null, typeof (SizeF)), "CCT#7A"); - Assert.IsTrue (! icoConvFrmTD.CanConvertTo (null, typeof (Object)), "CCT#8A"); - Assert.IsTrue (! icoConvFrmTD.CanConvertTo (null, typeof (int)), "CCT#9A"); - - } - - [Test] - public void TestConvertFrom () - { - Icon newIcon = (Icon) icoConv.ConvertFrom (null, CultureInfo.InvariantCulture, iconBytes); - - Assert.AreEqual (icon.Height, newIcon.Height, "CF#1"); - Assert.AreEqual (icon.Width, newIcon.Width, "CF#1a" ); - - try { - icoConv.ConvertFrom ("System.Drawing.String"); - Assert.Fail ("CF#2: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CF#2"); - } - - try { - icoConv.ConvertFrom (null, CultureInfo.InvariantCulture, - "System.Drawing.String"); - Assert.Fail ("CF#2a: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CF#2a"); - } - - try { - icoConv.ConvertFrom (null, CultureInfo.InvariantCulture, - new Bitmap (20, 20)); - Assert.Fail ("CF#3: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CF#3"); - } - - try { - icoConv.ConvertFrom (null, CultureInfo.InvariantCulture, - new Point (10, 10)); - Assert.Fail ("CF#4: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CF#4"); - } - - try { - icoConv.ConvertFrom (null, CultureInfo.InvariantCulture, - new SizeF (10, 10)); - Assert.Fail ("CF#5: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CF#5"); - } - - try { - icoConv.ConvertFrom (null, CultureInfo.InvariantCulture, - new Object ()); - Assert.Fail ("CF#6: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CF#6"); - } - - - newIcon = (Icon) icoConvFrmTD.ConvertFrom (null, CultureInfo.InvariantCulture, iconBytes); - - Assert.AreEqual (icon.Height, newIcon.Height, "CF#1A"); - Assert.AreEqual (icon.Width, newIcon.Width, "CF#1Aa"); - - try { - icoConvFrmTD.ConvertFrom ("System.Drawing.String"); - Assert.Fail ("CF#2A: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CF#2A"); - } - - try { - icoConvFrmTD.ConvertFrom (null, CultureInfo.InvariantCulture, - "System.Drawing.String"); - Assert.Fail ("CF#2aA: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CF#2aA"); - } - - try { - icoConvFrmTD.ConvertFrom (null, CultureInfo.InvariantCulture, - new Bitmap (20, 20)); - Assert.Fail ("CF#3A: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CF#3A"); - } - - try { - icoConvFrmTD.ConvertFrom (null, CultureInfo.InvariantCulture, - new Point (10, 10)); - Assert.Fail ("CF#4A: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CF#4A"); - } - - try { - icoConvFrmTD.ConvertFrom (null, CultureInfo.InvariantCulture, - new SizeF (10, 10)); - Assert.Fail ("CF#5A: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CF#5A"); - } - - try { - icoConvFrmTD.ConvertFrom (null, CultureInfo.InvariantCulture, - new Object ()); - Assert.Fail ("CF#6A: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CF#6A"); - } - - } - - [Test] - public void TestConvertTo () - { - Assert.AreEqual (iconStr, (String) icoConv.ConvertTo (null, - CultureInfo.InvariantCulture, - icon, typeof (String)), "CT#1"); - - Assert.AreEqual (iconStr, (String) icoConv.ConvertTo (icon, - typeof (String)), "CT#1a"); - - /*byte [] newIconBytes = (byte []) icoConv.ConvertTo (null, CultureInfo.InvariantCulture, - icon, iconBytes.GetType ()); - - Assert.AreEqual (iconBytes.Length, newIconBytes.Length, "CT#2"); - - newIconBytes = (byte []) icoConv.ConvertTo (icon, iconBytes.GetType ()); - - Assert.AreEqual (iconBytes.Length, newIconBytes.Length, "CT#2a"); - - - try { - icoConv.ConvertTo (null, CultureInfo.InvariantCulture, - icon, typeof (Rectangle)); - Assert.Fail ("CT#3: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue ( e is NotSupportedException, "CT#3"); - } - - try { - icoConv.ConvertTo (null, CultureInfo.InvariantCulture, - icon, icon.GetType ()); - Assert.Fail ("CT#4: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CT#4"); - } - - try { - icoConv.ConvertTo (null, CultureInfo.InvariantCulture, - icon, typeof (Size)); - Assert.Fail ("CT#5: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CT#5"); - } - - try { - icoConv.ConvertTo (null, CultureInfo.InvariantCulture, - icon, typeof (Bitmap)); - Assert.Fail ("CT#6: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue ( e is NotSupportedException, "CT#6"); - } - - try { - icoConv.ConvertTo (null, CultureInfo.InvariantCulture, - icon, typeof (Point)); - Assert.Fail ("CT#7: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CT#7"); - } - - try { - icoConv.ConvertTo (null, CultureInfo.InvariantCulture, - icon, typeof (Metafile)); - Assert.Fail ("CT#8: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CT#8"); - } - - try { - icoConv.ConvertTo (null, CultureInfo.InvariantCulture, - icon, typeof (Object)); - Assert.Fail ("CT#9: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CT#9"); - } - - try { - icoConv.ConvertTo (null, CultureInfo.InvariantCulture, - icon, typeof (int)); - Assert.Fail ("CT#10: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CT#10"); - }*/ - - - Assert.AreEqual (iconStr, (String) icoConvFrmTD.ConvertTo (null, - CultureInfo.InvariantCulture, - icon, typeof (String)), "CT#1A"); - - Assert.AreEqual (iconStr, (String) icoConvFrmTD.ConvertTo (icon, - typeof (String)), "CT#1aA"); - - /*newIconBytes = (byte []) icoConvFrmTD.ConvertTo (null, CultureInfo.InvariantCulture, - icon, iconBytes.GetType ()); - - Assert.AreEqual (iconBytes.Length, newIconBytes.Length, "CT#2A"); - - newIconBytes = (byte []) icoConvFrmTD.ConvertTo (icon, iconBytes.GetType ()); - - Assert.AreEqual (iconBytes.Length, newIconBytes.Length, "CT#2aA"); - - try { - icoConvFrmTD.ConvertTo (null, CultureInfo.InvariantCulture, - icon, typeof (Rectangle)); - Assert.Fail ("CT#3A: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CT#3A"); - } - - try { - icoConvFrmTD.ConvertTo (null, CultureInfo.InvariantCulture, - icon, icon.GetType ()); - Assert.Fail ("CT#4A: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CT#4A"); - } - - try { - icoConvFrmTD.ConvertTo (null, CultureInfo.InvariantCulture, - icon, typeof (Size)); - Assert.Fail ("CT#5A: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CT#5A"); - } - - try { - icoConvFrmTD.ConvertTo (null, CultureInfo.InvariantCulture, - icon, typeof (Bitmap)); - Assert.Fail ("CT#6A: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CT#6A"); - } - - try { - icoConvFrmTD.ConvertTo (null, CultureInfo.InvariantCulture, - icon, typeof (Point)); - Assert.Fail ("CT#7A: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CT#7A"); - } - - try { - icoConvFrmTD.ConvertTo (null, CultureInfo.InvariantCulture, - icon, typeof (Metafile)); - Assert.Fail ("CT#8A: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CT#8A"); - } - - try { - icoConvFrmTD.ConvertTo (null, CultureInfo.InvariantCulture, - icon, typeof (Object)); - Assert.Fail ("CT#9A: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CT#9A"); - } - - try { - icoConvFrmTD.ConvertTo (null, CultureInfo.InvariantCulture, - icon, typeof (int)); - Assert.Fail ("CT#10A: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CT#10A"); - }*/ - } - - } -} diff --git a/mcs/class/System.Drawing/Test/System.Drawing/TestImage.cs b/mcs/class/System.Drawing/Test/System.Drawing/TestImage.cs deleted file mode 100644 index 7a77f3da225..00000000000 --- a/mcs/class/System.Drawing/Test/System.Drawing/TestImage.cs +++ /dev/null @@ -1,55 +0,0 @@ -// -// Image class testing unit -// -// Author: -// -// Jordi Mas i Hernàndez (jmas@softcatala.org> -// -// (C) 2005 Ximian, Inc. http://www.ximian.com -// - -// -// Copyright (C) 2005 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -using System; -using System.Drawing; -using System.Drawing.Imaging; -using NUnit.Framework; -using System.IO; -using System.Runtime.InteropServices; -using System.Security.Permissions; - -namespace MonoTests.System.Drawing{ - - [TestFixture] - [SecurityPermission (SecurityAction.Deny, UnmanagedCode = true)] - public class TestImage { - - - [Test] - [ExpectedException (typeof (FileNotFoundException))] - public void FileDoesNotExists () - { - Image img = Image.FromFile ("FileDoesNotExists.jpg"); - } - } -} diff --git a/mcs/class/System.Drawing/Test/System.Drawing/TestImageConverter.cs b/mcs/class/System.Drawing/Test/System.Drawing/TestImageConverter.cs deleted file mode 100644 index 50752256897..00000000000 --- a/mcs/class/System.Drawing/Test/System.Drawing/TestImageConverter.cs +++ /dev/null @@ -1,459 +0,0 @@ -// -// Tests for System.Drawing.ImageConverter.cs -// -// Author: -// Sanjay Gupta (gsanjay@novell.com) -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - - -using NUnit.Framework; -using System; -using System.Drawing; -using System.Drawing.Imaging; -using System.Collections; -using System.ComponentModel; -using System.Globalization; -using System.IO; -using System.Security.Permissions; - -namespace MonoTests.System.Drawing -{ - [TestFixture] - [SecurityPermission (SecurityAction.Deny, UnmanagedCode = true)] - public class ImageConverterTest - { - Image image; - ImageConverter imgConv; - ImageConverter imgConvFrmTD; - String imageStr; - byte [] imageBytes; - - [TearDown] - public void TearDown () {} - - [SetUp] - public void SetUp () - { - image = Image.FromFile (TestBitmap.getInFile ("bitmaps/almogaver24bits.bmp")); - imageStr = image.ToString (); - - imgConv = new ImageConverter(); - imgConvFrmTD = (ImageConverter) TypeDescriptor.GetConverter (image); - - Stream stream = new FileStream (TestBitmap.getInFile ("bitmaps/almogaver24bits1.bmp"), FileMode.Open); - int length = (int) stream.Length; - imageBytes = new byte [length]; - - try { - if (stream.Read (imageBytes, 0, length) != length) - Assert.Fail ("SU#1: Read Failure"); - } catch (Exception e) { - Assert.Fail ("SU#2 Exception thrown while reading. Exception is: "+e.Message); - } finally { - stream.Close (); - } - - stream.Close (); - - } - - [Test] - public void TestCanConvertFrom () - { - Assert.IsTrue (imgConv.CanConvertFrom (typeof (byte [])), "CCF#1"); - Assert.IsTrue (imgConv.CanConvertFrom (null, typeof (byte [])), "CCF#1a"); - Assert.IsTrue (imgConv.CanConvertFrom (null, imageBytes.GetType ()), "CCF#1b"); - Assert.IsTrue (! imgConv.CanConvertFrom (null, typeof (String)), "CCF#2"); - Assert.IsTrue (! imgConv.CanConvertFrom (null, typeof (Rectangle)), "CCF#3"); - Assert.IsTrue (! imgConv.CanConvertFrom (null, typeof (Point)), "CCF#4"); - Assert.IsTrue (! imgConv.CanConvertFrom (null, typeof (PointF)), "CCF#5"); - Assert.IsTrue (! imgConv.CanConvertFrom (null, typeof (Size)), "CCF#6"); - Assert.IsTrue (! imgConv.CanConvertFrom (null, typeof (SizeF)), "CCF#7"); - Assert.IsTrue (! imgConv.CanConvertFrom (null, typeof (Object)), "CCF#8"); - Assert.IsTrue (! imgConv.CanConvertFrom (null, typeof (int)), "CCF#9"); - Assert.IsTrue (! imgConv.CanConvertFrom (null, typeof (Metafile)), "CCF#10"); - - Assert.IsTrue (imgConvFrmTD.CanConvertFrom (typeof (byte [])), "CCF#1A"); - Assert.IsTrue (imgConvFrmTD.CanConvertFrom (null, typeof (byte [])), "CCF#1aA"); - Assert.IsTrue (imgConvFrmTD.CanConvertFrom (null, imageBytes.GetType ()), "CCF#1bA"); - Assert.IsTrue (! imgConvFrmTD.CanConvertFrom (null, typeof (String)), "CCF#2A"); - Assert.IsTrue (! imgConvFrmTD.CanConvertFrom (null, typeof (Rectangle)), "CCF#3A"); - Assert.IsTrue (! imgConvFrmTD.CanConvertFrom (null, typeof (Point)), "CCF#4A"); - Assert.IsTrue (! imgConvFrmTD.CanConvertFrom (null, typeof (PointF)), "CCF#5A"); - Assert.IsTrue (! imgConvFrmTD.CanConvertFrom (null, typeof (Size)), "CCF#6A"); - Assert.IsTrue (! imgConvFrmTD.CanConvertFrom (null, typeof (SizeF)), "CCF#7A"); - Assert.IsTrue (! imgConvFrmTD.CanConvertFrom (null, typeof (Object)), "CCF#8A"); - Assert.IsTrue (! imgConvFrmTD.CanConvertFrom (null, typeof (int)), "CCF#9A"); - Assert.IsTrue (! imgConvFrmTD.CanConvertFrom (null, typeof (Metafile)), "CCF#10A"); - - } - - [Test] - public void TestCanConvertTo () - { - Assert.IsTrue (imgConv.CanConvertTo (typeof (String)), "CCT#1"); - Assert.IsTrue (imgConv.CanConvertTo (null, typeof (String)), "CCT#1a"); - Assert.IsTrue (imgConv.CanConvertTo (null, imageStr.GetType ()), "CCT#1b"); - Assert.IsTrue (imgConv.CanConvertTo (typeof (byte [])), "CCT#2"); - Assert.IsTrue (imgConv.CanConvertTo (null, typeof (byte [])), "CCT#2a"); - Assert.IsTrue (imgConv.CanConvertTo (null, imageBytes.GetType ()), "CCT#2b"); - Assert.IsTrue (! imgConv.CanConvertTo (null, typeof (Rectangle)), "CCT#3"); - Assert.IsTrue (! imgConv.CanConvertTo (null, typeof (Point)), "CCT#4"); - Assert.IsTrue (! imgConv.CanConvertTo (null, typeof (PointF)), "CCT#5"); - Assert.IsTrue (! imgConv.CanConvertTo (null, typeof (Size)), "CCT#6"); - Assert.IsTrue (! imgConv.CanConvertTo (null, typeof (SizeF)), "CCT#7"); - Assert.IsTrue (! imgConv.CanConvertTo (null, typeof (Object)), "CCT#8"); - Assert.IsTrue (! imgConv.CanConvertTo (null, typeof (int)), "CCT#9"); - - Assert.IsTrue (imgConvFrmTD.CanConvertTo (typeof (String)), "CCT#1A"); - Assert.IsTrue (imgConvFrmTD.CanConvertTo (null, typeof (String)), "CCT#1aA"); - Assert.IsTrue (imgConvFrmTD.CanConvertTo (null, imageStr.GetType ()), "CCT#1bA"); - Assert.IsTrue (imgConvFrmTD.CanConvertTo (typeof (byte [])), "CCT#2A"); - Assert.IsTrue (imgConvFrmTD.CanConvertTo (null, typeof (byte [])), "CCT#2aA"); - Assert.IsTrue (imgConvFrmTD.CanConvertTo (null, imageBytes.GetType ()), "CCT#2bA"); - Assert.IsTrue (! imgConvFrmTD.CanConvertTo (null, typeof (Rectangle)), "CCT#3A"); - Assert.IsTrue (! imgConvFrmTD.CanConvertTo (null, typeof (Point)), "CCT#4A"); - Assert.IsTrue (! imgConvFrmTD.CanConvertTo (null, typeof (PointF)), "CCT#5A"); - Assert.IsTrue (! imgConvFrmTD.CanConvertTo (null, typeof (Size)), "CCT#6A"); - Assert.IsTrue (! imgConvFrmTD.CanConvertTo (null, typeof (SizeF)), "CCT#7A"); - Assert.IsTrue (! imgConvFrmTD.CanConvertTo (null, typeof (Object)), "CCT#8A"); - Assert.IsTrue (! imgConvFrmTD.CanConvertTo (null, typeof (int)), "CCT#9A"); - - } - - [Test] - public void TestConvertFrom () - { - Image newImage = (Image) imgConv.ConvertFrom (null, CultureInfo.InvariantCulture, imageBytes); - - Assert.AreEqual (image.Height, newImage.Height, "CF#1"); - Assert.AreEqual (image.Width, newImage.Width, "CF#1a"); - - try { - imgConv.ConvertFrom ("System.Drawing.String"); - Assert.Fail ("CF#2: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CF#2"); - } - - try { - imgConv.ConvertFrom (null, CultureInfo.InvariantCulture, - "System.Drawing.String"); - Assert.Fail ("CF#2a: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CF#2a"); - } - - try { - imgConv.ConvertFrom (null, CultureInfo.InvariantCulture, - new Bitmap (20, 20)); - Assert.Fail ("CF#3: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CF#3"); - } - - try { - imgConv.ConvertFrom (null, CultureInfo.InvariantCulture, - new Point (10, 10)); - Assert.Fail ("CF#4: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CF#4"); - } - - try { - imgConv.ConvertFrom (null, CultureInfo.InvariantCulture, - new SizeF (10, 10)); - Assert.Fail ("CF#5: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CF#5"); - } - - try { - imgConv.ConvertFrom (null, CultureInfo.InvariantCulture, - new Object ()); - Assert.Fail ("CF#6: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CF#6"); - } - - - newImage = (Image) imgConvFrmTD.ConvertFrom (null, CultureInfo.InvariantCulture, imageBytes); - - Assert.AreEqual (image.Height, newImage.Height, "CF#1A"); - Assert.AreEqual (image.Width, newImage.Width, "CF#1aA"); - - - try { - imgConvFrmTD.ConvertFrom ("System.Drawing.String"); - Assert.Fail ("CF#2A: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CF#2A"); - } - - try { - imgConvFrmTD.ConvertFrom (null, CultureInfo.InvariantCulture, - "System.Drawing.String"); - Assert.Fail ("CF#2aA: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CF#2aA"); - } - - try { - imgConvFrmTD.ConvertFrom (null, CultureInfo.InvariantCulture, - new Bitmap (20, 20)); - Assert.Fail ("CF#3A: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CF#3A"); - } - - try { - imgConvFrmTD.ConvertFrom (null, CultureInfo.InvariantCulture, - new Point (10, 10)); - Assert.Fail ("CF#4A: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CF#4A"); - } - - try { - imgConvFrmTD.ConvertFrom (null, CultureInfo.InvariantCulture, - new SizeF (10, 10)); - Assert.Fail ("CF#5A: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CF#5A"); - } - - try { - imgConvFrmTD.ConvertFrom (null, CultureInfo.InvariantCulture, - new Object ()); - Assert.Fail ("CF#6A: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CF#6A"); - } - - } - - [Test] - public void TestConvertTo () - { - Assert.AreEqual (imageStr, (String) imgConv.ConvertTo (null, - CultureInfo.InvariantCulture, - image, typeof (String)), "CT#1"); - - Assert.AreEqual (imageStr, (String) imgConv.ConvertTo (image, - typeof (String)), "CT#1a"); - - /*byte [] newImageBytes = (byte []) imgConv.ConvertTo (null, CultureInfo.InvariantCulture, - image, imageBytes.GetType ()); - - Assert.AreEqual (imageBytes.Length, newImageBytes.Length, "CT#2"); - - newImageBytes = (byte []) imgConv.ConvertTo (image, imageBytes.GetType ()); - - Assert.AreEqual (imageBytes.Length, newImageBytes.Length, "CT#2a"); - - try { - imgConv.ConvertTo (null, CultureInfo.InvariantCulture, - image, typeof (Rectangle)); - Assert.Fail ("CT#3: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CT#3"); - } - - try { - imgConv.ConvertTo (null, CultureInfo.InvariantCulture, - image, image.GetType ()); - Assert.Fail ("CT#4: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CT#4"); - } - - try { - imgConv.ConvertTo (null, CultureInfo.InvariantCulture, - image, typeof (Size)); - Assert.Fail ("CT#5: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CT#5"); - } - - try { - imgConv.ConvertTo (null, CultureInfo.InvariantCulture, - image, typeof (Bitmap)); - Assert.Fail ("CT#6: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CT#6"); - } - - try { - imgConv.ConvertTo (null, CultureInfo.InvariantCulture, - image, typeof (Point)); - Assert.Fail ("CT#7: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CT#7"); - } - - try { - imgConv.ConvertTo (null, CultureInfo.InvariantCulture, - image, typeof (Metafile)); - Assert.Fail ("CT#8: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CT#8"); - } - - try { - imgConv.ConvertTo (null, CultureInfo.InvariantCulture, - image, typeof (Object)); - Assert.Fail ("CT#9: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CT#9"); - } - - try { - imgConv.ConvertTo (null, CultureInfo.InvariantCulture, - image, typeof (int)); - Assert.Fail ("CT#10: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CT#10"); - } - */ - - Assert.AreEqual (imageStr, (String) imgConvFrmTD.ConvertTo (null, - CultureInfo.InvariantCulture, - image, typeof (String)), "CT#1A"); - - Assert.AreEqual (imageStr, (String) imgConvFrmTD.ConvertTo (image, - typeof (String)), "CT#1aA"); - - /*newImageBytes = (byte []) imgConvFrmTD.ConvertTo (null, CultureInfo.InvariantCulture, - image, imageBytes.GetType ()); - - Assert.AreEqual ( imageBytes.Length, newImageBytes.Length, "CT#2A"); - - newImageBytes = (byte []) imgConvFrmTD.ConvertTo (image, imageBytes.GetType ()); - - Assert.AreEqual (imageBytes.Length, newImageBytes.Length, "CT#2aA"); - - try { - imgConvFrmTD.ConvertTo (null, CultureInfo.InvariantCulture, - image, typeof (Rectangle)); - Assert.Fail ("CT#3A: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CT#3A"); - } - - try { - imgConvFrmTD.ConvertTo (null, CultureInfo.InvariantCulture, - image, image.GetType ()); - Assert.Fail ("CT#4A: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CT#4A"); - } - - try { - imgConvFrmTD.ConvertTo (null, CultureInfo.InvariantCulture, - image, typeof (Size)); - Assert.Fail ("CT#5A: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CT#5A"); - } - - try { - imgConvFrmTD.ConvertTo (null, CultureInfo.InvariantCulture, - image, typeof (Bitmap)); - Assert.Fail ("CT#6A: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CT#6A"); - } - - try { - imgConvFrmTD.ConvertTo (null, CultureInfo.InvariantCulture, - image, typeof (Point)); - Assert.Fail ("CT#7A: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CT#7A"); - } - - try { - imgConvFrmTD.ConvertTo (null, CultureInfo.InvariantCulture, - image, typeof (Metafile)); - Assert.Fail ("CT#8A: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CT#8A"); - } - - try { - imgConvFrmTD.ConvertTo (null, CultureInfo.InvariantCulture, - image, typeof (Object)); - Assert.Fail ("CT#9A: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CT#9A"); - } - - try { - imgConvFrmTD.ConvertTo (null, CultureInfo.InvariantCulture, - image, typeof (int)); - Assert.Fail ("CT#10A: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CT#10A"); - }*/ - } - - - [Test] - public void TestGetPropertiesSupported () - { - Assert.IsTrue (imgConv.GetPropertiesSupported (), "GPS#1"); - Assert.IsTrue (imgConv.GetPropertiesSupported (null), "GPS#2"); - } - - [Test] - public void TestGetProperties () - { - PropertyDescriptorCollection propsColl; - - propsColl = imgConv.GetProperties (null, image, null); - Assert.AreEqual (13, propsColl.Count, "GP1#1"); - - propsColl = imgConv.GetProperties (null, image); - Assert.AreEqual (6, propsColl.Count, "GP1#2"); - - propsColl = imgConv.GetProperties (image); - Assert.AreEqual (6, propsColl.Count, "GP1#3"); - - propsColl = TypeDescriptor.GetProperties (typeof (Image)); - Assert.AreEqual (13, propsColl.Count, "GP1#4"); - - propsColl = imgConvFrmTD.GetProperties (null, image, null); - Assert.AreEqual (13, propsColl.Count, "GP1#1A"); - - propsColl = imgConvFrmTD.GetProperties (null, image); - Assert.AreEqual (6, propsColl.Count, "GP1#2A"); - - propsColl = imgConvFrmTD.GetProperties (image); - Assert.AreEqual (6, propsColl.Count, "GP1#3A"); - - } - } -} diff --git a/mcs/class/System.Drawing/Test/System.Drawing/TestImageFormatConverter.cs b/mcs/class/System.Drawing/Test/System.Drawing/TestImageFormatConverter.cs deleted file mode 100644 index 22ad5f3e00d..00000000000 --- a/mcs/class/System.Drawing/Test/System.Drawing/TestImageFormatConverter.cs +++ /dev/null @@ -1,305 +0,0 @@ -// -// Tests for System.Drawing.ImageFormatConverter.cs -// -// Author: -// Sanjay Gupta (gsanjay@novell.com) -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - - -using NUnit.Framework; -using System; -using System.Drawing; -using System.Drawing.Imaging; -using System.Collections; -using System.ComponentModel; -using System.Globalization; -using System.IO; -using System.Security.Permissions; - -namespace MonoTests.System.Drawing -{ - [TestFixture] - [SecurityPermission (SecurityAction.Deny, UnmanagedCode = true)] - public class ImageFormatConverterTest - { - ImageFormat imageFmt; - ImageFormatConverter imgFmtConv; - ImageFormatConverter imgFmtConvFrmTD; - String imageFmtStr; - - [TearDown] - public void TearDown () {} - - [SetUp] - public void SetUp () - { - imageFmt = ImageFormat.Bmp; - imageFmtStr = imageFmt.ToString (); - - imgFmtConv = new ImageFormatConverter(); - imgFmtConvFrmTD = (ImageFormatConverter) TypeDescriptor.GetConverter (imageFmt); - } - - [Test] - public void TestCanConvertFrom () - { - Assert.IsTrue (imgFmtConv.CanConvertFrom (typeof (String)), "CCF#1"); - Assert.IsTrue (imgFmtConv.CanConvertFrom (null, typeof (String)), "CCF#1a"); - Assert.IsTrue (! imgFmtConv.CanConvertFrom (null, typeof (ImageFormat)), "CCF#2"); - Assert.IsTrue (! imgFmtConv.CanConvertFrom (null, typeof (Guid)), "CCF#3"); - Assert.IsTrue (! imgFmtConv.CanConvertFrom (null, typeof (Object)), "CCF#4"); - Assert.IsTrue (! imgFmtConv.CanConvertFrom (null, typeof (int)), "CCF#5"); - - Assert.IsTrue (imgFmtConvFrmTD.CanConvertFrom (typeof (String)), "CCF#1A"); - Assert.IsTrue (imgFmtConvFrmTD.CanConvertFrom (null, typeof (String)), "CCF#1aA"); - Assert.IsTrue (! imgFmtConvFrmTD.CanConvertFrom (null, typeof (ImageFormat)), "CCF#2A"); - Assert.IsTrue (! imgFmtConvFrmTD.CanConvertFrom (null, typeof (Guid)), "CCF#3A"); - Assert.IsTrue (! imgFmtConvFrmTD.CanConvertFrom (null, typeof (Object)), "CCF#4A"); - Assert.IsTrue (! imgFmtConvFrmTD.CanConvertFrom (null, typeof (int)), "CCF#5A"); - - } - - [Test] - public void TestCanConvertTo () - { - Assert.IsTrue (imgFmtConv.CanConvertTo (typeof (String)), "CCT#1"); - Assert.IsTrue (imgFmtConv.CanConvertTo (null, typeof (String)), "CCT#1a"); - Assert.IsTrue (! imgFmtConv.CanConvertTo (null, typeof (ImageFormat)), "CCT#2"); - Assert.IsTrue (! imgFmtConv.CanConvertTo (null, typeof (Guid)), "CCT#3"); - Assert.IsTrue (! imgFmtConv.CanConvertTo (null, typeof (Object)), "CCT#4"); - Assert.IsTrue (! imgFmtConv.CanConvertTo (null, typeof (int)), "CCT#5"); - - Assert.IsTrue (imgFmtConvFrmTD.CanConvertTo (typeof (String)), "CCT#1A"); - Assert.IsTrue (imgFmtConvFrmTD.CanConvertTo (null, typeof (String)), "CCT#1aA"); - Assert.IsTrue (! imgFmtConvFrmTD.CanConvertTo (null, typeof (ImageFormat)), "CCT#2A"); - Assert.IsTrue (! imgFmtConvFrmTD.CanConvertTo (null, typeof (Guid)), "CCT#3A"); - Assert.IsTrue (! imgFmtConvFrmTD.CanConvertTo (null, typeof (Object)), "CCT#4A"); - Assert.IsTrue (! imgFmtConvFrmTD.CanConvertTo (null, typeof (int)), "CCT#5A"); - } - - [Test] - public void TestConvertFrom () - { - Assert.AreEqual (imageFmt, (ImageFormat) imgFmtConv.ConvertFrom (null, - CultureInfo.InvariantCulture, - ImageFormat.Bmp.ToString ()), "CF#1"); - - try { - imgFmtConv.ConvertFrom ("System.Drawing.String"); - Assert.Fail ("CF#2: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CF#2"); - } - - try { - imgFmtConv.ConvertFrom (null, CultureInfo.InvariantCulture, - "System.Drawing.String"); - Assert.Fail ("CF#2a: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CF#2a"); - } - - try { - imgFmtConv.ConvertFrom (null, CultureInfo.InvariantCulture, - ImageFormat.Bmp); - Assert.Fail ("CF#3: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CF#3"); - } - - try { - imgFmtConv.ConvertFrom (null, CultureInfo.InvariantCulture, - ImageFormat.Bmp.Guid); - Assert.Fail ("CF#4: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CF#4"); - } - - try { - imgFmtConv.ConvertFrom (null, CultureInfo.InvariantCulture, - new Object ()); - Assert.Fail ("CF#5: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CF#5"); - } - - try { - imgFmtConv.ConvertFrom (null, CultureInfo.InvariantCulture, 10); - Assert.Fail ("CF#6: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CF#6"); - } - - - Assert.AreEqual (imageFmt, (ImageFormat) imgFmtConvFrmTD.ConvertFrom (null, - CultureInfo.InvariantCulture, - ImageFormat.Bmp.ToString ()), "CF#1A"); - - try { - imgFmtConvFrmTD.ConvertFrom ("System.Drawing.String"); - Assert.Fail ("CF#2A: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CF#2A"); - } - - try { - imgFmtConvFrmTD.ConvertFrom (null, CultureInfo.InvariantCulture, - "System.Drawing.String"); - Assert.Fail ("CF#2aA: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CF#2aA"); - } - - try { - imgFmtConvFrmTD.ConvertFrom (null, CultureInfo.InvariantCulture, - ImageFormat.Bmp); - Assert.Fail ("CF#3A: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CF#3A"); - } - - try { - imgFmtConvFrmTD.ConvertFrom (null, CultureInfo.InvariantCulture, - ImageFormat.Bmp.Guid); - Assert.Fail ("CF#4A: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CF#4A"); - } - - try { - imgFmtConvFrmTD.ConvertFrom (null, CultureInfo.InvariantCulture, - new Object ()); - Assert.Fail ("CF#5A: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CF#5A"); - } - - try { - imgFmtConvFrmTD.ConvertFrom (null, CultureInfo.InvariantCulture, 10); - Assert.Fail ("CF#6A: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CF#6A"); - } - } - - [Test] - public void TestConvertTo () - { - Assert.AreEqual (imageFmtStr, (String) imgFmtConv.ConvertTo (null, - CultureInfo.InvariantCulture, - imageFmt, typeof (String)), "CT#1"); - - Assert.AreEqual (imageFmtStr, (String) imgFmtConv.ConvertTo (imageFmt, - typeof (String)), "CT#1a"); - - try { - imgFmtConv.ConvertTo (null, CultureInfo.InvariantCulture, - imageFmt, typeof (ImageFormat)); - Assert.Fail ("CT#2: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CT#2"); - } - - try { - imgFmtConv.ConvertTo (null, CultureInfo.InvariantCulture, - imageFmt, typeof (Guid)); - Assert.Fail ("CT#2a: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CT#2a"); - } - - try { - imgFmtConv.ConvertTo (null, CultureInfo.InvariantCulture, - imageFmt, typeof (Object)); - Assert.Fail ("CT#3: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CT#3"); - } - - try { - imgFmtConv.ConvertTo (null, CultureInfo.InvariantCulture, - imageFmt, typeof (int)); - Assert.Fail ("CT#4: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CT#4"); - } - - - Assert.AreEqual (imageFmtStr, (String) imgFmtConvFrmTD.ConvertTo (null, - CultureInfo.InvariantCulture, - imageFmt, typeof (String)), "CT#1A"); - - Assert.AreEqual (imageFmtStr, (String) imgFmtConvFrmTD.ConvertTo (imageFmt, - typeof (String)), "CT#1aA"); - - try { - imgFmtConvFrmTD.ConvertTo (null, CultureInfo.InvariantCulture, - imageFmt, typeof (ImageFormat)); - Assert.Fail ("CT#2A: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CT#2A"); - } - - try { - imgFmtConvFrmTD.ConvertTo (null, CultureInfo.InvariantCulture, - imageFmt, typeof (Guid)); - Assert.Fail ("CT#2aA: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CT#2aA"); - } - - try { - imgFmtConvFrmTD.ConvertTo (null, CultureInfo.InvariantCulture, - imageFmt, typeof (Object)); - Assert.Fail ("CT#3A: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CT#3A"); - } - - try { - imgFmtConvFrmTD.ConvertTo (null, CultureInfo.InvariantCulture, - imageFmt, typeof (int)); - Assert.Fail ("CT#4A: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CT#4A"); - } - } - - - /*[Test] - public void TestGetStandardValuesSupported () - { - Assert.IsTrue (imgFmtConv.GetPropertiesSupported (), "GSVS#1"); - Assert.IsTrue (imgFmtConv.GetPropertiesSupported (null), "GSVS#2"); - } - - [Test] - public void TestGetStandardValues () - { - //MONO TODO - }*/ - } -} diff --git a/mcs/class/System.Drawing/Test/System.Drawing/TestPens.cs b/mcs/class/System.Drawing/Test/System.Drawing/TestPens.cs deleted file mode 100644 index 00172e0b1ec..00000000000 --- a/mcs/class/System.Drawing/Test/System.Drawing/TestPens.cs +++ /dev/null @@ -1,2197 +0,0 @@ -// Tests for System.Drawing.Pens.cs -// -// Author: -// Ravindra (rkumar@novell.com) -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - - -using NUnit.Framework; -using System; -using System.Drawing; -using System.Drawing.Drawing2D; -using System.Security.Permissions; - -namespace MonoTests.System.Drawing -{ - [TestFixture] - [SecurityPermission (SecurityAction.Deny, UnmanagedCode = true)] - public class PensTest : Assertion - { - [SetUp] - public void SetUp () { } - - [TearDown] - public void TearDown () { } - - [Test] - public void TestEquals () - { - Pen pen1 = Pens.Blue; - Pen pen2 = Pens.Blue; - - AssertEquals ("Equals", true, pen1.Equals (pen2)); - } - - [Test] - public void TestAliceBlue () - { - Pen pen = Pens.AliceBlue; - AssertEquals ("P1#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P1#2", pen.Color, Color.AliceBlue); - - try { - pen.Color = Color.AliceBlue; - Fail ("P1#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P1#3", true); - } - } - - [Test] - public void TestAntiqueWhite () - { - Pen pen = Pens.AntiqueWhite; - AssertEquals ("P2#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P2#2", pen.Color, Color.AntiqueWhite); - - try { - pen.Color = Color.AntiqueWhite; - Fail ("P2#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P2#3", true); - } - } - - [Test] - public void TestAqua () - { - Pen pen = Pens.Aqua; - AssertEquals ("P3#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P3#2", pen.Color, Color.Aqua); - - try { - pen.Color = Color.Aqua; - Fail ("P3#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P3#3", true); - } - } - - [Test] - public void TestAquamarine () - { - Pen pen = Pens.Aquamarine; - AssertEquals ("P4#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P4#2", pen.Color, Color.Aquamarine); - - try { - pen.Color = Color.Aquamarine; - Fail ("P4#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P4#3", true); - } - } - - [Test] - public void TestAzure () - { - Pen pen = Pens.Azure; - AssertEquals ("P5#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P5#2", pen.Color, Color.Azure); - - try { - pen.Color = Color.Azure; - Fail ("P5#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P5#3", true); - } - } - - [Test] - public void TestBeige () - { - Pen pen = Pens.Beige; - AssertEquals ("P6#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P6#2", pen.Color, Color.Beige); - - try { - pen.Color = Color.Beige; - Fail ("P6#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P6#3", true); - } - } - - [Test] - public void TestBisque () - { - Pen pen = Pens.Bisque; - AssertEquals ("P7#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P7#2", pen.Color, Color.Bisque); - - try { - pen.Color = Color.Bisque; - Fail ("P7#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P7#3", true); - } - } - - [Test] - public void TestBlack () - { - Pen pen = Pens.Black; - AssertEquals ("P8#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P8#2", pen.Color, Color.Black); - - try { - pen.Color = Color.Black; - Fail ("P8#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P8#3", true); - } - } - - [Test] - public void TestBlanchedAlmond () - { - Pen pen = Pens.BlanchedAlmond; - AssertEquals ("P9#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P9#2", pen.Color, Color.BlanchedAlmond); - - try { - pen.Color = Color.BlanchedAlmond; - Fail ("P9#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P9#3", true); - } - } - - [Test] - public void TestBlue () - { - Pen pen = Pens.Blue; - AssertEquals ("P10#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P10#2", pen.Color, Color.Blue); - - try { - pen.Color = Color.Blue; - Fail ("P10#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P10#3", true); - } - } - - [Test] - public void TestBlueViolet () - { - Pen pen = Pens.BlueViolet; - AssertEquals ("P11#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P11#2", pen.Color, Color.BlueViolet); - - try { - pen.Color = Color.BlueViolet; - Fail ("P11#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P11#3", true); - } - } - - [Test] - public void TestBrown () - { - Pen pen = Pens.Brown; - AssertEquals ("P12#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P12#2", pen.Color, Color.Brown); - - try { - pen.Color = Color.Brown; - Fail ("P12#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P12#3", true); - } - } - - [Test] - public void TestBurlyWood () - { - Pen pen = Pens.BurlyWood; - AssertEquals ("P13#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P13#2", pen.Color, Color.BurlyWood); - - try { - pen.Color = Color.BurlyWood; - Fail ("P13#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P13#3", true); - } - } - - [Test] - public void TestCadetBlue () - { - Pen pen = Pens.CadetBlue; - AssertEquals ("P14#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P14#2", pen.Color, Color.CadetBlue); - - try { - pen.Color = Color.CadetBlue; - Fail ("P14#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P14#3", true); - } - } - - [Test] - public void TestChartreuse () - { - Pen pen = Pens.Chartreuse; - AssertEquals ("P15#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P15#2", pen.Color, Color.Chartreuse); - - try { - pen.Color = Color.Chartreuse; - Fail ("P15#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P15#3", true); - } - } - - [Test] - public void TestChocolate () - { - Pen pen = Pens.Chocolate; - AssertEquals ("P16#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P16#2", pen.Color, Color.Chocolate); - - try { - pen.Color = Color.Chocolate; - Fail ("P16#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P16#3", true); - } - } - - [Test] - public void TestCoral () - { - Pen pen = Pens.Coral; - AssertEquals ("P17#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P17#2", pen.Color, Color.Coral); - - try { - pen.Color = Color.Coral; - Fail ("P17#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P17#3", true); - } - } - - [Test] - public void TestCornflowerBlue () - { - Pen pen = Pens.CornflowerBlue; - AssertEquals ("P18#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P18#2", pen.Color, Color.CornflowerBlue); - - try { - pen.Color = Color.CornflowerBlue; - Fail ("P18#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P18#3", true); - } - } - - [Test] - public void TestCornsilk () - { - Pen pen = Pens.Cornsilk; - AssertEquals ("P19#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P19#2", pen.Color, Color.Cornsilk); - - try { - pen.Color = Color.Cornsilk; - Fail ("P19#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P19#3", true); - } - } - - [Test] - public void TestCrimson () - { - Pen pen = Pens.Crimson; - AssertEquals ("P20#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P20#2", pen.Color, Color.Crimson); - - try { - pen.Color = Color.Crimson; - Fail ("P20#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P20#3", true); - } - } - - [Test] - public void TestCyan () - { - Pen pen = Pens.Cyan; - AssertEquals ("P21#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P21#2", pen.Color, Color.Cyan); - - try { - pen.Color = Color.Cyan; - Fail ("P21#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P21#3", true); - } - } - - [Test] - public void TestDarkBlue () - { - Pen pen = Pens.DarkBlue; - AssertEquals ("P22#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P22#2", pen.Color, Color.DarkBlue); - - try { - pen.Color = Color.DarkBlue; - Fail ("P22#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P22#3", true); - } - } - - [Test] - public void TestDarkCyan () - { - Pen pen = Pens.DarkCyan; - AssertEquals ("P23#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P23#2", pen.Color, Color.DarkCyan); - - try { - pen.Color = Color.DarkCyan; - Fail ("P23#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P23#3", true); - } - } - - [Test] - public void TestDarkGoldenrod () - { - Pen pen = Pens.DarkGoldenrod; - AssertEquals ("P24#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P24#2", pen.Color, Color.DarkGoldenrod); - - try { - pen.Color = Color.DarkGoldenrod; - Fail ("P24#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P24#3", true); - } - } - - [Test] - public void TestDarkGray () - { - Pen pen = Pens.DarkGray; - AssertEquals ("P25#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P25#2", pen.Color, Color.DarkGray); - - try { - pen.Color = Color.DarkGray; - Fail ("P25#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P25#3", true); - } - } - - [Test] - public void TestDarkGreen () - { - Pen pen = Pens.DarkGreen; - AssertEquals ("P26#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P26#2", pen.Color, Color.DarkGreen); - - try { - pen.Color = Color.DarkGreen; - Fail ("P26#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P26#3", true); - } - } - - [Test] - public void TestDarkKhaki () - { - Pen pen = Pens.DarkKhaki; - AssertEquals ("P27#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P27#2", pen.Color, Color.DarkKhaki); - - try { - pen.Color = Color.DarkKhaki; - Fail ("P27#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P27#3", true); - } - } - - [Test] - public void TestDarkMagenta () - { - Pen pen = Pens.DarkMagenta; - AssertEquals ("P28#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P28#2", pen.Color, Color.DarkMagenta); - - try { - pen.Color = Color.DarkMagenta; - Fail ("P28#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P28#3", true); - } - } - - [Test] - public void TestDarkOliveGreen () - { - Pen pen = Pens.DarkOliveGreen; - AssertEquals ("P29#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P29#2", pen.Color, Color.DarkOliveGreen); - - try { - pen.Color = Color.DarkOliveGreen; - Fail ("P29#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P29#3", true); - } - } - - [Test] - public void TestDarkOrange () - { - Pen pen = Pens.DarkOrange; - AssertEquals ("P30#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P30#2", pen.Color, Color.DarkOrange); - - try { - pen.Color = Color.DarkOrange; - Fail ("P30#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P30#3", true); - } - } - - [Test] - public void TestDarkOrchid () - { - Pen pen = Pens.DarkOrchid; - AssertEquals ("P31#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P31#2", pen.Color, Color.DarkOrchid); - - try { - pen.Color = Color.DarkOrchid; - Fail ("P31#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P31#3", true); - } - } - - [Test] - public void TestDarkRed () - { - Pen pen = Pens.DarkRed; - AssertEquals ("P32#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P32#2", pen.Color, Color.DarkRed); - - try { - pen.Color = Color.DarkRed; - Fail ("P32#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P32#3", true); - } - } - - [Test] - public void TestDarkSalmon () - { - Pen pen = Pens.DarkSalmon; - AssertEquals ("P33#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P33#2", pen.Color, Color.DarkSalmon); - - try { - pen.Color = Color.DarkSalmon; - Fail ("P33#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P33#3", true); - } - } - - [Test] - public void TestDarkSeaGreen () - { - Pen pen = Pens.DarkSeaGreen; - AssertEquals ("P34#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P34#2", pen.Color, Color.DarkSeaGreen); - - try { - pen.Color = Color.DarkSeaGreen; - Fail ("P34#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P34#3", true); - } - } - - [Test] - public void TestDarkSlateBlue () - { - Pen pen = Pens.DarkSlateBlue; - AssertEquals ("P35#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P35#2", pen.Color, Color.DarkSlateBlue); - - try { - pen.Color = Color.DarkSlateBlue; - Fail ("P35#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P35#3", true); - } - } - - [Test] - public void TestDarkSlateGray () - { - Pen pen = Pens.DarkSlateGray; - AssertEquals ("P36#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P36#2", pen.Color, Color.DarkSlateGray); - - try { - pen.Color = Color.DarkSlateGray; - Fail ("P36#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P36#3", true); - } - } - - [Test] - public void TestDarkTurquoise () - { - Pen pen = Pens.DarkTurquoise; - AssertEquals ("P37#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P37#2", pen.Color, Color.DarkTurquoise); - - try { - pen.Color = Color.DarkTurquoise; - Fail ("P37#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P37#3", true); - } - } - - [Test] - public void TestDarkViolet () - { - Pen pen = Pens.DarkViolet; - AssertEquals ("P38#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P38#2", pen.Color, Color.DarkViolet); - - try { - pen.Color = Color.DarkViolet; - Fail ("P38#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P38#3", true); - } - } - - [Test] - public void TestDeepPink () - { - Pen pen = Pens.DeepPink; - AssertEquals ("P39#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P39#2", pen.Color, Color.DeepPink); - - try { - pen.Color = Color.DeepPink; - Fail ("P39#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P39#3", true); - } - } - - [Test] - public void TestDeepSkyBlue () - { - Pen pen = Pens.DeepSkyBlue; - AssertEquals ("P40#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P40#2", pen.Color, Color.DeepSkyBlue); - - try { - pen.Color = Color.DeepSkyBlue; - Fail ("P40#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P40#3", true); - } - } - - [Test] - public void TestDimGray () - { - Pen pen = Pens.DimGray; - AssertEquals ("P41#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P41#2", pen.Color, Color.DimGray); - - try { - pen.Color = Color.DimGray; - Fail ("P41#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P41#3", true); - } - } - - [Test] - public void TestDodgerBlue () - { - Pen pen = Pens.DodgerBlue; - AssertEquals ("P42#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P42#2", pen.Color, Color.DodgerBlue); - - try { - pen.Color = Color.DodgerBlue; - Fail ("P42#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P42#3", true); - } - } - - [Test] - public void TestFirebrick () - { - Pen pen = Pens.Firebrick; - AssertEquals ("P43#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P43#2", pen.Color, Color.Firebrick); - - try { - pen.Color = Color.Firebrick; - Fail ("P43#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P43#3", true); - } - } - - [Test] - public void TestFloralWhite () - { - Pen pen = Pens.FloralWhite; - AssertEquals ("P44#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P44#2", pen.Color, Color.FloralWhite); - - try { - pen.Color = Color.FloralWhite; - Fail ("P44#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P44#3", true); - } - } - - [Test] - public void TestForestGreen () - { - Pen pen = Pens.ForestGreen; - AssertEquals ("P45#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P45#2", pen.Color, Color.ForestGreen); - - try { - pen.Color = Color.ForestGreen; - Fail ("P45#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P45#3", true); - } - } - - [Test] - public void TestFuchsia () - { - Pen pen = Pens.Fuchsia; - AssertEquals ("P46#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P46#2", pen.Color, Color.Fuchsia); - - try { - pen.Color = Color.Fuchsia; - Fail ("P46#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P46#3", true); - } - } - - [Test] - public void TestGainsboro () - { - Pen pen = Pens.Gainsboro; - AssertEquals ("P47#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P47#2", pen.Color, Color.Gainsboro); - - try { - pen.Color = Color.Gainsboro; - Fail ("P47#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P47#3", true); - } - } - - [Test] - public void TestGhostWhite () - { - Pen pen = Pens.GhostWhite; - AssertEquals ("P48#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P48#2", pen.Color, Color.GhostWhite); - - try { - pen.Color = Color.GhostWhite; - Fail ("P48#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P48#3", true); - } - } - - [Test] - public void TestGold () - { - Pen pen = Pens.Gold; - AssertEquals ("P49#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P49#2", pen.Color, Color.Gold); - - try { - pen.Color = Color.Gold; - Fail ("P49#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P49#3", true); - } - } - - [Test] - public void TestGoldenrod () - { - Pen pen = Pens.Goldenrod; - AssertEquals ("P50#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P50#2", pen.Color, Color.Goldenrod); - - try { - pen.Color = Color.Goldenrod; - Fail ("P50#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P50#3", true); - } - } - - [Test] - public void TestGray () - { - Pen pen = Pens.Gray; - AssertEquals ("P51#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P51#2", pen.Color, Color.Gray); - - try { - pen.Color = Color.Gray; - Fail ("P51#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P51#3", true); - } - } - - [Test] - public void TestGreen () - { - Pen pen = Pens.Green; - AssertEquals ("P52#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P52#2", pen.Color, Color.Green); - - try { - pen.Color = Color.Green; - Fail ("P52#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P52#3", true); - } - } - - [Test] - public void TestGreenYellow () - { - Pen pen = Pens.GreenYellow; - AssertEquals ("P53#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P53#2", pen.Color, Color.GreenYellow); - - try { - pen.Color = Color.GreenYellow; - Fail ("P53#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P53#3", true); - } - } - - [Test] - public void TestHoneydew () - { - Pen pen = Pens.Honeydew; - AssertEquals ("P54#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P54#2", pen.Color, Color.Honeydew); - - try { - pen.Color = Color.Honeydew; - Fail ("P54#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P54#3", true); - } - } - - [Test] - public void TestHotPink () - { - Pen pen = Pens.HotPink; - AssertEquals ("P55#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P55#2", pen.Color, Color.HotPink); - - try { - pen.Color = Color.HotPink; - Fail ("P55#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P55#3", true); - } - } - - [Test] - public void TestIndianRed () - { - Pen pen = Pens.IndianRed; - AssertEquals ("P56#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P56#2", pen.Color, Color.IndianRed); - - try { - pen.Color = Color.IndianRed; - Fail ("P56#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P56#3", true); - } - } - - [Test] - public void TestIndigo () - { - Pen pen = Pens.Indigo; - AssertEquals ("P57#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P57#2", pen.Color, Color.Indigo); - - try { - pen.Color = Color.Indigo; - Fail ("P57#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P57#3", true); - } - } - - [Test] - public void TestIvory () - { - Pen pen = Pens.Ivory; - AssertEquals ("P58#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P58#2", pen.Color, Color.Ivory); - - try { - pen.Color = Color.Ivory; - Fail ("P58#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P58#3", true); - } - } - - [Test] - public void TestKhaki () - { - Pen pen = Pens.Khaki; - AssertEquals ("P59#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P59#2", pen.Color, Color.Khaki); - - try { - pen.Color = Color.Khaki; - Fail ("P59#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P59#3", true); - } - } - - [Test] - public void TestLavender () - { - Pen pen = Pens.Lavender; - AssertEquals ("P60#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P60#2", pen.Color, Color.Lavender); - - try { - pen.Color = Color.Lavender; - Fail ("P60#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P60#3", true); - } - } - - [Test] - public void TestLavenderBlush () - { - Pen pen = Pens.LavenderBlush; - AssertEquals ("P61#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P61#2", pen.Color, Color.LavenderBlush); - - try { - pen.Color = Color.LavenderBlush; - Fail ("P61#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P61#3", true); - } - } - - [Test] - public void TestLawnGreen () - { - Pen pen = Pens.LawnGreen; - AssertEquals ("P62#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P62#2", pen.Color, Color.LawnGreen); - - try { - pen.Color = Color.LawnGreen; - Fail ("P62#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P62#3", true); - } - } - - [Test] - public void TestLemonChiffon () - { - Pen pen = Pens.LemonChiffon; - AssertEquals ("P63#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P63#2", pen.Color, Color.LemonChiffon); - - try { - pen.Color = Color.LemonChiffon; - Fail ("P63#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P63#3", true); - } - } - - [Test] - public void TestLightBlue () - { - Pen pen = Pens.LightBlue; - AssertEquals ("P64#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P64#2", pen.Color, Color.LightBlue); - - try { - pen.Color = Color.LightBlue; - Fail ("P64#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P64#3", true); - } - } - - [Test] - public void TestLightCoral () - { - Pen pen = Pens.LightCoral; - AssertEquals ("P65#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P65#2", pen.Color, Color.LightCoral); - - try { - pen.Color = Color.LightCoral; - Fail ("P65#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P65#3", true); - } - } - - [Test] - public void TestLightCyan () - { - Pen pen = Pens.LightCyan; - AssertEquals ("P66#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P66#2", pen.Color, Color.LightCyan); - - try { - pen.Color = Color.LightCyan; - Fail ("P66#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P66#3", true); - } - } - - [Test] - public void TestLightGoldenrodYellow () - { - Pen pen = Pens.LightGoldenrodYellow; - AssertEquals ("P67#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P67#2", pen.Color, Color.LightGoldenrodYellow); - - try { - pen.Color = Color.LightGoldenrodYellow; - Fail ("P67#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P67#3", true); - } - } - - [Test] - public void TestLightGray () - { - Pen pen = Pens.LightGray; - AssertEquals ("P68#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P68#2", pen.Color, Color.LightGray); - - try { - pen.Color = Color.LightGray; - Fail ("P68#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P68#3", true); - } - } - - [Test] - public void TestLightGreen () - { - Pen pen = Pens.LightGreen; - AssertEquals ("P69#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P69#2", pen.Color, Color.LightGreen); - - try { - pen.Color = Color.LightGreen; - Fail ("P69#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P69#3", true); - } - } - - [Test] - public void TestLightPink () - { - Pen pen = Pens.LightPink; - AssertEquals ("P70#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P70#2", pen.Color, Color.LightPink); - - try { - pen.Color = Color.LightPink; - Fail ("P70#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P70#3", true); - } - } - - [Test] - public void TestLightSalmon () - { - Pen pen = Pens.LightSalmon; - AssertEquals ("P71#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P71#2", pen.Color, Color.LightSalmon); - - try { - pen.Color = Color.LightSalmon; - Fail ("P71#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P71#3", true); - } - } - - [Test] - public void TestLightSeaGreen () - { - Pen pen = Pens.LightSeaGreen; - AssertEquals ("P72#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P72#2", pen.Color, Color.LightSeaGreen); - - try { - pen.Color = Color.LightSeaGreen; - Fail ("P72#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P72#3", true); - } - } - - [Test] - public void TestLightSkyBlue () - { - Pen pen = Pens.LightSkyBlue; - AssertEquals ("P73#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P73#2", pen.Color, Color.LightSkyBlue); - - try { - pen.Color = Color.LightSkyBlue; - Fail ("P73#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P73#3", true); - } - } - - [Test] - public void TestLightSlateGray () - { - Pen pen = Pens.LightSlateGray; - AssertEquals ("P74#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P74#2", pen.Color, Color.LightSlateGray); - - try { - pen.Color = Color.LightSlateGray; - Fail ("P74#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P74#3", true); - } - } - - [Test] - public void TestLightSteelBlue () - { - Pen pen = Pens.LightSteelBlue; - AssertEquals ("P75#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P75#2", pen.Color, Color.LightSteelBlue); - - try { - pen.Color = Color.LightSteelBlue; - Fail ("P75#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P75#3", true); - } - } - - [Test] - public void TestLightYellow () - { - Pen pen = Pens.LightYellow; - AssertEquals ("P76#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P76#2", pen.Color, Color.LightYellow); - - try { - pen.Color = Color.LightYellow; - Fail ("P76#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P76#3", true); - } - } - - [Test] - public void TestLime () - { - Pen pen = Pens.Lime; - AssertEquals ("P77#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P77#2", pen.Color, Color.Lime); - - try { - pen.Color = Color.Lime; - Fail ("P77#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P77#3", true); - } - } - - [Test] - public void TestLimeGreen () - { - Pen pen = Pens.LimeGreen; - AssertEquals ("P78#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P78#2", pen.Color, Color.LimeGreen); - - try { - pen.Color = Color.LimeGreen; - Fail ("P78#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P78#3", true); - } - } - - [Test] - public void TestLinen () - { - Pen pen = Pens.Linen; - AssertEquals ("P79#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P79#2", pen.Color, Color.Linen); - - try { - pen.Color = Color.Linen; - Fail ("P79#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P79#3", true); - } - } - - [Test] - public void TestMagenta () - { - Pen pen = Pens.Magenta; - AssertEquals ("P80#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P80#2", pen.Color, Color.Magenta); - - try { - pen.Color = Color.Magenta; - Fail ("P80#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P80#3", true); - } - } - - [Test] - public void TestMaroon () - { - Pen pen = Pens.Maroon; - AssertEquals ("P81#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P81#2", pen.Color, Color.Maroon); - - try { - pen.Color = Color.Maroon; - Fail ("P81#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P81#3", true); - } - } - - [Test] - public void TestMediumAquamarine () - { - Pen pen = Pens.MediumAquamarine; - AssertEquals ("P82#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P82#2", pen.Color, Color.MediumAquamarine); - - try { - pen.Color = Color.MediumAquamarine; - Fail ("P82#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P82#3", true); - } - } - - [Test] - public void TestMediumBlue () - { - Pen pen = Pens.MediumBlue; - AssertEquals ("P83#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P83#2", pen.Color, Color.MediumBlue); - - try { - pen.Color = Color.MediumBlue; - Fail ("P83#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P83#3", true); - } - } - - [Test] - public void TestMediumOrchid () - { - Pen pen = Pens.MediumOrchid; - AssertEquals ("P84#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P84#2", pen.Color, Color.MediumOrchid); - - try { - pen.Color = Color.MediumOrchid; - Fail ("P84#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P84#3", true); - } - } - - [Test] - public void TestMediumPurple () - { - Pen pen = Pens.MediumPurple; - AssertEquals ("P85#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P85#2", pen.Color, Color.MediumPurple); - - try { - pen.Color = Color.MediumPurple; - Fail ("P85#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P85#3", true); - } - } - - [Test] - public void TestMediumSeaGreen () - { - Pen pen = Pens.MediumSeaGreen; - AssertEquals ("P86#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P86#2", pen.Color, Color.MediumSeaGreen); - - try { - pen.Color = Color.MediumSeaGreen; - Fail ("P86#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P86#3", true); - } - } - - [Test] - public void TestMediumSlateBlue () - { - Pen pen = Pens.MediumSlateBlue; - AssertEquals ("P87#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P87#2", pen.Color, Color.MediumSlateBlue); - - try { - pen.Color = Color.MediumSlateBlue; - Fail ("P87#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P87#3", true); - } - } - - [Test] - public void TestMediumSpringGreen () - { - Pen pen = Pens.MediumSpringGreen; - AssertEquals ("P88#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P88#2", pen.Color, Color.MediumSpringGreen); - - try { - pen.Color = Color.MediumSpringGreen; - Fail ("P88#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P88#3", true); - } - } - - [Test] - public void TestMediumTurquoise () - { - Pen pen = Pens.MediumTurquoise; - AssertEquals ("P89#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P89#2", pen.Color, Color.MediumTurquoise); - - try { - pen.Color = Color.MediumTurquoise; - Fail ("P89#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P89#3", true); - } - } - - [Test] - public void TestMediumVioletRed () - { - Pen pen = Pens.MediumVioletRed; - AssertEquals ("P90#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P90#2", pen.Color, Color.MediumVioletRed); - - try { - pen.Color = Color.MediumVioletRed; - Fail ("P90#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P90#3", true); - } - } - - [Test] - public void TestMidnightBlue () - { - Pen pen = Pens.MidnightBlue; - AssertEquals ("P91#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P91#2", pen.Color, Color.MidnightBlue); - - try { - pen.Color = Color.MidnightBlue; - Fail ("P91#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P91#3", true); - } - } - - [Test] - public void TestMintCream () - { - Pen pen = Pens.MintCream; - AssertEquals ("P92#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P92#2", pen.Color, Color.MintCream); - - try { - pen.Color = Color.MintCream; - Fail ("P92#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P92#3", true); - } - } - - [Test] - public void TestMistyRose () - { - Pen pen = Pens.MistyRose; - AssertEquals ("P93#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P93#2", pen.Color, Color.MistyRose); - - try { - pen.Color = Color.MistyRose; - Fail ("P93#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P93#3", true); - } - } - - [Test] - public void TestMoccasin () - { - Pen pen = Pens.Moccasin; - AssertEquals ("P94#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P94#2", pen.Color, Color.Moccasin); - - try { - pen.Color = Color.Moccasin; - Fail ("P94#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P94#3", true); - } - } - - [Test] - public void TestNavajoWhite () - { - Pen pen = Pens.NavajoWhite; - AssertEquals ("P95#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P95#2", pen.Color, Color.NavajoWhite); - - try { - pen.Color = Color.NavajoWhite; - Fail ("P95#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P95#3", true); - } - } - - [Test] - public void TestNavy () - { - Pen pen = Pens.Navy; - AssertEquals ("P96#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P96#2", pen.Color, Color.Navy); - - try { - pen.Color = Color.Navy; - Fail ("P96#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P96#3", true); - } - } - - [Test] - public void TestOldLace () - { - Pen pen = Pens.OldLace; - AssertEquals ("P97#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P97#2", pen.Color, Color.OldLace); - - try { - pen.Color = Color.OldLace; - Fail ("P97#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P97#3", true); - } - } - - [Test] - public void TestOlive () - { - Pen pen = Pens.Olive; - AssertEquals ("P98#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P98#2", pen.Color, Color.Olive); - - try { - pen.Color = Color.Olive; - Fail ("P98#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P98#3", true); - } - } - - [Test] - public void TestOliveDrab () - { - Pen pen = Pens.OliveDrab; - AssertEquals ("P99#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P99#2", pen.Color, Color.OliveDrab); - - try { - pen.Color = Color.OliveDrab; - Fail ("P99#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P99#3", true); - } - } - - [Test] - public void TestOrange () - { - Pen pen = Pens.Orange; - AssertEquals ("P100#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P100#2", pen.Color, Color.Orange); - - try { - pen.Color = Color.Orange; - Fail ("P100#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P100#3", true); - } - } - - [Test] - public void TestOrangeRed () - { - Pen pen = Pens.OrangeRed; - AssertEquals ("P101#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P101#2", pen.Color, Color.OrangeRed); - - try { - pen.Color = Color.OrangeRed; - Fail ("P101#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P101#3", true); - } - } - - [Test] - public void TestOrchid () - { - Pen pen = Pens.Orchid; - AssertEquals ("P102#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P102#2", pen.Color, Color.Orchid); - - try { - pen.Color = Color.Orchid; - Fail ("P102#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P102#3", true); - } - } - - [Test] - public void TestPaleGoldenrod () - { - Pen pen = Pens.PaleGoldenrod; - AssertEquals ("P103#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P103#2", pen.Color, Color.PaleGoldenrod); - - try { - pen.Color = Color.PaleGoldenrod; - Fail ("P103#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P103#3", true); - } - } - - [Test] - public void TestPaleGreen () - { - Pen pen = Pens.PaleGreen; - AssertEquals ("P104#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P104#2", pen.Color, Color.PaleGreen); - - try { - pen.Color = Color.PaleGreen; - Fail ("P104#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P104#3", true); - } - } - - [Test] - public void TestPaleTurquoise () - { - Pen pen = Pens.PaleTurquoise; - AssertEquals ("P105#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P105#2", pen.Color, Color.PaleTurquoise); - - try { - pen.Color = Color.PaleTurquoise; - Fail ("P105#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P105#3", true); - } - } - - [Test] - public void TestPaleVioletRed () - { - Pen pen = Pens.PaleVioletRed; - AssertEquals ("P106#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P106#2", pen.Color, Color.PaleVioletRed); - - try { - pen.Color = Color.PaleVioletRed; - Fail ("P106#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P106#3", true); - } - } - - [Test] - public void TestPapayaWhip () - { - Pen pen = Pens.PapayaWhip; - AssertEquals ("P107#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P107#2", pen.Color, Color.PapayaWhip); - - try { - pen.Color = Color.PapayaWhip; - Fail ("P107#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P107#3", true); - } - } - - [Test] - public void TestPeachPuff () - { - Pen pen = Pens.PeachPuff; - AssertEquals ("P108#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P108#2", pen.Color, Color.PeachPuff); - - try { - pen.Color = Color.PeachPuff; - Fail ("P108#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P108#3", true); - } - } - - [Test] - public void TestPeru () - { - Pen pen = Pens.Peru; - AssertEquals ("P109#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P109#2", pen.Color, Color.Peru); - - try { - pen.Color = Color.Peru; - Fail ("P109#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P109#3", true); - } - } - - [Test] - public void TestPink () - { - Pen pen = Pens.Pink; - AssertEquals ("P110#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P110#2", pen.Color, Color.Pink); - - try { - pen.Color = Color.Pink; - Fail ("P110#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P110#3", true); - } - } - - [Test] - public void TestPlum () - { - Pen pen = Pens.Plum; - AssertEquals ("P111#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P111#2", pen.Color, Color.Plum); - - try { - pen.Color = Color.Plum; - Fail ("P111#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P111#3", true); - } - } - - [Test] - public void TestPowderBlue () - { - Pen pen = Pens.PowderBlue; - AssertEquals ("P112#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P112#2", pen.Color, Color.PowderBlue); - - try { - pen.Color = Color.PowderBlue; - Fail ("P112#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P112#3", true); - } - } - - [Test] - public void TestPurple () - { - Pen pen = Pens.Purple; - AssertEquals ("P113#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P113#2", pen.Color, Color.Purple); - - try { - pen.Color = Color.Purple; - Fail ("P113#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P113#3", true); - } - } - - [Test] - public void TestRed () - { - Pen pen = Pens.Red; - AssertEquals ("P114#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P114#2", pen.Color, Color.Red); - - try { - pen.Color = Color.Red; - Fail ("P114#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P114#3", true); - } - } - - [Test] - public void TestRosyBrown () - { - Pen pen = Pens.RosyBrown; - AssertEquals ("P115#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P115#2", pen.Color, Color.RosyBrown); - - try { - pen.Color = Color.RosyBrown; - Fail ("P115#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P115#3", true); - } - } - - [Test] - public void TestRoyalBlue () - { - Pen pen = Pens.RoyalBlue; - AssertEquals ("P116#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P116#2", pen.Color, Color.RoyalBlue); - - try { - pen.Color = Color.RoyalBlue; - Fail ("P116#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P116#3", true); - } - } - - [Test] - public void TestSaddleBrown () - { - Pen pen = Pens.SaddleBrown; - AssertEquals ("P117#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P117#2", pen.Color, Color.SaddleBrown); - - try { - pen.Color = Color.SaddleBrown; - Fail ("P117#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P117#3", true); - } - } - - [Test] - public void TestSalmon () - { - Pen pen = Pens.Salmon; - AssertEquals ("P118#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P118#2", pen.Color, Color.Salmon); - - try { - pen.Color = Color.Salmon; - Fail ("P118#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P118#3", true); - } - } - - [Test] - public void TestSandyBrown () - { - Pen pen = Pens.SandyBrown; - AssertEquals ("P119#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P119#2", pen.Color, Color.SandyBrown); - - try { - pen.Color = Color.SandyBrown; - Fail ("P119#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P119#3", true); - } - } - - [Test] - public void TestSeaGreen () - { - Pen pen = Pens.SeaGreen; - AssertEquals ("P120#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P120#2", pen.Color, Color.SeaGreen); - - try { - pen.Color = Color.SeaGreen; - Fail ("P120#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P120#3", true); - } - } - - [Test] - public void TestSeaShell () - { - Pen pen = Pens.SeaShell; - AssertEquals ("P121#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P121#2", pen.Color, Color.SeaShell); - - try { - pen.Color = Color.SeaShell; - Fail ("P121#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P121#3", true); - } - } - - [Test] - public void TestSienna () - { - Pen pen = Pens.Sienna; - AssertEquals ("P122#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P122#2", pen.Color, Color.Sienna); - - try { - pen.Color = Color.Sienna; - Fail ("P122#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P122#3", true); - } - } - - [Test] - public void TestSilver () - { - Pen pen = Pens.Silver; - AssertEquals ("P123#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P123#2", pen.Color, Color.Silver); - - try { - pen.Color = Color.Silver; - Fail ("P123#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P123#3", true); - } - } - - [Test] - public void TestSkyBlue () - { - Pen pen = Pens.SkyBlue; - AssertEquals ("P124#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P124#2", pen.Color, Color.SkyBlue); - - try { - pen.Color = Color.SkyBlue; - Fail ("P124#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P124#3", true); - } - } - - [Test] - public void TestSlateBlue () - { - Pen pen = Pens.SlateBlue; - AssertEquals ("P125#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P125#2", pen.Color, Color.SlateBlue); - - try { - pen.Color = Color.SlateBlue; - Fail ("P125#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P125#3", true); - } - } - - [Test] - public void TestSlateGray () - { - Pen pen = Pens.SlateGray; - AssertEquals ("P126#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P126#2", pen.Color, Color.SlateGray); - - try { - pen.Color = Color.SlateGray; - Fail ("P126#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P126#3", true); - } - } - - [Test] - public void TestSnow () - { - Pen pen = Pens.Snow; - AssertEquals ("P127#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P127#2", pen.Color, Color.Snow); - - try { - pen.Color = Color.Snow; - Fail ("P127#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P127#3", true); - } - } - - [Test] - public void TestSpringGreen () - { - Pen pen = Pens.SpringGreen; - AssertEquals ("P128#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P128#2", pen.Color, Color.SpringGreen); - - try { - pen.Color = Color.SpringGreen; - Fail ("P128#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P128#3", true); - } - } - - [Test] - public void TestSteelBlue () - { - Pen pen = Pens.SteelBlue; - AssertEquals ("P129#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P129#2", pen.Color, Color.SteelBlue); - - try { - pen.Color = Color.SteelBlue; - Fail ("P129#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P129#3", true); - } - } - - [Test] - public void TestTan () - { - Pen pen = Pens.Tan; - AssertEquals ("P130#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P130#2", pen.Color, Color.Tan); - - try { - pen.Color = Color.Tan; - Fail ("P130#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P130#3", true); - } - } - - [Test] - public void TestTeal () - { - Pen pen = Pens.Teal; - AssertEquals ("P131#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P131#2", pen.Color, Color.Teal); - - try { - pen.Color = Color.Teal; - Fail ("P131#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P131#3", true); - } - } - - [Test] - public void TestThistle () - { - Pen pen = Pens.Thistle; - AssertEquals ("P132#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P132#2", pen.Color, Color.Thistle); - - try { - pen.Color = Color.Thistle; - Fail ("P132#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P132#3", true); - } - } - - [Test] - public void TestTomato () - { - Pen pen = Pens.Tomato; - AssertEquals ("P133#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P133#2", pen.Color, Color.Tomato); - - try { - pen.Color = Color.Tomato; - Fail ("P133#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P133#3", true); - } - } - - [Test] - public void TestTransparent () - { - Pen pen = Pens.Transparent; - AssertEquals ("P134#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P134#2", pen.Color, Color.Transparent); - - try { - pen.Color = Color.Transparent; - Fail ("P134#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P134#3", true); - } - } - - [Test] - public void TestTurquoise () - { - Pen pen = Pens.Turquoise; - AssertEquals ("P135#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P135#2", pen.Color, Color.Turquoise); - - try { - pen.Color = Color.Turquoise; - Fail ("P135#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P135#3", true); - } - } - - [Test] - public void TestViolet () - { - Pen pen = Pens.Violet; - AssertEquals ("P136#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P136#2", pen.Color, Color.Violet); - - try { - pen.Color = Color.Violet; - Fail ("P136#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P136#3", true); - } - } - - [Test] - public void TestWheat () - { - Pen pen = Pens.Wheat; - AssertEquals ("P137#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P137#2", pen.Color, Color.Wheat); - - try { - pen.Color = Color.Wheat; - Fail ("P137#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P137#3", true); - } - } - - [Test] - public void TestWhite () - { - Pen pen = Pens.White; - AssertEquals ("P138#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P138#2", pen.Color, Color.White); - - try { - pen.Color = Color.White; - Fail ("P138#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P138#3", true); - } - } - - [Test] - public void TestWhiteSmoke () - { - Pen pen = Pens.WhiteSmoke; - AssertEquals ("P139#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P139#2", pen.Color, Color.WhiteSmoke); - - try { - pen.Color = Color.WhiteSmoke; - Fail ("P139#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P139#3", true); - } - } - - [Test] - public void TestYellow () - { - Pen pen = Pens.Yellow; - AssertEquals ("P140#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P140#2", pen.Color, Color.Yellow); - - try { - pen.Color = Color.Yellow; - Fail ("P140#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P140#3", true); - } - } - - [Test] - public void TestYellowGreen () - { - Pen pen = Pens.YellowGreen; - AssertEquals ("P141#1", pen.PenType, PenType.SolidColor); - AssertEquals ("P141#2", pen.Color, Color.YellowGreen); - - try { - pen.Color = Color.YellowGreen; - Fail ("P141#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P141#3", true); - } - } - } -} - -// Following code was used to generate the test methods above -// -//Type type = typeof (Pens); -//PropertyInfo [] properties = type.GetProperties (); -//int count = 1; -//foreach (PropertyInfo property in properties) { -// Console.WriteLine(); -// Console.WriteLine("\t\t[Test]"); -// Console.WriteLine("\t\tpublic void Test" + property.Name + " ()"); -// Console.WriteLine("\t\t{"); -// Console.WriteLine("\t\t\tPen pen = Pens." + property.Name + ";"); -// Console.WriteLine("\t\t\tAssertEquals (\"P" + count + "#1\", pen.PenType, PenType.SolidColor);"); -// Console.WriteLine("\t\t\tAssertEquals (\"P" + count + "#2\", pen.Color, Color." + property.Name + ");\n"); -// -// Console.WriteLine("\t\t\ttry {"); -// Console.WriteLine("\t\t\t\tpen.Color = Color." + property.Name + ";"); -// Console.WriteLine("\t\t\t\tFail (\"P" + count + "#3: must throw ArgumentException\");"); -// Console.WriteLine("\t\t\t} catch (ArgumentException) {"); -// Console.WriteLine("\t\t\t\tAssert (\"P" + count + "#3\", true);"); -// Console.WriteLine("\t\t\t}"); -// Console.WriteLine("\t\t}"); -// count++; -//} diff --git a/mcs/class/System.Drawing/Test/System.Drawing/TestPoint.cs b/mcs/class/System.Drawing/Test/System.Drawing/TestPoint.cs deleted file mode 100644 index d60bac2929a..00000000000 --- a/mcs/class/System.Drawing/Test/System.Drawing/TestPoint.cs +++ /dev/null @@ -1,201 +0,0 @@ -// Tests for System.Drawing.Point.cs -// -// Author: Mike Kestner (mkestner@speakeasy.net) -// Improvements by Jordi Mas i Hernàndez -// Copyright (c) 2001 Ximian, Inc. - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using NUnit.Framework; -using System; -using System.Drawing; -using System.Security.Permissions; - -namespace MonoTests.System.Drawing{ - - [TestFixture] - [SecurityPermission (SecurityAction.Deny, UnmanagedCode = true)] - public class PointTest : Assertion { - Point pt1_1; - Point pt1_0; - Point pt0_1; - - [TearDown] - public void Clean() {} - - [SetUp] - public void GetReady() - { - pt1_1 = new Point (1, 1); - pt1_0 = new Point (1, 0); - pt0_1 = new Point (0, 1); - } - - - [Test] - public void EqualsTest () - { - AssertEquals (pt1_1, pt1_1); - AssertEquals (pt1_1, new Point (1, 1)); - Assert (!pt1_1.Equals (pt1_0)); - Assert (!pt1_1.Equals (pt0_1)); - Assert (!pt1_0.Equals (pt0_1)); - } - - [Test] - public void EqualityOpTest () - { - Assert (pt1_1 == pt1_1); - Assert (pt1_1 == new Point (1, 1)); - Assert (!(pt1_1 == pt1_0)); - Assert (!(pt1_1 == pt0_1)); - Assert (!(pt1_0 == pt0_1)); - } - - [Test] - public void InequalityOpTest () - { - Assert (!(pt1_1 != pt1_1)); - Assert (!(pt1_1 != new Point (1, 1))); - Assert (pt1_1 != pt1_0); - Assert (pt1_1 != pt0_1); - Assert (pt1_0 != pt0_1); - } - - [Test] - public void CeilingTest () - { - PointF ptf = new PointF (0.8f, 0.3f); - AssertEquals (pt1_1, Point.Ceiling (ptf)); - } - - [Test] - public void RoundTest () - { - PointF ptf = new PointF (0.8f, 1.3f); - AssertEquals (pt1_1, Point.Round (ptf)); - } - - [Test] - public void TruncateTest () - { - PointF ptf = new PointF (0.8f, 1.3f); - AssertEquals (pt0_1, Point.Truncate (ptf)); - } - - [Test] - public void NullTest () - { - Point pt = new Point (0, 0); - AssertEquals (pt, Point.Empty); - } - - [Test] - public void AdditionTest () - { - AssertEquals (pt1_1, pt1_0 + new Size (0, 1)); - AssertEquals (pt1_1, pt0_1 + new Size (1, 0)); - } - - [Test] - public void SubtractionTest () - { - AssertEquals (pt1_0, pt1_1 - new Size (0, 1)); - AssertEquals (pt0_1, pt1_1 - new Size (1, 0)); - } - - [Test] - public void Point2SizeTest () - { - Size sz1 = new Size (1, 1); - Size sz2 = (Size) pt1_1; - - AssertEquals (sz1, sz2); - } - - [Test] - public void Point2PointFTest () - { - PointF ptf1 = new PointF (1, 1); - PointF ptf2 = pt1_1; - - AssertEquals (ptf1, ptf2); - } - - [Test] - public void ConstructorTest () - { - int i = (1 << 16) + 1; - Size sz = new Size (1, 1); - Point pt_i = new Point (i); - Point pt_sz = new Point (sz); - - AssertEquals (pt_i, pt_sz); - AssertEquals (pt_i, pt1_1); - AssertEquals (pt_sz, pt1_1); - } - - [Test] - public void PropertyTest () - { - Point pt = new Point (0, 0); - - Assert (pt.IsEmpty); - Assert (!pt1_1.IsEmpty); - AssertEquals (1, pt1_0.X); - AssertEquals (1, pt0_1.Y); - } - - [Test] - public void OffsetTest () - { - Point pt = new Point (0, 0); - pt.Offset (0, 1); - AssertEquals (pt, pt0_1); - pt.Offset (1, 0); - AssertEquals (pt, pt1_1); - pt.Offset (0, -1); - AssertEquals (pt, pt1_0); - } - - [Test] - public void GetHashCodeTest () - { - AssertEquals (0, pt1_1.GetHashCode ()); - AssertEquals (1, pt1_0.GetHashCode ()); - AssertEquals (1, pt0_1.GetHashCode ()); - Point pt = new Point(0xFF, 0xFF00); - AssertEquals (0xFFFF, pt.GetHashCode ()); - } - - [Test] - public void ToStringTest () - { - AssertEquals ("{X=1,Y=1}", pt1_1.ToString ()); - AssertEquals ("{X=1,Y=0}", pt1_0.ToString ()); - AssertEquals ("{X=0,Y=1}", pt0_1.ToString ()); - } - } -} - diff --git a/mcs/class/System.Drawing/Test/System.Drawing/TestPointConverter.cs b/mcs/class/System.Drawing/Test/System.Drawing/TestPointConverter.cs deleted file mode 100644 index af3d2e32966..00000000000 --- a/mcs/class/System.Drawing/Test/System.Drawing/TestPointConverter.cs +++ /dev/null @@ -1,455 +0,0 @@ -// -// Tests for System.Drawing.PointConverter.cs -// -// Author: -// Ravindra (rkumar@novell.com) -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; -using System.Collections; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Drawing; -using System.Globalization; -using System.Security.Permissions; -using System.Threading; - -using NUnit.Framework; - -namespace MonoTests.System.Drawing -{ - [TestFixture] - [SecurityPermission (SecurityAction.Deny, UnmanagedCode = true)] - public class PointConverterTest - { - Point pt; - Point ptneg; - PointConverter ptconv; - String ptStr; - String ptnegStr; - - [SetUp] - public void SetUp () - { - pt = new Point (1, 2); - ptStr = pt.X + CultureInfo.InvariantCulture.TextInfo.ListSeparator + " " + pt.Y; - - ptneg = new Point (-2, -3); - ptnegStr = ptneg.X + CultureInfo.InvariantCulture.TextInfo.ListSeparator + " " + ptneg.Y; - - ptconv = (PointConverter) TypeDescriptor.GetConverter (pt); - } - - [Test] - public void TestCanConvertFrom () - { - Assert.IsTrue (ptconv.CanConvertFrom (typeof (String)), "CCF#1"); - Assert.IsTrue (ptconv.CanConvertFrom (null, typeof (String)), "CCF#2"); - Assert.IsFalse (ptconv.CanConvertFrom (null, typeof (Rectangle)), "CCF#3"); - Assert.IsFalse (ptconv.CanConvertFrom (null, typeof (RectangleF)), "CCF#4"); - Assert.IsFalse (ptconv.CanConvertFrom (null, typeof (Point)), "CCF#5"); - Assert.IsFalse (ptconv.CanConvertFrom (null, typeof (PointF)), "CCF#6"); - Assert.IsFalse (ptconv.CanConvertFrom (null, typeof (Size)), "CCF#7"); - Assert.IsFalse (ptconv.CanConvertFrom (null, typeof (SizeF)), "CCF#8"); - Assert.IsFalse (ptconv.CanConvertFrom (null, typeof (Object)), "CCF#9"); - Assert.IsFalse (ptconv.CanConvertFrom (null, typeof (int)), "CCF#10"); - Assert.IsTrue (ptconv.CanConvertFrom (null, typeof (InstanceDescriptor)), "CCF#11"); - } - - [Test] - public void TestCanConvertTo () - { - Assert.IsTrue (ptconv.CanConvertTo (typeof (String)), "CCT#1"); - Assert.IsTrue (ptconv.CanConvertTo (null, typeof (String)), "CCT#2"); - Assert.IsFalse (ptconv.CanConvertTo (null, typeof (Rectangle)), "CCT#3"); - Assert.IsFalse (ptconv.CanConvertTo (null, typeof (RectangleF)), "CCT#4"); - Assert.IsFalse (ptconv.CanConvertTo (null, typeof (Point)), "CCT#5"); - Assert.IsFalse (ptconv.CanConvertTo (null, typeof (PointF)), "CCT#6"); - Assert.IsFalse (ptconv.CanConvertTo (null, typeof (Size)), "CCT#7"); - Assert.IsFalse (ptconv.CanConvertTo (null, typeof (SizeF)), "CCT#8"); - Assert.IsFalse (ptconv.CanConvertTo (null, typeof (Object)), "CCT#9"); - Assert.IsFalse (ptconv.CanConvertTo (null, typeof (int)), "CCT#10"); - } - - [Test] - public void TestConvertFrom () - { - Assert.AreEqual (pt, (Point) ptconv.ConvertFrom (null, CultureInfo.InvariantCulture, - "1, 2"), "CF#1"); - Assert.AreEqual (ptneg, (Point) ptconv.ConvertFrom (null, CultureInfo.InvariantCulture, - "-2, -3"), "CF#2"); - - try { - ptconv.ConvertFrom (null, CultureInfo.InvariantCulture, "1"); - Assert.Fail ("CF#3: must throw ArgumentException"); - } catch (Exception e) { - Assert.IsTrue (e is ArgumentException, "CF#3"); - } - - try { - ptconv.ConvertFrom ("1"); - Assert.Fail ("CF#3a: must throw ArgumentException"); - } catch (Exception e) { - Assert.IsTrue (e is ArgumentException, "CF#3a"); - } - - try { - ptconv.ConvertFrom (null, CultureInfo.InvariantCulture, "1, 1, 1"); - Assert.Fail ("CF#4: must throw ArgumentException"); - } catch (Exception e) { - Assert.IsTrue (e is ArgumentException, "CF#4"); - } - - try { - ptconv.ConvertFrom (null, CultureInfo.InvariantCulture, "*1, 1"); - Assert.Fail ("CF#5-1"); - } catch (Exception ex) { - Assert.AreEqual (typeof (Exception), ex.GetType (), "CF#5-2"); - Assert.IsNotNull (ex.InnerException, "CF#5-3"); - Assert.AreEqual (typeof (FormatException), ex.InnerException.GetType (), "CF#5-4"); - } - - try { - ptconv.ConvertFrom (null, CultureInfo.InvariantCulture, - new Point (1, 1)); - Assert.Fail ("CF#6: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CF#6"); - } - - try { - ptconv.ConvertFrom (null, CultureInfo.InvariantCulture, - new PointF (1, 1)); - Assert.Fail ("CF#7: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CF#7"); - } - - try { - ptconv.ConvertFrom (null, CultureInfo.InvariantCulture, - new Size (1, 1)); - Assert.Fail ("CF#8: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CF#8"); - } - - try { - ptconv.ConvertFrom (null, CultureInfo.InvariantCulture, - new SizeF (1, 1)); - Assert.Fail ("CF#9: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CF#9"); - } - - try { - ptconv.ConvertFrom (null, CultureInfo.InvariantCulture, 0x10); - Assert.Fail ("CF#10: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CF#10"); - } - } - - [Test] - public void TestConvertTo () - { - Assert.AreEqual (ptStr, (String) ptconv.ConvertTo (null, CultureInfo.InvariantCulture, - pt, typeof (String)), "CT#1"); - Assert.AreEqual (ptnegStr, (String) ptconv.ConvertTo (null, CultureInfo.InvariantCulture, - ptneg, typeof (String)), "CT#2"); - - try { - ptconv.ConvertTo (null, CultureInfo.InvariantCulture, pt, - typeof (Size)); - Assert.Fail ("CT#3: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CT#3"); - } - - try { - ptconv.ConvertTo (null, CultureInfo.InvariantCulture, pt, - typeof (SizeF)); - Assert.Fail ("CT#4: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CT#4"); - } - - try { - ptconv.ConvertTo (null, CultureInfo.InvariantCulture, pt, - typeof (Point)); - Assert.Fail ("CT#5: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CT#5"); - } - - try { - ptconv.ConvertTo (null, CultureInfo.InvariantCulture, pt, - typeof (PointF)); - Assert.Fail ("CT#6: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CT#6"); - } - - try { - ptconv.ConvertTo (null, CultureInfo.InvariantCulture, pt, - typeof (int)); - Assert.Fail ("CT#7: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CT#7"); - } - } - - [Test] - public void TestGetCreateInstanceSupported () - { - Assert.IsTrue (ptconv.GetCreateInstanceSupported (), "GCIS#1"); - Assert.IsTrue (ptconv.GetCreateInstanceSupported (null), "GCIS#2"); - } - - [Test] - public void TestCreateInstance () - { - Point ptInstance; - - Hashtable ht = new Hashtable (); - ht.Add ("X", 1); ht.Add ("Y", 2); - - ptInstance = (Point) ptconv.CreateInstance (ht); - Assert.AreEqual (pt, ptInstance, "CI#1"); - - ht.Clear (); - ht.Add ("X", -2); ht.Add ("Y", -3); - - ptInstance = (Point) ptconv.CreateInstance (null, ht); - Assert.AreEqual (ptneg, ptInstance, "CI#2"); - - // Property names are case-sensitive. It should throw - // NullRefExc if any of the property names does not match - ht.Clear (); - ht.Add ("x", 2); ht.Add ("Y", 3); - try { - ptInstance = (Point) ptconv.CreateInstance (null, ht); - Assert.Fail ("CI#3: must throw NullReferenceException"); - } catch (Exception e) { - Assert.IsTrue (e is NullReferenceException, "CI#3"); - } - } - - [Test] - public void TestGetPropertiesSupported () - { - Assert.IsTrue (ptconv.GetPropertiesSupported (), "GPS#1"); - Assert.IsTrue (ptconv.GetPropertiesSupported (null), "GPS#2"); - } - - [Test] - public void TestGetProperties () - { - Attribute [] attrs; - PropertyDescriptorCollection propsColl; - - propsColl = ptconv.GetProperties (pt); - Assert.AreEqual (2, propsColl.Count, "GP1#1"); - Assert.AreEqual (pt.X, propsColl["X"].GetValue (pt), "GP1#2"); - Assert.AreEqual (pt.Y, propsColl["Y"].GetValue (pt), "GP1#3"); - - propsColl = ptconv.GetProperties (null, ptneg); - Assert.AreEqual (2, propsColl.Count, "GP2#1"); - Assert.AreEqual (ptneg.X, propsColl["X"].GetValue (ptneg), "GP2#2"); - Assert.AreEqual (ptneg.Y, propsColl["Y"].GetValue (ptneg), "GP2#3"); - - propsColl = ptconv.GetProperties (null, pt, null); - Assert.AreEqual (3, propsColl.Count, "GP3#1"); - Assert.AreEqual (pt.X, propsColl["X"].GetValue (pt), "GP3#2"); - Assert.AreEqual (pt.Y, propsColl["Y"].GetValue (pt), "GP3#3"); - Assert.AreEqual (pt.IsEmpty, propsColl["IsEmpty"].GetValue (pt), "GP3#4"); - - Type type = typeof (Point); - attrs = Attribute.GetCustomAttributes (type, true); - propsColl = ptconv.GetProperties (null, pt, attrs); - Assert.AreEqual (0, propsColl.Count, "GP3#5"); - } - - [Test] - public void ConvertFromInvariantString_string () - { - Assert.AreEqual (pt, ptconv.ConvertFromInvariantString ("1, 2"), "CFISS#1"); - Assert.AreEqual (ptneg, ptconv.ConvertFromInvariantString ("-2, -3"), "CFISS#2"); - } - - [Test] - [ExpectedException (typeof (ArgumentException))] - public void ConvertFromInvariantString_string_exc_1 () - { - ptconv.ConvertFromInvariantString ("1"); - } - - [Test] - public void ConvertFromInvariantString_string_exc_2 () - { - try { - ptconv.ConvertFromInvariantString ("hello"); - Assert.Fail ("#1"); - } catch (Exception ex) { - Assert.AreEqual (typeof (Exception), ex.GetType (), "#2"); - Assert.IsNotNull (ex.InnerException, "#3"); - Assert.AreEqual (typeof (FormatException), ex.InnerException.GetType (), "#3"); - } - } - - [Test] - public void ConvertFromString_string () - { - // save current culture - CultureInfo currentCulture = Thread.CurrentThread.CurrentCulture; - - try { - PerformConvertFromStringTest (new CultureInfo ("en-US")); - PerformConvertFromStringTest (new CultureInfo ("nl-BE")); - PerformConvertFromStringTest (new MyCultureInfo ()); - } finally { - // restore original culture - Thread.CurrentThread.CurrentCulture = currentCulture; - } - } - - [Test] - [ExpectedException (typeof (ArgumentException))] - public void ConvertFromString_string_exc_1 () - { - ptconv.ConvertFromString ("1"); - } - - [Test] - public void ConvertFromString_string_exc_2 () - { - try { - ptconv.ConvertFromString ("hello"); - Assert.Fail ("#1"); - } catch (Exception ex) { - Assert.AreEqual (typeof (Exception), ex.GetType (), "#2"); - Assert.IsNotNull (ex.InnerException, "#3"); - Assert.AreEqual (typeof (FormatException), ex.InnerException.GetType (), "#3"); - } - } - - [Test] - public void ConvertToInvariantString_string () - { - Assert.AreEqual ("1" + CultureInfo.InvariantCulture.TextInfo.ListSeparator + " 2", - ptconv.ConvertToInvariantString (pt), "CFISS#1"); - Assert.AreEqual ("-2" + CultureInfo.InvariantCulture.TextInfo.ListSeparator + " -3", - ptconv.ConvertToInvariantString (ptneg), "CFISS#2"); - } - - [Test] - public void ConvertToString_string () - { - // save current culture - CultureInfo currentCulture = Thread.CurrentThread.CurrentCulture; - - try { - PerformConvertToStringTest (new CultureInfo ("en-US")); - PerformConvertToStringTest (new CultureInfo ("nl-BE")); - PerformConvertToStringTest (new MyCultureInfo ()); - } finally { - // restore original culture - Thread.CurrentThread.CurrentCulture = currentCulture; - } - } - - [Test] - public void GetStandardValuesSupported () - { - Assert.IsFalse (ptconv.GetStandardValuesSupported ()); - } - - [Test] - public void GetStandardValues () - { - Assert.IsNull (ptconv.GetStandardValues ()); - } - - [Test] - public void GetStandardValuesExclusive () - { - Assert.IsFalse (ptconv.GetStandardValuesExclusive ()); - } - - private void PerformConvertFromStringTest (CultureInfo culture) - { - // set current culture - Thread.CurrentThread.CurrentCulture = culture; - - // perform tests - Assert.AreEqual (pt, ptconv.ConvertFromString (CreatePointString (culture, pt)), - "CFSS#1-" + culture.Name); - Assert.AreEqual (ptneg, ptconv.ConvertFromString (CreatePointString (culture, ptneg)), - "CFSS#2-" + culture.Name); - } - - private void PerformConvertToStringTest (CultureInfo culture) - { - // set current culture - Thread.CurrentThread.CurrentCulture = culture; - - // perform tests - Assert.AreEqual (CreatePointString (culture, pt), ptconv.ConvertToString (pt), - "CFISS#1-" + culture.Name); - Assert.AreEqual (CreatePointString (culture, ptneg), ptconv.ConvertToString (ptneg), - "CFISS#2-" + culture.Name); - } - - private static string CreatePointString (Point point) - { - return CreatePointString (CultureInfo.CurrentCulture, point); - } - - private static string CreatePointString (CultureInfo culture, Point point) - { - return string.Format ("{0}{1} {2}", point.X.ToString (culture), - culture.TextInfo.ListSeparator, point.Y.ToString (culture)); - } - - [Serializable] - private sealed class MyCultureInfo : CultureInfo - { - internal MyCultureInfo () : base ("en-US") - { - } - - public override object GetFormat (Type formatType) - { - if (formatType == typeof (NumberFormatInfo)) { - NumberFormatInfo nfi = (NumberFormatInfo) ((NumberFormatInfo) base.GetFormat (formatType)).Clone (); - - nfi.NegativeSign = "myNegativeSign"; - return NumberFormatInfo.ReadOnly (nfi); - } else { - return base.GetFormat (formatType); - } - } - } - } -} diff --git a/mcs/class/System.Drawing/Test/System.Drawing/TestPointF.cs b/mcs/class/System.Drawing/Test/System.Drawing/TestPointF.cs deleted file mode 100644 index af9f9c758ab..00000000000 --- a/mcs/class/System.Drawing/Test/System.Drawing/TestPointF.cs +++ /dev/null @@ -1,182 +0,0 @@ -// Tests for System.Drawing.PointF.cs -// -// Author: -// Ravindra (rkumar@novell.com) -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; -using System.Drawing; -using System.Globalization; -using System.Security.Permissions; -using System.Threading; - -using NUnit.Framework; - -namespace MonoTests.System.Drawing -{ - [TestFixture] - [SecurityPermission (SecurityAction.Deny, UnmanagedCode = true)] - public class PointFTest - { - PointF pt11_99; - PointF pt11_0; - PointF pt0_11; - - [TearDown] - public void TearDown () {} - - [SetUp] - public void SetUp () - { - pt11_99 = new PointF (1.1F, 9.9F); - pt11_0 = new PointF (1.1F, 0F); - pt0_11 = new PointF (0F, 1.1F); - } - - [Test] - public void TestConstructors () - { - PointF pt = new PointF (1.5F, 5.8F); - Assert.AreEqual (1.5F, pt.X, "C#1"); - Assert.AreEqual (5.8F, pt.Y, "C#2"); - } - - [Test] - public void TestEmptyField () - { - PointF pt = new PointF (0.0F, 0.0F); - Assert.AreEqual (pt, PointF.Empty, "#EMP1"); - } - - [Test] - public void TestProperties () - { - PointF pt = new PointF (0.0F, 0.0F); - - Assert.IsTrue (pt.IsEmpty, "P#1"); - Assert.IsTrue (!pt11_99.IsEmpty, "P#2"); - Assert.AreEqual (1.1F, pt11_0.X, "P#3"); - Assert.AreEqual (1.1F, pt0_11.Y, "P#4"); - } - - [Test] - public void TestEquals () - { - Assert.AreEqual (pt11_99, pt11_99, "EQ#1"); - Assert.AreEqual (pt11_99, new PointF (1.1F, 9.9F), "EQ#2"); - Assert.IsFalse (pt11_99.Equals (pt11_0), "EQ#3"); - Assert.IsFalse (pt11_99.Equals (pt0_11), "EQ#4"); - Assert.IsFalse (pt11_0.Equals (pt0_11), "EQ#5"); - } - - - [Test] - public void TestAddition () - { - Assert.AreEqual (pt11_0, pt11_0 + new Size (0, 0), "ADD#1"); - Assert.AreEqual (pt0_11, pt0_11 + new Size (0, 0), "ADD#2"); - Assert.AreEqual (new PointF (2, 5.1F), pt0_11 + new Size (2, 4), "ADD#3"); - } - - [Test] - public void TestEqualityOp () - { - Assert.IsTrue (pt11_99 == pt11_99, "EOP#1"); - Assert.IsTrue (pt11_99 == new PointF (1.1F, 9.9F), "EOP#2"); - Assert.IsFalse (pt11_99 == pt11_0, "EOP#3"); - Assert.IsFalse (pt11_99 == pt0_11, "EOP#4"); - Assert.IsFalse (pt11_0 == pt0_11, "EOP#5"); - } - - [Test] - public void TestInequalityOp () - { - Assert.IsFalse (pt11_99 != pt11_99, "IOP#1"); - Assert.IsFalse (pt11_99 != new PointF (1.1F, 9.9F), "IOP#2"); - Assert.IsTrue (pt11_99 != pt11_0, "IOP#3"); - Assert.IsTrue (pt11_99 != pt0_11, "IOP#4"); - Assert.IsTrue (pt11_0 != pt0_11, "IOP#5"); - } - - [Test] - public void TestSubtraction () - { - Assert.AreEqual (pt11_0, pt11_0 - new Size (0, 0), "SUB#1"); - Assert.AreEqual (pt0_11, pt0_11 - new Size (0, 0), "SUB#2"); - PointF expected = new PointF (0.1F, 1.9F); - PointF actual = pt11_99 - new Size (1, 8); - //need to permit a small delta on floating point - Assert.AreEqual (expected.X, actual.X, 1e-5, "SUB#3"); - Assert.AreEqual (expected.Y, actual.Y, 1e-5, "SUB#4"); - } - - [Test] - public void GetHashCodeTest () - { - PointF pt = new PointF (1.1F, 9.9F); - Assert.AreEqual (pt.GetHashCode (), pt11_99.GetHashCode (), "GHC#1"); - } - - [Test] - public void ToStringTest () - { - // save current culture - CultureInfo currentCulture = Thread.CurrentThread.CurrentCulture; - - try { - PerformToStringTest (new CultureInfo ("en-US")); - PerformToStringTest (new CultureInfo ("nl-BE")); - } finally { - // restore original culture - Thread.CurrentThread.CurrentCulture = currentCulture; - } - } - - private void PerformToStringTest(CultureInfo culture) - { - // set current culture - Thread.CurrentThread.CurrentCulture = culture; - - // perform tests - Assert.AreEqual (GetExpectedToString (culture, pt0_11), pt0_11.ToString (), - "TS#1-" + culture.Name); - Assert.AreEqual (GetExpectedToString (culture, pt11_0), pt11_0.ToString (), - "TS#2-" + culture.Name); - Assert.AreEqual (GetExpectedToString (culture, pt11_99), pt11_99.ToString (), - "TS#3-" + culture.Name); - PointF pt = new PointF (float.NaN, float.NegativeInfinity); - Assert.AreEqual (GetExpectedToString (culture, pt), pt.ToString (), - "TS#4-" + culture.Name); - } - - private static string GetExpectedToString (CultureInfo culture, PointF point) - { - return string.Format ("{{X={0}, Y={1}}}", point.X.ToString (culture), - point.Y.ToString (culture)); - } - } -} - diff --git a/mcs/class/System.Drawing/Test/System.Drawing/TestRectangle.cs b/mcs/class/System.Drawing/Test/System.Drawing/TestRectangle.cs deleted file mode 100644 index 73f62a3c51c..00000000000 --- a/mcs/class/System.Drawing/Test/System.Drawing/TestRectangle.cs +++ /dev/null @@ -1,212 +0,0 @@ -// Tests for System.Drawing.Rectangle.cs - -// Copyright (C) 2005 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// Author: Jordi Mas i Hernandez -// - -using NUnit.Framework; -using System; -using System.Drawing; -using System.Security.Permissions; - -namespace MonoTests.System.Drawing -{ - - [TestFixture] - [SecurityPermission (SecurityAction.Deny, UnmanagedCode = true)] - public class TestRectangle : Assertion - { - Rectangle rect_0; - Rectangle rect_1; - Rectangle rect_2; - Rectangle rect_3; - Rectangle rect_4; - Rectangle rect_5; - - [TearDown] - public void Clean () {} - - [SetUp] - public void GetReady () - { - rect_0 = new Rectangle (10, 10, 40, 40); - rect_1 = new Rectangle (5, 5, 5, 5); - rect_2 = Rectangle.Empty; - rect_3 = new Rectangle (new Point (25, 25), new Size (0, 0)); - rect_4 = new Rectangle (new Point (25, 252), new Size (10, 20)); - rect_5 = new Rectangle (40, 40, 50, 50); - } - - [Test] - public void Contains () - { - AssertEquals (false, rect_0.Contains (5, 5)); - AssertEquals (true, rect_0.Contains (12, 12)); - AssertEquals (true, rect_0.Contains (new Point (10, 10))); - AssertEquals (false, rect_0.Contains (new Point (10, 50))); - AssertEquals (false, rect_0.Contains (50, 10)); - AssertEquals (true, rect_0.Contains (new Rectangle (20, 20, 15, 15))); - AssertEquals (false, rect_0.Contains (new Rectangle (5, 5, 20, 20))); - AssertEquals (true, rect_2.Contains (rect_2)); - } - - [Test] - public void Empty () - { - AssertEquals (rect_2.X, 0); - AssertEquals (rect_2.Y, 0); - AssertEquals (rect_2.Width, 0); - AssertEquals (rect_2.Height, 0); - } - - [Test] - public void IsEmpty () - { - AssertEquals (rect_0.IsEmpty, false); - AssertEquals (rect_2.IsEmpty, true); - AssertEquals (rect_3.IsEmpty, false); - } - - [Test] - public void GetContents () - { - AssertEquals (rect_4.Right, rect_4.X + rect_4.Width); - AssertEquals (rect_4.Left, rect_4.X); - AssertEquals (rect_4.Bottom, rect_4.Y + rect_4.Height); - AssertEquals (rect_4.Top, rect_4.Y); - } - - [Test] - public void IntersectsWith () - { - AssertEquals (rect_0.IntersectsWith (rect_1), false); - AssertEquals (rect_0.IntersectsWith (rect_2), false); - AssertEquals (rect_0.IntersectsWith (rect_5), true); - AssertEquals (rect_5.IntersectsWith (rect_0), true); - AssertEquals (rect_0.IntersectsWith (rect_4), false); - } - - [Test] - public void Location () - { - AssertEquals (new Point (25, 252), rect_4.Location); - Point p = new Point (11, 121); - rect_4.Location = p; - AssertEquals (p, rect_4.Location); - AssertEquals (rect_4.X, 11); - AssertEquals (rect_4.Y, 121); - rect_4.X = 10; - rect_4.Y = 15; - AssertEquals (new Point (10, 15), rect_4.Location); - } - - [Test] - public void Size () - { - AssertEquals (rect_4.Width, 10); - AssertEquals (rect_4.Height, 20); - rect_4.Width = 40; - rect_4.Height = 100; - AssertEquals (rect_4.Size, new Size (40, 100)); - rect_4.Size = new Size (1, 2); - AssertEquals (rect_4.Width, 1); - AssertEquals (rect_4.Height, 2); - } - - [Test] - public void ConvertFromRectangleF () - { - AssertEquals (rect_0, Rectangle.Ceiling ( - new RectangleF (9.9F, 9.1F, 39.04F, 39.999F))); - AssertEquals (rect_0, Rectangle.Round ( - new RectangleF (9.5F, 10.499F, 40.01F, 39.6F))); - AssertEquals (rect_0, Rectangle.Truncate ( - new RectangleF (10.999F, 10.01F, 40.3F, 40.0F))); - } - - [Test] - public void GetHashCodeTest () - { - Assert ("GHC#1", rect_0.GetHashCode () != rect_1.GetHashCode ()); - } - - [Test] - public void Inflate () - { - rect_0.Inflate (new Size (8, 5)); - AssertEquals ("INF#1", new Rectangle (2, 5, 56, 50), rect_0); - rect_1.Inflate (4, 4); - AssertEquals ("INF#2", new Rectangle (1, 1, 13, 13), rect_1); - AssertEquals ("INF#3", new Rectangle (30, 20, 70, 90), - Rectangle.Inflate (rect_5, 10, 20)); - AssertEquals ("INF#4", new Rectangle (40, 40, 50, 50), rect_5); - } - - [Test] - public void Intersect () - { - AssertEquals ("INT#1", new Rectangle (40, 40, 10, 10), - Rectangle.Intersect (rect_0, rect_5)); - AssertEquals ("INT#2", new Rectangle (10, 10, 40, 40), rect_0); - rect_0.Intersect (rect_5); - AssertEquals ("INT#3", new Rectangle (40, 40, 10, 10), rect_0); - AssertEquals ("INT#4", Rectangle.Empty, Rectangle.Intersect (rect_1, rect_5)); - - // Two rectangles touching each other - AssertEquals ("INT#5", new Rectangle (3, 0, 0, 7), Rectangle.Intersect (new Rectangle (0, 0, 3, 7), new Rectangle (3, 0, 8, 14))); - } - - [Test] - public void Offset () - { - rect_0.Offset (5, 5); - AssertEquals ("OFS#1", new Rectangle (15, 15, 40, 40), rect_0); - rect_1.Offset (new Point (7, 0)); - AssertEquals ("OFS#2", new Rectangle (12, 5, 5, 5), rect_1); - } - - [Test] - public void ToStringTest () - { - AssertEquals ("{X=10,Y=10,Width=40,Height=40}", rect_0.ToString ()); - AssertEquals ("{X=5,Y=5,Width=5,Height=5}", rect_1.ToString ()); - AssertEquals ("{X=0,Y=0,Width=0,Height=0}", rect_2.ToString ()); - AssertEquals ("{X=25,Y=25,Width=0,Height=0}", rect_3.ToString ()); - } - - [Test] - public void FromTRLB () - { - AssertEquals (rect_0, Rectangle.FromLTRB (10, 10, 50, 50)); - AssertEquals (rect_1, Rectangle.FromLTRB (5, 5, 10, 10)); - AssertEquals (rect_2, Rectangle.FromLTRB (0, 0, 0, 0)); - } - - [Test] - public void Union () - { - AssertEquals (Rectangle.FromLTRB (5, 5, 50, 50), Rectangle.Union (rect_0, rect_1)); - } - } -} - diff --git a/mcs/class/System.Drawing/Test/System.Drawing/TestRectangleConverter.cs b/mcs/class/System.Drawing/Test/System.Drawing/TestRectangleConverter.cs deleted file mode 100644 index dbc36ddd779..00000000000 --- a/mcs/class/System.Drawing/Test/System.Drawing/TestRectangleConverter.cs +++ /dev/null @@ -1,533 +0,0 @@ -// -// Tests for System.Drawing.RectangleConverter.cs -// -// Author: -// Ravindra (rkumar@novell.com) -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; -using System.Collections; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Drawing; -using System.Globalization; -using System.Security.Permissions; -using System.Threading; - -using NUnit.Framework; - -namespace MonoTests.System.Drawing -{ - [TestFixture] - [SecurityPermission (SecurityAction.Deny, UnmanagedCode = true)] - public class RectangleConverterTest - { - Rectangle rect; - Rectangle rectneg; - RectangleConverter rconv; - String rectStrInvariant; - String rectnegStrInvariant; - - [SetUp] - public void SetUp () - { - rect = new Rectangle (10, 10, 20, 30); - rectStrInvariant = rect.X + CultureInfo.InvariantCulture.TextInfo.ListSeparator + " " + - rect.Y + CultureInfo.InvariantCulture.TextInfo.ListSeparator + " " + - rect.Width + CultureInfo.InvariantCulture.TextInfo.ListSeparator + " " + - rect.Height; - - rectneg = new Rectangle (-10, -10, 20, 30); - rectnegStrInvariant = rectneg.X + CultureInfo.InvariantCulture.TextInfo.ListSeparator + " " - + rectneg.Y + CultureInfo.InvariantCulture.TextInfo.ListSeparator + " " + - rectneg.Width + CultureInfo.InvariantCulture.TextInfo.ListSeparator + " " + rectneg.Height; - - rconv = (RectangleConverter) TypeDescriptor.GetConverter (rect); - } - - [Test] - public void TestCanConvertFrom () - { - Assert.IsTrue (rconv.CanConvertFrom (typeof (String)), "CCF#1"); - Assert.IsTrue (rconv.CanConvertFrom (null, typeof (String)), "CCF#2"); - Assert.IsFalse (rconv.CanConvertFrom (null, typeof (Rectangle)), "CCF#3"); - Assert.IsFalse (rconv.CanConvertFrom (null, typeof (RectangleF)), "CCF#4"); - Assert.IsFalse (rconv.CanConvertFrom (null, typeof (Point)), "CCF#5"); - Assert.IsFalse (rconv.CanConvertFrom (null, typeof (PointF)), "CCF#6"); - Assert.IsFalse (rconv.CanConvertFrom (null, typeof (Size)), "CCF#7"); - Assert.IsFalse (rconv.CanConvertFrom (null, typeof (SizeF)), "CCF#8"); - Assert.IsFalse (rconv.CanConvertFrom (null, typeof (Object)), "CCF#9"); - Assert.IsFalse (rconv.CanConvertFrom (null, typeof (int)), "CCF#10"); - Assert.IsTrue (rconv.CanConvertFrom (null, typeof (InstanceDescriptor)), "CCF#11"); - } - - [Test] - public void TestCanConvertTo () - { - Assert.IsTrue (rconv.CanConvertTo (typeof (String)), "CCT#1"); - Assert.IsTrue (rconv.CanConvertTo (null, typeof (String)), "CCT#2"); - Assert.IsFalse (rconv.CanConvertTo (null, typeof (Rectangle)), "CCT#3"); - Assert.IsFalse (rconv.CanConvertTo (null, typeof (RectangleF)), "CCT#4"); - Assert.IsFalse (rconv.CanConvertTo (null, typeof (Point)), "CCT#5"); - Assert.IsFalse (rconv.CanConvertTo (null, typeof (PointF)), "CCT#6"); - Assert.IsFalse (rconv.CanConvertTo (null, typeof (Size)), "CCT#7"); - Assert.IsFalse (rconv.CanConvertTo (null, typeof (SizeF)), "CCT#8"); - Assert.IsFalse (rconv.CanConvertTo (null, typeof (Object)), "CCT#9"); - Assert.IsFalse (rconv.CanConvertTo (null, typeof (int)), "CCT#10"); - } - - [Test] - public void TestConvertFrom () - { - Assert.AreEqual (rect, (Rectangle) rconv.ConvertFrom (null, CultureInfo.InvariantCulture, - "10, 10, 20, 30"), "CF#1"); - Assert.AreEqual (rectneg, (Rectangle) rconv.ConvertFrom (null, CultureInfo.InvariantCulture, - "-10, -10, 20, 30"), "CF#2"); - - try { - rconv.ConvertFrom (null, CultureInfo.InvariantCulture, - "10, 10"); - Assert.Fail ("CF#3: must throw ArgumentException"); - } catch (Exception e) { - Assert.IsTrue (e is ArgumentException, "CF#3"); - } - - try { - rconv.ConvertFrom ("10"); - Assert.Fail ("CF#3a: must throw ArgumentException"); - } catch (Exception e) { - Assert.IsTrue (e is ArgumentException, "CF#3a"); - } - - try { - rconv.ConvertFrom (null, CultureInfo.InvariantCulture, - "1, 1, 1, 1, 1"); - Assert.Fail ("CF#4: must throw ArgumentException"); - } catch (Exception e) { - Assert.IsTrue (e is ArgumentException, "CF#4"); - } - - try { - rconv.ConvertFrom (null, CultureInfo.InvariantCulture, - "*1, 1, 1, 1"); - Assert.Fail ("CF#5: must throw Exception"); - } catch (Exception ex) { - Assert.AreEqual (typeof (Exception), ex.GetType (), "CF#5-2"); - Assert.IsNotNull (ex.InnerException, "CF#5-3"); - Assert.AreEqual (typeof (FormatException), ex.InnerException.GetType (), "CF#5-4"); - } - - try { - rconv.ConvertFrom (null, CultureInfo.InvariantCulture, - new Rectangle (10, 10, 100, 100)); - Assert.Fail ("CF#6: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CF#6"); - } - - try { - rconv.ConvertFrom (null, CultureInfo.InvariantCulture, - new RectangleF (10, 10, 100, 100)); - Assert.Fail ("CF#7: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CF#7"); - } - - try { - rconv.ConvertFrom (null, CultureInfo.InvariantCulture, - new Point (10, 10)); - Assert.Fail ("CF#8: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CF#8"); - } - - try { - rconv.ConvertFrom (null, CultureInfo.InvariantCulture, - new PointF (10, 10)); - Assert.Fail ("CF#9: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CF#9"); - } - - try { - rconv.ConvertFrom (null, CultureInfo.InvariantCulture, - new Size (10, 10)); - Assert.Fail ("CF#10: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CF#10"); - } - - try { - rconv.ConvertFrom (null, CultureInfo.InvariantCulture, - new SizeF (10, 10)); - Assert.Fail ("CF#11: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CF#11"); - } - - try { - rconv.ConvertFrom (null, CultureInfo.InvariantCulture, - new Object ()); - Assert.Fail ("CF#12: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CF#12"); - } - - try { - rconv.ConvertFrom (null, CultureInfo.InvariantCulture, 1001); - Assert.Fail ("CF#13: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CF#13"); - } - } - - [Test] - public void TestConvertTo () - { - Assert.AreEqual (rectStrInvariant, (String) rconv.ConvertTo (null, - CultureInfo.InvariantCulture, rect, typeof (String)), "CT#1"); - Assert.AreEqual (rectnegStrInvariant, (String) rconv.ConvertTo (null, - CultureInfo.InvariantCulture, rectneg, typeof (String)), "CT#2"); - - try { - rconv.ConvertTo (null, CultureInfo.InvariantCulture, - rect, typeof (Rectangle)); - Assert.Fail ("CT#3: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CT#3"); - } - - try { - rconv.ConvertTo (null, CultureInfo.InvariantCulture, - rect, typeof (RectangleF)); - Assert.Fail ("CT#4: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CT#4"); - } - - try { - rconv.ConvertTo (null, CultureInfo.InvariantCulture, - rect, typeof (Size)); - Assert.Fail ("CT#5: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CT#5"); - } - - try { - rconv.ConvertTo (null, CultureInfo.InvariantCulture, - rect, typeof (SizeF)); - Assert.Fail ("CT#6: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CT#6"); - } - - try { - rconv.ConvertTo (null, CultureInfo.InvariantCulture, - rect, typeof (Point)); - Assert.Fail ("CT#7: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CT#7"); - } - - try { - rconv.ConvertTo (null, CultureInfo.InvariantCulture, - rect, typeof (PointF)); - Assert.Fail ("CT#8: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CT#8"); - } - - try { - rconv.ConvertTo (null, CultureInfo.InvariantCulture, - rect, typeof (Object)); - Assert.Fail ("CT#9: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CT#9"); - } - - try { - rconv.ConvertTo (null, CultureInfo.InvariantCulture, - rect, typeof (int)); - Assert.Fail ("CT#10: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CT#10"); - } - } - - [Test] - public void TestGetCreateInstanceSupported () - { - Assert.IsTrue (rconv.GetCreateInstanceSupported (), "GCIS#1"); - Assert.IsTrue (rconv.GetCreateInstanceSupported (null), "GCIS#2"); - } - - [Test] - public void TestCreateInstance () - { - Rectangle rectInstance; - - Hashtable ht = new Hashtable (); - ht.Add ("X", 10); ht.Add ("Y", 10); - ht.Add ("Width", 20); ht.Add ("Height", 30); - - rectInstance = (Rectangle) rconv.CreateInstance (ht); - Assert.AreEqual (rect, rectInstance, "CI#1"); - - ht.Clear (); - ht.Add ("X", -10); ht.Add ("Y", -10); - ht.Add ("Width", 20); ht.Add ("Height", 30); - - rectInstance = (Rectangle) rconv.CreateInstance (null, ht); - Assert.AreEqual (rectneg, rectInstance, "CI#2"); - - // Property names are case-sensitive. It should throw - // NullRefExc if any of the property names does not match - ht.Clear (); - ht.Add ("x", -10); ht.Add ("Y", -10); - ht.Add ("Width", 20); ht.Add ("Height", 30); - try { - rectInstance = (Rectangle) rconv.CreateInstance (null, ht); - Assert.Fail ("CI#3: must throw NullReferenceException"); - } catch (Exception e) { - Assert.IsTrue (e is NullReferenceException, "CI#3"); - } - } - - [Test] - public void TestGetPropertiesSupported () - { - Assert.IsTrue (rconv.GetPropertiesSupported (), "GPS#1"); - Assert.IsTrue (rconv.GetPropertiesSupported (null), "GPS#2"); - } - - [Test] - public void TestGetProperties () - { - Attribute [] attrs; - PropertyDescriptorCollection propsColl; - - propsColl = rconv.GetProperties (rect); - Assert.AreEqual (4, propsColl.Count, "GP1#1"); - Assert.AreEqual (rect.X, propsColl["X"].GetValue (rect), "GP1#2"); - Assert.AreEqual (rect.Y, propsColl["Y"].GetValue (rect), "GP1#3"); - Assert.AreEqual (rect.Width, propsColl["Width"].GetValue (rect), "GP1#4"); - Assert.AreEqual (rect.Height, propsColl["Height"].GetValue (rect), "GP1#5"); - - propsColl = rconv.GetProperties (null, rectneg); - Assert.AreEqual (4, propsColl.Count, "GP2#1"); - Assert.AreEqual (rectneg.X, propsColl["X"].GetValue (rectneg), "GP2#2"); - Assert.AreEqual (rectneg.Y, propsColl["Y"].GetValue (rectneg), "GP2#3"); - Assert.AreEqual (rectneg.Width, propsColl["Width"].GetValue (rectneg), "GP2#4"); - Assert.AreEqual (rectneg.Height, propsColl["Height"].GetValue (rectneg), "GP2#5"); - - propsColl = rconv.GetProperties (null, rect, null); - Assert.AreEqual (11, propsColl.Count, "GP3#1"); - Assert.AreEqual (rect.X, propsColl["X"].GetValue (rect), "GP3#2"); - Assert.AreEqual (rect.Y, propsColl["Y"].GetValue (rect), "GP3#3"); - Assert.AreEqual (rect.Width, propsColl["Width"].GetValue (rect), "GP3#4"); - Assert.AreEqual (rect.Height, propsColl["Height"].GetValue (rect), "GP3#5"); - - Assert.AreEqual (rect.Top, propsColl["Top"].GetValue (rect), "GP3#6"); - Assert.AreEqual (rect.Bottom, propsColl["Bottom"].GetValue (rect), "GP3#7"); - Assert.AreEqual (rect.Left, propsColl["Left"].GetValue (rect), "GP3#8"); - Assert.AreEqual (rect.Right, propsColl["Right"].GetValue (rect), "GP3#9"); - Assert.AreEqual (rect.Location, propsColl["Location"].GetValue (rect), "GP3#10"); - Assert.AreEqual (rect.Size, propsColl["Size"].GetValue (rect), "GP3#11"); - Assert.AreEqual (rect.IsEmpty, propsColl["IsEmpty"].GetValue (rect), "GP3#12"); - - Type type = typeof (Rectangle); - attrs = Attribute.GetCustomAttributes (type, true); - propsColl = rconv.GetProperties (null, rect, attrs); - Assert.AreEqual (0, propsColl.Count, "GP3#13"); - } - - [Test] - public void ConvertFromInvariantString_string () - { - Assert.AreEqual (rect, rconv.ConvertFromInvariantString (rectStrInvariant), - "CFISS#1"); - Assert.AreEqual (rectneg, rconv.ConvertFromInvariantString (rectnegStrInvariant), - "CFISS#2"); - } - - [Test] - [ExpectedException (typeof (ArgumentException))] - public void ConvertFromInvariantString_string_exc_1 () - { - rconv.ConvertFromInvariantString ("1, 2, 3"); - } - - [Test] - public void ConvertFromInvariantString_string_exc_2 () - { - try { - rconv.ConvertFromInvariantString ("hello"); - Assert.Fail ("#1"); - } catch (Exception ex) { - Assert.AreEqual (typeof (Exception), ex.GetType (), "#2"); - Assert.IsNotNull (ex.InnerException, "#3"); - Assert.AreEqual (typeof (FormatException), ex.InnerException.GetType (), "#3"); - } - } - - [Test] - public void ConvertFromString_string () - { - // save current culture - CultureInfo currentCulture = Thread.CurrentThread.CurrentCulture; - - try { - PerformConvertFromStringTest (new CultureInfo ("en-US")); - PerformConvertFromStringTest (new CultureInfo ("nl-BE")); - PerformConvertFromStringTest (new MyCultureInfo ()); - } finally { - // restore original culture - Thread.CurrentThread.CurrentCulture = currentCulture; - } - } - - [Test] - [ExpectedException (typeof (ArgumentException))] - public void ConvertFromString_string_exc_1 () - { - CultureInfo culture = CultureInfo.CurrentCulture; - rconv.ConvertFromString (string.Format(culture, - "1{0} 2{0} 3{0} 4{0} 5", culture.TextInfo.ListSeparator)); - } - - [Test] - public void ConvertFromString_string_exc_2 () - { - try { - rconv.ConvertFromString ("hello"); - Assert.Fail ("#1"); - } catch (Exception ex) { - Assert.AreEqual (typeof (Exception), ex.GetType (), "#2"); - Assert.IsNotNull (ex.InnerException, "#3"); - Assert.AreEqual (typeof (FormatException), ex.InnerException.GetType (), "#3"); - } - } - - [Test] - public void ConvertToInvariantString_string () - { - Assert.AreEqual (rectStrInvariant, rconv.ConvertToInvariantString (rect), - "CFISS#1"); - Assert.AreEqual (rectnegStrInvariant, rconv.ConvertToInvariantString (rectneg), - "CFISS#2"); - } - - [Test] - public void ConvertToString_string () { - // save current culture - CultureInfo currentCulture = Thread.CurrentThread.CurrentCulture; - - try { - PerformConvertToStringTest (new CultureInfo ("en-US")); - PerformConvertToStringTest (new CultureInfo ("nl-BE")); - PerformConvertToStringTest (new MyCultureInfo ()); - } finally { - // restore original culture - Thread.CurrentThread.CurrentCulture = currentCulture; - } - } - - [Test] - public void GetStandardValuesSupported () - { - Assert.IsFalse (rconv.GetStandardValuesSupported ()); - } - - [Test] - public void GetStandardValues () - { - Assert.IsNull (rconv.GetStandardValues ()); - } - - [Test] - public void GetStandardValuesExclusive () - { - Assert.IsFalse (rconv.GetStandardValuesExclusive ()); - } - - private void PerformConvertFromStringTest (CultureInfo culture) - { - // set current culture - Thread.CurrentThread.CurrentCulture = culture; - - // perform tests - Assert.AreEqual (rect, rconv.ConvertFromString (CreateRectangleString (rect)), - "CFSS#1-" + culture.Name); - Assert.AreEqual (rectneg, rconv.ConvertFromString (CreateRectangleString (rectneg)), - "CFSS#2-" + culture.Name); - } - - private void PerformConvertToStringTest (CultureInfo culture) - { - // set current culture - Thread.CurrentThread.CurrentCulture = culture; - - // perform tests - Assert.AreEqual (CreateRectangleString (rect), rconv.ConvertToString (rect), - "CFISS#1-" + culture.Name); - Assert.AreEqual (CreateRectangleString (rectneg), rconv.ConvertToString (rectneg), - "CFISS#2-" + culture.Name); - } - - private static string CreateRectangleString (Rectangle rectangle) - { - return CreateRectangleString (CultureInfo.CurrentCulture, rectangle); - } - - private static string CreateRectangleString (CultureInfo culture, Rectangle rectangle) - { - return string.Format ("{0}{1} {2}{1} {3}{1} {4}", rectangle.X.ToString (culture), - culture.TextInfo.ListSeparator, rectangle.Y.ToString (culture), - rectangle.Width.ToString (culture), rectangle.Height.ToString (culture)); - } - - [Serializable] - private sealed class MyCultureInfo : CultureInfo - { - internal MyCultureInfo () - : base ("en-US") - { - } - - public override object GetFormat (Type formatType) - { - if (formatType == typeof (NumberFormatInfo)) { - NumberFormatInfo nfi = (NumberFormatInfo) ((NumberFormatInfo) base.GetFormat (formatType)).Clone (); - - nfi.NegativeSign = "myNegativeSign"; - return NumberFormatInfo.ReadOnly (nfi); - } else { - return base.GetFormat (formatType); - } - } - } - } -} diff --git a/mcs/class/System.Drawing/Test/System.Drawing/TestRectangleF.cs b/mcs/class/System.Drawing/Test/System.Drawing/TestRectangleF.cs deleted file mode 100644 index 27a288b75a9..00000000000 --- a/mcs/class/System.Drawing/Test/System.Drawing/TestRectangleF.cs +++ /dev/null @@ -1,190 +0,0 @@ -// Tests for System.Drawing.RectangleF.cs - -// Copyright (C) 2005 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// Author: Jordi Mas i Hernandez -// - -using NUnit.Framework; -using System; -using System.Drawing; -using System.Security.Permissions; - -namespace MonoTests.System.Drawing -{ - - [TestFixture] - [SecurityPermission (SecurityAction.Deny, UnmanagedCode = true)] - public class TestRectangleF : Assertion - { - RectangleF rect_0; - RectangleF rect_1; - RectangleF rect_2; - RectangleF rect_3; - RectangleF rect_4; - RectangleF rect_5; - RectangleF rect_6; - - [TearDown] - public void Clean () {} - - [SetUp] - public void GetReady () - { - rect_0 = new RectangleF (new PointF (10, 10), new SizeF (40, 40)); - rect_1 = new RectangleF (5, 5, 5, 5); - rect_2 = RectangleF.Empty; - rect_3 = new RectangleF (25, 25, 0, 0); - rect_4 = new RectangleF (25, 252, 10, 20); - rect_5 = new RectangleF (40, 40, 50, 50); - rect_6 = new RectangleF (40, 40, 0, 50); - } - - [Test] - public void Contains () - { - AssertEquals (false, rect_0.Contains (5, 5)); - AssertEquals (true, rect_0.Contains (12, 12)); - AssertEquals (true, rect_0.Contains (10, 10)); - AssertEquals (false, rect_0.Contains (10, 50)); - AssertEquals (false, rect_0.Contains (10, 50F-float.Epsilon)); - AssertEquals (true, rect_0.Contains (10, 49.9F)); - AssertEquals (false, rect_0.Contains (50, 10)); - } - - [Test] - public void Empty () - { - AssertEquals (rect_2.X, 0); - AssertEquals (rect_2.Y, 0); - AssertEquals (rect_2.Width, 0); - AssertEquals (rect_2.Height, 0); - } - - [Test] - public void IsEmpty () - { - AssertEquals (rect_0.IsEmpty, false); - AssertEquals (rect_2.IsEmpty, true); - AssertEquals (rect_3.IsEmpty, true); - AssertEquals (rect_6.IsEmpty, true); - } - - [Test] - public void GetContents () { - AssertEquals (rect_4.Right, rect_4.X + rect_4.Width); - AssertEquals (rect_4.Left, rect_4.X); - AssertEquals (rect_4.Bottom, rect_4.Y + rect_4.Height); - AssertEquals (rect_4.Top, rect_4.Y); - } - - [Test] - public void IntersectsWith () { - AssertEquals (rect_0.IntersectsWith (rect_1), false); - AssertEquals (rect_0.IntersectsWith (rect_2), false); - AssertEquals (rect_0.IntersectsWith (rect_5), true); - AssertEquals (rect_5.IntersectsWith (rect_0), true); - AssertEquals (rect_0.IntersectsWith (rect_4), false); - } - - [Test] - public void Location () { - AssertEquals (new PointF (25, 252), rect_4.Location); - PointF p = new PointF (11, 121); - rect_4.Location = p; - AssertEquals (p, rect_4.Location); - AssertEquals (rect_4.X, 11); - AssertEquals (rect_4.Y, 121); - rect_4.X = 10; - rect_4.Y = 15; - AssertEquals (new PointF (10, 15), rect_4.Location); - } - - [Test] - public void Size () { - AssertEquals (rect_4.Width, 10); - AssertEquals (rect_4.Height, 20); - rect_4.Width = 40; - rect_4.Height = 100; - AssertEquals (rect_4.Size, new SizeF (40, 100)); - rect_4.Size = new SizeF (1, 2); - AssertEquals (rect_4.Width, 1); - AssertEquals (rect_4.Height, 2); - } - - [Test] - public void GetHashCodeTest () { - Assert ("GHC#1", rect_0.GetHashCode () != rect_1.GetHashCode ()); - } - - [Test] - public void Inflate () { - rect_0.Inflate (new SizeF (8, 5)); - AssertEquals ("INF#1", new RectangleF (2, 5, 56, 50), rect_0); - rect_1.Inflate (4, 4); - AssertEquals ("INF#2", new RectangleF (1, 1, 13, 13), rect_1); - AssertEquals ("INF#3", new RectangleF (30, 20, 70, 90), - RectangleF.Inflate (rect_5, 10, 20)); - AssertEquals ("INF#4", new RectangleF (40, 40, 50, 50), rect_5); - } - - [Test] - public void Intersect () { - AssertEquals ("INT#1", new RectangleF (40, 40, 10, 10), - RectangleF.Intersect (rect_0, rect_5)); - AssertEquals ("INT#2", new RectangleF (10, 10, 40, 40), rect_0); - rect_0.Intersect (rect_5); - AssertEquals ("INT#3", new RectangleF (40, 40, 10, 10), rect_0); - AssertEquals ("INT#4", RectangleF.Empty, RectangleF.Intersect (rect_1, rect_5)); - } - - [Test] - public void Offset () { - rect_0.Offset (5, 5); - AssertEquals ("OFS#1", new RectangleF (15, 15, 40, 40), rect_0); - rect_1.Offset (new Point (7, 0)); - AssertEquals ("OFS#2", new RectangleF (12, 5, 5, 5), rect_1); - } - - [Test] - public void ToStringTest () { - AssertEquals ("{X=10,Y=10,Width=40,Height=40}", rect_0.ToString ()); - AssertEquals ("{X=5,Y=5,Width=5,Height=5}", rect_1.ToString ()); - AssertEquals ("{X=0,Y=0,Width=0,Height=0}", rect_2.ToString ()); - AssertEquals ("{X=25,Y=25,Width=0,Height=0}", rect_3.ToString ()); - } - - [Test] - public void RectangleToRectangleF () - { - Rectangle r = new Rectangle (1, 2, 3, 4); - RectangleF rf = r; - AssertEquals (new RectangleF (1F, 2F, 3F, 4F), rf); - } - - [Test] - public void Union () { - AssertEquals (RectangleF.FromLTRB (5, 5, 50, 50), RectangleF.Union (rect_0, rect_1)); - } - } -} - diff --git a/mcs/class/System.Drawing/Test/System.Drawing/TestRegion.cs b/mcs/class/System.Drawing/Test/System.Drawing/TestRegion.cs deleted file mode 100644 index 90dcb9c2bb5..00000000000 --- a/mcs/class/System.Drawing/Test/System.Drawing/TestRegion.cs +++ /dev/null @@ -1,1043 +0,0 @@ -// -// Region class testing unit -// -// Author: -// Jordi Mas, jordi@ximian.com -// - -// -// Copyright (C) 2004-2005 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; -using System.Drawing.Imaging; -using System.Drawing; -using System.Drawing.Drawing2D; -using System.Security.Permissions; -using NUnit.Framework; - -namespace MonoTests.System.Drawing -{ - - [TestFixture] - [SecurityPermission (SecurityAction.Deny, UnmanagedCode = true)] - public class TestRegion - { - [TearDown] - public void Clean() {} - - [SetUp] - public void GetReady() - { - - } - - /* For debugging */ - public static void DumpRegion (Region rgn) - { - Matrix matrix = new Matrix (); - RectangleF [] rects = rgn.GetRegionScans (matrix); - - for (int i = 0; i < rects.Length; i++) - Console.WriteLine ( rects[i]); - } - - [Test] - public void TestBounds() - { - Bitmap bmp = new Bitmap (600, 800); - Graphics dc = Graphics.FromImage (bmp); - Rectangle rect1, rect2; - Region rgn1, rgn2; - RectangleF bounds; - - rect1 = new Rectangle (500, 30, 60, 80); - rect2 = new Rectangle (520, 40, 60, 80); - rgn1 = new Region(rect1); - rgn2 = new Region(rect2); - rgn1.Union(rgn2); - - bounds = rgn1.GetBounds (dc); - - Assert.AreEqual (500, bounds.X); - Assert.AreEqual (30, bounds.Y); - Assert.AreEqual (80, bounds.Width); - Assert.AreEqual (90, bounds.Height); - } - - [Test] - public void TestCloneAndEquals() - { - Bitmap bmp = new Bitmap (600, 800); - Graphics dc = Graphics.FromImage (bmp); - Rectangle rect1, rect2; - Region rgn1, rgn2; - RectangleF [] rects; - RectangleF [] rects2; - Matrix matrix = new Matrix (); - - rect1 = new Rectangle (500, 30, 60, 80); - rect2 = new Rectangle (520, 40, 60, 80); - rgn1 = new Region (rect1); - rgn1.Union (rect2); - rgn2 = rgn1.Clone (); - - rects = rgn1.GetRegionScans (matrix); - rects2 = rgn2.GetRegionScans (matrix); - - Assert.AreEqual (rects.Length, rects2.Length); - - for (int i = 0; i < rects.Length; i++) { - - Assert.AreEqual (rects[i].X, rects[i].X); - Assert.AreEqual (rects[i].Y, rects[i].Y); - Assert.AreEqual (rects[i].Width, rects[i].Width); - Assert.AreEqual (rects[i].Height, rects[i].Height); - } - - Assert.AreEqual (true, rgn1.Equals (rgn2, dc)); - } - - /*Tests infinite, empty, etc*/ - [Test] - public void TestInfiniteAndEmpty() - { - Bitmap bmp = new Bitmap (600, 800); - Graphics dc = Graphics.FromImage (bmp); - Rectangle rect1, rect2; - Region rgn1; - RectangleF [] rects; - Matrix matrix = new Matrix (); - - rect1 = new Rectangle (500, 30, 60, 80); - rect2 = new Rectangle (520, 40, 60, 80); - rgn1 = new Region (rect1); - rgn1.Union (rect2); - - Assert.AreEqual (false, rgn1.IsEmpty (dc)); - Assert.AreEqual (false, rgn1.IsInfinite (dc)); - - rgn1.MakeEmpty(); - Assert.AreEqual (true, rgn1.IsEmpty (dc)); - - rgn1 = new Region (rect1); - rgn1.Union (rect2); - rgn1.MakeInfinite (); - rects = rgn1.GetRegionScans (matrix); - - Assert.AreEqual (1, rects.Length); - Assert.AreEqual (-4194304, rects[0].X); - Assert.AreEqual (-4194304, rects[0].Y); - Assert.AreEqual (8388608, rects[0].Width); - Assert.AreEqual (8388608, rects[0].Height); - Assert.AreEqual (true, rgn1.IsInfinite (dc)); - } - - - [Test] - public void TestUnionGroup1 () - { - Bitmap bmp = new Bitmap (600, 800); - Graphics dc = Graphics.FromImage (bmp); - Matrix matrix = new Matrix (); - Rectangle rect1, rect2, rect3, rect4; - Region rgn1, rgn2, rgn3, rgn4; - RectangleF [] rects; - - rect1 = new Rectangle (500, 30, 60, 80); - rect2 = new Rectangle (520, 40, 60, 80); - rgn1 = new Region(rect1); - rgn2 = new Region(rect2); - rgn1.Union(rgn2); - rects = rgn1.GetRegionScans (matrix); - - Assert.AreEqual (3, rects.Length); - Assert.AreEqual (500, rects[0].X); - Assert.AreEqual (30, rects[0].Y); - Assert.AreEqual (60, rects[0].Width); - Assert.AreEqual (10, rects[0].Height); - - Assert.AreEqual (500, rects[1].X); - Assert.AreEqual (40, rects[1].Y); - Assert.AreEqual (80, rects[1].Width); - Assert.AreEqual (70, rects[1].Height); - - Assert.AreEqual (520, rects[2].X); - Assert.AreEqual (110, rects[2].Y); - Assert.AreEqual (60, rects[2].Width); - Assert.AreEqual (10, rects[2].Height); - - rect1 = new Rectangle (20, 180, 40, 50); - rect2 = new Rectangle (50, 190, 40, 50); - rect3 = new Rectangle (70, 210, 30, 50); - rgn1 = new Region (rect1); - rgn2 = new Region (rect2); - rgn3 = new Region (rect3); - - rgn1.Union (rgn2); - rgn1.Union (rgn3); - rects = rgn1.GetRegionScans (matrix); - Assert.AreEqual (5, rects.Length); - - Assert.AreEqual (20, rects[0].X); - Assert.AreEqual (180, rects[0].Y); - Assert.AreEqual (40, rects[0].Width); - Assert.AreEqual (10, rects[0].Height); - - Assert.AreEqual (20, rects[1].X); - Assert.AreEqual (190, rects[1].Y); - Assert.AreEqual (70, rects[1].Width); - Assert.AreEqual (20, rects[1].Height); - - Assert.AreEqual (20, rects[2].X); - Assert.AreEqual (210, rects[2].Y); - Assert.AreEqual (80, rects[2].Width); - Assert.AreEqual (20, rects[2].Height); - - Assert.AreEqual (50, rects[3].X); - Assert.AreEqual (230, rects[3].Y); - Assert.AreEqual (50, rects[3].Width); - Assert.AreEqual (10, rects[3].Height); - - Assert.AreEqual (70, rects[4].X); - Assert.AreEqual (240, rects[4].Y); - Assert.AreEqual (30, rects[4].Width); - Assert.AreEqual (20, rects[4].Height); - - rect1 = new Rectangle (20, 330, 40, 50); - rect2 = new Rectangle (50, 340, 40, 50); - rect3 = new Rectangle (70, 360, 30, 50); - rect4 = new Rectangle (80, 400, 30, 10); - rgn1 = new Region (rect1); - rgn2 = new Region (rect2); - rgn3 = new Region (rect3); - rgn4 = new Region (rect4); - - rgn1.Union (rgn2); - rgn1.Union (rgn3); - rgn1.Union (rgn4); - - rects = rgn1.GetRegionScans (matrix); - - Assert.AreEqual (6, rects.Length); - - Assert.AreEqual (20, rects[0].X); - Assert.AreEqual (330, rects[0].Y); - Assert.AreEqual (40, rects[0].Width); - Assert.AreEqual (10, rects[0].Height); - - Assert.AreEqual (20, rects[1].X); - Assert.AreEqual (340, rects[1].Y); - Assert.AreEqual (70, rects[1].Width); - Assert.AreEqual (20, rects[1].Height); - - Assert.AreEqual (20, rects[2].X); - Assert.AreEqual (360, rects[2].Y); - Assert.AreEqual (80, rects[2].Width); - Assert.AreEqual (20, rects[2].Height); - - Assert.AreEqual (50, rects[3].X); - Assert.AreEqual (380, rects[3].Y); - Assert.AreEqual (50, rects[3].Width); - Assert.AreEqual (10, rects[3].Height); - - Assert.AreEqual (70, rects[4].X); - Assert.AreEqual (390, rects[4].Y); - Assert.AreEqual (30, rects[4].Width); - Assert.AreEqual (10, rects[4].Height); - - Assert.AreEqual (70, rects[5].X); - Assert.AreEqual (400, rects[5].Y); - Assert.AreEqual (40, rects[5].Width); - Assert.AreEqual (10, rects[5].Height); - - rect1 = new Rectangle (10, 20, 50, 50); - rect2 = new Rectangle (100, 100, 60, 60); - rect3 = new Rectangle (200, 200, 80, 80); - - rgn1 = new Region (rect1); - rgn1.Union (rect2); - rgn1.Union (rect3); - - rects = rgn1.GetRegionScans (matrix); - - Assert.AreEqual (3, rects.Length); - - Assert.AreEqual (10, rects[0].X); - Assert.AreEqual (20, rects[0].Y); - Assert.AreEqual (50, rects[0].Width); - Assert.AreEqual (50, rects[0].Height); - - Assert.AreEqual (100, rects[1].X); - Assert.AreEqual (100, rects[1].Y); - Assert.AreEqual (60, rects[1].Width); - Assert.AreEqual (60, rects[1].Height); - - Assert.AreEqual (200, rects[2].X); - Assert.AreEqual (200, rects[2].Y); - Assert.AreEqual (80, rects[2].Width); - Assert.AreEqual (80, rects[2].Height); - } - - void AssertEqualRectangles (RectangleF rect1, RectangleF rect2, string text) - { - Assert.AreEqual (rect1.X, rect2.X, text + ".X"); - Assert.AreEqual (rect1.Y, rect2.Y, text + ".Y"); - Assert.AreEqual (rect1.Width, rect2.Width, text + ".Width"); - Assert.AreEqual (rect1.Height, rect2.Height, text + ".Height"); - } - - [Test] - public void TestUnionGroup2 () - { - RectangleF[] rects; - Region r1 = new Region (); - Rectangle rect2 = Rectangle.Empty; - Rectangle rect1 = Rectangle.Empty; - Rectangle rect3 = Rectangle.Empty; - Rectangle rect4 = Rectangle.Empty; - - { // TEST1: Not intersecting rects. Union just adds them - - rect1 = new Rectangle (20, 20, 20, 20); - rect2 = new Rectangle (20, 80, 20, 10); - rect3 = new Rectangle (60, 60, 30, 10); - - r1 = new Region (rect1); - r1.Union (rect2); - r1.Union (rect3); - - rects = r1.GetRegionScans (new Matrix ()); - Assert.AreEqual (3, rects.Length, "TUG1Test1"); - AssertEqualRectangles (new RectangleF (20, 20, 20, 20), rects[0], "TUG1Test2"); - AssertEqualRectangles (new RectangleF (60, 60, 30, 10), rects[1], "TUG1Test3"); - AssertEqualRectangles (new RectangleF (20, 80, 20, 10), rects[2], "TUG1Test4"); - } - - { // TEST2: Intersecting from the right - /* - * ----------- - * | | - * | |-------- | - * | | | - * | |-------- | - * | | - * ----------| - * - */ - - rect1 = new Rectangle (10, 10, 100, 100); - rect2 = new Rectangle (40, 60, 100, 20); - r1 = new Region (rect1); - r1.Union (rect2); - - rects = r1.GetRegionScans (new Matrix ()); - Assert.AreEqual (3, rects.Length, "TUG2Test1"); - AssertEqualRectangles (new RectangleF (10, 10, 100, 50), rects[0], "TUG2Test2"); - AssertEqualRectangles (new RectangleF (10, 60, 130, 20), rects[1], "TUG2Test3"); - AssertEqualRectangles (new RectangleF (10, 80, 100, 30), rects[2], "TUG2Test4"); - } - - { // TEST3: Intersecting from the right - /* - * ----------- - * | | - * |-------- | | - * | | | - * |-------- | | - * | | - * ----------| - * - */ - - rect1 = new Rectangle (70, 10, 100, 100); - rect2 = new Rectangle (40, 60, 100, 20); - - r1 = new Region (rect1); - r1.Union (rect2); - - rects = r1.GetRegionScans (new Matrix ()); - Assert.AreEqual (3, rects.Length, "TUG3Test1"); - AssertEqualRectangles (new RectangleF (70, 10, 100, 50), rects[0], "TUG3Test2"); - AssertEqualRectangles (new RectangleF (40, 60, 130, 20), rects[1], "TUG3Test3"); - AssertEqualRectangles (new RectangleF (70, 80, 100, 30), rects[2], "TUG3Test4"); - } - - { // TEST4: Intersecting from the top - /* - * ----- - * | | - * ----------- - * | | | | - * | ----- | - * | | - * | | - * ----------| - * - */ - - rect1 = new Rectangle (40, 100, 100, 100); - rect2 = new Rectangle (70, 80, 50, 40); - r1 = new Region (rect1); - r1.Union (rect2); - - rects = r1.GetRegionScans (new Matrix ()); - Assert.AreEqual (2, rects.Length, "TUG4Test1"); - AssertEqualRectangles (new RectangleF (70, 80, 50, 20), rects[0], "TUG4Test2"); - AssertEqualRectangles (new RectangleF (40, 100, 100, 100), rects[1], "TUG4Test3"); - } - - { // TEST5: Intersecting from the bottom - /* - - * ----------- - * | | - * | | - * | | - * | | | | - * |--| |--| - * | | - * ----- - */ - - rect1 = new Rectangle (40, 10, 100, 100); - rect2 = new Rectangle (70, 80, 50, 40); - - r1 = new Region (rect1); - r1.Union (rect2); - - rects = r1.GetRegionScans (new Matrix ()); - Assert.AreEqual (2, rects.Length, "TUG5Test1"); - AssertEqualRectangles (new RectangleF (40, 10, 100, 100), rects[0], "TUG5Test2"); - AssertEqualRectangles (new RectangleF (70, 110, 50, 10), rects[1], "TUG5Test3"); - } - - { // TEST6: Multiple regions, two separted by zero pixels - - rect1 = new Rectangle (30, 30, 80, 80); - rect2 = new Rectangle (45, 45, 200, 200); - rect3 = new Rectangle (160, 260, 10, 10); - rect4 = new Rectangle (170, 260, 10, 10); - - r1 = new Region (rect1); - r1.Union (rect2); - r1.Union (rect3); - r1.Union (rect4); - - rects = r1.GetRegionScans (new Matrix ()); - Assert.AreEqual (4, rects.Length, "TUG6Test1"); - AssertEqualRectangles (new RectangleF (30, 30, 80, 15), rects[0], "TUG6Test2"); - AssertEqualRectangles (new RectangleF (30, 45, 215, 65), rects[1], "TUG6Test3"); - AssertEqualRectangles (new RectangleF (45, 110, 200, 135), rects[2], "TUG6Test4"); - AssertEqualRectangles (new RectangleF (160, 260, 20, 10), rects[3], "TUG6Test5"); - } - } - - - [Test] - public void TestComplementGroup1 () - { - RectangleF[] rects; - Region r1 = new Region (); - Region r2 = new Region (); - Rectangle rect1 = Rectangle.Empty; - Rectangle rect2 = Rectangle.Empty; - Rectangle rect3 = Rectangle.Empty; - Rectangle rect4 = Rectangle.Empty; - Rectangle rect5 = Rectangle.Empty; - Rectangle rect6 = Rectangle.Empty; - Rectangle rect7 = Rectangle.Empty; - - - { // TEST1 - - rect1 = new Rectangle (20, 20, 20, 20); - rect2 = new Rectangle (20, 80, 20, 10); - rect3 = new Rectangle (60, 60, 30, 10); - - r1 = new Region (rect1); - r2 = new Region (rect2); - r2.Union (rect3); - r1.Complement (r2); - - rects = r1.GetRegionScans (new Matrix ()); - Assert.AreEqual (2, rects.Length, "TCG1Test1"); - AssertEqualRectangles (new RectangleF (60, 60, 30, 10), rects[0], "TCG1Test2"); - AssertEqualRectangles (new RectangleF (20, 80, 20, 10), rects[1], "TCG1Test3"); - } - - - { // TEST2 - - rect1 = new Rectangle (10, 10, 100, 100); - rect2 = new Rectangle (40, 60, 100, 20); - - r1 = new Region (rect1); - r1.Complement (rect2); - - rects = r1.GetRegionScans (new Matrix ()); - Assert.AreEqual (1, rects.Length, "TCG2Test1"); - AssertEqualRectangles (new RectangleF (110, 60, 30, 20), rects[0], "TCG2Test2"); - } - - { // TEST3 - - rect1 = new Rectangle (70, 10, 100, 100); - rect2 = new Rectangle (40, 60, 100, 20); - - r1 = new Region (rect1); - r1.Complement (rect2); - - rects = r1.GetRegionScans (new Matrix ()); - Assert.AreEqual (1, rects.Length, "TCG3Test1"); - AssertEqualRectangles (new RectangleF (40, 60, 30, 20), rects[0], "TCG3Test2"); - } - - { // TEST4 - - rect1 = new Rectangle (40, 100, 100, 100); - rect2 = new Rectangle (70, 80, 50, 40); - - r1 = new Region (rect1); - r1.Complement (rect2); - - rects = r1.GetRegionScans (new Matrix ()); - Assert.AreEqual (1, rects.Length, "TCG4Test1"); - AssertEqualRectangles (new RectangleF (70, 80, 50, 20), rects[0], "TCG4Test2"); - } - - { // TEST5 - - rect1 = new Rectangle (40, 10, 100, 100); - rect2 = new Rectangle (70, 80, 50, 40); - - r1 = new Region (rect1); - r1.Complement (rect2); - - rects = r1.GetRegionScans (new Matrix ()); - Assert.AreEqual (1, rects.Length, "TCG5Test1"); - AssertEqualRectangles (new RectangleF (70, 110, 50, 10), rects[0], "TCG5Test2"); - } - - { // TEST6: Multiple regions - - rect1 = new Rectangle (30, 30, 80, 80); - rect2 = new Rectangle (45, 45, 200, 200); - rect3 = new Rectangle (160, 260, 10, 10); - rect4 = new Rectangle (170, 260, 10, 10); - - r1 = new Region (rect1); - r1.Complement (rect2); - r1.Complement (rect3); - r1.Complement (rect4); - - rects = r1.GetRegionScans (new Matrix ()); - Assert.AreEqual (1, rects.Length, "TCG6Test1"); - AssertEqualRectangles (new RectangleF (170, 260, 10, 10), rects[0], "TCG6Test2"); - } - - } - - [Test] - public void TestComplementGroup2 () - { - - Bitmap bmp = new Bitmap (600, 800); - Graphics dc = Graphics.FromImage (bmp); - Matrix matrix = new Matrix (); - Rectangle rect1, rect2; - Region rgn1, rgn2; - RectangleF [] rects; - - rect1 = new Rectangle (20, 30, 60, 80); - rect2 = new Rectangle (50, 40, 60, 80); - rgn1 = new Region (rect1); - rgn2 = new Region (rect2); - dc.DrawRectangle (Pens.Green, rect1); - dc.DrawRectangle (Pens.Red, rect2); - rgn1.Complement (rgn2); - dc.FillRegion (Brushes.Blue, rgn1); - dc.DrawRectangles (Pens.Yellow, rgn1.GetRegionScans (matrix)); - - rects = rgn1.GetRegionScans (matrix); - - Assert.AreEqual (2, rects.Length); - - Assert.AreEqual (80, rects[0].X); - Assert.AreEqual (40, rects[0].Y); - Assert.AreEqual (30, rects[0].Width); - Assert.AreEqual (70, rects[0].Height); - - Assert.AreEqual (50, rects[1].X); - Assert.AreEqual (110, rects[1].Y); - Assert.AreEqual (60, rects[1].Width); - Assert.AreEqual (10, rects[1].Height); - - } - - - [Test] - public void TestExcludeGroup1 () - { - RectangleF[] rects; - Region r1 = new Region (); - Region r2 = new Region (); - Rectangle rect1 = Rectangle.Empty; - Rectangle rect2 = Rectangle.Empty; - Rectangle rect3 = Rectangle.Empty; - Rectangle rect4 = Rectangle.Empty; - Rectangle rect5 = Rectangle.Empty; - Rectangle rect6 = Rectangle.Empty; - Rectangle rect7 = Rectangle.Empty; - - - { // TEST1: Not intersecting rects. Exclude just adds them - - rect1 = new Rectangle (20, 20, 20, 20); - rect2 = new Rectangle (20, 80, 20, 10); - rect3 = new Rectangle (60, 60, 30, 10); - - r1 = new Region (rect1); - r2 = new Region (rect2); - r2.Union (rect3); - r1.Exclude (r2); - - rects = r1.GetRegionScans (new Matrix ()); - Assert.AreEqual (1, rects.Length, "TEG1Test1"); - AssertEqualRectangles (new RectangleF (20, 20, 20, 20), rects[0], "TEG1Test2"); - } - - { // TEST2: Excluding from the right - /* - * ----------- - * | | - * | |-------- | - * | | | - * | |-------- | - * | | - * ----------| - * - */ - - rect1 = new Rectangle (10, 10, 100, 100); - rect2 = new Rectangle (40, 60, 100, 20); - r1 = new Region (rect1); - r1.Exclude (rect2); - - rects = r1.GetRegionScans (new Matrix ()); - Assert.AreEqual (3, rects.Length, "TEG2Test1"); - AssertEqualRectangles (new RectangleF (10, 10, 100, 50), rects[0], "TEG2Test2"); - AssertEqualRectangles (new RectangleF (10, 60, 30, 20), rects[1], "TEG2Test3"); - AssertEqualRectangles (new RectangleF (10, 80, 100, 30), rects[2], "TEG2Test4"); - } - - - { // TEST3: Intersecting from the right - /* - * ----------- - * | | - * |-------- | | - * | | | - * |-------- | | - * | | - * ----------| - * - */ - - rect1 = new Rectangle (70, 10, 100, 100); - rect2 = new Rectangle (40, 60, 100, 20); - - r1 = new Region (rect1); - r1.Exclude (rect2); - - rects = r1.GetRegionScans (new Matrix ()); - Assert.AreEqual (3, rects.Length, "TEG3Test1"); - AssertEqualRectangles (new RectangleF (70, 10, 100, 50), rects[0], "TEG3Test2"); - AssertEqualRectangles (new RectangleF (140, 60, 30, 20), rects[1], "TEG3Test3"); - AssertEqualRectangles (new RectangleF (70, 80, 100, 30), rects[2], "TEG3Test4"); - } - - - { // TEST4: Intersecting from the top - /* - * ----- - * | | - * ----------- - * | | | | - * | ----- | - * | | - * | | - * ----------| - * - */ - - rect1 = new Rectangle (40, 100, 100, 100); - rect2 = new Rectangle (70, 80, 50, 40); - - r1 = new Region (rect1); - r1.Exclude (rect2); - - rects = r1.GetRegionScans (new Matrix ()); - Assert.AreEqual (3, rects.Length, "TEG4Test1"); - AssertEqualRectangles (new RectangleF (40, 100, 30, 20), rects[0], "TEG4Test2"); - AssertEqualRectangles (new RectangleF (120, 100, 20, 20), rects[1], "TEG4Test3"); - AssertEqualRectangles (new RectangleF (40, 120, 100, 80), rects[2], "TEG4Test4"); - } - - - { // TEST5: Intersecting from the bottom - /* - * ----------- - * | | - * | | - * | | - * | | | | - * |--| |--| - * | | - * ----- - * - */ - - rect1 = new Rectangle (40, 10, 100, 100); - rect2 = new Rectangle (70, 80, 50, 40); - - r1 = new Region (rect1); - r1.Exclude (rect2); - - rects = r1.GetRegionScans (new Matrix ()); - Assert.AreEqual (3, rects.Length, "TEG5Test1"); - AssertEqualRectangles (new RectangleF (40, 10, 100, 70), rects[0], "TEG5Test2"); - AssertEqualRectangles (new RectangleF (40, 80, 30, 30), rects[1], "TEG5Test3"); - AssertEqualRectangles (new RectangleF (120, 80, 20, 30), rects[2], "TEG5Test4"); - } - - - { // TEST6: Multiple regions - - rect1 = new Rectangle (30, 30, 80, 80); - rect2 = new Rectangle (45, 45, 200, 200); - rect3 = new Rectangle (160, 260, 10, 10); - rect4 = new Rectangle (170, 260, 10, 10); - - r1 = new Region (rect1); - r1.Exclude (rect2); - r1.Exclude (rect3); - r1.Exclude (rect4); - - rects = r1.GetRegionScans (new Matrix ()); - Assert.AreEqual (2, rects.Length, "TEG6Test1"); - AssertEqualRectangles (new RectangleF (30, 30, 80, 15), rects[0], "TEG6Test2"); - AssertEqualRectangles (new RectangleF (30, 45, 15, 65), rects[1], "TEG6Test3"); - } - - - { // TEST7: Intersecting from the top with a larger rect - /* - * ----------------- - * | | - * | ----------- | - * | | | | - * | ----- | - * | | - * | | - * ----------| - * - */ - - rect1 = new Rectangle (50, 100, 100, 100); - rect2 = new Rectangle (30, 70, 150, 40); - - r1 = new Region (rect1); - r1.Exclude (rect2); - - rects = r1.GetRegionScans (new Matrix ()); - Assert.AreEqual (1, rects.Length, "TEG7Test1"); - AssertEqualRectangles (new RectangleF (50, 110, 100, 90), rects[0], "TEG7Test2"); - } - - { // TEST8: Intersecting from the right with a larger rect - /* - * - * |--------| - * | | - * | ----------- - * | | | - * | | | - * | | | - * | | | - * | | | - * | ----------| - * |-------| - */ - - rect1 = new Rectangle (70, 60, 100, 70); - rect2 = new Rectangle (40, 10, 100, 150); - - r1 = new Region (rect1); - r1.Exclude (rect2); - - rects = r1.GetRegionScans (new Matrix ()); - Assert.AreEqual (1, rects.Length, "TEG8Test1"); - AssertEqualRectangles (new RectangleF (140, 60, 30, 70), rects[0], "TEG8Test2"); - - } - - { // TEST9: Intersecting from the left with a larger rect - /* - * - * |--------| - * | | - * ----------- | - * | | | - * | | | - * | | | - * | | | - * | | | - * ----------| | - * |--------| - * - */ - - - rect1 = new Rectangle (70, 60, 100, 70); - rect2 = new Rectangle (100, 10, 100, 150); - - r1 = new Region (rect1); - r1.Exclude (rect2); - - rects = r1.GetRegionScans (new Matrix ()); - Assert.AreEqual (1, rects.Length, "TEG9Test1"); - AssertEqualRectangles (new RectangleF (70, 60, 30, 70), rects[0], "TEG9Test2"); - } - - - { // TEST10: Intersecting from the bottom with a larger rect - /* - * * - * |--------| - * | | - * | | - * | | - * -------------------- - * | | - * | | - * |------------------| - */ - - - rect1 = new Rectangle (20, 20, 100, 100); - rect2 = new Rectangle (10, 80, 140, 150); - - r1 = new Region (rect1); - r1.Exclude (rect2); - - rects = r1.GetRegionScans (new Matrix ()); - Assert.AreEqual (1, rects.Length, "TEG10Test1"); - AssertEqualRectangles (new RectangleF (20, 20, 100, 60), rects[0], "TEG10Test2"); - } - - - } - - [Test] - public void TestExcludeGroup2 () - { - Bitmap bmp = new Bitmap (600, 800); - Graphics dc = Graphics.FromImage (bmp); - Matrix matrix = new Matrix (); - Rectangle rect1, rect2; - Region rgn1; - RectangleF [] rects; - - rect1 = new Rectangle (130, 30, 60, 80); - rect2 = new Rectangle (170, 40, 60, 80); - rgn1 = new Region (rect1); - rgn1.Exclude (rect2); - rects = rgn1.GetRegionScans (matrix); - - Assert.AreEqual (2, rects.Length); - - Assert.AreEqual (130, rects[0].X); - Assert.AreEqual (30, rects[0].Y); - Assert.AreEqual (60, rects[0].Width); - Assert.AreEqual (10, rects[0].Height); - - Assert.AreEqual (130, rects[1].X); - Assert.AreEqual (40, rects[1].Y); - Assert.AreEqual (40, rects[1].Width); - Assert.AreEqual (70, rects[1].Height); - } - - [Test] - public void TestIntersect() - { - - - Bitmap bmp = new Bitmap (600, 800); - Graphics dc = Graphics.FromImage (bmp); - Matrix matrix = new Matrix (); - RectangleF [] rects; - RectangleF rect3, rect4; - Region rgn3, rgn4; - - /* Two simple areas */ - Rectangle rect1 = new Rectangle (260, 30, 60, 80); - Rectangle rect2 = new Rectangle (290, 40, 60, 80); - Region rgn1 = new Region (rect1); - Region rgn2 = new Region (rect2); - rgn1.Intersect (rgn2); - - rects = rgn1.GetRegionScans (matrix); - Assert.AreEqual (1, rects.Length); - - Assert.AreEqual (290, rects[0].X); - Assert.AreEqual (40, rects[0].Y); - Assert.AreEqual (30, rects[0].Width); - Assert.AreEqual (70, rects[0].Height); - - /* No intersect */ - rect1 = new Rectangle (20, 330, 40, 50); - rect2 = new Rectangle (50, 340, 40, 50); - rect3 = new Rectangle (70, 360, 30, 50); - rect4 = new Rectangle (80, 400, 30, 10); - rgn1 = new Region (rect1); - rgn2 = new Region (rect2); - rgn3 = new Region (rect3); - rgn4 = new Region (rect4); - - rgn1.Intersect (rgn2); - rgn1.Intersect (rgn3); - rgn1.Intersect (rgn4); - rects = rgn1.GetRegionScans (matrix); - Assert.AreEqual (0, rects.Length); - } - - [Test] - public void TestXor() - { - Bitmap bmp = new Bitmap (600, 800); - Graphics dc = Graphics.FromImage (bmp); - Matrix matrix = new Matrix (); - RectangleF [] rects; - - Rectangle rect1 = new Rectangle (380, 30, 60, 80); - Rectangle rect2 = new Rectangle (410, 40, 60, 80); - Region rgn1 = new Region (rect1); - Region rgn2 = new Region (rect2); - rgn1.Xor (rgn2); - - - rects = rgn1.GetRegionScans (matrix); - - Assert.AreEqual (4, rects.Length); - - Assert.AreEqual (380, rects[0].X); - Assert.AreEqual (30, rects[0].Y); - Assert.AreEqual (60, rects[0].Width); - Assert.AreEqual (10, rects[0].Height); - - Assert.AreEqual (380, rects[1].X); - Assert.AreEqual (40, rects[1].Y); - Assert.AreEqual (30, rects[1].Width); - Assert.AreEqual (70, rects[1].Height); - - Assert.AreEqual (440, rects[2].X); - Assert.AreEqual (40, rects[2].Y); - Assert.AreEqual (30, rects[2].Width); - Assert.AreEqual (70, rects[2].Height); - - Assert.AreEqual (410, rects[3].X); - Assert.AreEqual (110, rects[3].Y); - Assert.AreEqual (60, rects[3].Width); - Assert.AreEqual (10, rects[3].Height); - } - - - [Test] - public void TestIsVisible() - { - Bitmap bmp = new Bitmap (600, 800); - Graphics dc = Graphics.FromImage (bmp); - Rectangle rect1, rect2; - Region rgn1, rgn2; - Matrix matrix = new Matrix (); - - rect1 = new Rectangle (500, 30, 60, 80); - rect2 = new Rectangle (520, 40, 60, 80); - - rgn1 = new Region (new RectangleF (0, 0, 10,10)); - Assert.AreEqual (false, rgn1.IsVisible (0,0,0,1)); - - rgn1 = new Region (rect1); - Assert.AreEqual (false, rgn1.IsVisible (500,29)); - Assert.AreEqual (true, rgn1.IsVisible (500,30)); - Assert.AreEqual (true, rgn1.IsVisible (rect1)); - Assert.AreEqual (true, rgn1.IsVisible (rect2)); - Assert.AreEqual (false, rgn1.IsVisible (new Rectangle (50,50,2,5))); - - Rectangle r = new Rectangle (1,1, 2,1); - rgn2 = new Region (r); - Assert.AreEqual (true, rgn2.IsVisible (r)); - Assert.AreEqual (true, rgn2.IsVisible (new Rectangle (1,1, 2,2))); - Assert.AreEqual (true, rgn2.IsVisible (new Rectangle (1,1, 10,10))); - Assert.AreEqual (true, rgn2.IsVisible (new Rectangle (1,1, 1,1))); - Assert.AreEqual (false, rgn2.IsVisible (new Rectangle (2,2, 1,1))); - Assert.AreEqual (false, rgn2.IsVisible (new Rectangle (0,0, 1,1))); - Assert.AreEqual (false, rgn2.IsVisible (new Rectangle (3,3, 1,1))); - - Assert.AreEqual (false, rgn2.IsVisible (0,0)); - Assert.AreEqual (false, rgn2.IsVisible (1,0)); - Assert.AreEqual (false, rgn2.IsVisible (2,0)); - Assert.AreEqual (false, rgn2.IsVisible (3,0)); - Assert.AreEqual (false, rgn2.IsVisible (0,1)); - Assert.AreEqual (true, rgn2.IsVisible (1,1)); - Assert.AreEqual (true, rgn2.IsVisible (2,1)); - Assert.AreEqual (false, rgn2.IsVisible (3,1)); - Assert.AreEqual (false, rgn2.IsVisible (0,2)); - Assert.AreEqual (false, rgn2.IsVisible (1,2)); - Assert.AreEqual (false, rgn2.IsVisible (2,2)); - Assert.AreEqual (false, rgn2.IsVisible (3,2)); - - - } - - [Test] - public void TestTranslate() - { - Region rgn1 = new Region (new RectangleF (10, 10, 120,120)); - rgn1.Translate (30,20); - Matrix matrix = new Matrix (); - - RectangleF [] rects = rgn1.GetRegionScans (matrix); - - Assert.AreEqual (1, rects.Length); - - Assert.AreEqual (40, rects[0].X); - Assert.AreEqual (30, rects[0].Y); - Assert.AreEqual (120, rects[0].Width); - Assert.AreEqual (120, rects[0].Height); - } - - } -} - - diff --git a/mcs/class/System.Drawing/Test/System.Drawing/TestSize.cs b/mcs/class/System.Drawing/Test/System.Drawing/TestSize.cs deleted file mode 100644 index c0eeae43da2..00000000000 --- a/mcs/class/System.Drawing/Test/System.Drawing/TestSize.cs +++ /dev/null @@ -1,201 +0,0 @@ -// Tests for System.Drawing.Size.cs -// -// Author: Ravindra (rkumar@novell.com) -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - - -using NUnit.Framework; -using System; -using System.Drawing; -using System.Security.Permissions; - -namespace MonoTests.System.Drawing -{ - [TestFixture] - [SecurityPermission (SecurityAction.Deny, UnmanagedCode = true)] - public class SizeTest : Assertion - { - Size sz1_1; - Size sz1_0; - Size sz0_1; - - [TearDown] - public void TearDown () {} - - [SetUp] - public void SetUp () - { - sz1_1 = new Size (1, 1); - sz1_0 = new Size (1, 0); - sz0_1 = new Size (0, 1); - } - - [Test] - public void TestConstructors () - { - Size sz_wh = new Size (1, 5); - AssertEquals ("C#1", 1, sz_wh.Width); - AssertEquals ("C#2", 5, sz_wh.Height); - - Size sz_pt = new Size (new Point (1, 5)); - AssertEquals ("C#3", 1, sz_pt.Width); - AssertEquals ("C#4", 5, sz_pt.Height); - - AssertEquals ("C#5", sz_wh, sz_pt); - } - - [Test] - public void TestEmptyField () - { - Size sz = new Size (0, 0); - AssertEquals ("EMP#1", sz, Size.Empty); - } - - [Test] - public void TestProperties () - { - Size sz = new Size (0, 0); - - Assert ("P#1", sz.IsEmpty); - Assert ("P#2", ! sz1_1.IsEmpty); - AssertEquals ("P#3", 1, sz1_0.Width); - AssertEquals ("P#4", 1, sz0_1.Height); - } - - [Test] - public void TestCeiling () - { - SizeF sf = new SizeF (0.5F, 0.6F); - AssertEquals ("CL#1", sz1_1, Size.Ceiling (sf)); - - sf = new SizeF (1.0F, 1.0F); - AssertEquals ("CL#2", sz1_1, Size.Ceiling (sf)); - } - - [Test] - public void TestEquals () - { - AssertEquals ("EQ#1", sz1_1, sz1_1); - AssertEquals ("EQ#2", sz1_1, new Size (1, 1)); - Assert ("EQ#3", ! sz1_1.Equals (sz1_0)); - Assert ("EQ#4", ! sz1_1.Equals (sz0_1)); - Assert ("EQ#5", ! sz1_0.Equals (sz0_1)); - } - - [Test] - public void TestRound () - { - SizeF sf = new SizeF (0.3F, 0.7F); - AssertEquals ("CL#1", sz0_1, Size.Round (sf)); - - sf = new SizeF (0.6F, 0.6F); - AssertEquals ("CL#2", sz1_1, Size.Round (sf)); - - sf = new SizeF (1.0F, 1.0F); - AssertEquals ("CL#3", sz1_1, Size.Round (sf)); - } - - - [Test] - public void TestTruncate () - { - SizeF sf = new SizeF (0.8f, 1.3f); - AssertEquals ("TR#1", sz0_1, Size.Truncate (sf)); - - sf = new SizeF (1.9f, 1.9f); - AssertEquals ("TR#2", sz1_1, Size.Truncate (sf)); - - sf = new SizeF (1.0f, 1.0f); - AssertEquals ("TR#3", sz1_1, Size.Truncate (sf)); - } - - [Test] - public void TestAddition () - { - AssertEquals ("ADD#1", sz1_1, sz1_0 + sz0_1); - AssertEquals ("ADD#2", sz1_1, sz1_1 + new Size (0, 0)); - } - - [Test] - public void TestEqualityOp () - { - Assert ("EOP#1", sz1_1 == sz1_1); - Assert ("EOP#2", sz1_1 == new Size (1, 1)); - Assert ("EOP#3", ! (sz1_1 == sz1_0)); - Assert ("EOP#4", ! (sz1_1 == sz0_1)); - Assert ("EOP#5", ! (sz1_0 == sz0_1)); - } - - [Test] - public void TestInequalityOp () - { - Assert ("IOP#1", ! (sz1_1 != sz1_1)); - Assert ("IOP#2", ! (sz1_1 != new Size (1, 1))); - Assert ("IOP#3", sz1_1 != sz1_0); - Assert ("IOP#4", sz1_1 != sz0_1); - Assert ("IOP#5", sz1_0 != sz0_1); - } - - [Test] - public void TestSubtraction () - { - AssertEquals ("SUB#1", sz1_0, sz1_1 - sz0_1); - AssertEquals ("SUB#2", sz0_1, sz1_1 - sz1_0); - } - - [Test] - public void TestSize2Point () - { - Point pt1 = new Point (1, 1); - Point pt2 = (Point) sz1_1; - - AssertEquals ("SZ2PT#1", pt1, pt2); - } - - [Test] - public void TestSize2SizeF () - { - SizeF sf1 = new SizeF (1.0F, 1.0F); - SizeF sf2 = (SizeF) sz1_1; - - AssertEquals ("SZ2SF#1", sf1, sf2); - } - - [Test] - public void ToStringTest () - { - AssertEquals ("{Width=1, Height=0}", sz1_0.ToString ()); - AssertEquals ("{Width=0, Height=0}", Size.Empty.ToString ()); - } - - [Test] - public void GetHashCodeTest () - { - AssertEquals (new Size (1, 0).GetHashCode (), sz1_0.GetHashCode ()); - } - } -} - diff --git a/mcs/class/System.Drawing/Test/System.Drawing/TestSizeConverter.cs b/mcs/class/System.Drawing/Test/System.Drawing/TestSizeConverter.cs deleted file mode 100644 index 22592590fa6..00000000000 --- a/mcs/class/System.Drawing/Test/System.Drawing/TestSizeConverter.cs +++ /dev/null @@ -1,462 +0,0 @@ -// -// Tests for System.Drawing.SizeConverter.cs -// -// Author: -// Ravindra (rkumar@novell.com) -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; -using System.Collections; -using System.ComponentModel; -using System.ComponentModel.Design.Serialization; -using System.Drawing; -using System.Globalization; -using System.Security.Permissions; -using System.Threading; - -using NUnit.Framework; - -namespace MonoTests.System.Drawing -{ - [TestFixture] - [SecurityPermission (SecurityAction.Deny, UnmanagedCode = true)] - public class SizeConverterTest - { - Size sz; - Size szneg; - SizeConverter szconv; - String szStrInvariant; - String sznegStrInvariant; - - [SetUp] - public void SetUp () - { - sz = new Size (10, 20); - szStrInvariant = sz.Width + CultureInfo.InvariantCulture.TextInfo.ListSeparator + " " + sz.Height; - - szneg = new Size (-20, -30); - sznegStrInvariant = szneg.Width + CultureInfo.InvariantCulture.TextInfo.ListSeparator + " " + szneg.Height; - - szconv = (SizeConverter) TypeDescriptor.GetConverter (sz); - } - - [Test] - public void TestCanConvertFrom () - { - Assert.IsTrue (szconv.CanConvertFrom (typeof (String)), "CCF#1"); - Assert.IsTrue (szconv.CanConvertFrom (null, typeof (String)), "CCF#2"); - Assert.IsFalse (szconv.CanConvertFrom (null, typeof (Rectangle)), "CCF#3"); - Assert.IsFalse (szconv.CanConvertFrom (null, typeof (RectangleF)), "CCF#4"); - Assert.IsFalse (szconv.CanConvertFrom (null, typeof (Point)), "CCF#5"); - Assert.IsFalse (szconv.CanConvertFrom (null, typeof (PointF)), "CCF#6"); - Assert.IsFalse (szconv.CanConvertFrom (null, typeof (Size)), "CCF#7"); - Assert.IsFalse (szconv.CanConvertFrom (null, typeof (SizeF)), "CCF#8"); - Assert.IsFalse (szconv.CanConvertFrom (null, typeof (Object)), "CCF#9"); - Assert.IsFalse (szconv.CanConvertFrom (null, typeof (int)), "CCF#10"); - Assert.IsTrue (szconv.CanConvertFrom (null, typeof (InstanceDescriptor)), "CCF#11"); - } - - [Test] - public void TestCanConvertTo () - { - Assert.IsTrue (szconv.CanConvertTo (typeof (String)), "CCT#1"); - Assert.IsTrue (szconv.CanConvertTo (null, typeof (String)), "CCT#2"); - Assert.IsFalse (szconv.CanConvertTo (null, typeof (Rectangle)), "CCT#3"); - Assert.IsFalse (szconv.CanConvertTo (null, typeof (RectangleF)), "CCT#4"); - Assert.IsFalse (szconv.CanConvertTo (null, typeof (Point)), "CCT#5"); - Assert.IsFalse (szconv.CanConvertTo (null, typeof (PointF)), "CCT#6"); - Assert.IsFalse (szconv.CanConvertTo (null, typeof (Size)), "CCT#7"); - Assert.IsFalse (szconv.CanConvertTo (null, typeof (SizeF)), "CCT#8"); - Assert.IsFalse (szconv.CanConvertTo (null, typeof (Object)), "CCT#9"); - Assert.IsFalse (szconv.CanConvertTo (null, typeof (int)), "CCT#10"); - } - - [Test] - public void TestConvertFrom () - { - Assert.AreEqual (sz, (Size) szconv.ConvertFrom (null, CultureInfo.InvariantCulture, - "10, 20"), "CF#1"); - Assert.AreEqual (szneg, (Size) szconv.ConvertFrom (null, CultureInfo.InvariantCulture, - "-20, -30"), "CF#2"); - - try { - szconv.ConvertFrom (null, CultureInfo.InvariantCulture, "10"); - Assert.Fail ("CF#3: must throw ArgumentException"); - } catch (Exception e) { - Assert.IsTrue (e is ArgumentException, "CF#3"); - } - - try { - szconv.ConvertFrom ("10"); - Assert.Fail ("CF#3a: must throw ArgumentException"); - } catch (Exception e) { - Assert.IsTrue (e is ArgumentException, "CF#3a"); - } - - try { - szconv.ConvertFrom (null, CultureInfo.InvariantCulture, - "1, 1, 1"); - Assert.Fail ("CF#4: must throw ArgumentException"); - } catch (Exception e) { - Assert.IsTrue (e is ArgumentException, "CF#4"); - } - - try { - szconv.ConvertFrom (null, CultureInfo.InvariantCulture, - "*1, 1"); - Assert.Fail ("CF#5-1: must throw Exception"); - } catch (Exception ex) { - Assert.AreEqual (typeof (Exception), ex.GetType (), "CF#5-2"); - Assert.IsNotNull (ex.InnerException, "CF#5-3"); - Assert.AreEqual (typeof (FormatException), ex.InnerException.GetType (), "CF#5-4"); - } - - try { - szconv.ConvertFrom (null, CultureInfo.InvariantCulture, - new Point (10, 10)); - Assert.Fail ("CF#6: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CF#6"); - } - - try { - szconv.ConvertFrom (null, CultureInfo.InvariantCulture, - new PointF (10, 10)); - Assert.Fail ("CF#7: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CF#7"); - } - - try { - szconv.ConvertFrom (null, CultureInfo.InvariantCulture, - new Size (10, 10)); - Assert.Fail ("CF#8: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CF#8"); - } - - try { - szconv.ConvertFrom (null, CultureInfo.InvariantCulture, - new SizeF (10, 10)); - Assert.Fail ("CF#9: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CF#9"); - } - - try { - szconv.ConvertFrom (null, CultureInfo.InvariantCulture, 0x10); - Assert.Fail ("CF#10: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CF#10"); - } - } - - [Test] - public void TestConvertTo () - { - Assert.AreEqual (szStrInvariant, (String) szconv.ConvertTo (null, - CultureInfo.InvariantCulture, sz, typeof (String)), "CT#1"); - Assert.AreEqual (sznegStrInvariant, (String) szconv.ConvertTo (null, - CultureInfo.InvariantCulture, szneg, typeof (String)), "CT#2"); - - try { - szconv.ConvertTo (null, CultureInfo.InvariantCulture, sz, - typeof (Size)); - Assert.Fail ("CT#3: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CT#3"); - } - - try { - szconv.ConvertTo (null, CultureInfo.InvariantCulture, sz, - typeof (SizeF)); - Assert.Fail ("CT#4: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CT#4"); - } - - try { - szconv.ConvertTo (null, CultureInfo.InvariantCulture, sz, - typeof (Point)); - Assert.Fail ("CT#5: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CT#5"); - } - - try { - szconv.ConvertTo (null, CultureInfo.InvariantCulture, sz, - typeof (PointF)); - Assert.Fail ("CT#6: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CT#6"); - } - - try { - szconv.ConvertTo (null, CultureInfo.InvariantCulture, sz, - typeof (int)); - Assert.Fail ("CT#7: must throw NotSupportedException"); - } catch (Exception e) { - Assert.IsTrue (e is NotSupportedException, "CT#7"); - } - } - - [Test] - public void TestGetCreateInstanceSupported () - { - Assert.IsTrue (szconv.GetCreateInstanceSupported (), "GCIS#1"); - Assert.IsTrue (szconv.GetCreateInstanceSupported (null), "GCIS#2"); - } - - [Test] - public void TestCreateInstance () - { - Size szInstance; - - Hashtable ht = new Hashtable (); - ht.Add ("Width", 10); ht.Add ("Height", 20); - - szInstance = (Size) szconv.CreateInstance (ht); - Assert.AreEqual (sz, szInstance, "CI#1"); - - ht.Clear (); - ht.Add ("Width", -20); ht.Add ("Height", -30); - - szInstance = (Size) szconv.CreateInstance (null, ht); - Assert.AreEqual (szneg, szInstance, "CI#2"); - - // Property names are case-sensitive. It should throw - // NullRefExc if any of the property names does not match - ht.Clear (); - ht.Add ("width", 20); ht.Add ("Height", 30); - try { - szInstance = (Size) szconv.CreateInstance (null, ht); - Assert.Fail ("CI#3: must throw NullReferenceException"); - } catch (Exception e) { - Assert.IsTrue (e is NullReferenceException, "CI#3"); - } - } - - [Test] - public void TestGetPropertiesSupported () - { - Assert.IsTrue (szconv.GetPropertiesSupported (), "GPS#1"); - Assert.IsTrue (szconv.GetPropertiesSupported (null), "GPS#2"); - } - - [Test] - public void TestGetProperties () - { - Attribute [] attrs; - PropertyDescriptorCollection propsColl; - - propsColl = szconv.GetProperties (sz); - Assert.AreEqual (2, propsColl.Count, "GP1#1"); - Assert.AreEqual (sz.Width, propsColl["Width"].GetValue (sz), "GP1#2"); - Assert.AreEqual (sz.Height, propsColl["Height"].GetValue (sz), "GP1#3"); - - propsColl = szconv.GetProperties (null, szneg); - Assert.AreEqual (2, propsColl.Count, "GP2#1"); - Assert.AreEqual (szneg.Width, propsColl["Width"].GetValue (szneg), "GP2#2"); - Assert.AreEqual (szneg.Height, propsColl["Height"].GetValue (szneg), "GP2#3"); - - propsColl = szconv.GetProperties (null, sz, null); - Assert.AreEqual (3, propsColl.Count, "GP3#1"); - Assert.AreEqual (sz.Width, propsColl["Width"].GetValue (sz), "GP3#2"); - Assert.AreEqual (sz.Height, propsColl["Height"].GetValue (sz), "GP3#3"); - Assert.AreEqual (sz.IsEmpty, propsColl["IsEmpty"].GetValue (sz), "GP3#4"); - - Type type = typeof (Size); - attrs = Attribute.GetCustomAttributes (type, true); - propsColl = szconv.GetProperties (null, sz, attrs); - Assert.AreEqual (0, propsColl.Count, "GP3#5"); - } - - [Test] - public void ConvertFromInvariantString_string () - { - Assert.AreEqual (sz, szconv.ConvertFromInvariantString (szStrInvariant), - "CFISS#1"); - Assert.AreEqual (szneg, szconv.ConvertFromInvariantString (sznegStrInvariant), - "CFISS#2"); - } - - [Test] - [ExpectedException (typeof (ArgumentException))] - public void ConvertFromInvariantString_string_exc_1 () - { - szconv.ConvertFromInvariantString ("1, 2, 3"); - } - - [Test] - public void ConvertFromInvariantString_string_exc_2 () - { - try { - szconv.ConvertFromInvariantString ("hello"); - Assert.Fail ("#1"); - } catch (Exception ex) { - Assert.AreEqual (typeof (Exception), ex.GetType (), "#2"); - Assert.IsNotNull (ex.InnerException, "#3"); - Assert.AreEqual (typeof (FormatException), ex.InnerException.GetType (), "#3"); - } - } - - [Test] - public void ConvertFromString_string () - { - // save current culture - CultureInfo currentCulture = Thread.CurrentThread.CurrentCulture; - - try { - PerformConvertFromStringTest (new CultureInfo ("en-US")); - PerformConvertFromStringTest (new CultureInfo ("nl-BE")); - PerformConvertFromStringTest (new MyCultureInfo ()); - } finally { - // restore original culture - Thread.CurrentThread.CurrentCulture = currentCulture; - } - } - - [Test] - [ExpectedException (typeof (ArgumentException))] - public void ConvertFromString_string_exc_1 () - { - CultureInfo culture = CultureInfo.CurrentCulture; - szconv.ConvertFromString (string.Format(culture, - "1{0} 2{0} 3{0} 4{0} 5", culture.TextInfo.ListSeparator)); - } - - [Test] - public void ConvertFromString_string_exc_2 () - { - try { - szconv.ConvertFromString ("hello"); - Assert.Fail ("#1"); - } catch (Exception ex) { - Assert.AreEqual (typeof (Exception), ex.GetType (), "#2"); - Assert.IsNotNull (ex.InnerException, "#3"); - Assert.AreEqual (typeof (FormatException), ex.InnerException.GetType (), "#3"); - } - } - - [Test] - public void ConvertToInvariantString_string () - { - Assert.AreEqual (szStrInvariant, szconv.ConvertToInvariantString (sz), - "CFISS#1"); - Assert.AreEqual (sznegStrInvariant, szconv.ConvertToInvariantString (szneg), - "CFISS#2"); - } - - [Test] - public void ConvertToString_string () - { - // save current culture - CultureInfo currentCulture = Thread.CurrentThread.CurrentCulture; - - try { - PerformConvertToStringTest (new CultureInfo ("en-US")); - PerformConvertToStringTest (new CultureInfo ("nl-BE")); - PerformConvertToStringTest (new MyCultureInfo ()); - } finally { - // restore original culture - Thread.CurrentThread.CurrentCulture = currentCulture; - } - } - - [Test] - public void GetStandardValuesSupported () - { - Assert.IsFalse (szconv.GetStandardValuesSupported ()); - } - - [Test] - public void GetStandardValues () - { - Assert.IsNull (szconv.GetStandardValues ()); - } - - [Test] - public void GetStandardValuesExclusive () - { - Assert.IsFalse (szconv.GetStandardValuesExclusive ()); - } - - private void PerformConvertFromStringTest (CultureInfo culture) - { - // set current culture - Thread.CurrentThread.CurrentCulture = culture; - - // perform tests - Assert.AreEqual (sz, szconv.ConvertFromString (CreateSizeString (culture, sz)), - "CFSS#1-" + culture.Name); - Assert.AreEqual (szneg, szconv.ConvertFromString (CreateSizeString (culture, szneg)), - "CFSS#2-" + culture.Name); - } - - private void PerformConvertToStringTest (CultureInfo culture) - { - // set current culture - Thread.CurrentThread.CurrentCulture = culture; - - // perform tests - Assert.AreEqual (CreateSizeString (culture, sz), szconv.ConvertToString (sz), - "CFISS#1-" + culture.Name); - Assert.AreEqual (CreateSizeString (culture, szneg), szconv.ConvertToString (szneg), - "CFISS#2-" + culture.Name); - } - - private static string CreateSizeString (Size size) - { - return CreateSizeString (CultureInfo.CurrentCulture, size); - } - - private static string CreateSizeString (CultureInfo culture, Size size) - { - return string.Format ("{0}{1} {2}", size.Width.ToString (culture), - culture.TextInfo.ListSeparator, size.Height.ToString (culture)); - } - - [Serializable] - private sealed class MyCultureInfo : CultureInfo - { - internal MyCultureInfo () : base ("en-US") - { - } - - public override object GetFormat (Type formatType) - { - if (formatType == typeof (NumberFormatInfo)) { - NumberFormatInfo nfi = (NumberFormatInfo) ((NumberFormatInfo) base.GetFormat (formatType)).Clone (); - - nfi.NegativeSign = "myNegativeSign"; - return NumberFormatInfo.ReadOnly (nfi); - } else { - return base.GetFormat (formatType); - } - } - } - } -} diff --git a/mcs/class/System.Drawing/Test/System.Drawing/TestSizeF.cs b/mcs/class/System.Drawing/Test/System.Drawing/TestSizeF.cs deleted file mode 100644 index 77549fd9133..00000000000 --- a/mcs/class/System.Drawing/Test/System.Drawing/TestSizeF.cs +++ /dev/null @@ -1,212 +0,0 @@ -// Tests for System.Drawing.SizeF.cs -// -// Author: Ravindra (rkumar@novell.com) -// -// Modified TestPoint.cs for testing SizeF.cs. -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; -using System.Drawing; -using System.Security.Permissions; -using System.Globalization; -using System.Threading; - -using NUnit.Framework; - -namespace MonoTests.System.Drawing -{ - [TestFixture] - [SecurityPermission (SecurityAction.Deny, UnmanagedCode = true)] - public class SizeFTest - { - SizeF sz11_99; - SizeF sz11_0; - SizeF sz0_11; - - [SetUp] - public void SetUp () - { - sz11_99 = new SizeF (1.1F, 9.9F); - sz11_0 = new SizeF (1.1F, 0F); - sz0_11 = new SizeF (0F, 1.1F); - } - - [Test] - public void TestConstructors () - { - SizeF sz_wh = new SizeF (1.5F, 5.8F); - Assert.AreEqual (1.5F, sz_wh.Width, "C#1"); - Assert.AreEqual (5.8F, sz_wh.Height, "C#2"); - - SizeF sz_pf = new SizeF (new PointF (1.5F, 5.8F)); - Assert.AreEqual (1.5F, sz_pf.Width, "C#3"); - Assert.AreEqual (5.8F, sz_pf.Height, "C#4"); - - SizeF sz_sz = new SizeF (sz_wh); - Assert.AreEqual (1.5F, sz_sz.Width, "C#5"); - Assert.AreEqual (5.8F, sz_sz.Height, "C#6"); - - Assert.AreEqual (sz_wh, sz_pf, "C#7"); - Assert.AreEqual (sz_pf, sz_sz, "C#8"); - Assert.AreEqual (sz_wh, sz_sz, "C#9"); - } - - [Test] - public void TestEmptyField () - { - SizeF sz = new SizeF (0.0F, 0.0F); - Assert.AreEqual (sz, SizeF.Empty, "EMP#1"); - } - - [Test] - public void TestProperties () - { - SizeF sz = new SizeF (0.0F, 0.0F); - - Assert.IsTrue (sz.IsEmpty, "P#1"); - Assert.IsFalse (sz11_99.IsEmpty, "P#2"); - Assert.AreEqual (1.1F, sz11_0.Width, "P#3"); - Assert.AreEqual (1.1F, sz0_11.Height, "P#4"); - } - - [Test] - public void TestEquals () - { - Assert.AreEqual (sz11_99, sz11_99, "EQ#1"); - Assert.AreEqual (sz11_99, new SizeF (1.1F, 9.9F), "EQ#2"); - Assert.IsFalse (sz11_99.Equals (sz11_0), "EQ#3"); - Assert.IsFalse (sz11_99.Equals (sz0_11), "EQ#4"); - Assert.IsFalse (sz11_0.Equals (sz0_11), "EQ#5"); - } - - [Test] - public void Test2PointF () - { - PointF p1 = new PointF (1.1F, 9.9F); - PointF p2 = sz11_99.ToPointF (); - - Assert.AreEqual (p1, p2, "2PF#1"); - } - - [Test] - public void Test2Size () - { - Size sz1 = new Size (1, 9); - Size sz2 = sz11_99.ToSize (); - - Assert.AreEqual (sz1, sz2, "2SZ#1"); - } - - - [Test] - public void TestAddition () - { - Assert.AreEqual (sz11_99, sz11_0 + new SizeF (0.0F, 9.9F), "ADD#1"); - Assert.AreEqual (sz11_99, new SizeF (0.0F, 0.0F) + new SizeF (1.1F, 9.9F), "ADD#2"); - } - - [Test] - public void TestEqualityOp () - { - Assert.IsTrue (sz11_99 == sz11_99, "EOP#1"); - Assert.IsTrue (sz11_99 == new SizeF (1.1F, 9.9F), "EOP#2"); - Assert.IsFalse (sz11_99 == sz11_0, "EOP#3"); - Assert.IsFalse (sz11_99 == sz0_11, "EOP#4"); - Assert.IsFalse (sz11_0 == sz0_11, "EOP#5"); - } - - [Test] - public void TestInequalityOp () - { - Assert.IsFalse (sz11_99 != sz11_99, "IOP#1"); - Assert.IsFalse (sz11_99 != new SizeF (1.1F, 9.9F), "IOP#2"); - Assert.IsTrue (sz11_99 != sz11_0, "IOP#3"); - Assert.IsTrue (sz11_99 != sz0_11, "IOP#4"); - Assert.IsTrue (sz11_0 != sz0_11, "IOP#5"); - } - - [Test] - public void TestSubtraction () - { - Assert.AreEqual (sz11_0, sz11_99 - new SizeF (0.0F, 9.9F), "SUB#1"); - Assert.AreEqual (sz0_11, new SizeF (1.1F, 1.1F) - new SizeF (1.1F, 0.0F), "SUB#2"); - } - - [Test] - public void TestSizeF2PointF () - { - PointF pf1 = new PointF (1.1F, 9.9F); - PointF pf2 = (PointF) sz11_99; - - Assert.AreEqual (pf1, pf2, "SF2PF#1"); - } - - [Test] - public void GetHashCodeTest () - { - Assert.AreEqual (sz11_0.GetHashCode (), new SizeF (1.1f, 0).GetHashCode (), "GHC#1"); - Assert.AreEqual (Size.Empty.GetHashCode (), new SizeF (0, 0).GetHashCode (), "GHC#2"); - } - - [Test] - public void ToStringTest () { - // save current culture - CultureInfo currentCulture = Thread.CurrentThread.CurrentCulture; - - try { - PerformToStringTest (new CultureInfo ("en-US")); - PerformToStringTest (new CultureInfo ("nl-BE")); - } finally { - // restore original culture - Thread.CurrentThread.CurrentCulture = currentCulture; - } - } - - private void PerformToStringTest (CultureInfo culture) - { - // set current culture - Thread.CurrentThread.CurrentCulture = culture; - - // perform tests - Assert.AreEqual (GetExpectedToString (culture, sz11_0), sz11_0.ToString (), - "TS#1-" + culture.Name); - Assert.AreEqual (GetExpectedToString (culture, sz0_11), sz0_11.ToString (), - "TS#2-" + culture.Name); - Assert.AreEqual (GetExpectedToString (culture, SizeF.Empty), SizeF.Empty.ToString (), - "TS#3-" + culture.Name); - SizeF size = new SizeF (float.NaN, float.NegativeInfinity); - Assert.AreEqual (GetExpectedToString (culture, size), size.ToString (), - "TS#4-" + culture.Name); - } - - private static string GetExpectedToString (CultureInfo culture, SizeF size) - { - return string.Format ("{{Width={0}, Height={1}}}", size.Width.ToString (culture), - size.Height.ToString (culture)); - } - } -} - diff --git a/mcs/class/System.Drawing/Test/System.Drawing/TestStringFormat.cs b/mcs/class/System.Drawing/Test/System.Drawing/TestStringFormat.cs deleted file mode 100644 index 657cc25078c..00000000000 --- a/mcs/class/System.Drawing/Test/System.Drawing/TestStringFormat.cs +++ /dev/null @@ -1,116 +0,0 @@ -// -// StringFormatFlags class testing unit -// -// Author: -// -// Jordi Mas i Hernàndez (jordi@ximian.com) -// -// (C) 2004 Ximian, Inc. http://www.ximian.com -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -using System; -using System.Drawing; -using System.Drawing.Imaging; -using System.Security.Permissions; -using NUnit.Framework; - -namespace MonoTests.System.Drawing{ - - [TestFixture] - [SecurityPermission (SecurityAction.Deny, UnmanagedCode = true)] - public class StringFormatTest { - - [TearDown] - public void Clean() {} - - [SetUp] - public void GetReady() - { - - } - - [Test] - public void TestSpecialConstructors() - { - StringFormat smf = StringFormat.GenericDefault; - smf = StringFormat.GenericTypographic; - } - - [Test] - public void TestClone() - { - StringFormat smf = new StringFormat(); - StringFormat smfclone = (StringFormat) smf.Clone(); - - Assert.AreEqual (smf.LineAlignment, smfclone.LineAlignment); - Assert.AreEqual (smf.FormatFlags, smfclone.FormatFlags); - Assert.AreEqual (smf.LineAlignment, smfclone.LineAlignment); - Assert.AreEqual (smf.Alignment, smfclone.Alignment); - Assert.AreEqual (smf.Trimming, smfclone.Trimming); - } - - [Test] - public void TestAlignment() - { - StringFormat smf = new StringFormat (); - - smf.LineAlignment = StringAlignment.Center; - Assert.AreEqual (StringAlignment.Center, smf.LineAlignment); - - smf.Alignment = StringAlignment.Far; - Assert.AreEqual (StringAlignment.Far, smf.Alignment); - } - - [Test] - public void TestFormatFlags() - { - StringFormat smf = new StringFormat (); - - smf.FormatFlags = StringFormatFlags.DisplayFormatControl; - Assert.AreEqual (StringFormatFlags.DisplayFormatControl, smf.FormatFlags); - } - - [Test] - public void TabsStops() - { - StringFormat smf = new StringFormat (); - - float firstTabOffset; - float[] tabsSrc = {100, 200, 300, 400}; - float[] tabStops; - - smf.SetTabStops(200, tabsSrc); - tabStops = smf.GetTabStops(out firstTabOffset); - - Assert.AreEqual (200, firstTabOffset); - Assert.AreEqual (tabsSrc.Length, tabStops.Length); - Assert.AreEqual (tabsSrc[0], tabStops[0]); - Assert.AreEqual (tabsSrc[1], tabStops[1]); - Assert.AreEqual (tabsSrc[2], tabStops[2]); - Assert.AreEqual (tabsSrc[3], tabStops[3]); - } - - } -} diff --git a/mcs/class/System.Drawing/Test/System.Drawing/TestSystemBrushes.cs b/mcs/class/System.Drawing/Test/System.Drawing/TestSystemBrushes.cs deleted file mode 100644 index 795cdf851df..00000000000 --- a/mcs/class/System.Drawing/Test/System.Drawing/TestSystemBrushes.cs +++ /dev/null @@ -1,718 +0,0 @@ -// Tests for System.Drawing.SystemBrushes.cs -// -// Author: Ravindra (rkumar@novell.com) -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - - -using NUnit.Framework; -using System; -using System.Drawing; -using System.Security.Permissions; - -namespace MonoTests.System.Drawing -{ - [TestFixture] - [SecurityPermission (SecurityAction.Deny, UnmanagedCode = true)] - public class SystemBrushesTest : Assertion - { - [TearDown] - public void TearDown () {} - - [SetUp] - public void SetUp () {} - - [Test] - public void TestActiveBorder () - { - SolidBrush brush; - brush = (SolidBrush) SystemBrushes.ActiveBorder; - Assert ("P1#1", brush.Color.IsSystemColor); - AssertEquals ("P1#2", SystemColors.ActiveBorder, brush.Color); - - try { - brush.Color = Color.Red; - Fail ("P1#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P1#3", true); - } - - try { - brush.Color = SystemColors.ActiveBorder; - Fail ("P1#4: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P1#4", true); - } - - try { - brush.Dispose(); - Fail ("P1#5: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("P1#5", true); - } - } - - [Test] - public void TestActiveCaption () - { - SolidBrush brush; - brush = (SolidBrush) SystemBrushes.ActiveCaption; - Assert ("P2#1", brush.Color.IsSystemColor); - AssertEquals ("P2#2", SystemColors.ActiveCaption, brush.Color); - - try { - brush.Color = Color.Red; - Fail ("P2#3: must throw ArgumentException"); - } catch (Exception e) { - Assert ("P2#3", e is ArgumentException); - } - - try { - brush.Color = SystemColors.ActiveCaption; - Fail ("P2#4: must throw ArgumentException"); - } catch (Exception e) { - Assert ("P2#4", e is ArgumentException); - } - - try { - brush.Dispose(); - Fail ("P2#5: must throw ArgumentException"); - } catch (Exception e) { - Assert ("P2#5", e is ArgumentException); - } - - } - - [Test] - public void TestActiveCaptionText () - { - SolidBrush brush; - brush = (SolidBrush) SystemBrushes.ActiveCaptionText; - Assert ("P3#1", brush.Color.IsSystemColor); - AssertEquals ("P3#2", SystemColors.ActiveCaptionText, brush.Color); - - try { - brush.Color = Color.Red; - Fail ("P3#3: must throw ArgumentException"); - } catch (Exception e) { - Assert ("P3#3", e is ArgumentException); - } - - try { - brush.Color = SystemColors.ActiveCaptionText; - Fail ("P3#4: must throw ArgumentException"); - } catch (Exception e) { - Assert ("P3#4", e is ArgumentException); - } - - try { - brush.Dispose(); - Fail ("P3#5: must throw ArgumentException"); - } catch (Exception e) { - Assert ("P3#5", e is ArgumentException); - } - } - - [Test] - public void TestAppWorkspace () - { - SolidBrush brush; - brush = (SolidBrush) SystemBrushes.AppWorkspace; - Assert ("P4#1", brush.Color.IsSystemColor); - AssertEquals ("P4#2", SystemColors.AppWorkspace, brush.Color); - - try { - brush.Color = Color.Red; - Fail ("P4#3: must throw ArgumentException"); - } catch (Exception e) { - Assert ("P4#3", e is ArgumentException); - } - - try { - brush.Color = SystemColors.AppWorkspace; - Fail ("P4#4: must throw ArgumentException"); - } catch (Exception e) { - Assert ("P4#4", e is ArgumentException); - } - - try { - brush.Dispose(); - Fail ("P4#5: must throw ArgumentException"); - } catch (Exception e) { - Assert ("P4#5", e is ArgumentException); - } - } - - [Test] - public void TestControl () - { - SolidBrush brush; - brush = (SolidBrush) SystemBrushes.Control; - Assert ("P5#1", brush.Color.IsSystemColor); - AssertEquals ("P5#2", SystemColors.Control, brush.Color); - - try { - brush.Color = Color.Red; - Fail ("P5#3: must throw ArgumentException"); - } catch (Exception e) { - Assert ("P5#3", e is ArgumentException); - } - - try { - brush.Color = SystemColors.Control; - Fail ("P5#4: must throw ArgumentException"); - } catch (Exception e) { - Assert ("P5#4", e is ArgumentException); - } - - try { - brush.Dispose(); - Fail ("P5#5: must throw ArgumentException"); - } catch (Exception e) { - Assert ("P5#5", e is ArgumentException); - } - - } - - [Test] - public void TestControlDark () - { - SolidBrush brush; - brush = (SolidBrush) SystemBrushes.ControlDark; - Assert ("P6#1", brush.Color.IsSystemColor); - AssertEquals ("P6#2", SystemColors.ControlDark, brush.Color); - - try { - brush.Color = Color.Red; - Fail ("P6#3: must throw ArgumentException"); - } catch (Exception e) { - Assert ("P6#3", e is ArgumentException); - } - - try { - brush.Color = SystemColors.ControlDark; - Fail ("P6#4: must throw ArgumentException"); - } catch (Exception e) { - Assert ("P6#4", e is ArgumentException); - } - - try { - brush.Dispose(); - Fail ("P6#5: must throw ArgumentException"); - } catch (Exception e) { - Assert ("P6#5", e is ArgumentException); - } - } - - [Test] - public void TestControlDarkDark () - { - SolidBrush brush; - brush = (SolidBrush) SystemBrushes.ControlDarkDark; - Assert ("P7#1", brush.Color.IsSystemColor); - AssertEquals ("P7#2", SystemColors.ControlDarkDark, brush.Color); - - try { - brush.Color = Color.Red; - Fail ("P7#3: must throw ArgumentException"); - } catch (Exception e) { - Assert ("P7#3", e is ArgumentException); - } - - try { - brush.Color = SystemColors.ControlDarkDark; - Fail ("P7#4: must throw ArgumentException"); - } catch (Exception e) { - Assert ("P7#4", e is ArgumentException); - } - - try { - brush.Dispose(); - Fail ("P7#5: must throw ArgumentException"); - } catch (Exception e) { - Assert ("P7#5", e is ArgumentException); - } - } - - [Test] - public void TestControlLight () - { - SolidBrush brush; - brush = (SolidBrush) SystemBrushes.ControlLight; - Assert ("P8#1", brush.Color.IsSystemColor); - AssertEquals ("P8#2", SystemColors.ControlLight, brush.Color); - - try { - brush.Color = Color.Red; - Fail ("P8#3: must throw ArgumentException"); - } catch (Exception e) { - Assert ("P8#3", e is ArgumentException); - } - - try { - brush.Color = SystemColors.ControlLight; - Fail ("P8#4: must throw ArgumentException"); - } catch (Exception e) { - Assert ("P8#4", e is ArgumentException); - } - - try { - brush.Dispose(); - Fail ("P8#5: must throw ArgumentException"); - } catch (Exception e) { - Assert ("P8#5", e is ArgumentException); - } - } - - [Test] - public void TestControlLightLight () - { - SolidBrush brush; - brush = (SolidBrush) SystemBrushes.ControlLightLight; - Assert ("P9#1", brush.Color.IsSystemColor); - AssertEquals ("P9#2", SystemColors.ControlLightLight, brush.Color); - - try { - brush.Color = Color.Red; - Fail ("P9#3: must throw ArgumentException"); - } catch (Exception e) { - Assert ("P9#3", e is ArgumentException); - } - - try { - brush.Color = SystemColors.ControlLightLight; - Fail ("P9#4: must throw ArgumentException"); - } catch (Exception e) { - Assert ("P9#4", e is ArgumentException); - } - - try { - brush.Dispose(); - Fail ("P9#5: must throw ArgumentException"); - } catch (Exception e) { - Assert ("P9#5", e is ArgumentException); - } - } - - [Test] - public void TestControlText () - { - SolidBrush brush; - brush = (SolidBrush) SystemBrushes.ControlText; - Assert ("P10#1", brush.Color.IsSystemColor); - AssertEquals ("P10#2", SystemColors.ControlText, brush.Color); - - try { - brush.Color = Color.Red; - Fail ("P10#3: must throw ArgumentException"); - } catch (Exception e) { - Assert ("P10#3", e is ArgumentException); - } - - try { - brush.Color = SystemColors.ControlText; - Fail ("P10#4: must throw ArgumentException"); - } catch (Exception e) { - Assert ("P10#4", e is ArgumentException); - } - - try { - brush.Dispose(); - Fail ("P10#5: must throw ArgumentException"); - } catch (Exception e) { - Assert ("P10#5", e is ArgumentException); - } - } - - - [Test] - public void TestDesktop () - { - SolidBrush brush; - brush = (SolidBrush) SystemBrushes.Desktop; - Assert ("P11#1", brush.Color.IsSystemColor); - AssertEquals ("P11#2", SystemColors.Desktop, brush.Color); - - try { - brush.Color = Color.Red; - Fail ("P11#3: must throw ArgumentException"); - } catch (Exception e) { - Assert ("P11#3", e is ArgumentException); - } - - try { - brush.Color = SystemColors.Desktop; - Fail ("P11#4: must throw ArgumentException"); - } catch (Exception e) { - Assert ("P11#4", e is ArgumentException); - } - - try { - brush.Dispose(); - Fail ("P11#5: must throw ArgumentException"); - } catch (Exception e) { - Assert ("P11#5", e is ArgumentException); - } - } - - [Test] - public void TestHighlight () - { - SolidBrush brush; - brush = (SolidBrush) SystemBrushes.Highlight; - Assert ("P12#1", brush.Color.IsSystemColor); - AssertEquals ("P12#2", SystemColors.Highlight, brush.Color); - - try { - brush.Color = Color.Red; - Fail ("P12#3: must throw ArgumentException"); - } catch (Exception e) { - Assert ("P12#3", e is ArgumentException); - } - - try { - brush.Color = SystemColors.Highlight; - Fail ("P12#4: must throw ArgumentException"); - } catch (Exception e) { - Assert ("P12#4", e is ArgumentException); - } - - try { - brush.Dispose(); - Fail ("P12#5: must throw ArgumentException"); - } catch (Exception e) { - Assert ("P12#5", e is ArgumentException); - } - } - - [Test] - public void TestHighlightText () - { - SolidBrush brush; - brush = (SolidBrush) SystemBrushes.HighlightText; - Assert ("P13#1", brush.Color.IsSystemColor); - AssertEquals ("P13#2", SystemColors.HighlightText, brush.Color); - - try { - brush.Color = Color.Red; - Fail ("P13#3: must throw ArgumentException"); - } catch (Exception e) { - Assert ("P13#3", e is ArgumentException); - } - - try { - brush.Color = SystemColors.HighlightText; - Fail ("P13#4: must throw ArgumentException"); - } catch (Exception e) { - Assert ("P13#4", e is ArgumentException); - } - - try { - brush.Dispose(); - Fail ("P13#5: must throw ArgumentException"); - } catch (Exception e) { - Assert ("P13#5", e is ArgumentException); - } - } - - [Test] - public void TestHotTrack () - { - SolidBrush brush; - brush = (SolidBrush) SystemBrushes.HotTrack; - Assert ("P14#1", brush.Color.IsSystemColor); - AssertEquals ("P14#2", SystemColors.HotTrack, brush.Color); - - try { - brush.Color = Color.Red; - Fail ("P14#3: must throw ArgumentException"); - } catch (Exception e) { - Assert ("P14#3", e is ArgumentException); - } - - try { - brush.Color = SystemColors.HotTrack; - Fail ("P14#4: must throw ArgumentException"); - } catch (Exception e) { - Assert ("P14#4", e is ArgumentException); - } - - try { - brush.Dispose(); - Fail ("P14#5: must throw ArgumentException"); - } catch (Exception e) { - Assert ("P14#5", e is ArgumentException); - } - } - - [Test] - public void TestInactiveBorder () - { - SolidBrush brush; - brush = (SolidBrush) SystemBrushes.InactiveBorder; - Assert ("P15#1", brush.Color.IsSystemColor); - AssertEquals ("P15#2", SystemColors.InactiveBorder, brush.Color); - - try { - brush.Color = Color.Red; - Fail ("P15#3: must throw ArgumentException"); - } catch (Exception e) { - Assert ("P15#3", e is ArgumentException); - } - - try { - brush.Color = SystemColors.InactiveBorder; - Fail ("P15#4: must throw ArgumentException"); - } catch (Exception e) { - Assert ("P15#4", e is ArgumentException); - } - - try { - brush.Dispose(); - Fail ("P15#5: must throw ArgumentException"); - } catch (Exception e) { - Assert ("P15#5", e is ArgumentException); - } - } - - [Test] - public void TestInactiveCaption () - { - SolidBrush brush; - brush = (SolidBrush) SystemBrushes.InactiveCaption; - Assert ("P16#1", brush.Color.IsSystemColor); - AssertEquals ("P16#2", SystemColors.InactiveCaption, brush.Color); - - try { - brush.Color = Color.Red; - Fail ("P16#3: must throw ArgumentException"); - } catch (Exception e) { - Assert ("P16#3", e is ArgumentException); - } - - try { - brush.Color = SystemColors.InactiveCaption; - Fail ("P16#4: must throw ArgumentException"); - } catch (Exception e) { - Assert ("P16#4", e is ArgumentException); - } - - try { - brush.Dispose(); - Fail ("P16#5: must throw ArgumentException"); - } catch (Exception e) { - Assert ("P16#5", e is ArgumentException); - } - } - - [Test] - public void TestInfo () - { - SolidBrush brush; - brush = (SolidBrush) SystemBrushes.Info; - Assert ("P17#1", brush.Color.IsSystemColor); - AssertEquals ("P17#2", SystemColors.Info, brush.Color); - - try { - brush.Color = Color.Red; - Fail ("P17#3: must throw ArgumentException"); - } catch (Exception e) { - Assert ("P17#3", e is ArgumentException); - } - - try { - brush.Color = SystemColors.Info; - Fail ("P17#4: must throw ArgumentException"); - } catch (Exception e) { - Assert ("P17#4", e is ArgumentException); - } - - try { - brush.Dispose(); - Fail ("P17#5: must throw ArgumentException"); - } catch (Exception e) { - Assert ("P17#5", e is ArgumentException); - } - } - - [Test] - public void TestMenu () - { - SolidBrush brush; - brush = (SolidBrush) SystemBrushes.Menu; - Assert ("P18#1", brush.Color.IsSystemColor); - AssertEquals ("P18#2", SystemColors.Menu, brush.Color); - - try { - brush.Color = Color.Red; - Fail ("P18#3: must throw ArgumentException"); - } catch (Exception e) { - Assert ("P18#3", e is ArgumentException); - } - - try { - brush.Color = SystemColors.Menu; - Fail ("P18#4: must throw ArgumentException"); - } catch (Exception e) { - Assert ("P18#4", e is ArgumentException); - } - - try { - brush.Dispose(); - Fail ("P18#5: must throw ArgumentException"); - } catch (Exception e) { - Assert ("P18#5", e is ArgumentException); - } - } - - [Test] - public void TestScrollBar () - { - SolidBrush brush; - brush = (SolidBrush) SystemBrushes.ScrollBar; - Assert ("P19#1", brush.Color.IsSystemColor); - AssertEquals ("P19#2", SystemColors.ScrollBar, brush.Color); - - try { - brush.Color = Color.Red; - Fail ("P19#3: must throw ArgumentException"); - } catch (Exception e) { - Assert ("P19#3", e is ArgumentException); - } - - try { - brush.Color = SystemColors.ScrollBar; - Fail ("P19#4: must throw ArgumentException"); - } catch (Exception e) { - Assert ("P19#4", e is ArgumentException); - } - - try { - brush.Dispose(); - Fail ("P19#5: must throw ArgumentException"); - } catch (Exception e) { - Assert ("P19#5", e is ArgumentException); - } - } - - [Test] - public void TestWindow () - { - SolidBrush brush; - brush = (SolidBrush) SystemBrushes.Window; - Assert ("P20#1", brush.Color.IsSystemColor); - AssertEquals ("P20#2", SystemColors.Window, brush.Color); - - try { - brush.Color = Color.Red; - Fail ("P20#3: must throw ArgumentException"); - } catch (Exception e) { - Assert ("P20#3", e is ArgumentException); - } - - try { - brush.Color = SystemColors.Window; - Fail ("P20#4: must throw ArgumentException"); - } catch (Exception e) { - Assert ("P20#4", e is ArgumentException); - } - - try { - brush.Dispose(); - Fail ("P20#5: must throw ArgumentException"); - } catch (Exception e) { - Assert ("P20#5", e is ArgumentException); - } - } - - [Test] - public void TestWindowText () - { - SolidBrush brush; - brush = (SolidBrush) SystemBrushes.WindowText; - Assert ("P21#1", brush.Color.IsSystemColor); - AssertEquals ("P21#2", SystemColors.WindowText, brush.Color); - - try { - brush.Color = Color.Red; - Fail ("P21#3: must throw ArgumentException"); - } catch (Exception e) { - Assert ("P21#3", e is ArgumentException); - } - - try { - brush.Color = SystemColors.WindowText; - Fail ("P21#4: must throw ArgumentException"); - } catch (Exception e) { - Assert ("P21#4", e is ArgumentException); - } - - try { - brush.Dispose(); - Fail ("P21#5: must throw ArgumentException"); - } catch (Exception e) { - Assert ("P21#5", e is ArgumentException); - } - } - - [Test] - public void TestFromSystemColor () - { - SolidBrush brush; - - brush = (SolidBrush) SystemBrushes.FromSystemColor (SystemColors.Menu); - AssertEquals ("M1#1", SystemColors.Menu, brush.Color); - - try { - brush.Color = Color.Red; - Fail ("M1#2: must throw ArgumentException"); - } catch (Exception e) { - Assert ("M1#2", e is ArgumentException); - } - - try { - brush.Color = SystemColors.Menu; - Fail ("M1#3: must throw ArgumentException"); - } catch (Exception e) { - Assert ("M1#3", e is ArgumentException); - } - - try { - brush.Dispose(); - Fail ("M1#4: must throw ArgumentException"); - } catch (Exception e) { - Assert ("M1#4", e is ArgumentException); - } - - - try { - brush = (SolidBrush) SystemBrushes.FromSystemColor (Color.Red); - Fail ("M2#1: must throw ArgumentException"); - } catch (Exception e) { - Assert ("M2#1", e is ArgumentException); - } - } - } -} diff --git a/mcs/class/System.Drawing/Test/System.Drawing/TestSystemPens.cs b/mcs/class/System.Drawing/Test/System.Drawing/TestSystemPens.cs deleted file mode 100644 index 1e82a8607df..00000000000 --- a/mcs/class/System.Drawing/Test/System.Drawing/TestSystemPens.cs +++ /dev/null @@ -1,364 +0,0 @@ -// Tests for System.Drawing.SystemPens.cs -// -// Author: -// Ravindra (rkumar@novell.com) -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - - -using NUnit.Framework; -using System; -using System.Drawing; -using System.Drawing.Drawing2D; -using System.Security.Permissions; - -namespace MonoTests.System.Drawing -{ - [TestFixture] - [SecurityPermission (SecurityAction.Deny, UnmanagedCode = true)] - public class SystemPensTest : Assertion - { - [TearDown] - public void TearDown () {} - - [SetUp] - public void SetUp () {} - - [Test] - public void TestActiveCaptionText () - { - Pen pen; - pen = SystemPens.ActiveCaptionText; - CheckProperties (pen, "P1", SystemColors.ActiveCaptionText); - CheckMethods (pen, "M1"); - } - - [Test] - public void TestControl () - { - Pen pen; - pen = SystemPens.Control; - CheckProperties (pen, "P2", SystemColors.Control); - CheckMethods (pen, "M2"); - } - - [Test] - public void TestControlDark () - { - Pen pen; - pen = SystemPens.ControlDark; - CheckProperties (pen, "P3", SystemColors.ControlDark); - CheckMethods (pen, "M3"); - } - - [Test] - public void TestControlDarkDark () - { - Pen pen; - pen = SystemPens.ControlDarkDark; - CheckProperties (pen, "P4", SystemColors.ControlDarkDark); - CheckMethods (pen, "M4"); - } - - [Test] - public void TestControlLight () - { - Pen pen; - pen = SystemPens.ControlLight; - CheckProperties (pen, "P5", SystemColors.ControlLight); - CheckMethods (pen, "M5"); - } - - [Test] - public void TestControlLightLight () - { - Pen pen; - pen = SystemPens.ControlLightLight; - CheckProperties (pen, "P6", SystemColors.ControlLightLight); - CheckMethods (pen, "M6"); - } - - [Test] - public void TestControlText () - { - Pen pen; - pen = SystemPens.ControlText; - CheckProperties (pen, "P7", SystemColors.ControlText); - CheckMethods (pen, "M7"); - } - - [Test] - public void TestGrayText () - { - Pen pen; - pen = SystemPens.GrayText; - CheckProperties (pen, "P8", SystemColors.GrayText); - CheckMethods (pen, "M8"); - } - - [Test] - public void TestHighlight () - { - Pen pen; - pen = SystemPens.Highlight; - CheckProperties (pen, "P9", SystemColors.Highlight); - CheckMethods (pen, "M9"); - } - - [Test] - public void TestHighlightText () - { - Pen pen; - pen = SystemPens.HighlightText; - CheckProperties (pen, "P10", SystemColors.HighlightText); - CheckMethods (pen, "M10"); - } - - [Test] - public void TestInactiveCaptionText () - { - Pen pen; - pen = SystemPens.InactiveCaptionText; - CheckProperties (pen, "P11", SystemColors.InactiveCaptionText); - CheckMethods (pen, "M11"); - } - - [Test] - public void TestInfoText () - { - Pen pen; - pen = SystemPens.InfoText; - CheckProperties (pen, "P12", SystemColors.InfoText); - CheckMethods (pen, "M12"); - } - - [Test] - public void TestMenuText () - { - Pen pen; - pen = SystemPens.MenuText; - CheckProperties (pen, "P13", SystemColors.MenuText); - CheckMethods (pen, "M13"); - } - - [Test] - public void TestWindowFrame () - { - Pen pen; - pen = SystemPens.WindowFrame; - CheckProperties (pen, "P14", SystemColors.WindowFrame); - CheckMethods (pen, "M14"); - } - - [Test] - public void TestWindowText () - { - Pen pen; - pen = SystemPens.WindowText; - CheckProperties (pen, "P15", SystemColors.WindowText); - CheckMethods (pen, "M15"); - } - - [Test] - public void TestFromSystemColor () - { - Pen pen; - - pen = SystemPens.FromSystemColor (SystemColors.MenuText); - CheckProperties (pen, "P16", SystemColors.MenuText); - CheckMethods (pen, "M16"); - - try { - pen = SystemPens.FromSystemColor (Color.Red); - Fail ("M17: must throw ArgumentException"); - } catch (ArgumentException) { - Assert ("M17", true); - } - } - - // helper test functions - void CheckProperties (Pen pen, String tag, Color sysColor) - { - // Try modifying properties of a SystemPen. - // ArgumentException must be thrown. - - Assert (tag + "#1", pen.Color.IsSystemColor); - AssertEquals (tag + "#1", sysColor, pen.Color); - - try { - pen.Alignment = PenAlignment.Center; - Fail (tag + "#2: must throw ArgumentException"); - } catch (ArgumentException) { - Assert (tag + "#2", true); - } - - try { - pen.Brush = new SolidBrush(Color.Red); - Fail (tag + "#3: must throw ArgumentException"); - } catch (ArgumentException) { - Assert (tag + "#3", true); - } - - try { - pen.Color = Color.Red; - Fail (tag + "#4: must throw ArgumentException"); - } catch (ArgumentException) { - Assert (tag + "#4", true); - } - - try { - pen.Color = sysColor; - Fail (tag + "#5" + ": must throw ArgumentException"); - } catch (ArgumentException) { - Assert (tag + "#5", true); - } -/* - try { - // NotImplemented - pen.CompoundArray = new float[2]; - Fail (tag + "#6: must throw ArgumentException"); - } catch (ArgumentException) { - Assert (tag + "#6", true); - } - - try { - // NotImplemented - pen.CustomEndCap = null; - Fail (tag + "#7: must throw ArgumentException"); - } catch (ArgumentException) { - Assert (tag + "#7", true); - } - - try { - // NotImplemented - pen.CustomStartCap = null; - Fail (tag + "#8: must throw ArgumentException"); - } catch (ArgumentException) { - Assert (tag + "#8", true); - } - - try { - // NotImplemented - pen.DashCap = DashCap.Flat; - Fail (tag + "#9: must throw ArgumentException"); - } catch (ArgumentException) { - Assert (tag + "#9", true); - } -*/ - try { - pen.DashOffset = 5.5F; - Fail (tag + "#10: must throw ArgumentException"); - } catch (ArgumentException) { - Assert (tag + "#10", true); - } - - try { - pen.DashPattern = null; - Fail (tag + "#11: must throw ArgumentException"); - } catch (ArgumentException) { - Assert (tag + "#11", true); - } - - try { - pen.DashStyle = DashStyle.Dot; // hangs!prob - Fail (tag + "#12: must throw ArgumentException"); - } catch (ArgumentException) { - Assert (tag + "#12", true); - } -/* - try { - // NotImplemented - pen.EndCap = LineCap.Round; - Fail (tag + "#13: must throw ArgumentException"); - } catch (ArgumentException) { - Assert (tag + "#13", true); - } -*/ - try { - pen.LineJoin = LineJoin.Round; - Fail (tag + "#14: must throw ArgumentException"); - } catch (ArgumentException) { - Assert (tag + "#14", true); - } - - try { - pen.MiterLimit = 0.1f; - Fail (tag + "#15: must throw ArgumentException"); - } catch (ArgumentException) { - Assert (tag + "#15", true); - } -/* - try { - // NotImplemented - pen.StartCap = LineCap.Square; - Fail (tag + "#16: must throw ArgumentException"); - } catch (ArgumentException) { - Assert (tag + "#16", true); - } -*/ - try { - pen.Transform = new Matrix (); //Matrix hangs!problem - Fail (tag + "#17: must throw ArgumentException"); - } catch (ArgumentException) { - Assert (tag + "#17", true); - } - - try { - pen.Width = 0.5F; - Fail (tag + "#18: must throw ArgumentException"); - } catch (ArgumentException) { - Assert (tag + "#18", true); - } - } - - void CheckMethods (Pen pen, String tag) - { - // Try modifying a SystemPen by calling methods. - // ArgumentException must be thrown in some cases. -/* - try { - // NotImplemented - pen.SetLineCap (LineCap.Flat, LineCap.Round, DashCap.Triangle); - Fail (tag + "#1: must throw ArgumentException"); - } catch (ArgumentException) { - Assert (tag + "#1", true); - } -*/ - pen.ResetTransform (); - pen.RotateTransform (90); - pen.ScaleTransform (2, 1); - pen.TranslateTransform (10, 20); - pen.MultiplyTransform (new Matrix ()); - pen.Clone (); - - try { - pen.Dispose (); - Fail (tag + "#8: must throw ArgumentException"); - } catch (ArgumentException) { - Assert (tag + "#8", true); - } - } - } -} diff --git a/mcs/class/System.Drawing/Test/System.Drawing/bitmaps/VisualPng.ico b/mcs/class/System.Drawing/Test/System.Drawing/bitmaps/VisualPng.ico deleted file mode 100644 index 68aa3719fb523eccd4c4a706e4198ca1be2b4c62..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 766 zcmb_ayGjE=6ul!BJ4Il&5f%%#i;YeE0sqBX?6q(TQ7j^}Bh9<%xts4i6 zkcy&!=Yp>fdCw6P!YMX?g~S3@L(=jS0+)s|NiKlEgL>VOVf)WTfR)85V$RN>JwSV-vWY^X3AQl6o~-A`A21P`H#(L`ua zC6p2|SPTx|B;lEdR<4J97z(@|!YJx7#d!1r3hTe|MU4YoP< Ob-aH+fF44>&V2wPTAUpK diff --git a/mcs/class/System.Drawing/Test/System.Drawing/bitmaps/VisualPng1.ico b/mcs/class/System.Drawing/Test/System.Drawing/bitmaps/VisualPng1.ico deleted file mode 100644 index 68aa3719fb523eccd4c4a706e4198ca1be2b4c62..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 766 zcmb_ayGjE=6ul!BJ4Il&5f%%#i;YeE0sqBX?6q(TQ7j^}Bh9<%xts4i6 zkcy&!=Yp>fdCw6P!YMX?g~S3@L(=jS0+)s|NiKlEgL>VOVf)WTfR)85V$RN>JwSV-vWY^X3AQl6o~-A`A21P`H#(L`ua zC6p2|SPTx|B;lEdR<4J97z(@|!YJx7#d!1r3hTe|MU4YoP< Ob-aH+fF44>&V2wPTAUpK diff --git a/mcs/class/System.Drawing/Test/System.Drawing/bitmaps/almogaver-os2.bmp b/mcs/class/System.Drawing/Test/System.Drawing/bitmaps/almogaver-os2.bmp deleted file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%KzBKI=0+yUE5__wa+r`S(|Egy416oVd{MysT%pUvK{fd&dN7rY*mhF&pC^fp3+aT zm`}yf`qEx{wTgPXO|#kaqiylB6kD-eF?3-z zK53I>Ws4`tCUQNot=L=kBGxy4IBS1-ScJ0$*buk^_Lsd9{E_+;)m)<@zP4 zrggnET+-XE+ns0|4x|Vdd_UD?Y|}Z(I%(dq5!PqiFdH;^k}V7guqg|cI1NG1enZ7= zUs9axWg9znk+@};;>;1sIcRUu9toGkUeJdMdj+P5N3xdTOe-UzoG;G#c6LJ73LAsJ z#9oO_!ZyJhz$i8ho=7hYVh*016L~3@Bm8rJrY?ZE6}8>_&&p;iK7b8Df6ROHe7M2R zL+T$S{d1h+uS-?Kw!54(aO^ z3*M}Cuv7h%k4PVRMeloA|Cio9C^bfLc+KQak**+3akBK?cJ%gXOUzzlW$ONJj~A#e z1z>e?gCFhjCu+*?DQEALtRtUnhAmtrtOQ5d))Ts>`_t6V|Aa*;&swfve=GUwPxfh< z(N^iZY4*&sE%ds2%6*NuG1CKWX^5}IZ{XZ3x8(gr!TRwGnBiCNOIf=Z4{bj^d!vC zCf3Qir4PVy#UBqzE8(#h*a2(_kHNpNf%$u7e!h{|tBcpj{&{Q#=Ndnk7y&kz+%5kH z*Vu{-_4G(sC!Le_bMU!+?>S*mc@6OkmwS^P+`LPD1rFsn9gkmRs(FP=!yCBDX-TQE z;x}y0J}y3T#PvNuv%Tl2?5%hLu{ft|<+FrQ)(`lE!|)xj|L|yV3O9$lvUc~Ycgh;Y zQ#@;kIsw)j*xhwRxj6M!AcwI``A>2RU=z%NRbm62C;sp0O@nU-XW;yBcxHsUQ-d#njme&l|!8Uv8YV(ZtMWQ%)mNYn3-|EKS{Lu)8QIYQPNxox+1>{L(NBUkmEH5XHB G=Kld1)g?~= diff --git a/mcs/class/System.Drawing/Test/System.Drawing/bitmaps/almogaver8bits.bmp b/mcs/class/System.Drawing/Test/System.Drawing/bitmaps/almogaver8bits.bmp deleted file mode 100644 index 4249d1376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8^_UzGho1`o-|a{esU6hW!5jsQV7QM~A}!!O`BFuP77`*_yCEeof zFZ=tiu2Kb0i^K8ZPe1)M9vA%J51B;X#vpJ3+kpa>&4kVDg(OT7Z_!`4x`?Si zu6^bAWOFQYyzWSI@%i)7(VJp`GGo(kQT_bO-d6|aMz0Lk;9Tzf`dWC~_Yq~VuHyAG z-XMxHj%-j;aT)i15)3=K`17C` z#wTlvE9;9fX_k4hGkfS-ssE-b%9Sb?{48L^ZC zMe^&j9DODJK%*4id^dnlPu%IY#e@DpqWwmCTQfH)W#>+?VCb4lzn8ifBB}&>C`Sa{ zbD=VsU&C3zY*UT6MAsXtN*V+go!|Hm5y#_e6_FHJN*rE8DCzzE?~3|&rT&|K$B8gF g)5}kx5)wcS)oEk+C@!xc4Jwy$>JWc%0t9&fAN7($;s5{u diff --git a/mcs/class/System.Drawing/Test/System.Drawing/bitmaps/maketransparent.bmp b/mcs/class/System.Drawing/Test/System.Drawing/bitmaps/maketransparent.bmp deleted file mode 100644 index b9f6a206dd26d0f7562d0c980d8d11d095533a77..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 24534 zcmeI$+fl#j3xA*VQ zY1v-W`%8L#Y_F&3dD;K99bba&?Pr?wlLdr90Y;hWvIBWgfYD{!A}?GX6kwE@E<2D1 z1sGknE%L(UK>9PZPP=L{8+afPq9u#1dnJzn!2L%{iwk`6)V|c{*|CEzQ39yWF zfzkk5d0@bJxW{d=``0#KvH$GOGY3wUGF`S~84n^E<*`|Gt!n;^W0?D|vY(-^E$Wrn zlGuB6+#@x{y2p^j*uwzBmP8&DVDzX#kL@>W4#O5P^DxG+B9R9L7#+JW>Z^t{he?YV zcnriipF|!MU{rVhfj#OEqRK-at-m1DA4Pu*$2j>brdY~>M`wMBJSZv;d4zhH27i8} z^oHLut@_kYxb_})d;8p-N993OdB~%6%c?)rAFcjKkKKVS@=qo^zXS4VEN$N1KNv!C zGDcdpJSf1Zzb(p7Fm93ao5Qj{Rv0r96AXD&w@0<3Z1_{g1}$RM9QOUOik?bhh%w4z znP)-iTFm?jE3n)n{ diff --git a/mcs/class/System.Drawing/Test/System.Drawing/bitmaps/nature24bits.gif b/mcs/class/System.Drawing/Test/System.Drawing/bitmaps/nature24bits.gif deleted file mode 100644 index dfd1cd5c9789516614137df2bc1c64342b1c239f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10292 zcmWkzc|6qJ_y273nHh%0mL)Wn82i|FX6&+!EfN}1$<|aVM9pf;GPK!}XrbsCQYkHC zD`Xi(Nz{}UZBNtoO(oCI@BVl0ANRao=bn4s%k}m5ad1q?0Fr>W{{c7!b)1rt!kRS- z+A1nq2Ab*?dg@x5I*MyG4OMk@l}YxbwOU$aBa)$|s)@Ijsr5Qjl8J$pg|RZ(glulC zXJle-ZfvA$=59yU*SDZplg%wG)D6w;?Tn0VExbJ_YaJcd8adId9L+85X%t5%KWlXx z2U{0=3v3>ws%)HFD?C0Mvi;lj6Gix$rt(+-m@=#5uShRc&;Cl zeImZFIW2c!H?R2k!SG`TlB;v0d91w3LkXv{;}3F*it-8yIlGVL?kYc&$7j`M@;kPb zH`N{57FT)OqxR#e;1RTKCq5fS5}ssE6GZ#d0AdrT~*0$E#1*p z9@|-z(pFVKAmp62L&1xA;YJbz%P|H2{sJ!`~`o@;N zx*fOb4qRzq@4ocu^2wU6`qJB{_XP_oUz}++moy(AM>V{A9uIS+^M*9e`5A_UDx2mqrQ_D#w1g{ zmySIC{%)XXeDJ}O`$M;8=ig4W-kSZ~{^G~*6G{F1zpo$OnVgxr|L)JX7q`Yg{doQA z!}R;FpWeKj{q*U7Z^zzzc>Cl1Q^}vd-+xN}`!VtJ$Cpok{(fHi-=C%b{{FY5v#c5D zP4gl}Y~7Nau`_Mw_8nXIko+^Yn3FbGno}$RQ($HN|62iY%K%MB*Td^XSLTO|BG|XI z#(w8Q*O$JxC2Q{-{JZpP{`|!AJBR)_6)*X9oEbVo4!;mP^x%xyrW=~sUo&OZt@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aps/nature24bits.jpg deleted file mode 100644 index dc21e0de7b3774a0db10e7aaaaf775b98eb06a8f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2372 zcmb7FXIPV28vVWmqzVb429Oj&F9`z-GExH(2#7$C-a#osq!&e2dNWE1WtdeH1`NF^ z0x}LA1cHE(qEUfC91#@-)-oa+)>&ug=f3Z+`#$$M&$;KGbMM~5-Vy+_BiWJwkk>Z6 z2KK%HO7_+kRwznHP-qnOH1$+iNG!@WDo6))f}n#Z0DF&sOh8IZTtfVylmuKtMp{Zv zNgt!6sHkMFgICeFCmwes6K!oMe#s{(9x+}vwqcjTV^S~VxGfM9>&S){5ouvQtDPOK}zBd|a45+zrYxtkI5~j8$XftPm$F0-1>W0=m$68NWuJZd%9zLAXRzG1(&pXMH zV?IOI_gwTZ^O%o0!s)16B-~WS>auW#ULI!=#@hz$Vg$31&^bq0W2Xj#VU63~4_6ni zUDH^Vx;J>ECcLI}PO~u_GA(7!yU-y(7Y0BeAcP;n59R+;FOYX^2{ZyjuyEoF(EHBv zLK_TQgu)Y@1EYDm2=W93&A{_l@F~^mR--pfI%%t_Q!g2Ep4M-6Ybt~7n&*QQdUv7` z4G}?NzOLPgy4~C5yT;wDUq&^I3M8AyQnId7cT~%kZ|;~Jvb)Vq#y06xEgqS1e^So+ zxK$Vb>dugoddNn!G1l*J%UQiuF70~a^X~d`XT7f5p`)gDzvQvI#cWsB-z?Jn-aieR z9Zxy@FrvdUUfRwTnj5i()9r6&5;659((e|IF-WT8s$pi)E*bA4icgC6%rsn{Fts=< zai#E5+b}g?^-;{&&Vq-ch(R19m~snS5>*}FepWW7H|7ro>Pa&8HBr+`czix#uYzhmpei^<&)G6LvAPa11@aG=*I1WG}iIcvr~%AwMT@> ztk&u*DS1h!9EAv`QS|*8ITXu@=tdaav~`j@a+2wDT-r6Q)qhd! zg+)dkOwwNz$v2%`>OgSfYvGcVR!9=V088d%PA?j}P@S9uF zQN_L~2g5FQ@E>+9p1nT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*PPLy2i@0T&{H$;4$h$CebS*14*r^JgcNnwCg{iG!TKb=pBk!eIY@DKQwsk8pv9%t!>+vd$Zjy gnfp2GevWU!OJjDI%wX;3#$e5@@0Z5F-e52P0hm}%wg3PC diff --git a/mcs/class/System.Drawing/Test/System.Drawing/tests-ms.sh b/mcs/class/System.Drawing/Test/System.Drawing/tests-ms.sh deleted file mode 100755 index 6e17f270393..00000000000 --- a/mcs/class/System.Drawing/Test/System.Drawing/tests-ms.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/sh - -if [ $# -eq 0 ]; then - echo "You should give a list of test names such as: " - echo "$0 System.Drawing.TestStringFormat" - echo "or" - echo "$0 all" - exit 1 -fi - -export MSNet=Yes -cp ../../System.Drawing_test_default.dll . -topdir=../../../.. -NUNITCONSOLE=$topdir/class/lib/default/nunit-console.exe -MONO_PATH=$topdir/nunit20:$topdir/class/lib:. - -for i in $@; do - if [ "$i" = "all" ]; then - fixture="" - else - fixture="/fixture:MonoTests.${i}" - fi - MONO_PATH=$MONO_PATH \ - ${NUNITCONSOLE} System.Drawing_test_default.dll $fixture -done - - - diff --git a/mcs/class/System.Drawing/Test/System.Drawing/tests.sh b/mcs/class/System.Drawing/Test/System.Drawing/tests.sh deleted file mode 100755 index 511cfcd6ee6..00000000000 --- a/mcs/class/System.Drawing/Test/System.Drawing/tests.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh - -if [ $# -eq 0 ]; then - echo "You should give a list of test names such as: " - echo "$0 System.Drawing.TestStringFormat" - echo "or" - echo "$0 all" - exit 1 -fi - -cp ../../System.Drawing_test_default.dll . - -topdir=../../../.. -NUNITCONSOLE=$topdir/class/lib/default/nunit-console.exe -MONO_PATH=$topdir/nunit20:$topdir/class/lib/default:. - - -for i in $@; do - if [ "$i" = "all" ]; then - fixture="" - else - fixture="/fixture:MonoTests.${i}" - fi - MONO_PATH=$MONO_PATH \ - mono --debug ${NUNITCONSOLE} System.Drawing_test_default.dll $fixture -done - - - diff --git a/mcs/class/System.Drawing/Test/Test.dotnet.csproj b/mcs/class/System.Drawing/Test/Test.dotnet.csproj deleted file mode 100644 index 8a69b3d5816..00000000000 --- a/mcs/class/System.Drawing/Test/Test.dotnet.csproj +++ /dev/null @@ -1,543 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/mcs/class/System.Drawing/Test/Test.vmwcsproj b/mcs/class/System.Drawing/Test/Test.vmwcsproj deleted file mode 100644 index c42968e055e..00000000000 --- a/mcs/class/System.Drawing/Test/Test.vmwcsproj +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/mcs/class/System.Drawing/Test/resources/indexed.png b/mcs/class/System.Drawing/Test/resources/indexed.png deleted file mode 100644 index 2ea1fe10934774421f382b96c34bfc82fb3603f5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 238 zcmeAS@N?(olHy`uVBq!ia0vp^tU%1k!VDxint!haQqloFA+8Dx3{i9L)oggWefO=Y zCw{NG_~+QQ7uTMDW-y#1$X?3=RK{2ml0q0`(n1C{Hb+*4X$c7)EJ^>sM#2C9 diff --git a/mcs/class/System.Drawing/cdeclRedirector/cdeclCallback.dll b/mcs/class/System.Drawing/cdeclRedirector/cdeclCallback.dll deleted file mode 100644 index 79bd372fb2d3114df043a171eb3f0938fc5d313c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3072 zcmeHJ-HTgA6hCv5bdy~-nw8R2R-9#b1#7uwcZ;ADO_S8RlCX87eNdrIZid}!Z|+_0 zy&GB(>4S)meb6Tt1)qFUANo)P!51q&?EhfFKcP<|)Zdvqlg;*H!BPr^4w*COcfRJF zGc!rrA6}yz5#=%O+#$Mwl}Am}gUMB>%P;*>rt78Mxf`OjJNN#kpUAB^+K9UY>2<>} zN@Y*UcsrDSD4S~?If(koot~atFrm+#A!-SSe%m?vmfh_yD$h-cLqtVLoJ{)T%UC65 z4U>t)0v+eg!>)7@!1$mph@aD+z12W=!uS|**E070v_|yI{WS+mWtP4*DgwV_0aiCv zms70QQKqhCtX69#i7vXa3L?+sP=khRo5UO&HKO_${9o)f?kfi8#-TSQ(d`0}0RJ$< zdBCW5-mME0mHRnda+lnbE6dAzle|8*9UR#FXGH&E{S*nzchcAoHxf3vjGSt*pB#-WFwZ?-_k0j?lzDKfY4h5`Hh5OJn_}tPXw)R5mEv?^&yZ z-!ZCKg#DK3`4Qs%j_mW}{@VRc(F+!7zu6Ju{iH$Jesflb{hBmy5&T-{F^{ai1$xDx z%(QU848_gBO8TpF7I?)r9^`UB-QqQRCQsJNrzq3@}LIEh9S4jY^it)5P42^>$RQakMFJ?4L7ME9Wh%yB!!$7)uPPJRH`$F zXA4q@nTnPcs{qBB%7k>ZNlE5mQ-qP06stv}sb(5>M;x}T7AIu^#@d?bbMxE6SKwRb zC3E)<`x}&LE;ORJ83gUFA7-~hDYqZ+cRl{0ERw8g?kRah9gx|7i=SV6MDd=6d7?V- EANdj!)Bpeg diff --git a/mcs/class/System.Drawing/cdeclRedirector/cdeclCallback.il b/mcs/class/System.Drawing/cdeclRedirector/cdeclCallback.il deleted file mode 100644 index 79d9bc08221..00000000000 --- a/mcs/class/System.Drawing/cdeclRedirector/cdeclCallback.il +++ /dev/null @@ -1,204 +0,0 @@ -// -// cdeclCallback.il -// -// Author: -// Alexandre Pigolkine (pigolkine@gmx.de) -// -// (C) 2002/2003 Ximian, Inc. -.assembly extern mscorlib -{ -} -.assembly cdeclCallback -{ -} - -.namespace cdeclCallback -{ - .class public auto ansi beforefieldinit cdeclRedirector - extends [mscorlib]System.Object - { - .class auto ansi sealed nested public MethodVoidIntPtr - extends [mscorlib]System.MulticastDelegate - { - .method public hidebysig specialname rtspecialname - instance void .ctor(object 'object', - native int 'method') runtime managed - { - } // end of method MethodVoidIntPtr::.ctor - - .method public hidebysig virtual instance void modopt([mscorlib]System.Runtime.CompilerServices.CallConvCdecl) - Invoke(native int param) runtime managed - { - } // end of method MethodVoidIntPtr::Invoke - - .method public hidebysig newslot virtual - instance class [mscorlib]System.IAsyncResult - BeginInvoke(native int param, - class [mscorlib]System.AsyncCallback callback, - object 'object') runtime managed - { - } // end of method MethodVoidIntPtr::BeginInvoke - - .method public hidebysig newslot virtual - instance void EndInvoke(class [mscorlib]System.IAsyncResult result) runtime managed - { - } // end of method MethodVoidIntPtr::EndInvoke - - } // end of class MethodVoidIntPtr - - .class auto ansi sealed nested public MethodIntIntPtr - extends [mscorlib]System.MulticastDelegate - { - .method public hidebysig specialname rtspecialname - instance void .ctor(object 'object', - native int 'method') runtime managed - { - } // end of method MethodIntIntPtr::.ctor - - .method public hidebysig virtual instance int32 modopt([mscorlib]System.Runtime.CompilerServices.CallConvCdecl) - Invoke(native int param) runtime managed - { - } // end of method MethodIntIntPtr::Invoke - - .method public hidebysig newslot virtual - instance class [mscorlib]System.IAsyncResult - BeginInvoke(native int param, - class [mscorlib]System.AsyncCallback callback, - object 'object') runtime managed - { - } // end of method MethodIntIntPtr::BeginInvoke - - .method public hidebysig newslot virtual - instance int32 EndInvoke(class [mscorlib]System.IAsyncResult result) runtime managed - { - } // end of method MethodIntIntPtr::EndInvoke - - } // end of class MethodIntIntPtr - - .class auto ansi sealed nested public MethodVoidIntPtrInt - extends [mscorlib]System.MulticastDelegate - { - .method public hidebysig specialname rtspecialname - instance void .ctor(object 'object', - native int 'method') runtime managed - { - } // end of method MethodVoidIntPtrInt::.ctor - - .method public hidebysig virtual instance void modopt([mscorlib]System.Runtime.CompilerServices.CallConvCdecl) - Invoke(native int param, - int32 param1) runtime managed - { - } // end of method MethodVoidIntPtrInt::Invoke - - .method public hidebysig newslot virtual - instance class [mscorlib]System.IAsyncResult - BeginInvoke(native int param, - int32 param1, - class [mscorlib]System.AsyncCallback callback, - object 'object') runtime managed - { - } // end of method MethodVoidIntPtrInt::BeginInvoke - - .method public hidebysig newslot virtual - instance void EndInvoke(class [mscorlib]System.IAsyncResult result) runtime managed - { - } // end of method MethodVoidIntPtrInt::EndInvoke - - } // end of class MethodVoidIntPtrInt - - .class auto ansi sealed nested public MethodIntIntPtrInt - extends [mscorlib]System.MulticastDelegate - { - .method public hidebysig specialname rtspecialname - instance void .ctor(object 'object', - native int 'method') runtime managed - { - } // end of method MethodIntIntPtrInt::.ctor - - .method public hidebysig virtual instance int32 modopt([mscorlib]System.Runtime.CompilerServices.CallConvCdecl) - Invoke(native int param, - int32 param1) runtime managed - { - } // end of method MethodIntIntPtrInt::Invoke - - .method public hidebysig newslot virtual - instance class [mscorlib]System.IAsyncResult - BeginInvoke(native int param, - int32 param1, - class [mscorlib]System.AsyncCallback callback, - object 'object') runtime managed - { - } // end of method MethodIntIntPtrInt::BeginInvoke - - .method public hidebysig newslot virtual - instance int32 EndInvoke(class [mscorlib]System.IAsyncResult result) runtime managed - { - } // end of method MethodIntIntPtrInt::EndInvoke - - } // end of class MethodIntIntPtrInt - - .class auto ansi sealed nested public MethodVoidIntPtrIntPtr - extends [mscorlib]System.MulticastDelegate - { - .method public hidebysig specialname rtspecialname - instance void .ctor(object 'object', - native int 'method') runtime managed - { - } // end of method MethodVoidIntPtrIntPtr::.ctor - - .method public hidebysig virtual instance void modopt([mscorlib]System.Runtime.CompilerServices.CallConvCdecl) - Invoke(native int param, - native int param1) runtime managed - { - } // end of method MethodVoidIntPtrIntPtr::Invoke - - .method public hidebysig newslot virtual - instance class [mscorlib]System.IAsyncResult - BeginInvoke(native int param, - native int param1, - class [mscorlib]System.AsyncCallback callback, - object 'object') runtime managed - { - } // end of method MethodVoidIntPtrIntPtr::BeginInvoke - - .method public hidebysig newslot virtual - instance int32 EndInvoke(class [mscorlib]System.IAsyncResult result) runtime managed - { - } // end of method MethodVoidIntPtrIntPtr::EndInvoke - } // end of class MethodVoidIntPtrIntPtr - - .class auto ansi sealed nested public MethodVoidIntPtrIntPtrInt - extends [mscorlib]System.MulticastDelegate - { - .method public hidebysig specialname rtspecialname - instance void .ctor(object 'object', - native int 'method') runtime managed - { - } // end of method MethodVoidIntPtrIntPtrInt::.ctor - - .method public hidebysig virtual instance void modopt([mscorlib]System.Runtime.CompilerServices.CallConvCdecl) - Invoke(native int param, - native int param1, - int32 param2) runtime managed - { - } // end of method MethodVoidIntPtrIntPtrInt::Invoke - - .method public hidebysig newslot virtual - instance class [mscorlib]System.IAsyncResult - BeginInvoke(native int param, - native int param1, - int32 param2, - class [mscorlib]System.AsyncCallback callback, - object 'object') runtime managed - { - } // end of method MethodVoidIntPtrIntPtrInt::BeginInvoke - - .method public hidebysig newslot virtual - instance int32 EndInvoke(class [mscorlib]System.IAsyncResult result) runtime managed - { - } // end of method MethodVoidIntPtrIntPtrInt::EndInvoke - - - } // end of class MethodVoidIntPtrIntPtrInt - } // end of class cdeclRedirector -} -- 2.25.1