Print Library, Svg Library, Utils Library, XYPlots
This commit is contained in:
@@ -1,6 +1,3 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Drawing;
|
||||
|
||||
namespace Volian.Svg.Library
|
||||
@@ -17,33 +14,17 @@ namespace Volian.Svg.Library
|
||||
_FontWeight = ((myFont.Style & FontStyle.Bold) == FontStyle.Bold ? "bold" : "normal");
|
||||
_TextDecoration = ((myFont.Style & FontStyle.Underline) == FontStyle.Underline ? "underline" : "normal");
|
||||
}
|
||||
//public SvgFontSettings(string myFontFamily, string myFontSize, string mySvgStyle, string myFontWeight, string myTextDecoration)
|
||||
//{
|
||||
// _FontFamilyName = myFontFamily;
|
||||
// _FontSize = myFontSize;
|
||||
// _SVGFontStyle = mySvgStyle;
|
||||
// _FontWeight = myFontWeight;
|
||||
// _TextDecoration = myTextDecoration;
|
||||
//}
|
||||
#endregion
|
||||
#region Inheritance
|
||||
private SvgFontSettings _MyParentsSettings = null;
|
||||
public SvgFontSettings MyParentsSettings
|
||||
{
|
||||
get { return _MyParentsSettings; }
|
||||
set
|
||||
{
|
||||
_MyParentsSettings = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region Internal Inherited Properties
|
||||
protected string InheritedFontFamily
|
||||
#endregion
|
||||
#region Inheritance
|
||||
public SvgFontSettings MyParentsSettings { get; set; } = null;
|
||||
#endregion
|
||||
#region Internal Inherited Properties
|
||||
protected string InheritedFontFamily
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_FontFamily != "") return _FontFamily;
|
||||
if (_MyParentsSettings != null) return _MyParentsSettings.InheritedFontFamily; // Default
|
||||
if (MyParentsSettings != null) return MyParentsSettings.InheritedFontFamily; // Default
|
||||
return "Arial"; // Absolute Default
|
||||
}
|
||||
}
|
||||
@@ -52,7 +33,7 @@ namespace Volian.Svg.Library
|
||||
get
|
||||
{
|
||||
if (_FontSize != "") return _FontSize; // Current Value
|
||||
if (_MyParentsSettings != null) return _MyParentsSettings.InheritedFontSize; // Default
|
||||
if (MyParentsSettings != null) return MyParentsSettings.InheritedFontSize; // Default
|
||||
return "9PT"; // Absolute Default
|
||||
}
|
||||
}
|
||||
@@ -61,7 +42,7 @@ namespace Volian.Svg.Library
|
||||
get
|
||||
{
|
||||
if (_SVGFontStyle != "") return _SVGFontStyle; // Current Value
|
||||
if (_MyParentsSettings != null) return _MyParentsSettings.InheritedFontStyle;// Default
|
||||
if (MyParentsSettings != null) return MyParentsSettings.InheritedFontStyle;// Default
|
||||
return "normal"; // Absolute Default
|
||||
}
|
||||
}
|
||||
@@ -70,7 +51,7 @@ namespace Volian.Svg.Library
|
||||
get
|
||||
{
|
||||
if (_FontWeight != "") return _FontWeight;// Current Value
|
||||
if (_MyParentsSettings != null) return _MyParentsSettings.InheritedFontWeight;// Default
|
||||
if (MyParentsSettings != null) return MyParentsSettings.InheritedFontWeight;// Default
|
||||
return "normal"; // Absolute Default
|
||||
}
|
||||
}
|
||||
@@ -79,7 +60,7 @@ namespace Volian.Svg.Library
|
||||
get
|
||||
{
|
||||
if (_TextDecoration != "") return _TextDecoration;// Current Value
|
||||
if (_MyParentsSettings != null) return _MyParentsSettings.InheritedTextDecoration;// Default
|
||||
if (MyParentsSettings != null) return MyParentsSettings.InheritedTextDecoration;// Default
|
||||
return "normal"; // Absolute Default
|
||||
}
|
||||
}
|
||||
@@ -110,13 +91,6 @@ namespace Volian.Svg.Library
|
||||
}
|
||||
set
|
||||
{
|
||||
// This was disposing fonts that are saved in our static dictionary.
|
||||
// caused problems with the step editor display after printing (found with Wolf Creek Chem procedure RW-G02 Step 6.1.17) - jsj 7/14/2017
|
||||
//if (_Font != null)
|
||||
//{
|
||||
// Console.WriteLine("font dispose {0}, {1}", _Font, _Font.Style);
|
||||
// //_Font.Dispose();
|
||||
//}
|
||||
if (value != null)
|
||||
{
|
||||
_FontFamily = value.FontFamily.Name;
|
||||
|
||||
Reference in New Issue
Block a user