Print Library, Svg Library, Utils Library, XYPlots
This commit is contained in:
@@ -17,13 +17,6 @@ namespace Volian.Svg.Library
|
||||
}
|
||||
public partial class Svg : SvgGroup
|
||||
{
|
||||
public void Draw(Graphics graphics)
|
||||
{
|
||||
//SetupInheritance();
|
||||
//Console.WriteLine("{0}, DPI {1}", graphics.VisibleClipBounds, graphics.DpiX);
|
||||
SvgParts.Draw(graphics, new SvgScale(DeviceDPI(graphics), graphics.VisibleClipBounds, _Width, _Height, _ViewBox), this, this);
|
||||
//SvgParts.Draw(graphics, new SvgScale(100, graphics.VisibleClipBounds, _Width, _Height, _ViewBox));
|
||||
}
|
||||
public static float DeviceDPI(Graphics g)
|
||||
{
|
||||
PointF[] tmp = { new PointF(g.DpiX, g.DpiY) };
|
||||
@@ -36,7 +29,6 @@ namespace Volian.Svg.Library
|
||||
public override void Draw(System.Drawing.Graphics graphics, SvgScale scale, Svg mySvg, SvgPartInheritance myParent)
|
||||
{
|
||||
SetupInheritance(myParent.MyInheritedSettings);
|
||||
//_MyLineSettings.Scale = scale.M(1F);
|
||||
if (FillColor != Color.Transparent)
|
||||
using (Brush brush = new SolidBrush(FillColor))
|
||||
graphics.FillEllipse(brush, scale.X(CX - Radius), scale.Y(CY - Radius), scale.M(Radius * 2), scale.M(Radius * 2));
|
||||
@@ -50,7 +42,6 @@ namespace Volian.Svg.Library
|
||||
public override void Draw(System.Drawing.Graphics graphics, SvgScale scale, Svg mySvg, SvgPartInheritance myParent)
|
||||
{
|
||||
SetupInheritance(myParent.MyInheritedSettings);
|
||||
//_MyLineSettings.Scale = scale.M(1F);
|
||||
if (FillColor != Color.Transparent)
|
||||
using (Brush brush = new SolidBrush(FillColor))
|
||||
graphics.FillEllipse(brush, scale.X(CX - Radius), scale.Y(CY - Radius), scale.M(Radius * 2), scale.M(Radius * 2));
|
||||
@@ -64,7 +55,6 @@ namespace Volian.Svg.Library
|
||||
public override void Draw(Graphics graphics, SvgScale myScale, Svg mySvg, SvgPartInheritance myParent)
|
||||
{
|
||||
// Don't draw
|
||||
//_SvgParts.Draw(graphics, myScale);
|
||||
}
|
||||
}
|
||||
public partial class SvgEllipse : SvgShapePart
|
||||
@@ -85,7 +75,7 @@ namespace Volian.Svg.Library
|
||||
public override void Draw(Graphics graphics, SvgScale myScale, Svg mySvg, SvgPartInheritance myParent)
|
||||
{
|
||||
SetupInheritance(myParent.MyInheritedSettings);
|
||||
_SvgParts.Draw(graphics, myScale, mySvg, this);
|
||||
SvgParts.Draw(graphics, myScale, mySvg, this);
|
||||
}
|
||||
}
|
||||
public partial class SvgImage : SvgPart
|
||||
@@ -130,26 +120,9 @@ namespace Volian.Svg.Library
|
||||
graphics.DrawRectangle(pen, scale.X(X),scale.Y(Y), scale.M(Width), scale.M(Height));
|
||||
}
|
||||
}
|
||||
//public partial class SvgRtf : SvgShapePart
|
||||
//{
|
||||
// //private static float _Factor = 1.085F; // 20 point Arial Font
|
||||
// public override void Draw(System.Drawing.Graphics graphics, SvgScale scale, Svg mySvg, SvgPartInheritance myParent)
|
||||
// {
|
||||
// SetupInheritance(myParent.MyInheritedSettings);
|
||||
// _MyFontSettings.Scale = scale.M(1F);
|
||||
// }
|
||||
// private float YAdjustment(Graphics gr, Font fnt)
|
||||
// {
|
||||
// int yAsc = fnt.FontFamily.GetCellAscent(fnt.Style);
|
||||
// int yLS = fnt.FontFamily.GetLineSpacing(fnt.Style);
|
||||
// float gth = fnt.GetHeight(gr);
|
||||
// float fAsc = (yAsc * gth) / yLS;
|
||||
// return -fAsc;
|
||||
// }
|
||||
//}
|
||||
|
||||
public partial class SvgText : SvgShapePart
|
||||
{
|
||||
//private static float _Factor = 1.085F; // 20 point Arial Font
|
||||
public override void Draw(System.Drawing.Graphics graphics, SvgScale scale, Svg mySvg, SvgPartInheritance myParent)
|
||||
{
|
||||
SetupInheritance(myParent.MyInheritedSettings);
|
||||
@@ -175,8 +148,6 @@ namespace Volian.Svg.Library
|
||||
private float YAdjustment(Graphics gr, Font fnt)
|
||||
{
|
||||
int yAsc = fnt.FontFamily.GetCellAscent(fnt.Style);
|
||||
//int yDesc = fnt.FontFamily.GetCellDescent(fnt.Style);
|
||||
//int yEm = fnt.FontFamily.GetEmHeight(fnt.Style);
|
||||
int yLS = fnt.FontFamily.GetLineSpacing(fnt.Style);
|
||||
float gth = fnt.GetHeight(gr);
|
||||
float fh = fnt.Size;
|
||||
@@ -189,7 +160,7 @@ namespace Volian.Svg.Library
|
||||
public override void Draw(System.Drawing.Graphics graphics, SvgScale scale, Svg mySvg, SvgPartInheritance myParent)
|
||||
{
|
||||
SetupInheritance(myParent.MyInheritedSettings);
|
||||
mySvg[_UseID.Substring(1)].Draw(graphics, scale.AdjustOrigin(X, Y), mySvg, this);
|
||||
mySvg[UseID.Substring(1)].Draw(graphics, scale.AdjustOrigin(X, Y), mySvg, this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user