Print Library, Svg Library, Utils Library, XYPlots
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Drawing;
|
||||
using System.ComponentModel;
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace Volian.Svg.Library
|
||||
{
|
||||
@@ -11,11 +9,8 @@ namespace Volian.Svg.Library
|
||||
{
|
||||
#region ctor
|
||||
public SvgViewBox() { ;}
|
||||
public SvgViewBox(float x, float y, float width, float height)
|
||||
{
|
||||
_MyRectangleF = new RectangleF(x, y, width, height);
|
||||
}
|
||||
public SvgViewBox(string val)
|
||||
public SvgViewBox(float x, float y, float width, float height) => _MyRectangleF = new RectangleF(x, y, width, height);
|
||||
public SvgViewBox(string val)
|
||||
{
|
||||
string[] parms = ((string)val).Split(' ');
|
||||
_MyRectangleF = new RectangleF(Convert.ToSingle(parms[0]), Convert.ToSingle(parms[1]), Convert.ToSingle(parms[2]), Convert.ToSingle(parms[3]));
|
||||
@@ -43,33 +38,17 @@ namespace Volian.Svg.Library
|
||||
get { return _MyRectangleF.Height; }
|
||||
set { _MyRectangleF.Height = value; }
|
||||
}
|
||||
#endregion
|
||||
#region ToString
|
||||
public override string ToString()
|
||||
{
|
||||
return string.Format("{0} {1} {2} {3}", X, Y, Width, Height);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
#endregion
|
||||
#region ToString
|
||||
public override string ToString() => string.Format("{0} {1} {2} {3}", X, Y, Width, Height);
|
||||
#endregion
|
||||
}
|
||||
public class ViewBoxTypeConverter : ExpandableObjectConverter
|
||||
{
|
||||
public override bool CanConvertTo(ITypeDescriptorContext context, Type t)
|
||||
{
|
||||
return t == typeof(String);
|
||||
}
|
||||
public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destType)
|
||||
{
|
||||
if (destType == typeof(string) && value is SvgViewBox)
|
||||
{
|
||||
return value.ToString();
|
||||
}
|
||||
return base.ConvertTo(context, culture, value, destType);
|
||||
}
|
||||
public override bool CanConvertFrom(ITypeDescriptorContext context, Type t)
|
||||
{
|
||||
return t == typeof(String);
|
||||
}
|
||||
public override object ConvertFrom(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object val)
|
||||
public override bool CanConvertTo(ITypeDescriptorContext context, Type t) => t == typeof(string);
|
||||
public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destType) => destType == typeof(string) && value is SvgViewBox ? value.ToString() : base.ConvertTo(context, culture, value, destType);
|
||||
public override bool CanConvertFrom(ITypeDescriptorContext context, Type t) => t == typeof(string);
|
||||
public override object ConvertFrom(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object val)
|
||||
{
|
||||
string[] parms = ((string)val).Split(' ');
|
||||
SvgViewBox viewBox = new SvgViewBox(Convert.ToSingle(parms[0]), Convert.ToSingle(parms[1]), Convert.ToSingle(parms[2]), Convert.ToSingle(parms[3]));
|
||||
|
||||
Reference in New Issue
Block a user