Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
Geom::Translate Class Reference

Translation by a vector. More...

#include <transforms.h>

Inheritance diagram for Geom::Translate:
Geom::TransformOperations< Translate >

Public Member Functions

 Translate ()=default
 Create a translation that doesn't do anything.
 
 Translate (Point const &p)
 Construct a translation from its vector.
 
 Translate (Coord x, Coord y)
 Construct a translation from its coordinates.
 
 operator Affine () const
 
Coord operator[] (Dim2 dim) const
 
Coord operator[] (unsigned dim) const
 
Translateoperator*= (Translate const &o)
 
bool operator== (Translate const &o) const
 
Point vector () const
 
Translate inverse () const
 Get the inverse translation.
 
- Public Member Functions inherited from Geom::TransformOperations< Translate >
Affine operator* (T2 const &t) const
 

Static Public Member Functions

static Translate identity ()
 Get a translation that doesn't do anything.
 

Private Attributes

Point vec
 

Friends

class Point
 

Related Symbols

(Note that these are not member symbols.)

template<>
Translate pow (Translate const &t, int n)
 Specialization of exponentiation for Translate.
 

Detailed Description

Translation by a vector.

Definition at line 113 of file transforms.h.

Constructor & Destructor Documentation

◆ Translate() [1/3]

Geom::Translate::Translate ( )
default

Create a translation that doesn't do anything.

Referenced by inverse().

◆ Translate() [2/3]

Geom::Translate::Translate ( Point const &  p)
inlineexplicit

Construct a translation from its vector.

Definition at line 121 of file transforms.h.

◆ Translate() [3/3]

Geom::Translate::Translate ( Coord  x,
Coord  y 
)
inline

Construct a translation from its coordinates.

Definition at line 123 of file transforms.h.

Member Function Documentation

◆ identity()

static Translate Geom::Translate::identity ( )
inlinestatic

Get a translation that doesn't do anything.

Definition at line 135 of file transforms.h.

Referenced by Geom::check_transforms().

◆ inverse()

◆ operator Affine()

Geom::Translate::operator Affine ( ) const
inline

Definition at line 125 of file transforms.h.

References vec, Geom::X, and Geom::Y.

◆ operator*=()

Translate & Geom::Translate::operator*= ( Translate const &  o)
inline

Definition at line 128 of file transforms.h.

References vec.

◆ operator==()

bool Geom::Translate::operator== ( Translate const &  o) const
inline

Definition at line 129 of file transforms.h.

References vec.

◆ operator[]() [1/2]

Coord Geom::Translate::operator[] ( Dim2  dim) const
inline

Definition at line 126 of file transforms.h.

References vec.

◆ operator[]() [2/2]

Coord Geom::Translate::operator[] ( unsigned  dim) const
inline

Definition at line 127 of file transforms.h.

References vec.

◆ vector()

Point Geom::Translate::vector ( ) const
inline

Definition at line 131 of file transforms.h.

References vec.

Referenced by SPUse::snappoints().

Friends And Related Symbol Documentation

◆ Point

friend class Point
friend

Definition at line 137 of file transforms.h.

◆ pow()

Translate pow ( Translate const &  t,
int  n 
)
related

Specialization of exponentiation for Translate.

Definition at line 342 of file transforms.h.

References Geom::X, and Geom::Y.

Member Data Documentation

◆ vec

Point Geom::Translate::vec
private

The documentation for this class was generated from the following file: