re-adding .pngs as binary
[dia.git] / lib / boundingbox.h
blob4758044383b55ba1375c5dc43e72635b71965dc3
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 "geometry.h"
25 typedef struct _PolyBBExtras PolyBBExtras;
27 struct _PolyBBExtras {
28 real start_long, start_trans;
29 real middle_trans;
30 real end_long, end_trans;
33 typedef struct _LineBBExtras LineBBExtras;
35 struct _LineBBExtras {
36 real start_long, start_trans;
37 real end_long, end_trans;
40 typedef struct _ElementBBExtras ElementBBExtras;
41 struct _ElementBBExtras {
42 real border_trans;
45 void bicubicbezier2D_bbox(const Point *p0,const Point *p1,
46 const Point *p2,const Point *p3,
47 const PolyBBExtras *extra,
48 Rectangle *rect);
50 void line_bbox(const Point *p1, const Point *p2,
51 const LineBBExtras *extra,
52 Rectangle *rect);
54 void rectangle_bbox(const Rectangle *rin,
55 const ElementBBExtras *extra,
56 Rectangle *rout);
58 void circle_bbox(const Point *centre, real radius,
59 Rectangle *rect);
61 void ellipse_bbox(const Point *centre, real width, real height,
62 const ElementBBExtras *extra,
63 Rectangle *rect);
64 void polyline_bbox(const Point *pts, int numpoints,
65 const PolyBBExtras *extra, gboolean closed,
66 Rectangle *rect);
67 void polybezier_bbox(const BezPoint *pts, int numpoints,
68 const PolyBBExtras *extra, gboolean closed,
69 Rectangle *rect);
71 #endif /* BOUNDINGBOX_H */