Struct SvgViewBox
- Namespace
- Svg
- Assembly
- Svg.dll
It is often desirable to specify that a given set of graphics stretch to fit a particular container element. The viewBox attribute provides this capability.
[TypeConverter(typeof(SvgViewBoxConverter))]
public struct SvgViewBox
- Inherited Members
Constructors
SvgViewBox(float, float, float, float)
Initializes a new instance of the SvgViewBox struct.
public SvgViewBox(float minX, float minY, float width, float height)
Parameters
Fields
Empty
public static readonly SvgViewBox Empty
Field Value
Properties
Height
Gets or sets the height of the viewport.
public float Height { readonly get; set; }
Property Value
MinX
Gets or sets the position where the viewport starts horizontally.
public float MinX { readonly get; set; }
Property Value
MinY
Gets or sets the position where the viewport starts vertically.
public float MinY { readonly get; set; }
Property Value
Width
Gets or sets the width of the viewport.
public float Width { readonly get; set; }
Property Value
Methods
AddViewBoxTransform(SvgAspectRatio, ISvgRenderer, SvgFragment)
public void AddViewBoxTransform(SvgAspectRatio aspectRatio, ISvgRenderer renderer, SvgFragment frag)
Parameters
aspectRatio
SvgAspectRatiorenderer
ISvgRendererfrag
SvgFragment
Equals(SvgViewBox)
public bool Equals(SvgViewBox other)
Parameters
other
SvgViewBox
Returns
Equals(object)
Indicates whether this instance and a specified object are equal.
public override bool Equals(object obj)
Parameters
obj
objectThe object to compare with the current instance.
Returns
- bool
true if
obj
and this instance are the same type and represent the same value; otherwise, false.
GetHashCode()
Returns the hash code for this instance.
public override int GetHashCode()
Returns
- int
A 32-bit signed integer that is the hash code for this instance.
Operators
operator ==(SvgViewBox, SvgViewBox)
public static bool operator ==(SvgViewBox lhs, SvgViewBox rhs)
Parameters
lhs
SvgViewBoxrhs
SvgViewBox
Returns
implicit operator RectangleF(SvgViewBox)
Performs an implicit conversion from SvgViewBox to RectangleF.
public static implicit operator RectangleF(SvgViewBox value)
Parameters
value
SvgViewBoxThe value.
Returns
- RectangleF
The result of the conversion.
implicit operator SvgViewBox(RectangleF)
Performs an implicit conversion from RectangleF to SvgViewBox.
public static implicit operator SvgViewBox(RectangleF value)
Parameters
value
RectangleFThe value.
Returns
- SvgViewBox
The result of the conversion.
operator !=(SvgViewBox, SvgViewBox)
public static bool operator !=(SvgViewBox lhs, SvgViewBox rhs)
Parameters
lhs
SvgViewBoxrhs
SvgViewBox