Click here to Skip to main content
15,885,366 members
Articles / Desktop Programming / WPF

SharpVectors - SVG# Reloaded: An Introduction

Rate me:
Please Sign up or sign in to vote.
4.98/5 (33 votes)
17 Nov 2010BSD10 min read 204.5K   21.7K   101  
A C# library for converting SVG to WPF and viewing SVG files in WPF Applications
namespace SharpVectors.Dom.Svg
{
	/// <summary>
	/// The SvgAngle interface corresponds to the angle basic data 
	/// type. 
	/// </summary>
	/// <developer>niklas@protocol7.com</developer>
	/// <completed>100</completed>
	public interface ISvgAngle
	{
		/// <summary>
		/// The type of the value as specified by the SvgAngleType 
		/// enum class.
		/// </summary>
		SvgAngleType UnitType{get;}

		/// <summary>
		/// The angle value as a floating point value, in degrees. 
		/// Setting this attribute will cause valueInSpecifiedUnits 
		/// and valueAsString to be updated automatically to reflect 
		/// this setting.
		/// </summary>
		double Value{get;set;}

		/// <summary>
		/// The angle value as a floating point value, in the units 
		/// expressed by unitType. Setting this attribute will cause
		/// value and valueAsString to be updated automatically to 
		/// reflect this setting.
		/// </summary>
		double ValueInSpecifiedUnits{get;set;}

		/// <summary>
		/// The angle value as a string value, in the units expressed
		/// by unitType. Setting this attribute will cause value and 
		/// valueInSpecifiedUnits to be updated automatically to 
		/// reflect this setting.
		/// </summary>
		string ValueAsString{get;set;}

		/// <summary>
		/// Reset the value as a number with an associated unitType,
		/// thereby replacing the values for all of the attributes on 
		/// the object.
		/// </summary>
		/// <param name="unitType"> The unitType for the angle value (e.g., SvgAngleTypeDEG).</param>
		/// <param name="valueInSpecifiedUnits">The angle value.</param>
		void NewValueSpecifiedUnits(SvgAngleType unitType, double valueInSpecifiedUnits);
		
		/// <summary>
		/// Preserve the same underlying stored value, but reset the
		/// stored unit identifier to the given unitType. Object 
		/// attributes unitType, valueAsSpecified and valueAsString 
		/// might be modified as a result of this method.
		/// </summary>
		/// <param name="unitType">The unitType to switch to (e.g., SvgAngleTypeDEG).</param>
		void ConvertToSpecifiedUnits(SvgAngleType unitType);
	}
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The BSD License


Written By
Engineer
Japan Japan
Systems Engineer

Comments and Discussions