* lib/text.h: Added text_get_line() declaration
[dia.git] / lib / boundingbox.h
blobf742a87dc47d5e5ac4f385d449c7ec19b09b63ee
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 /** \file boundingbox.h Boundingbox calculation (helpers) */
22 #ifndef BOUNDINGBOX_H
23 #define BOUNDINGBOX_H
25 #include "diatypes.h"
26 #include "geometry.h"
28 struct _PolyBBExtras {
29 real start_long, start_trans;
30 real middle_trans;
31 real end_long, end_trans;
34 struct _LineBBExtras {
35 real start_long, start_trans;
36 real end_long, end_trans;
39 struct _ElementBBExtras {
40 real border_trans;
43 void bicubicbezier2D_bbox(const Point *p0,const Point *p1,
44 const Point *p2,const Point *p3,
45 const PolyBBExtras *extra,
46 Rectangle *rect);
48 void line_bbox(const Point *p1, const Point *p2,
49 const LineBBExtras *extra,
50 Rectangle *rect);
52 void rectangle_bbox(const Rectangle *rin,
53 const ElementBBExtras *extra,
54 Rectangle *rout);
56 void circle_bbox(const Point *centre, real radius,
57 Rectangle *rect);
59 void ellipse_bbox(const Point *centre, real width, real height,
60 const ElementBBExtras *extra,
61 Rectangle *rect);
62 void polyline_bbox(const Point *pts, int numpoints,
63 const PolyBBExtras *extra, gboolean closed,
64 Rectangle *rect);
65 void polybezier_bbox(const BezPoint *pts, int numpoints,
66 const PolyBBExtras *extra, gboolean closed,
67 Rectangle *rect);
69 #endif /* BOUNDINGBOX_H */