/*  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_LINE_H
#define VISUALID_LINE_H

struct _VisualID_Line {
  VisualID_Glyph base;

  double length; /* length of the line */
  int rib_count; /* number of rib-children along the line */

  gboolean spawn_head;
  VisualID_Glyph *head; /* end-child 1 */
  double head_scale;

  gboolean spawn_tail;
  VisualID_Glyph *tail; /* end-child 2 */
  double tail_scale;

  gboolean spawn_rib;
  VisualID_Glyph *rib; /* (along the line) */
  double rib_scale;

  int rib_doublesided; /* bool: ribs are drawn mirrored on both sides */
  double rib_angle; /* angle of ribs relative to line normal */

  int rib_taper; /* bool: reduce or increase scale of ribs along the line */
  int rib_increase; /* bool: increase (rather than decrease) rib scale */
};


#define VISUALID_TYPE_LINE            (visualid_line_get_type ())
#define VISUALID_LINE(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), VISUALID_TYPE_LINE, VisualID_Line))
#define VISUALID_IS_LINE(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VISUALID_TYPE_LINE))
#define VISUALID_LINE_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), VISUALID_TYPE_LINE, VisualID_Line))
#define vISUALID_IS_LINE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VISUALID_TYPE_LINE))
#define VISUALID_LINE_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), VISUALID_TYPE_LINE, VisualID_Line))

typedef struct _VisualID_Line VisualID_Line;
typedef struct _VisualID_LineClass VisualID_LineClass;

GType visualid_line_get_type (void);

#endif

