예제 #1
0
파일: XText.cs 프로젝트: valsavva/dynacat
        public override void ReadXml(System.Xml.XmlReader reader)
        {
            reader.ReadAttrAsColor("Color", ref this.Color);
            this.Text   = reader["Text"];
            this.FontId = reader["FontId"];
            reader.ReadAttrAsEnum <XFlipEffects>("FlipEffects", ref this.FlipEffects);

            base.ReadXml(reader);
        }
예제 #2
0
        public override void ReadXml(System.Xml.XmlReader reader)
        {
            Color  color = Color.White;
            double f     = 0;

            reader.ReadAttrAsBoolean("IsRoot", ref this.IsRoot);
            reader.ReadAttrAsFloat("Opacity", ref this.Opacity);
            reader.ReadAttrAsFloat("Rotation", ref this.Rotation);
            reader.ReadAttrAsVector2("ScaleVector", ref this.ScaleVector);

            reader.ReadAttrAsRectF("Bounds", ref this.Bounds);
            if (reader.ReadAttrAsColor("BackColor", ref color))
            {
                this.BackColor = color;
            }
            if (reader.ReadAttrAsVector2("Origin", ref tmpVector1))
            {
                this.Origin = tmpVector1;
            }
            if (reader.ReadAttrAsVector2("RotationCenter", ref tmpVector1))
            {
                this.RotationCenter = tmpVector1;
            }
            if (reader.ReadAttrAsFloat("Scale", ref f))
            {
                this.Scale = f;
            }
            if (reader.ReadAttrAsFloat("Depth", ref f))
            {
                this.Depth = (float)f;
            }
            if (reader.ReadAttrAsVector2("Location", ref tmpVector1))
            {
                this.Location = tmpVector1;
            }
            if (reader.ReadAttrAsVector2("Center", ref tmpVector1))
            {
                this.Center = tmpVector1;
            }

            base.ReadXml(reader);
        }