/*  Copyright (C) 2008--2009 Joshua Judson Rosen <rozzin@geekspace.com>.

    This program is free software: you can redistribute it and/or
    modify it under the terms of the GNU General Public License
    version 3 as published by the Free Software Foundation.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; see the file COPYING. If not, see
    <http://www.gnu.org/licenses/> or write to:

        The Free Software Foundation, inc.
        51 Franklin Street, Fifth Floor
        Boston, MA 02110-1301
        USA
*/

#ifndef VISUALID_SPIRAL_H
#define VISUALID_SPIRAL_H

struct _VisualID_Spiral {
  VisualID_Glyph base;

  int len; /* number of segments in the spiral */
  int aligned; /* boolean: children are aligned on radial spokes */
  double ppr; /* points per revolution (ratio, not necessarily n/1) */

  VisualID_Glyph *centre_child; /* child at the centre of the spiral */
  double centre_scale; /* scale reduction for the child at centre of spiral */

  VisualID_Glyph *outer_child; /* child used outside the centre */
  double outer_scale; /* scale reduction for the child at outside of spiral */
};


#define VISUALID_TYPE_SPIRAL            (visualid_spiral_get_type ())
#define VISUALID_SPIRAL(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), VISUALID_TYPE_SPIRAL, VisualID_Spiral))
#define VISUALID_IS_SPIRAL(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VISUALID_TYPE_SPIRAL))
#define VISUALID_SPIRAL_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), VISUALID_TYPE_SPIRAL, VisualID_SpiralClass))
#define VISUALID_IS_SPIRAL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VISUALID_TYPE_SPIRAL))
#define VISUALID_SPIRAL_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), VISUALID_TYPE_SPIRAL, VisualID_SpiralClass))

typedef struct _VisualID_Spiral VisualID_Spiral;
typedef struct _VisualID_SpiralClass VisualID_SpiralClass;

GType visualid_spiral_get_type (void);

#endif
