1 /* Dia -- an diagram creation/manipulation program 2 * Copyright (C) 2001 Lars Clausen 3 * 4 * This program is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License as published by 6 * the Free Software Foundation; either version 2 of the License, or 7 * (at your option) any later version. 8 * 9 * This program is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details. 13 * 14 * You should have received a copy of the GNU General Public License 15 * along with this program; if not, write to the Free Software 16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 */ 18 19 /** This file contains user_data structures for creating the non-trivial 20 standard objects (polylines & polygons). 21 */ 22 23 #ifndef STANDARD_OBJECT_CREATE_H 24 #define STANDARD_OBJECT_CREATE_H 25 26 #include "diatypes.h" 27 28 /** \brief Can be used as extra parameter at create. Usually discouraged, you can set via StdProp API */ 29 struct _MultipointCreateData { 30 int num_points; /**< count */ 31 Point *points; /**< data */ 32 }; 33 34 /** \brief Can be used as extra parameter at create. Usually discouraged, you can set via StdProp API */ 35 struct _BezierCreateData { 36 int num_points; /**< count */ 37 BezPoint *points; /**< data */ 38 }; 39 40 /** Create a text object for the diagram. 41 * @param xpos X position (in cm from the origo) of the object. 42 * @param ypos Y position (in cm from the origo) of the object. 43 * @param 44 */ 45 DiaObject * 46 create_standard_text(real xpos, real ypos); 47 DiaObject * 48 create_standard_ellipse(real xpos, real ypos, real width, real height); 49 DiaObject * 50 create_standard_box(real xpos, real ypos, real width, real height); 51 DiaObject * 52 create_standard_polyline(int num_points, Point *points, 53 Arrow *end_arrow, Arrow *start_arrow); 54 DiaObject * 55 create_standard_polygon(int num_points, Point *points); 56 DiaObject * 57 create_standard_bezierline(int num_points, BezPoint *points, 58 Arrow *end_arrow, Arrow *start_arrow); 59 DiaObject * 60 create_standard_beziergon(int num_points, BezPoint *points); 61 DiaObject * 62 create_standard_arc(real x1, real y1, real x2, real y2, 63 real curve_distance, 64 Arrow *end_arrow, Arrow *start_arrow); 65 DiaObject * 66 create_standard_image(real xpos, real ypos, real width, real height, 67 char *file); 68 DiaObject * 69 create_standard_group(GList *items); 70 #endif 71