1 /* === S Y N F I G ========================================================= */
2 /*! \file layer_shape.h
3 ** \brief Template Header
5 ** $Id: layer_shape.h,v 1.2 2005/01/24 03:08:18 darco Exp $
8 ** Copyright (c) 2002 Robert B. Quattlebaum Jr.
10 ** This software and associated documentation
11 ** are CONFIDENTIAL and PROPRIETARY property of
12 ** the above-mentioned copyright holder.
14 ** You may not copy, print, publish, or in any
15 ** other way distribute this software without
16 ** a prior written agreement with
17 ** the copyright holder.
20 /* ========================================================================= */
22 /* === S T A R T =========================================================== */
24 #ifndef __SYNFIG_LAYER_SHAPE_H
25 #define __SYNFIG_LAYER_SHAPE_H
27 /* === H E A D E R S ======================================================= */
29 #include "layer_composite.h"
36 /* === M A C R O S ========================================================= */
38 /* === T Y P E D E F S ===================================================== */
40 /* === C L A S S E S & S T R U C T S ======================================= */
44 /*! \class Layer_Shape
46 class Layer_Shape : public Layer_Composite, public Layer_NoDeform
48 SYNFIG_LAYER_MODULE_EXT
54 Intersector *edge_table;
66 std::vector< char > bytestream;
68 //for use in creating the bytestream
74 Layer_Shape(const Real &a = 1.0, const Color::BlendMethod m = Color::BLEND_COMPOSITE);
80 //! Clears out any data
81 /*! Also clears out the Intersector
86 void move_to(Real x, Real y);
87 void line_to(Real x, Real y);
88 void conic_to(Real x1, Real y1, Real x, Real y);
89 void conic_to_smooth(Real x, Real y); //x1,y1 derived from current tangent
90 void curve_to(Real x1, Real y1, Real x2, Real y2, Real x, Real y);
91 void curve_to_smooth(Real x2, Real y2, Real x, Real y); //x1,y1 derived from current tangent
95 virtual bool set_param(const String & param, const synfig::ValueBase &value);
96 virtual ValueBase get_param(const String & param)const;
98 virtual Vocab get_param_vocab()const;
100 virtual Color get_color(Context context, const Point &pos)const;
101 virtual bool accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const;
102 virtual synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const;
103 virtual Rect get_bounding_rect()const;
107 bool render_polyspan(Surface *surface,PolySpan &polyspan,
108 Color::BlendMethod method,Color::value_type amount)const;
109 bool render_polyspan(etl::surface<float> *surface,PolySpan &polyspan)const;
110 virtual bool render_shape(Surface *surface,bool useblend,int quality,const RendDesc &renddesc, ProgressCallback *cb)const;
111 virtual bool render_shape(etl::surface<float> *surface,int quality,const RendDesc &renddesc, ProgressCallback *cb)const;
112 }; // END of Layer_Shape
114 }; // END of namespace synfig
115 /* === E N D =============================================================== */