1 /*****************************************************************************
2 ** Copyright (C) 1998-2001 Ljubomir Milanovic & Horst Wagner
3 ** This file is part of the g2 library
5 ** This library is free software; you can redistribute it and/or
6 ** modify it under the terms of the GNU Lesser General Public
7 ** License as published by the Free Software Foundation; either
8 ** version 2.1 of the License, or (at your option) any later version.
10 ** This library is distributed in the hope that it will be useful,
11 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
12 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 ** Lesser General Public License for more details.
15 ** You should have received a copy of the GNU Lesser General Public
16 ** License along with this library; if not, write to the Free Software
17 ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 ******************************************************************************/
19 #ifndef _G2_PHYSICAL_DEVICE_H
20 #define _G2_PHYSICAL_DEVICE_H
26 typedef enum _g2_coor { /* coord. type */
27 g2_IntCoor, g2_DoubleCoor
31 typedef struct _g2_funix_fun { /* funix--function paar */
32 g2_funix fx; /* function index */
33 int (*fun)(); /* pointer to function */
37 typedef struct _g2_physical_device {
38 int pid; /* physical device id */
39 void *pdp; /* pointer to something in phys. dev. */
40 g2_coor coor_type; /* coordinate type */
41 g2_funix_fun *ff; /* list of funix-function pairs */
42 double a11, a22; /* coordinate transformation (ud->pd) */
43 double b1, b2; /* Ar + B */
45 double x_origin; /* User coordinates specification */
53 g2_physical_device *g2_create_physical_device(int pid,
56 const g2_funix_fun *ff,
57 double a11, double a22,
58 double b1, double b2);
59 void g2_destroy_physical_device(g2_physical_device *pd);
61 #endif /* _G2_PHYSICAL_DEVICE_H */