libgeda

m_transform.c File Reference

#include <config.h>
#include <math.h>
#include <libgeda_priv.h>
Include dependency graph for m_transform.c:

Go to the source code of this file.

Functions

void m_transform_combine (TRANSFORM *result, TRANSFORM *a, TRANSFORM *b)
 Combines two transformations.
void m_transform_init (TRANSFORM *transform)
 Initialize a transform with the identity matrix.
void m_transform_invert (TRANSFORM *transform, TRANSFORM *inverse)
 Calculates the inverse transform.
void m_transform_line (TRANSFORM *transform, LINE *line)
 Transforms a line segment.
void m_transform_lines (TRANSFORM *transform, GArray *lines)
 Transforms multiple line segments.
void m_transform_point (TRANSFORM *transform, gint *x, gint *y)
 Transforms a point.
void m_transform_points (TRANSFORM *transform, GArray *points)
 Transforms a polyline or polygon.
void m_transform_rotate (TRANSFORM *transform, gdouble angle)
 Adds a rotation to the transformation.
void m_transform_scale (TRANSFORM *transform, gdouble factor)
 Adds a scaling to the transformation.
void m_transform_translate (TRANSFORM *transform, gdouble dx, gdouble dy)
 Adds a translation to the transformation.

Function Documentation

void m_transform_combine ( TRANSFORM result,
TRANSFORM a,
TRANSFORM b 
)

Combines two matricies using matrix multiplication: a*b.

Parameters:
result[out] The resulting transformation. If either operand is NULL, the contents of the result remain unaltered.
a[in] The second operand.
b[in] The second operand.

Definition at line 33 of file m_transform.c.

void m_transform_init ( TRANSFORM transform)
Parameters:
transform[out] The transform to initialize with the identity matrix.

Definition at line 51 of file m_transform.c.

void m_transform_invert ( TRANSFORM transform,
TRANSFORM inverse 
)
Parameters:
transform[in] The given matrix
inverse[out] The inverse of the given matrix.

Definition at line 68 of file m_transform.c.

void m_transform_line ( TRANSFORM transform,
LINE line 
)
Parameters:
transform[in] The transform function.
line[inout] The line to transform.

Definition at line 90 of file m_transform.c.

Here is the call graph for this function:

void m_transform_lines ( TRANSFORM transform,
GArray *  lines 
)
Parameters:
transform[in] The transform function.
lines[inout] The GArray of LINE to transform.

Definition at line 104 of file m_transform.c.

Here is the call graph for this function:

void m_transform_point ( TRANSFORM transform,
gint *  x,
gint *  y 
)
Parameters:
x[inout] The x coordinate to transform.
y[inout] The y coordinate to transform.
transform[in] The transform function.

Definition at line 123 of file m_transform.c.

void m_transform_points ( TRANSFORM transform,
GArray *  points 
)
Parameters:
transform[in] The transform function.
points[inout] The GArray of sPOINT to transform.

Definition at line 144 of file m_transform.c.

Here is the call graph for this function:

void m_transform_rotate ( TRANSFORM transform,
gdouble  angle 
)
Parameters:
transform[inout] The given matrix
angle[in] The angle to rotate

Definition at line 162 of file m_transform.c.

void m_transform_scale ( TRANSFORM transform,
gdouble  factor 
)
Parameters:
transform[inout] The given matrix
factor[in] The amount to scale the transform. This parameter must not be zero, or the matrix becomes singular.

Definition at line 185 of file m_transform.c.

void m_transform_translate ( TRANSFORM transform,
gdouble  dx,
gdouble  dy 
)
Parameters:
transform[inout] The given matrix.
dx[in] The amount to translate on the x axis.
dy[in] The amount to translate on the y axis.

Definition at line 202 of file m_transform.c.

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines