Table of Contents

Struct ImportSVG.Vector2

Namespace
CADability
Assembly
CADability.dll

A 2d point or vector in SVG user coordinates (single precision), as passed to the path related CreateXxx methods. Addition and subtraction are provided for the relative path commands.

protected struct ImportSVG.Vector2
Inherited Members

Constructors

Vector2(float, float)

Creates the vector with the given components.

public Vector2(float x, float y)

Parameters

x float

the x component

y float

the y component

Fields

x

The x and y coordinates in SVG user units.

public float x

Field Value

float

y

The x and y coordinates in SVG user units.

public float y

Field Value

float

Methods

Equals(object)

public override bool Equals(object obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

Operators

operator +(Vector2, Vector2)

Adds the components; used to turn the relative coordinates of a path command into absolute ones.

public static ImportSVG.Vector2 operator +(ImportSVG.Vector2 v1, ImportSVG.Vector2 v2)

Parameters

v1 ImportSVG.Vector2

first summand

v2 ImportSVG.Vector2

second summand

Returns

ImportSVG.Vector2

the component-wise sum

operator -(Vector2, Vector2)

Subtracts the components of v2 from v1.

public static ImportSVG.Vector2 operator -(ImportSVG.Vector2 v1, ImportSVG.Vector2 v2)

Parameters

v1 ImportSVG.Vector2

the minuend

v2 ImportSVG.Vector2

the subtrahend

Returns

ImportSVG.Vector2

the component-wise difference