1
#region PDFsharp - A .NET library for processing PDF
4
// Stefan Lange (mailto:Stefan.Lange@pdfsharp.com)
6
// Copyright (c) 2005-2008 empira Software GmbH, Cologne (Germany)
8
// http://www.pdfsharp.com
9
// http://sourceforge.net/projects/pdfsharp
11
// Permission is hereby granted, free of charge, to any person obtaining a
12
// copy of this software and associated documentation files (the "Software"),
13
// to deal in the Software without restriction, including without limitation
14
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
15
// and/or sell copies of the Software, and to permit persons to whom the
16
// Software is furnished to do so, subject to the following conditions:
18
// The above copyright notice and this permission notice shall be included
19
// in all copies or substantial portions of the Software.
21
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
24
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
27
// DEALINGS IN THE SOFTWARE.
32
#if under_constructioin
33
namespace PdfSharp.Drawing.Shapes
35
public sealed class Ellipse : Shape
40
// protected override Size ArrangeOverride(Size finalSize);
41
// protected override Size MeasureOverride(Size constraint);
42
// protected override void OnRender(DrawingContext dc);
45
// public double CenterX { get; set; }
46
// public double CenterY { get; set; }
47
// public double RadiusX { get; set; }
48
// public double RadiusY { get; set; }
51
// private Rect _shapeBounds;
52
// [TypeConverter("System.Windows.LengthConverter, PresentationFramework, Version=6.0.4030.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, Custom=null")]
53
// public static readonly DependencyProperty CenterXProperty;
54
// [TypeConverter("System.Windows.LengthConverter, PresentationFramework, Version=6.0.4030.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, Custom=null")]
55
// public static readonly DependencyProperty CenterYProperty;
56
// [TypeConverter("System.Windows.LengthConverter, PresentationFramework, Version=6.0.4030.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, Custom=null")]
57
// public static readonly DependencyProperty RadiusXProperty;
58
// [TypeConverter("System.Windows.LengthConverter, PresentationFramework, Version=6.0.4030.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, Custom=null")]
59
// public static readonly DependencyProperty RadiusYProperty;
62
public sealed class Glyphs : Shape
67
// protected override Size ArrangeOverride(Size finalSize);
68
// public GlyphRun ComputeGlyphRun();
69
// private void ComputeMeasurementGlyphRunAndOrigin();
70
// private static double GetAdvanceWidth(GlyphTypeface glyphTypeface, ushort glyphIndex, bool sideways);
71
// private static bool IsEmpty(string s);
72
// protected override Size MeasureOverride(Size constraint);
73
// protected override void OnRender(DrawingContext ctx);
74
// private IList<bool> ParseCaretStops();
75
// [SecurityCritical, SecurityTreatAsSafe]
76
// private void ParseGlyphRunProperties();
77
// private int ParseGlyphsProperty(GlyphTypeface fontFace, string unicodeString, bool sideways, out List<ParsedGlyphData> parsedGlyphs, out ushort[] clusterMap);
78
// private bool ReadGlyphIndex(string valueSpec, ref bool inCluster, ref int glyphClusterSize, ref int characterClusterSize, ref ushort glyphIndex);
81
// public int BidiLevel { get; set; }
82
// public string CaretStops { get; set; }
83
// [Obsolete("This property is obsolete and will be removed in a future version. Use the fragment portion of FontUri property to specify TTC index instead.")]
84
// public int FontFaceIndex { get; set; }
85
// public double FontRenderingEmSize { get; set; }
86
// public Uri FontUri { get; set; }
87
// public string Indices { get; set; }
88
// public bool IsSideways { get; set; }
89
// public double OriginX { get; set; }
90
// public double OriginY { get; set; }
91
// public StyleSimulations StyleSimulations { get; set; }
92
// Uri IUriContext.BaseUri { get; set; }
93
// public string UnicodeString { get; set; }
96
// private Point _glyphRunOrigin;
97
// private LayoutDependentGlyphRunProperties _glyphRunProperties;
98
// private GlyphRun _measurementGlyphRun;
99
// public static readonly DependencyProperty BidiLevelProperty;
100
// public static readonly DependencyProperty CaretStopsProperty;
101
// private const double EmMultiplier = 100;
102
// [Obsolete("This property is obsolete and will be removed in a future version. Use the fragment portion of FontUri property to specify TTC index instead.")]
103
// public static readonly DependencyProperty FontFaceIndexProperty;
104
// [TypeConverter("System.Windows.FontSizeConverter, PresentationFramework, Version=6.0.4030.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, Custom=null")]
105
// public static readonly DependencyProperty FontRenderingEmSizeProperty;
106
// public static readonly DependencyProperty FontUriProperty;
107
// public static readonly DependencyProperty IndicesProperty;
108
// public static readonly DependencyProperty IsSidewaysProperty;
109
// [TypeConverter("System.Windows.LengthConverter, PresentationFramework, Version=6.0.4030.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, Custom=null")]
110
// public static readonly DependencyProperty OriginXProperty;
111
// [TypeConverter("System.Windows.LengthConverter, PresentationFramework, Version=6.0.4030.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, Custom=null")]
112
// public static readonly DependencyProperty OriginYProperty;
113
// public static readonly DependencyProperty StyleSimulationsProperty;
114
// public static readonly DependencyProperty UnicodeStringProperty;
117
// private class LayoutDependentGlyphRunProperties
120
// public LayoutDependentGlyphRunProperties();
121
// public GlyphRun CreateGlyphRun(Point origin, CultureInfo culture);
124
// public double[] advanceWidths;
125
// public int bidiLevel;
126
// public IList<bool> caretStops;
127
// public ushort[] clusterMap;
128
// public double fontRenderingSize;
129
// public ushort[] glyphIndices;
130
// public Point[] glyphOffsets;
131
// public GlyphTypeface glyphTypeface;
132
// public bool sideways;
133
// public string unicodeString;
136
// private class ParsedGlyphData
139
// public ParsedGlyphData();
142
// public double advanceWidth;
143
// public ushort glyphIndex;
144
// public double offsetX;
145
// public double offsetY;
149
public sealed class Line : StretchableShape
154
// internal override void CacheDefiningGeometry();
157
// protected override Geometry DefiningGeometry { get; }
158
// public double X1 { get; set; }
159
// public double X2 { get; set; }
160
// public double Y1 { get; set; }
161
// public double Y2 { get; set; }
164
// private LineGeometry _lineGeometry;
165
// [TypeConverter("System.Windows.LengthConverter, PresentationFramework, Version=6.0.4030.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, Custom=null")]
166
// public static readonly DependencyProperty X1Property;
167
// [TypeConverter("System.Windows.LengthConverter, PresentationFramework, Version=6.0.4030.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, Custom=null")]
168
// public static readonly DependencyProperty X2Property;
169
// [TypeConverter("System.Windows.LengthConverter, PresentationFramework, Version=6.0.4030.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, Custom=null")]
170
// public static readonly DependencyProperty Y1Property;
171
// [TypeConverter("System.Windows.LengthConverter, PresentationFramework, Version=6.0.4030.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, Custom=null")]
172
// public static readonly DependencyProperty Y2Property;
175
public sealed class Path : StretchableShape
180
// internal override void CacheDefiningGeometry();
181
// private static void PathDataInvalidator(DependencyObject d);
184
// public Geometry Data { get; set; }
185
// protected override Geometry DefiningGeometry { get; }
186
// public FillRule FillRule { get; set; }
189
// private Geometry _cachedGeometry;
190
// public static readonly DependencyProperty DataProperty;
191
// public static readonly DependencyProperty FillRuleProperty;
194
public sealed class Polygon : StretchableShape
199
// internal override void CacheDefiningGeometry();
202
// protected override Geometry DefiningGeometry { get; }
203
// public FillRule FillRule { get; set; }
204
// public PointCollection Points { get; set; }
207
// private PathGeometry _polygonGeometry;
208
// public static readonly DependencyProperty FillRuleProperty;
209
// public static readonly DependencyProperty PointsProperty;
212
public sealed class Polyline : StretchableShape
215
// static Polyline();
216
// public Polyline();
217
// internal override void CacheDefiningGeometry();
218
// protected override void OnRender(DrawingContext dc);
221
// protected override Geometry DefiningGeometry { get; }
222
// public FillRule FillRule { get; set; }
223
// public PointCollection Points { get; set; }
226
// private PathGeometry _polylineGeometry;
227
// public static readonly DependencyProperty FillRuleProperty;
228
// public static readonly DependencyProperty PointsProperty;
231
public sealed class Rectangle : StretchableShape
234
// static Rectangle();
235
// public Rectangle();
236
// protected override Size ArrangeOverride(Size finalSize);
237
// internal override void CacheDefiningGeometry();
238
// internal override Rect GetDefiningGeometryBounds();
239
// internal override Size GetNaturalSize();
240
// protected override Size MeasureOverride(Size constraint);
241
// protected override void OnRender(DrawingContext dc);
244
// protected override Geometry DefiningGeometry { get; }
245
// public override Transform GeometryTransform { get; }
246
// public double RadiusX { get; set; }
247
// public double RadiusY { get; set; }
248
// public override Geometry RenderedGeometry { get; }
251
// private Rect _rect;
252
// [TypeConverter("System.Windows.LengthConverter, PresentationFramework, Version=6.0.4030.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, Custom=null")]
253
// public static readonly DependencyProperty RadiusXProperty;
254
// [TypeConverter("System.Windows.LengthConverter, PresentationFramework, Version=6.0.4030.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, Custom=null")]
255
// public static readonly DependencyProperty RadiusYProperty;
258
public abstract class Shape
262
// protected Shape();
263
// internal Pen GetPen(Size sizeReference);
264
// internal double GetStrokeThickness();
265
// internal static bool IsDoubleFinite(object o);
266
// internal static bool IsDoubleFiniteNonNegative(object o);
267
// private static void PenInvalidated(DependencyObject d);
270
// public Brush Fill { get; set; }
271
// internal bool IsPenNoOp { get; }
272
// public Brush Stroke { get; set; }
273
// public DoubleCollection StrokeDashArray { get; set; }
274
// public PenLineCap StrokeDashCap { get; set; }
275
// public double StrokeDashOffset { get; set; }
276
// public PenLineCap StrokeEndLineCap { get; set; }
277
// public PenLineJoin StrokeLineJoin { get; set; }
278
// public double StrokeMiterLimit { get; set; }
279
// public PenLineCap StrokeStartLineCap { get; set; }
280
// public double StrokeThickness { get; set; }
284
// public static readonly DependencyProperty FillProperty;
285
// public static readonly DependencyProperty StrokeDashArrayProperty;
286
// public static readonly DependencyProperty StrokeDashCapProperty;
287
// public static readonly DependencyProperty StrokeDashOffsetProperty;
288
// public static readonly DependencyProperty StrokeEndLineCapProperty;
289
// public static readonly DependencyProperty StrokeLineJoinProperty;
290
// public static readonly DependencyProperty StrokeMiterLimitProperty;
291
// public static readonly DependencyProperty StrokeProperty;
292
// public static readonly DependencyProperty StrokeStartLineCapProperty;
293
// [TypeConverter("System.Windows.LengthConverter, PresentationFramework, Version=6.0.4030.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, Custom=null")]
294
// public static readonly DependencyProperty StrokeThicknessProperty;
297
public abstract class StretchableShape : Shape
300
// static StretchableShape();
301
// internal StretchableShape();
302
// protected override Size ArrangeOverride(Size finalSize);
303
// internal abstract void CacheDefiningGeometry();
304
// internal Stretch GetAdjustedStretch(Size size);
305
// internal virtual Rect GetDefiningGeometryBounds();
306
// internal virtual Size GetNaturalSize();
307
// protected override Size MeasureOverride(Size constraint);
308
// protected override void OnRender(DrawingContext dc);
309
// internal void Render(DrawingContext dc, Brush brush);
310
// internal void ResetStretchMatrix();
311
// internal void SetStretchedGeometry(Size finalSize);
312
// internal void SetStretchMatrix(Size size, Stretch mode, double penThickness);
315
// protected abstract Geometry DefiningGeometry { get; }
316
// public virtual Transform GeometryTransform { get; }
317
// public virtual Geometry RenderedGeometry { get; }
318
// public Stretch Stretch { get; set; }
321
// private Geometry _renderedGeometry;
322
// private Matrix _stretchMatrix;
323
// public static readonly DependencyProperty StretchProperty;
b'\\ No newline at end of file'