Commit Graph
75 Commits
Author SHA1 Message Date
Ravindra 9904f37266 * gdipFunctions.cs: Corrected signatures of GdipPathIterCopyData and
GdipPathIterEnumerate P/Invoke functions for GraphicsPathIterator.
	* GraphicsPath.cs: Implemented Dispose method and added error
	checking in constructors.
	* GraphicsPathIterator.cs: Fixed CopyData and Enumerate methods.

svn path=/trunk/mcs/; revision=31353
2004-07-22 02:23:44 +00:00
Ravindra e63e0963f8 * 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.

svn path=/trunk/mcs/; revision=31236
2004-07-16 16:43:41 +00:00
Ravindra a44076d1a4 Correction to my previous checkin.
svn path=/trunk/mcs/; revision=31175
2004-07-15 11:19:12 +00:00
Ravindra 051d8814cc * GraphicsPath.cs: Implemented PathData property and some formatting.
svn path=/trunk/mcs/; revision=31174
2004-07-15 11:12:03 +00:00
Ravindra 2a54f7ba41 Code cleaning: Changed format of various files to unix from dos.
Also, changed access of instance variables to private in
	some classes.

svn path=/trunk/mcs/; revision=31166
2004-07-15 05:53:10 +00:00
Ravindra dcbb59b493 * PathGradientBrush.cs: Removed all the private variables.
Now, we get/set everything from libgdiplus. This is cleaner.

svn path=/trunk/mcs/; revision=31075
2004-07-13 12:07:52 +00:00
Ravindra eeb7486b59 * LinearGradientBrush.cs: Added checks for the values of
focus and scale parameters in SetBlendTriangularShape and
	SetSigmaBellShape methods.
	* PathGradientBrush.cs: Same as above.

svn path=/trunk/mcs/; revision=30377
2004-06-25 10:41:37 +00:00
Sachin Kumar 15a49e8b92 Add license and copyright to all source files in System.Drawing
svn path=/trunk/mcs/; revision=29667
2004-06-16 06:32:39 +00:00
Gert Driesen 6a01fd4110 * DashCap.cs: fixed mismatches in enum field values
* HatchStyle.cs: fixes mismatches in enum field values

svn path=/trunk/mcs/; revision=29481
2004-06-14 05:47:08 +00:00
Miguel de Icaza f879a12f34 API signature fixes
svn path=/trunk/mcs/; revision=29136
2004-06-09 20:15:14 +00:00
Ravindra 18b476a537 * CustomLineCap.cs: Added null checks and corrected Dispose method.
svn path=/trunk/mcs/; revision=27584
2004-05-18 11:52:34 +00:00
Duncan Mak 6eadf37de4 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.

svn path=/trunk/mcs/; revision=27533
2004-05-17 18:51:50 +00:00
Gert Driesen c8514597c4 * GraphicsPath.cs: renamed SetMarker to SetMarkers, to fix
public API to match MS.NET

svn path=/trunk/mcs/; revision=27473
2004-05-16 11:34:27 +00:00
Duncan Mak f7b1c1a722 Instead of casting null to an IntPtr, use IntPtr.Zero instead. Thanks
to Nick Drochak for spotting this.

svn path=/trunk/mcs/; revision=27460
2004-05-15 19:05:00 +00:00
Nick Drochak 3f569a1079 2004-05-14 Nick Drochak <[email protected]>
* GraphicsPath.cs: fix build with csc.  No implicit conversion from
	null to IntPtr.  Bug in mcs?

svn path=/trunk/mcs/; revision=27442
2004-05-15 10:53:40 +00:00
Duncan Mak 0a60e85735 * 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.

* gdipFunctions.cs (GdipCreatePath2I, GdipAddPathPieI):
(GdipFlattenPath, GdipWarpPath, GdipWidenPath):
(GdipGetPathWorldBounds, GdipGetPathWorldBoundsI): Imported.

svn path=/trunk/mcs/; revision=27424
2004-05-14 19:29:19 +00:00
Sanja Gupta 21b14e727b ChangeLog: Updated ChangeLog.
GraphicsState.cs: Added internal constructor.

svn path=/trunk/mcs/; revision=27226
2004-05-13 05:19:28 +00:00
Sanja Gupta 02bc85cf44 ChangeLog: Updated ChangeLog.
GraphicsPath.cs: Added stub for missing method CloseFigure().

svn path=/trunk/mcs/; revision=27215
2004-05-13 03:06:41 +00:00
Ravindra 8627dfa65b Implemented AdjustableArrowCap.cs and CustomLineCap.cs.
svn path=/trunk/mcs/; revision=27063
2004-05-11 05:22:47 +00:00
Ravindra 668a50ae10 Fixed Transform property in LinearGradientBrush.cs.
svn path=/trunk/mcs/; revision=26699
2004-05-04 14:16:33 +00:00
Ravindra 19e7ccfc13 Changed exception messages.
svn path=/trunk/mcs/; revision=26426
2004-04-30 16:20:37 +00:00
Ravindra b2ef4f74e5 Some fixes in LinearGradientBrush.cs.
svn path=/trunk/mcs/; revision=26425
2004-04-30 15:36:13 +00:00
Duncan Mak b1c50589c8 * GraphicsPath.cs (GraphicsPath): Filled out the missing
constructors.
(ConvertPoints): New helper function. Converts a Point array to a
PointF array.

* gdipFunctions.cs (GdipCreatePath2): Fixed signature.

* pie.cs: Save to PNG, instead of BMP.

svn path=/trunk/mcs/; revision=25125
2004-04-07 02:19:42 +00:00
Jordi Mas i Hernandez be9e053790 added missing members
svn path=/trunk/mcs/; revision=25044
2004-04-05 15:50:40 +00:00
Duncan Mak e052b7bdd0 * GraphicsPath.cs (AddCurve, AddClosedCurve): Added all overloads.
* Graphics.cs (DrawCurve): Call the correct GDI+ wrappers.

* gdipFunctions.cs (GdipAddPathCurveI):
(GdipAddPathCurve2, GdipAddPathCurve2I):
(GdipAddPathCurve3, GdipAddPathCurve3I):
(GdipAddPathClosedCurve, GdipAddPathClosedCurveI):
(GdipAddPathClosedCurve2, GdipAddPathClosedCurve2I): Added new
wrappers from GDI+.

svn path=/trunk/mcs/; revision=24936
2004-04-02 01:20:34 +00:00
Ravindra 3fdef174ec Fixed wrapmode enum values.
svn path=/trunk/mcs/; revision=24629
2004-03-26 13:33:58 +00:00
Ravindra bb8fe26a6e Implementing LinearGradientBrush.cs public methods.
svn path=/trunk/mcs/; revision=24452
2004-03-23 08:23:43 +00:00
Ravindra 0147ab6cff Implementing LinearGradientBrush.cs and fixing PathGradientBrush.cs.
svn path=/trunk/mcs/; revision=24413
2004-03-22 12:21:04 +00:00
Ravindra 19fe645737 Minor fixes.
svn path=/trunk/mcs/; revision=24276
2004-03-18 14:18:00 +00:00
Ravindra 75f4530b6f Fixed Blend.cs and ColorBlend.cs.
svn path=/trunk/mcs/; revision=24222
2004-03-17 13:55:59 +00:00
Ravindra 72eba65094 Implementing methods for PathGradientBrush.
svn path=/trunk/mcs/; revision=23756
2004-03-06 13:31:18 +00:00
Ravindra 84ca941bfa Implemented constructors and properties of PathGradient brush.
svn path=/trunk/mcs/; revision=23753
2004-03-06 12:32:04 +00:00
Duncan Mak a381c8cfaa * GraphicsPath.cs (PathCount): Corrected. The name should be PointCount.
(AddPath): Implemented.

* RectangleF.cs: Changed the internal structure from a PointF,
SizeF to floats in order to match the layout from the C API.

svn path=/trunk/mcs/; revision=23725
2004-03-05 03:27:16 +00:00
Ravindra 15bbe83678 Corrected WrapMode enum values.
svn path=/trunk/mcs/; revision=23534
2004-02-27 15:37:40 +00:00
Ravindra 68a26f8122 Added status checks using CheckStatus(Status) method.
svn path=/trunk/mcs/; revision=22980
2004-02-11 16:06:21 +00:00
Andreas N f17ab32435 2004-02-07 Andreas Nahr <[email protected]>
* GraphicsPathIterator.cs: Fixed signature, added TODOs
	* Matrix.cs: Removed additional method

svn path=/trunk/mcs/; revision=22861
2004-02-07 19:21:51 +00:00
Ravindra de8edc8157 Modifications related to GetException method.
svn path=/trunk/mcs/; revision=22821
2004-02-06 07:19:00 +00:00
Ravindra 31057d5cef Implemented HatchBrush.
svn path=/trunk/mcs/; revision=22797
2004-02-05 15:07:44 +00:00
Duncan Mak b84ccfd050 (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.

svn path=/trunk/mcs/; revision=22616
2004-01-30 19:40:18 +00:00
Jordi Mas i Hernandez a7de5f45cf more functions implemented in graphics.cs
svn path=/trunk/mcs/; revision=22506
2004-01-26 17:57:37 +00:00
Duncan Mak 636e1eda1f 2004-01-23 Duncan Mak <[email protected]>
* graphics.c (GdipDrawPath): Implemented.

        * Graphics.cs (DrawPath): Implemented.

        * GraphicsPath.cs (AddEllipse): Added.

svn path=/trunk/mcs/; revision=22466
2004-01-24 18:43:58 +00:00
Duncan Mak bfddd84cdb (GdipGetPathTypes, GdipGetPathPoints): Add
OutAttribute to the array argument. This fixes the PathPoints
property in System.Drawing.Drawing2D.GraphicsPath.

svn path=/trunk/mcs/; revision=22371
2004-01-22 01:55:34 +00:00
Duncan Mak dc30685e5f I've been busy with school and also with preparing for the upcoming
release, so I haven't been spending a lot of time on
GraphicsPath. Rather than letting my changes go stale, I'll commit
them now while they are still in a compilable state.

* 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.

* gdipFunctions.cs: Import functions for GraphicsPath.

* graphics-path.c (GdipGetPathPoints): Fixed.
(GdipCreatePath): Remember to	initialize the arrays instead of
just setting them to NULL.
(GdipGetPathTypes, GdipGetPathPoints): Fix signature.

* Makefile (local_sources): Add graphics-path.c to the build.

* Matrix.cs (Matrix): Removed reference to GpRect/GpRectF.

* Bitmap.cs (LockBits):
* Graphics.cs (DrawString): Removed reference to GpRectF.

* gdipStructs.cs (GpRectF, GpRect, GpPointF, GpPoint):
Removed. Didn't know that structs are laid out sequentially by
default. We don't need these anymore.

svn path=/trunk/mcs/; revision=22282
2004-01-20 04:44:52 +00:00
Ravindra 8731c62658 Changing the access to Matrix(IntPtr) constructor from private to internal.
svn path=/trunk/mcs/; revision=22008
2004-01-13 05:18:30 +00:00
Ravindra 97eae23285 Made all Enums serializable and corrected some class declarations.
svn path=/trunk/mcs/; revision=21899
2004-01-10 09:21:19 +00:00
Duncan Mak 591a124259 * Matrix.cs (ToString): Cache the elements inside a local variable
to avoid calling the Elements property repeatedly.

* graphics-path.c (GdipAddPathLine): Use append instead of
append_point.
(GdipTransformPath): Remember to reset the points after the
transformation.

svn path=/trunk/mcs/; revision=21485
2003-12-25 07:39:23 +00:00
Gonzalo Paniagua Javier 7ec6a0f206 2003-12-04 Gonzalo Paniagua Javier <[email protected]>
* Blend.cs: fix array sizes in the constructors. Closes bug #51564.
	System.Web moves in mysterious ways.

svn path=/trunk/mcs/; revision=20756
2003-12-04 02:49:40 +00:00
Duncan Mak 9cf400d341 * Matrix.cs: Rewrote to use GDI+ implementation, doing all the
math in unmanaged code instead of doing it in C#.

* 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.

* matrix.c (GdipCreateMatrix3, GdipCreateMatrix3I): Implemented.
(GdipCloneMatrix): Fixed.
(GdipShearMatrix, set_shear): Implemented.

* graphics.c:
(GdipGetWorldTransform, GdipMultiplyWorldTransform): Implemented.
(GdipRotatePenTransform, GdipTranslatePenTransform): Use GDI+
functions instead.

* gdip.h
(GdipRotatePenTransform, GdipTranslatePenTransform): Fix
signature.
(GdipCreateMatrix3, GdipCreateMatrix3I): Use const appropriately.

svn path=/trunk/mcs/; revision=20344
2003-11-22 23:32:56 +00:00
Miguel de Icaza 4bd00342d6 2003-11-04 Miguel de Icaza <[email protected]>
* GraphicsPathIterator.cs: Do not make this protected.

2003-11-16  Miguel de Icaza  <[email protected]>

	* Graphics.cs: Implement the other DrawString overloads .

2003-11-16  Miguel de Icaza  <[email protected]>

	* gdipStructs.cs (GdipRectF): Added utility constructor

svn path=/trunk/mcs/; revision=20092
2003-11-16 23:30:43 +00:00
Andreas N 21a5a4133c 2003-11-13 Andreas Nahr <[email protected]>
* 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

svn path=/trunk/mcs/; revision=19970
2003-11-13 22:36:20 +00:00