This commit is contained in:
99
PROMS/Volian.Svg.Library/SvgImage.cs
Normal file
99
PROMS/Volian.Svg.Library/SvgImage.cs
Normal file
@@ -0,0 +1,99 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Xml.Serialization;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
|
||||
namespace Volian.Svg.Library
|
||||
{
|
||||
public partial class SvgImage : SvgPart
|
||||
{
|
||||
#region ctor
|
||||
public SvgImage() { ;}
|
||||
public SvgImage(PointF location, SizeF size, string path)
|
||||
{
|
||||
_X.Value = location.X;
|
||||
_Y.Value = location.Y;
|
||||
_Width.Value = size.Width;
|
||||
_Height.Value = size.Height;
|
||||
_ImagePath = path;
|
||||
}
|
||||
#endregion
|
||||
#region Location
|
||||
private SvgMeasurement _X = new SvgMeasurement();
|
||||
[XmlIgnore]
|
||||
public SvgMeasurement X
|
||||
{
|
||||
get { return _X; }
|
||||
set { _X = value; }
|
||||
}
|
||||
[XmlAttribute("x")]
|
||||
[Browsable(false)]
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
public string X_XmlSurrogate
|
||||
{
|
||||
get { return SvgXmlConverter<SvgMeasurement>.GetString(_X); }
|
||||
set { _X = SvgXmlConverter<SvgMeasurement>.GetObject(value); }
|
||||
}
|
||||
private SvgMeasurement _Y = new SvgMeasurement();
|
||||
[XmlIgnore]
|
||||
public SvgMeasurement Y
|
||||
{
|
||||
get { return _Y; }
|
||||
set { _Y = value; }
|
||||
}
|
||||
[XmlAttribute("y")]
|
||||
[Browsable(false)]
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
public string Y_XmlSurrogate
|
||||
{
|
||||
get { return SvgXmlConverter<SvgMeasurement>.GetString(_Y); }
|
||||
set { _Y = SvgXmlConverter<SvgMeasurement>.GetObject(value); }
|
||||
}
|
||||
#endregion
|
||||
#region Size
|
||||
private SvgMeasurement _Width = new SvgMeasurement();
|
||||
[XmlIgnore]
|
||||
public SvgMeasurement Width
|
||||
{
|
||||
get { return _Width; }
|
||||
set { _Width = value; }
|
||||
}
|
||||
[XmlAttribute("width")]
|
||||
[Browsable(false)]
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
public string Width_WidthmlSurrogate
|
||||
{
|
||||
get { return SvgXmlConverter<SvgMeasurement>.GetString(_Width); }
|
||||
set { _Width = SvgXmlConverter<SvgMeasurement>.GetObject(value); }
|
||||
}
|
||||
private SvgMeasurement _Height = new SvgMeasurement();
|
||||
[XmlIgnore]
|
||||
public SvgMeasurement Height
|
||||
{
|
||||
get { return _Height; }
|
||||
set { _Height = value; }
|
||||
}
|
||||
[XmlAttribute("height")]
|
||||
[Browsable(false)]
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
public string Height_XmlSurrogate
|
||||
{
|
||||
get { return SvgXmlConverter<SvgMeasurement>.GetString(_Height); }
|
||||
set { _Height = SvgXmlConverter<SvgMeasurement>.GetObject(value); }
|
||||
}
|
||||
#endregion
|
||||
#region Path to Image File
|
||||
private string _ImagePath = null;
|
||||
[XmlAttribute(AttributeName = "href", Namespace = "http://www.w3.org/1999/xlink")]
|
||||
[Browsable(false)]
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
public string ImagePath
|
||||
{
|
||||
get { return _ImagePath; }
|
||||
set { _ImagePath = value; }
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user