~inkscape.dev/inkscape/trunk

« back to all changes in this revision

Viewing changes to src/sp-star.h

  • Committer: mental
  • Date: 2006-01-16 02:36:01 UTC
  • Revision ID: mental@users.sourceforge.net-20060116023601-wkr0h7edl5veyudq
moving trunk for module inkscape

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef __SP_STAR_H__
 
2
#define __SP_STAR_H__
 
3
 
 
4
/*
 
5
 * <sodipodi:star> implementation
 
6
 *
 
7
 * Authors:
 
8
 *   Mitsuru Oka <oka326@parkcity.ne.jp>
 
9
 *   Lauris Kaplinski <lauris@kaplinski.com>
 
10
 *
 
11
 * Copyright (C) 1999-2002 Lauris Kaplinski
 
12
 * Copyright (C) 2000-2001 Ximian, Inc.
 
13
 *
 
14
 * Released under GNU GPL, read the file 'COPYING' for more information
 
15
 */
 
16
 
 
17
#include "sp-polygon.h"
 
18
 
 
19
 
 
20
 
 
21
#define SP_TYPE_STAR            (sp_star_get_type ())
 
22
#define SP_STAR(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), SP_TYPE_STAR, SPStar))
 
23
#define SP_STAR_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), SP_TYPE_STAR, SPStarClass))
 
24
#define SP_IS_STAR(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SP_TYPE_STAR))
 
25
#define SP_IS_STAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SP_TYPE_STAR))
 
26
 
 
27
class SPStar;
 
28
class SPStarClass;
 
29
 
 
30
typedef enum {
 
31
        SP_STAR_POINT_KNOT1,
 
32
        SP_STAR_POINT_KNOT2
 
33
} SPStarPoint;
 
34
 
 
35
struct SPStar : public SPPolygon {
 
36
        gint sides;
 
37
 
 
38
        NR::Point center;
 
39
        double r[2];
 
40
        double arg[2];
 
41
        bool flatsided;
 
42
 
 
43
        double rounded;
 
44
        double randomized;
 
45
};
 
46
 
 
47
struct SPStarClass {
 
48
        SPPolygonClass parent_class;
 
49
};
 
50
 
 
51
GType sp_star_get_type (void);
 
52
 
 
53
void sp_star_position_set (SPStar *star, gint sides, NR::Point center, gdouble r1, gdouble r2, gdouble arg1, gdouble arg2, bool isflat, double rounded, double randomized);
 
54
 
 
55
NR::Point sp_star_get_xy (SPStar *star, SPStarPoint point, gint index, bool randomized = false);
 
56
 
 
57
 
 
58
 
 
59
#endif