OSSIM - Open Source Software Image Map
Version 1.9.0 (20180803)
ossim-plugins
potrace
src
trans.h
Go to the documentation of this file.
1
/* Copyright (C) 2001-2015 Peter Selinger.
2
This file is part of Potrace. It is free software and it is covered
3
by the GNU General Public License. See the file COPYING for details. */
4
5
6
#ifndef TRANS_H
7
#define TRANS_H
8
9
#include "
auxiliary.h
"
10
11
/* structure to hold a coordinate transformation */
12
struct
trans_s
{
13
double
bb
[2];
/* dimensions of bounding box */
14
double
orig
[2];
/* origin relative to bounding box */
15
double
x
[2];
/* basis vector for the "x" direction */
16
double
y
[2];
/* basis vector for the "y" direction */
17
double
scalex
,
scaley
;
/* redundant info for some backends' benefit */
18
};
19
typedef
struct
trans_s
trans_t
;
20
21
/* apply a coordinate transformation to a point */
22
static
inline
dpoint_t
trans(
dpoint_t
p,
trans_t
t) {
23
dpoint_t
res;
24
25
res.
x
= t.
orig
[0] + p.
x
* t.
x
[0] + p.
y
* t.
y
[0];
26
res.
y
= t.
orig
[1] + p.
x
* t.
x
[1] + p.
y
* t.
y
[1];
27
return
res;
28
}
29
30
#endif
/* TRANS_H */
trans_s::y
double y[2]
Definition:
trans.h:16
trans_s::bb
double bb[2]
Definition:
trans.h:13
trans_s
Definition:
trans.h:12
trans_s::scalex
double scalex
Definition:
trans.h:17
trans_s::x
double x[2]
Definition:
trans.h:15
auxiliary.h
potrace_dpoint_s::x
double x
Definition:
potracelib.h:67
trans_s::scaley
double scaley
Definition:
trans.h:17
potrace_dpoint_s
Definition:
potracelib.h:66
potrace_dpoint_s::y
double y
Definition:
potracelib.h:67
trans_s::orig
double orig[2]
Definition:
trans.h:14
Generated on Fri Aug 3 2018 08:46:55 for OSSIM - Open Source Software Image Map by
1.8.14