Beispiel #1
0
        public Tick(IStreamReader reader, GraphRecordNumber id, ushort length)
            : base(reader, id, length)
        {
            // assert that the correct record type is instantiated
            Debug.Assert(this.Id == ID);

            // initialize class members from stream
            this.tktMajor = (MarkLocation)reader.ReadByte();
            this.tktMinor = (MarkLocation)reader.ReadByte();
            this.tlt      = (MarkLabelLocation)reader.ReadByte();
            this.wBkgMode = (BackgroundMode)reader.ReadByte();
            this.rgb      = new RGBColor(reader.ReadInt32(), RGBColor.ByteOrder.RedFirst);
            reader.ReadBytes(16); // rerserved
            ushort flags = reader.ReadUInt16();

            this.fAutoCo       = Utils.BitmaskToBool(flags, 0x1);
            this.fAutoMode     = Utils.BitmaskToBool(flags, 0x2);
            this.rot           = (TextRotation)Utils.BitmaskToInt(flags, 0x1C);
            this.fAutoRot      = Utils.BitmaskToBool(flags, 0x10);
            this.iReadingOrder = (ReadingOrder)Utils.BitmaskToInt(flags, 0xC000);
            this.icv           = reader.ReadUInt16();
            this.trot          = reader.ReadUInt16();

            // assert that the correct number of bytes has been read from the stream
            Debug.Assert(this.Offset + this.Length == this.Reader.BaseStream.Position);
        }
Beispiel #2
0
 public PictureWaterMark(System.Drawing.Image sourceImg, System.Drawing.Image waterImg, float tranparence, MarkLocation markLocation, CompressSize compressSize)
 {
     this._sourceImage  = sourceImg;
     this._markType     = MarkType.Image;
     this._waterImage   = waterImg;
     this._transparence = tranparence;
     this._markLocation = markLocation;
     if (compressSize != CompressSize.None)
     {
         this._compressSize = compressSize;
     }
 }
Beispiel #3
0
 public PictureWaterMark(System.Drawing.Image sourceImg, string text, System.Drawing.Font textFont, System.Drawing.Color color, float tranparence, MarkLocation markLocation, CompressSize compressSize)
 {
     this._textFont     = textFont;
     this._sourceImage  = sourceImg;
     this._transparence = tranparence;
     this._markType     = MarkType.Text;
     this._text         = text;
     this._textColor    = color;
     this._markLocation = markLocation;
     if (compressSize != CompressSize.None)
     {
         this._compressSize = compressSize;
     }
 }