#include <config.h>
#include <stdio.h>
#include <math.h>
#include "libgeda_priv.h"
Go to the source code of this file.
Functions |
void | set_window (TOPLEVEL *toplevel, PAGE *page, int xmin, int xmax, int ymin, int ymax) |
| Set the contraints for the current page.
|
void | rotate_point (int x, int y, int angle, int *newx, int *newy) |
| Rotate a point by an arbitrary angle.
|
void | rotate_point_90 (int x, int y, int angle, int *newx, int *newy) |
| Rotate point in 90 degree increments only.
|
void | PAPERSIZEtoWORLD (int width, int height, int border, int *right, int *bottom) |
| Convert Paper size to World coordinates.
|
Function Documentation
void set_window |
( |
TOPLEVEL * |
toplevel, |
|
|
PAGE * |
page, |
|
|
int |
xmin, |
|
|
int |
xmax, |
|
|
int |
ymin, |
|
|
int |
ymax |
|
) |
| |
- Function Description
- This function will set the current page constraints.
- Parameters:
-
[in] | toplevel | The TOPLEVEL object. |
[in,out] | page | The PAGE object to set constraints on. |
[in] | xmin | The minimum x coordinate for the page. |
[in] | xmax | The maximum x coordinate for the page. |
[in] | ymin | The minimum y coordinate for the page. |
[in] | ymax | The maximum y coordinate for the page. |
Definition at line 43 of file m_basic.c.
void rotate_point |
( |
int |
x, |
|
|
int |
y, |
|
|
int |
angle, |
|
|
int * |
newx, |
|
|
int * |
newy |
|
) |
| |
- Function Description
- This function will rotate a point coordinate by an arbitrary angle and return the new coordinate in the newx and newy parameters.
- Parameters:
-
[in] | x | Input point x coordinate. |
[in] | y | Input point y coordinate. |
[in] | angle | Angle to rotate in degrees. |
[out] | newx | Output point x coordinate. |
[out] | newy | Output point y coordinate. |
Definition at line 93 of file m_basic.c.
void rotate_point_90 |
( |
int |
x, |
|
|
int |
y, |
|
|
int |
angle, |
|
|
int * |
newx, |
|
|
int * |
newy |
|
) |
| |
- Function Description
- This function takes a point coordinate and rotates it by 90 degrees at a time. The new point coordinate is returned in newx and newy.
- Parameters:
-
[in] | x | Input point x coordinate. |
[in] | y | Input point y coordinate. |
[in] | angle | Angle to rotate by (90 degree increments only). |
[out] | newx | Output point x coordinate. |
[out] | newy | Output point y coordinate. |
Definition at line 119 of file m_basic.c.
void PAPERSIZEtoWORLD |
( |
int |
width, |
|
|
int |
height, |
|
|
int |
border, |
|
|
int * |
right, |
|
|
int * |
bottom |
|
) |
| |
- Function Description
- This function takes the paper size and converts it to world coordinates. It supports landscape with a fixed aspect ratio.
- Parameters:
-
[in] | width | Paper width. (units?) |
[in] | height | Paper height. (units?) |
[in] | border | Paper border size. (units?) |
[out] | right | Right world coordinate. (units?) |
[out] | bottom | Bottom world coordinate. (units?) |
- Todo:
- Support more modes than just landscape only mode.
Definition at line 168 of file m_basic.c.