1 /* === S Y N F I G ========================================================= */
3 ** \brief Template Header
5 ** $Id: blinepoint.h,v 1.1.1.1 2005/01/04 01:23:14 darco Exp $
8 ** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
10 ** This package is free software; you can redistribute it and/or
11 ** modify it under the terms of the GNU General Public License as
12 ** published by the Free Software Foundation; either version 2 of
13 ** the License, or (at your option) any later version.
15 ** This package is distributed in the hope that it will be useful,
16 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 ** General Public License for more details.
21 /* ========================================================================= */
23 /* === S T A R T =========================================================== */
25 #ifndef __SYNFIG_BLINEPOINT_H
26 #define __SYNFIG_BLINEPOINT_H
28 /* === H E A D E R S ======================================================= */
34 /* === M A C R O S ========================================================= */
36 /* === T Y P E D E F S ===================================================== */
38 /* === C L A S S E S & S T R U C T S ======================================= */
42 class BLinePoint : public UniqueID
58 { tangent_[0] = Point(0,0); tangent_[1] = Point(0,0); }
60 const Point& get_vertex()const { return vertex_; }
61 void set_vertex(const Point& x) { vertex_=x; }
64 const Vector& get_tangent1()const { return tangent_[0]; }
65 const Vector& get_tangent2()const { return split_tangent_?tangent_[1]:tangent_[0]; }
66 void set_tangent(const Vector& x) { tangent_[0]=tangent_[1]=x; }
67 void set_tangent1(const Vector& x) { tangent_[0]=x; }
68 void set_tangent2(const Vector& x) { tangent_[1]=x; }
71 const float& get_width()const { return width_; }
72 void set_width(float x) { width_=x; }
74 // We store the origin offset by 0.5 so that
75 // can have the origin set to the default by zeroing
77 float get_origin()const { return origin_+0.5f; }
78 void set_origin(float x) { origin_=x-0.5f; }
81 const bool& get_split_tangent_flag()const { return split_tangent_; }
82 void set_split_tangent_flag(bool x=true) { split_tangent_=x; }
86 }; // END of class BLinePoint
88 }; // END of namespace synfig
90 /* === E N D =============================================================== */