Ejemplo n.º 1
0
 public RGBQuad(MetafileReader reader)
 {
     Blue     = reader.ReadByte();
     Green    = reader.ReadByte();
     Red      = reader.ReadByte();
     Reserved = reader.ReadByte();
 }
Ejemplo n.º 2
0
 public ColorRef(MetafileReader reader)
 {
     Blue     = reader.ReadByte();
     Green    = reader.ReadByte();
     Red      = reader.ReadByte();
     Reserved = reader.ReadByte();
 }
Ejemplo n.º 3
0
 public PaletteEntry(MetafileReader reader)
 {
     Flags = (PaletteEntryFlag)reader.ReadByte();
     Blue  = reader.ReadByte();
     Green = reader.ReadByte();
     Red   = reader.ReadByte();
 }
Ejemplo n.º 4
0
 public Bitmap16(MetafileReader reader)
 {
     Type           = reader.ReadInt16();
     Width          = reader.ReadInt16();
     Height         = reader.ReadInt16();
     WidthBytes     = reader.ReadInt16();
     NumberOfPlanes = reader.ReadByte();
     BitsPerPixel   = reader.ReadByte();
     Bits           = Utilities.ReadBytes(reader, DataSize);
 }
Ejemplo n.º 5
0
 public EmfPlusCompressedImage(MetafileReader reader, uint size) : base(size)
 {
     for (uint i = 0; i < size; i++)
     {
         reader.ReadByte();
     }
 }
Ejemplo n.º 6
0
        public EmfPlusMetafile(MetafileReader reader, uint size) : base(size)
        {
            Type     = (MetafileDataType)reader.ReadUInt32();
            DataSize = reader.ReadUInt32();

            for (uint i = 0; i < DataSize; i++)
            {
                reader.ReadByte();
            }
        }
Ejemplo n.º 7
0
        public EmfPlusPath(MetafileReader reader, uint size) : base(reader, size)
        {
            PointCount = reader.ReadUInt32();
            PointFlags = reader.ReadUInt32();
            Points     = Utilities.GetPoints(reader, false, CompressedPoints, PointCount);

            var types = new List <byte>();

            for (uint i = 0; i < PointCount; i++)
            {
                byte type = reader.ReadByte();
                types.Add(type);
            }
            Types = types;

            uint padding = PointCount % 4;

            for (uint i = 0; i < padding; i++)
            {
                reader.ReadByte();
            }
        }
Ejemplo n.º 8
0
        public EmfPlusDrawString(MetafileReader reader) : base(reader)
        {
            BrushIdOrColor  = reader.ReadUInt32();
            StringFormatId  = reader.ReadUInt32();
            StringLength    = reader.ReadUInt32();
            LayoutRectangle = new EmfPlusRectF(reader);
            String          = Utilities.GetString(reader, StringLength);

            uint padding = (StringLength * 2) % 4;

            for (uint i = 0; i < padding; i++)
            {
                reader.ReadByte();
            }
        }
Ejemplo n.º 9
0
 public Font(MetafileReader reader)
 {
     Height         = reader.ReadInt16();
     Width          = reader.ReadInt16();
     Escapement     = reader.ReadInt16();
     Orientation    = reader.ReadInt16();
     Weight         = reader.ReadInt16();
     Italic         = reader.ReadByte() != 0;
     Underline      = reader.ReadByte() != 0;
     StrikeOut      = reader.ReadByte() != 0;
     CharSet        = (CharacterSet)reader.ReadByte();
     OutPrecision   = (OutPrecision)reader.ReadByte();
     ClipPrecision  = (ClipPrecisionFlags)reader.ReadByte();
     Quality        = (FontQuality)reader.ReadByte();
     PitchAndFamily = new PitchAndFamily(reader);
     FaceName       = Utilities.GetString(reader, 32);
 }
Ejemplo n.º 10
0
 public EmfPlusSetTSGraphics(MetafileReader reader) : base(reader)
 {
     SmoothingMode          = (SmoothingMode)reader.ReadByte();
     TextRenderingHint      = (TextRenderingHint)reader.ReadByte();
     CompositingMode        = (CompositingMode)reader.ReadByte();
     CompositingQuality     = (CompositingQuality)reader.ReadByte();
     RenderOriginX          = reader.ReadInt16();
     RenderOriginY          = reader.ReadInt16();
     TextContrast           = reader.ReadUInt16();
     FilterType             = (FilterType)reader.ReadByte();
     PixelOffsetMode        = (PixelOffsetMode)reader.ReadByte();
     WorldToDeviceTransform = new EmfPlusTransformMatrix(reader);
     if (HasPalette)
     {
         Palette = new EmfPlusPalette(reader);
     }
 }
Ejemplo n.º 11
0
 public PitchAndFamily(MetafileReader reader)
 {
     Data = reader.ReadByte();
 }