public static Polymarker Polymarker(MetafileReader reader, CommandHeader commandHeader) { // P1-Pn: (point) n (X,Y) marker positions var points = ReadPointList(reader); return(new Polymarker(points.ToArray())); }
public static ParabolicArc ParabolicArc(MetafileReader reader, CommandHeader commandHeader) { // P1: (point) tangent intersection point // P2: (point) start point // P3: (point) end point return(new ParabolicArc(reader.ReadPoint(), reader.ReadPoint(), reader.ReadPoint())); }
public static Ellipse Ellipse(MetafileReader reader, CommandHeader commandHeader) { // P1: (point) centre of ellipse // P2: (point) endpoint of first conjugate diameter // P3: (point) endpoint of second conjugate diameter return(new Ellipse(reader.ReadPoint(), reader.ReadPoint(), reader.ReadPoint())); }
public static DisjointPolyline DisjointPolyline(MetafileReader reader, CommandHeader commandHeader) { // P1-Pn: (point) n (X,Y) line segment endpoints var points = ReadPointList(reader); return(new DisjointPolyline(points.ToArray())); }
public static CircularArc3Point CircularArc3Point(MetafileReader reader, CommandHeader commandHeader) { // P1: (point) starting point // P2: (point) intermediate point // P3: (point) ending point return(new CircularArc3Point(reader.ReadPoint(), reader.ReadPoint(), reader.ReadPoint())); }
public static NonUniformBSpline NonUniformBSpline(MetafileReader reader, CommandHeader commandHeader) { // P1: (integer) spline order (=m) // P2: (integer) number of control points (=n) // P(3)-P(2+n): (points) array of control points // P(3+n)-P(2+2n+m): (real) list of knots, of length n+m. // P(3+2n+m): (real) parameter start value // P(4+2n+m): (real) parameter end value int splineOrder = reader.ReadInteger(); int numberOfControlPoints = reader.ReadInteger(); var controlPoints = new List <PointF>(); for (int i = 0; i < numberOfControlPoints; i++) { controlPoints.Add(reader.ReadPoint()); } var knots = new List <double>(); for (int i = 0; i < splineOrder + numberOfControlPoints; i++) { knots.Add(reader.ReadReal()); } double start = reader.ReadReal(); double end = reader.ReadReal(); return(new NonUniformBSpline(splineOrder, controlPoints.ToArray(), knots.ToArray(), start, end)); }
private static Command ReadColorIndexPrecision(MetafileReader reader, CommandHeader commandHeader) { var colorIndexPrecision = MetafileDescriptorReader.ColorIndexPrecision(reader, commandHeader); reader.Descriptor.ColorIndexPrecision = colorIndexPrecision.Precision; return(colorIndexPrecision); }
public static BeginTileArray BeginTileArray(MetafileReader reader, CommandHeader commandHeader) { // P1: (point) position // P2: (enumerated) cell path direction: valid values are // 0 0° // 1 90° // 2 180° // 3 270° // P3: (enumerated) line progression direction: valid values are // 0 90° // 1 270° // P4: (integer) number of tiles in pth direction // P5: (integer) number of tiles in line direction // P6: (integer) number of cells/ tile in path direction // P7: (integer) number of cells/ tile in line direction // P8: (real) cell size in path direction // P9: (real) cell size in line direction // P10: (integer) image offset in path direction // P11: (integer) image offset in line direction // P12: (integer) image number of cells in path direction // P13: (integer) image number of cells in line direction return(new BeginTileArray( reader.ReadPoint(), reader.ReadEnum <CellPathDirection>(), reader.ReadEnum <LineProgressionDirection>(), reader.ReadInteger(), reader.ReadInteger(), reader.ReadInteger(), reader.ReadInteger(), reader.ReadReal(), reader.ReadReal(), reader.ReadInteger(), reader.ReadInteger(), reader.ReadInteger(), reader.ReadInteger())); }
private static Command ReadColorModel(MetafileReader reader, CommandHeader commandHeader) { var colorModel = MetafileDescriptorReader.ColorModelCommand(reader, commandHeader); reader.Descriptor.ColorModel = colorModel.ColorModel; return(colorModel); }
private static Command ReadColorSelectionMode(MetafileReader reader, CommandHeader commandHeader) { var colorSelectionMode = PictureDescriptorReader.ColorSelectionMode(reader, commandHeader); reader.Descriptor.ColorSelectionMode = colorSelectionMode.ColorMode; return(colorSelectionMode); }
public static Polyline Polyline(MetafileReader reader, CommandHeader commandHeader) { // P1-Pn: (point) n (X,Y) polyline vertices var points = ReadPointList(reader); return(new Polyline(points.ToArray())); }
private static Command ReadNamePrecision(MetafileReader reader, CommandHeader commandHeader) { var namePrecision = MetafileDescriptorReader.NamePrecision(reader, commandHeader); reader.Descriptor.NamePrecision = namePrecision.Precision; return(namePrecision); }
private static Command ReadRealPrecision(MetafileReader reader, CommandHeader commandHeader) { var realPrecision = MetafileDescriptorReader.RealPrecision(reader, commandHeader); reader.Descriptor.RealPrecision = realPrecision.Specification; return(realPrecision); }
private static Command ReadIndexPrecision(MetafileReader reader, CommandHeader commandHeader) { var indexPrecision = MetafileDescriptorReader.IndexPrecision(reader, commandHeader); reader.Descriptor.IndexPrecision = indexPrecision.Precision; return(indexPrecision); }
private static Command ReadVdcType(MetafileReader reader, CommandHeader commandHeader) { var vdcType = MetafileDescriptorReader.VdcType(reader, commandHeader); reader.Descriptor.VdcType = vdcType.Specification; return(vdcType); }
private static Command ReadEndMetafile(MetafileReader reader, CommandHeader commandHeader) { var result = DelimiterElementReader.EndMetafile(reader, commandHeader); reader._insideMetafile = false; return(result); }
private static Command ReadBeginMetafile(MetafileReader reader, CommandHeader commandHeader) { var result = DelimiterElementReader.BeginMetafile(reader, commandHeader); reader._insideMetafile = result != null; return(result); }
private static Command ReadLineWidthSpecificationMode(MetafileReader reader, CommandHeader commandHeader) { var lineWidthSpecificationMode = PictureDescriptorReader.LineWidthSpecificationMode(reader, commandHeader); reader.Descriptor.LineWidthSpecificationMode = lineWidthSpecificationMode.WidthSpecificationMode; return(lineWidthSpecificationMode); }
public static AppendText AppendText(MetafileReader reader, CommandHeader commandHeader) { // P1: (enumerated) final / not - final flag: valid values are // 0 not final // 1 final // P2: (string) text string return(new AppendText(reader.ReadEnum <FinalFlag>(), reader.ReadString())); }
public static TextPrecision TextPrecision(MetafileReader reader, CommandHeader commandHeader) { // P1: (enumerated) text precision: valid values are // 0 string // 1 character // 2 stroke return(new TextPrecision(reader.ReadEnum <TextPrecisionType>())); }
public static Message Message(MetafileReader reader, CommandHeader commandHeader) { // P1: (enumerated) action-required flag: valid values are // 0 noaction // 1 action // P2: (string fixed) message string return(new Message(reader.ReadEnum <ActionRequired>(), reader.ReadString())); }
public static SegmentHighlighting SegmentHighlighting(MetafileReader reader, CommandHeader commandHeader) { // P1: (name) segment identifier // P2: (enumerated) highlighting: valid values are // 0 normal // 1 highlighted return(new SegmentHighlighting(reader.ReadName(), reader.ReadEnum <Highlighting>())); }
public static EdgeClippingMode EdgeClippingMode(MetafileReader reader, CommandHeader commandHeader) { // P1: (enumerated) clipping mode: valid values are // 0 locus // 1 shape // 2 locus then shape return(new EdgeClippingMode(reader.ReadEnum <ClippingMode>())); }
public static TextCommand Text(MetafileReader reader, CommandHeader commandHeader) { // P1: (point) text position // P2: (enumerated) final / not - final flag: valid values are // 0 not final // 1 final // P3: (string) text string return(new TextCommand(reader.ReadPoint(), reader.ReadEnum <FinalFlag>(), reader.ReadString())); }
public static TextPath TextPath(MetafileReader reader, CommandHeader commandHeader) { // P1: (enumerated) text path: valid values are: // 0 right // 1 left // 2 up // 3 down return(new TextPath(reader.ReadEnum <TextPathType>())); }
public static VdcRealPrecision VdcRealPrecision(MetafileReader reader, CommandHeader commandHeader) { // P1: (enumerated) form of representation for real values: valid values are // 0 floating point format // 1 fixed point format // P2: (integer) field width for exponent or whole part (including 1 bit for sign) // P3: (integer) field width for fraction or fractional part return(new VdcRealPrecision(reader.ReadEnum <RealRepresentation>(), reader.ReadInteger(), reader.ReadInteger())); }
public static DeviceViewport DeviceViewport(MetafileReader reader, CommandHeader header) { // P1: (viewport point) first corner // P2: (viewport point) second corner var firstCorner = reader.ReadViewportPoint(); var secondCorner = reader.ReadViewportPoint(); return(new DeviceViewport(firstCorner, secondCorner)); }
public static VdcExtent VdcExtent(MetafileReader reader, CommandHeader header) { // P1: (point) first corner // P2: (point) second corner var firstCorner = reader.ReadPoint(); var secondCorner = reader.ReadPoint(); return(new VdcExtent(firstCorner, secondCorner)); }
public static EdgeJoin EdgeJoin(MetafileReader reader, CommandHeader commandHeader) { // P1: (index) edge join indicator: the following values are standardized: // 1 unspecified // 2 mitre // 3 round // 4 bevel // >4 reserved for registered values return(new EdgeJoin(reader.ReadIndex())); }
public static FontList FontList(MetafileReader reader, CommandHeader commandHeader) { // P1-Pn: (string fixed) n font names var fonts = new List <string>(); while (reader.HasMoreData()) { fonts.Add(reader.ReadString()); } return(new FontList(fonts)); }