public static EmfPlusObjectData GetObject(MetafileReader reader, ObjectType type, uint size) { EmfPlusObjectData data; switch (type) { case ObjectType.Brush: data = new EmfPlusBrush(reader, size); break; case ObjectType.Pen: data = new EmfPlusPen(reader, size); break; case ObjectType.Path: data = new EmfPlusPath(reader, size); break; case ObjectType.Region: data = new EmfPlusRegion(reader, size); break; case ObjectType.Image: data = new EmfPlusImage(reader, size); break; case ObjectType.Font: data = new EmfPlusFont(reader, size); break; case ObjectType.StringFormat: data = new EmfPlusStringFormat(reader, size); break; case ObjectType.ImageAttributes: data = new EmfPlusImageAttributes(reader, size); break; case ObjectType.CustomLineCap: data = new EmfPlusCustomLineCap(reader, size); break; default: throw new InvalidOperationException($"Unknown object type {type}."); } return(data); }
public EmfPlusRegionNodePath(MetafileReader reader) : base(RegionNodeDataType.Path) { PathLength = reader.ReadInt32(); Path = new EmfPlusPath(reader, (uint)PathLength); }
public EmfPlusFillPath(MetafileReader reader) { DataSize = reader.ReadUInt32(); Data = new EmfPlusPath(reader, DataSize); }
public EmfPlusBoundaryPathData(MetafileReader reader) { DataSize = reader.ReadUInt32(); Data = new EmfPlusPath(reader, DataSize); }