Exemple #1
0
        public override void LoadFromStream(Stream aStream)
        {
            FPoints.Clear();

            base.LoadFromStream(aStream);

            FWidth     = (byte)aStream.ReadByte();
            FLineStyle = (HCPenStyle)aStream.ReadByte();

            int vCount = 0;

            byte[] vBuffer = BitConverter.GetBytes(vCount);
            aStream.Read(vBuffer, 0, vBuffer.Length);
            vCount = BitConverter.ToInt32(vBuffer, 0);

            int     vX = 0, vY = 0;
            HCPoint vPoint = null;

            for (int i = 0; i < vCount; i++)
            {
                aStream.Read(vBuffer, 0, vBuffer.Length);
                vX = BitConverter.ToInt32(vBuffer, 0);
                aStream.Read(vBuffer, 0, vBuffer.Length);
                vY     = BitConverter.ToInt32(vBuffer, 0);
                vPoint = new HCPoint(vX, vY);
                FPoints.Add(vPoint);
            }
        }
Exemple #2
0
 private void SetLineStyle(HCPenStyle value)
 {
     if (FLineStyle != value)
     {
         FLineStyle = value;
     }
 }
Exemple #3
0
 public HCLineItem(HCCustomData AOwnerData, int AWidth, int ALineHeight) : base(AOwnerData)
 {
     FLineHeight = (byte)ALineHeight;
     Width       = AWidth;
     Height      = ALineHeight;
     FLineStyle  = HCPenStyle.psSolid;
     StyleNo     = HCStyle.Line;
 }
Exemple #4
0
 protected void SetStyle(HCPenStyle value)
 {
     if (FStyle != value)
     {
         FStyle = value;
         DoChange();
     }
 }
Exemple #5
0
 public HCShapePolygon() : base()
 {
     Style             = HCShapeStyle.hssPolygon;
     FWidth            = 1;
     FLineStyle        = HCPenStyle.psSolid;
     FPoints           = new List <HCPoint>();
     FActivePointIndex = -1;
     FActiveLineIndex  = -1;
 }
Exemple #6
0
 public HCShapeLine() : base()
 {
     Style      = HCShapeStyle.hssLine;
     FStartPt   = new POINT(0, 0);
     FEndPt     = new POINT(0, 0);
     FWidth     = 1;
     FActiveOjb = HCShapeLineObj.sloNone;
     FLineStyle = HCPenStyle.psSolid;
 }
Exemple #7
0
 public HCLineItem(HCCustomData aOwnerData, int aWidth, int aHeight)
     : base(aOwnerData)
 {
     FLineHeight = 1;
     Width       = aWidth;
     Height      = aHeight;
     FLineStyle  = HCPenStyle.psSolid;
     StyleNo     = HCStyle.Line;
 }
Exemple #8
0
 public override void ParseXml(XmlElement aNode)
 {
     base.ParseXml(aNode);
     FWidth     = byte.Parse(aNode.Attributes["width"].Value);
     FLineStyle = (HCPenStyle)byte.Parse(aNode.Attributes["ls"].Value);
     FStartPt.X = int.Parse(aNode.Attributes["sx"].Value);
     FStartPt.Y = int.Parse(aNode.Attributes["sy"].Value);
     FEndPt.X   = int.Parse(aNode.Attributes["ex"].Value);
     FEndPt.Y   = int.Parse(aNode.Attributes["ey"].Value);
 }
Exemple #9
0
        public override void ParseXml(XmlElement aNode)
        {
            FPoints.Clear();

            base.ParseXml(aNode);

            FWidth     = byte.Parse(aNode.Attributes["width"].Value);
            FLineStyle = (HCPenStyle)byte.Parse(aNode.Attributes["ls"].Value);

            HCPoint vPoint = null;

            for (int i = 0; i < aNode.ChildNodes.Count; i++)
            {
                vPoint = new HCPoint(int.Parse(aNode.ChildNodes[i].Attributes["x"].Value),
                                     int.Parse(aNode.ChildNodes[i].Attributes["y"].Value));

                FPoints.Add(vPoint);
            }
        }
Exemple #10
0
        public override void LoadFromStream(Stream aStream)
        {
            base.LoadFromStream(aStream);

            FWidth     = (byte)aStream.ReadByte();
            FLineStyle = (HCPenStyle)aStream.ReadByte();

            byte[] vBuffer = BitConverter.GetBytes(FStartPt.X);
            aStream.Read(vBuffer, 0, vBuffer.Length);
            FStartPt.X = BitConverter.ToInt32(vBuffer, 0);

            aStream.Read(vBuffer, 0, vBuffer.Length);
            FStartPt.Y = BitConverter.ToInt32(vBuffer, 0);

            aStream.Read(vBuffer, 0, vBuffer.Length);
            FEndPt.X = BitConverter.ToInt32(vBuffer, 0);

            aStream.Read(vBuffer, 0, vBuffer.Length);
            FEndPt.Y = BitConverter.ToInt32(vBuffer, 0);
        }
Exemple #11
0
 public override void LoadFromStream(Stream aStream, HCStyle aStyle, ushort aFileVersion)
 {
     base.LoadFromStream(aStream, aStyle, aFileVersion);
     FLineHeight = (byte)aStream.ReadByte();
     FLineStyle  = (HCPenStyle)aStream.ReadByte();
 }
Exemple #12
0
 public override void Assign(HCCustomItem source)
 {
     base.Assign(source);
     FLineHeight = (source as HCLineItem).LineHeight;
     FLineStyle  = (source as HCLineItem).FLineStyle;
 }
Exemple #13
0
 public override void ParseXml(XmlElement aNode)
 {
     base.ParseXml(aNode);
     FLineHeight = byte.Parse(aNode.Attributes["height"].Value);
     FLineStyle  = (HCPenStyle)byte.Parse(aNode.Attributes["style"].Value);
 }
Exemple #14
0
 public override void LoadFromStream(Stream AStream, HCStyle AStyle, ushort AFileVersion)
 {
     base.LoadFromStream(AStream, AStyle, AFileVersion);
     FLineHeight = (byte)AStream.ReadByte();
     FLineStyle  = (HCPenStyle)AStream.ReadByte();
 }