synfig::Layer_Polygon Class Reference

writeme More...

#include <layer_polygon.h>

Inheritance diagram for synfig::Layer_Polygon:

synfig::Layer_Shape synfig::Layer_Composite synfig::Layer_NoDeform synfig::Layer synfig::Node Outline Region Star

List of all members.

Public Member Functions

 ~Layer_Polygon ()
void add_polygon (const std::vector< Point > &point_list)
 Adds a polygon to the layer.
void clear ()
 Clears out any polygon data.
void sync ()
 Updates EdgeTable so it will reflect the parameter data.
virtual bool set_param (const String &param, const synfig::ValueBase &value)
 Sets the parameter described by param to value.
virtual ValueBase get_param (const String &param) const
 Get the value of the specified parameter.
virtual Vocab get_param_vocab () const
 Gets the parameter vocabulary.

Protected Member Functions

 Layer_Polygon ()


Detailed Description

writeme

Todo:
This layer needs to support multiple polygons

Constructor & Destructor Documentation

Layer_Polygon::Layer_Polygon (  )  [protected]

References sync().

Layer_Polygon::~Layer_Polygon (  ) 


Member Function Documentation

void Layer_Polygon::add_polygon ( const std::vector< Point > &  point_list  ) 

Adds a polygon to the layer.

The edge data is automatically added to the EdgeTable, so there is no need to call sync() after adding a polygon using this function.

Parameters:
point_list A list containing the points that define the polygon's parameter.

References synfig::Layer_Shape::close(), synfig::Layer_Shape::line_to(), and synfig::Layer_Shape::move_to().

Referenced by set_param(), Star::sync(), Region::sync(), and Outline::sync().

void Layer_Polygon::clear (  ) 

Clears out any polygon data.

Also clears out the EdgeTable, so there is no need to call sync() after using this function.

Reimplemented from synfig::Layer_Shape.

References synfig::Layer_Shape::clear().

Referenced by Outline::Outline(), Region::Region(), Star::sync(), Region::sync(), and Outline::sync().

void Layer_Polygon::sync (  ) 

Updates EdgeTable so it will reflect the parameter data.

Reimplemented in Outline, Region, and Star.

Referenced by Layer_Polygon(), and set_param().

bool Layer_Polygon::set_param ( const String param,
const synfig::ValueBase value 
) [virtual]

Sets the parameter described by param to value.

Parameters:
param The name of the parameter to set
value What the parameter is to be set to.
Returns:
true on success, false upon rejection or failure. If it returns false, then the Layer is assumed to remain unchanged.
See also:
get_param()
Todo:
param should be of the type const String &param

Reimplemented from synfig::Layer_Shape.

Reimplemented in Outline, Region, and Star.

References add_polygon(), synfig::Layer_Shape::clear(), synfig::ValueBase::same_type_as(), synfig::Layer_Shape::set_param(), and sync().

ValueBase Layer_Polygon::get_param ( const String param  )  const [virtual]

Get the value of the specified parameter.

Returns:
The requested parameter value, or (upon failure) a NIL ValueBase.
See also:
set_param()
Todo:
param should be of the type const String &

Reimplemented from synfig::Layer_Shape.

Reimplemented in Outline, Region, and Star.

References EXPORT, EXPORT_NAME, EXPORT_VERSION, and synfig::Layer_Shape::get_param().

Layer::Vocab Layer_Polygon::get_param_vocab ( void   )  const [virtual]

Gets the parameter vocabulary.

Reimplemented from synfig::Layer_Shape.

Reimplemented in Outline, Region, and Star.

References _, and synfig::Layer_Shape::get_param_vocab().


The documentation for this class was generated from the following files:

Generated on Fri Jul 31 00:01:59 2009 for synfig-core by  doxygen 1.5.6