/// <summary> /// Deserialization Constructor /// </summary> /// <param name="info"></param> /// <param name="context"></param> protected GlyphBase(SerializationInfo info, StreamingContext context) { _panel = (GlyphPanel)info.GetValue("Panel", typeof(GlyphPanel)); _size = (Size)info.GetValue("Size", typeof(System.Drawing.Size)); _position = (PointF)info.GetValue("Position", typeof(PointF)); ForegroundColor = (IColor)info.GetValue("ForegroundColor", typeof(IColor)); BackgroundColor = (IColor)info.GetValue("BackgroundColor", typeof(IColor)); _owner = (GlyphContainer)info.GetValue("Owner", typeof(GlyphContainer)); Tag = (object)info.GetValue("Tag", typeof(object)); }
/// <summary> /// The default constructor - XML serialixation only /// </summary> protected GlyphBase() { _position = new PointF(0, 0); _fgColor = new ColorByte(255, 0, 0, 0); _bgColor = new ColorByte(); // same as ColorByte.Empty _panel = new GlyphPanel(this); _computedLayout = new GlyphLayout(this); _compareInfo = new GlyphCompareInfo(); }