Table of Contents

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

minX float

The min X.

minY float

The min Y.

width float

The width.

height float

The height.

Fields

Empty

public static readonly SvgViewBox Empty

Field Value

SvgViewBox

Properties

Height

Gets or sets the height of the viewport.

public float Height { readonly get; set; }

Property Value

float

MinX

Gets or sets the position where the viewport starts horizontally.

public float MinX { readonly get; set; }

Property Value

float

MinY

Gets or sets the position where the viewport starts vertically.

public float MinY { readonly get; set; }

Property Value

float

Width

Gets or sets the width of the viewport.

public float Width { readonly get; set; }

Property Value

float

Methods

AddViewBoxTransform(SvgAspectRatio, ISvgRenderer, SvgFragment)

public void AddViewBoxTransform(SvgAspectRatio aspectRatio, ISvgRenderer renderer, SvgFragment frag)

Parameters

aspectRatio SvgAspectRatio
renderer ISvgRenderer
frag SvgFragment

Equals(SvgViewBox)

public bool Equals(SvgViewBox other)

Parameters

other SvgViewBox

Returns

bool

Equals(object)

Indicates whether this instance and a specified object are equal.

public override bool Equals(object obj)

Parameters

obj object

The 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 SvgViewBox
rhs SvgViewBox

Returns

bool

implicit operator RectangleF(SvgViewBox)

Performs an implicit conversion from SvgViewBox to RectangleF.

public static implicit operator RectangleF(SvgViewBox value)

Parameters

value SvgViewBox

The 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 RectangleF

The value.

Returns

SvgViewBox

The result of the conversion.

operator !=(SvgViewBox, SvgViewBox)

public static bool operator !=(SvgViewBox lhs, SvgViewBox rhs)

Parameters

lhs SvgViewBox
rhs SvgViewBox

Returns

bool