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); } }
private void SetLineStyle(HCPenStyle value) { if (FLineStyle != value) { FLineStyle = value; } }
public HCLineItem(HCCustomData AOwnerData, int AWidth, int ALineHeight) : base(AOwnerData) { FLineHeight = (byte)ALineHeight; Width = AWidth; Height = ALineHeight; FLineStyle = HCPenStyle.psSolid; StyleNo = HCStyle.Line; }
protected void SetStyle(HCPenStyle value) { if (FStyle != value) { FStyle = value; DoChange(); } }
public HCShapePolygon() : base() { Style = HCShapeStyle.hssPolygon; FWidth = 1; FLineStyle = HCPenStyle.psSolid; FPoints = new List <HCPoint>(); FActivePointIndex = -1; FActiveLineIndex = -1; }
public HCShapeLine() : base() { Style = HCShapeStyle.hssLine; FStartPt = new POINT(0, 0); FEndPt = new POINT(0, 0); FWidth = 1; FActiveOjb = HCShapeLineObj.sloNone; FLineStyle = HCPenStyle.psSolid; }
public HCLineItem(HCCustomData aOwnerData, int aWidth, int aHeight) : base(aOwnerData) { FLineHeight = 1; Width = aWidth; Height = aHeight; FLineStyle = HCPenStyle.psSolid; StyleNo = HCStyle.Line; }
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); }
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); } }
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); }
public override void LoadFromStream(Stream aStream, HCStyle aStyle, ushort aFileVersion) { base.LoadFromStream(aStream, aStyle, aFileVersion); FLineHeight = (byte)aStream.ReadByte(); FLineStyle = (HCPenStyle)aStream.ReadByte(); }
public override void Assign(HCCustomItem source) { base.Assign(source); FLineHeight = (source as HCLineItem).LineHeight; FLineStyle = (source as HCLineItem).FLineStyle; }
public override void ParseXml(XmlElement aNode) { base.ParseXml(aNode); FLineHeight = byte.Parse(aNode.Attributes["height"].Value); FLineStyle = (HCPenStyle)byte.Parse(aNode.Attributes["style"].Value); }
public override void LoadFromStream(Stream AStream, HCStyle AStyle, ushort AFileVersion) { base.LoadFromStream(AStream, AStyle, AFileVersion); FLineHeight = (byte)AStream.ReadByte(); FLineStyle = (HCPenStyle)AStream.ReadByte(); }