#include <layer_polygon.h>
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 ¶m, const synfig::ValueBase &value) |
Sets the parameter described by param to value. | |
virtual ValueBase | get_param (const String ¶m) const |
Get the value of the specified parameter. | |
virtual Vocab | get_param_vocab () const |
Gets the parameter vocabulary. | |
Protected Member Functions | |
Layer_Polygon () |
Layer_Polygon::Layer_Polygon | ( | ) | [protected] |
References sync().
Layer_Polygon::~Layer_Polygon | ( | ) |
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.
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.
param | The name of the parameter to set | |
value | What the parameter is to be set to. |
true
on success, false
upon rejection or failure. If it returns false
, then the Layer is assumed to remain unchanged. const String ¶m
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().
Get the value of the specified parameter.
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().