Project

General

Profile

Revision 194

added scaling functions

View differences:

proj/include/ent.h
6 6
void (ent_set_scale) (double n);
7 7
void (ent_set_origin)(double x, double y);
8 8

  
9
double (ent_get_scale)  (void);
9 10
double (ent_get_XLength)(void);
10 11
double (ent_get_YLength)(void);
11 12

  
proj/src/ent.c
11 11
void (ent_set_scale) (double n){ scale = n; }
12 12
void (ent_set_origin)(double x, double y){ x_origin = x; y_origin = y; }
13 13

  
14
double (ent_get_scale)  (void){ return scale; }
14 15
double (ent_get_XLength)(void){ return graph_get_XRes()/scale; }
15 16
double (ent_get_YLength)(void){ return graph_get_YRes()/scale; }
16 17

  

Also available in: Unified diff