UML class fix bigtime.
[dia.git] / lib / boundingbox.h
blob3c6cc2bd790ca2fab7f98943c933131fc719939e
1 /* Dia -- an diagram creation/manipulation program
2 * Support for computing bounding boxes
3 * Copyright (C) 2001 Cyrille Chepelov
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program 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
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 #ifndef BOUNDINGBOX_H
21 #define BOUNDINGBOX_H
23 #include "diatypes.h"
24 #include "geometry.h"
26 struct _PolyBBExtras {
27 real start_long, start_trans;
28 real middle_trans;
29 real end_long, end_trans;
32 struct _LineBBExtras {
33 real start_long, start_trans;
34 real end_long, end_trans;
37 struct _ElementBBExtras {
38 real border_trans;
41 void bicubicbezier2D_bbox(const Point *p0,const Point *p1,
42 const Point *p2,const Point *p3,
43 const PolyBBExtras *extra,
44 Rectangle *rect);
46 void line_bbox(const Point *p1, const Point *p2,
47 const LineBBExtras *extra,
48 Rectangle *rect);
50 void rectangle_bbox(const Rectangle *rin,
51 const ElementBBExtras *extra,
52 Rectangle *rout);
54 void circle_bbox(const Point *centre, real radius,
55 Rectangle *rect);
57 void ellipse_bbox(const Point *centre, real width, real height,
58 const ElementBBExtras *extra,
59 Rectangle *rect);
60 void polyline_bbox(const Point *pts, int numpoints,
61 const PolyBBExtras *extra, gboolean closed,
62 Rectangle *rect);
63 void polybezier_bbox(const BezPoint *pts, int numpoints,
64 const PolyBBExtras *extra, gboolean closed,
65 Rectangle *rect);
67 #endif /* BOUNDINGBOX_H */