# Layer_Freetype Class Reference

`#include <lyr_freetype.h>`

Inheritance diagram for Layer_Freetype:

List of all members.

## Public Member Functions

| Layer_Freetype ()
virtual | ~Layer_Freetype ()
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 Color | get_color (Context context, const synfig::Point &pos) const
| Gets the color of the Canvas at pos.
virtual bool | accelerated_render (Context context, Surface *surface, int quality, const RendDesc &renddesc, ProgressCallback *cb) const
| Renders the Canvas to the given Surface in an accelerated manner.
virtual Vocab | get_param_vocab () const
| Gets the parameter vocabulary.
virtual bool | set_version (const String &ver)
| Sets the virtual version to use for backwards-compatibility.
virtual void | reset_version ()
| Resets the virtual version.
virtual synfig::Rect | get_bounding_rect () const

## Constructor & Destructor Documentation

Layer_Freetype::Layer_Freetype | ( |  | ) |

References _, PANGO_STYLE_NORMAL, synfig::Layer_Composite::set_blend_method(), and WEIGHT_NORMAL.

Layer_Freetype::~Layer_Freetype | ( |  | ) | `[virtual]`

## Member Function Documentation

bool Layer_Freetype::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_Composite.

References synfig::Layer_Composite::converted_blend_, synfig::Color::get_a(), IMPORT, IMPORT_AS, IMPORT_PLUS, synfig::Color::set_a(), synfig::Layer_Composite::set_blend_method(), and synfig::Layer_Composite::transparent_color_.

ValueBase Layer_Freetype::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_Composite.

References EXPORT, EXPORT_NAME, and EXPORT_VERSION.

Color Layer_Freetype::get_color | ( | Context | context,
|  | const synfig::Point & | pos |
| ) |  |  | const`[virtual]`

Gets the color of the Canvas at pos.

Parameters:

  | context | Context iterator referring to next Layer.
  | pos | Point which indicates where the Color should come from

See also:
  Handle::get_color()

Reimplemented from synfig::Layer.

References synfig::Layer_Composite::get_amount(), synfig::Layer_Composite::get_blend_method(), and synfig::Context::get_color().

bool Layer_Freetype::accelerated_render | ( | Context | context,
|  | Surface * | surface,
|  | int | quality,
|  | const RendDesc & | renddesc,
|  | ProgressCallback * | cb |
| ) |  |  | const`[virtual]`

Renders the Canvas to the given Surface in an accelerated manner.

Parameters:

  | context | Context iterator referring to next Layer.
  | surface | Pointer to Surface to render to.
  | quality | The requested quality-level to render at.
  | renddesc | The associated RendDesc.
  | cb | Pointer to callback object. May be NULL if there is no callback.

Returns:
  `true` on success, `false` on failure

See also:
  Handle::accelerated_render()

Reimplemented from synfig::Layer_Composite.

References _, std::abs(), synfig::Context::accelerated_render(), CHAR_RESOLUTION, f, synfig::Layer_Composite::get_amount(), synfig::Layer_Composite::get_blend_method(), synfig::RendDesc::get_br(), synfig::Layer::get_canvas(), synfig::RendDesc::get_h(), synfig::RendDesc::get_tl(), synfig::RendDesc::get_w(), Glyph::glyph, synfig::Layer_Composite::is_disabled(), METRICS_SCALE_ONE, Glyph::pos, synfig::warning(), and synfig::ProgressCallback::warning().

Layer::Vocab Layer_Freetype::get_param_vocab | ( | void |  | ) | const`[virtual]`

Gets the parameter vocabulary.

Reimplemented from synfig::Layer_Composite.

References _, PANGO_STYLE_ITALIC, PANGO_STYLE_NORMAL, PANGO_STYLE_OBLIQUE, and synfig::Layer::set_description().

virtual bool Layer_Freetype::set_version | ( | const String & | ver | ) | `[inline, virtual]`

Sets the virtual version to use for backwards-compatibility.

See also:
  reset_version()

Reimplemented from synfig::Layer.

virtual void Layer_Freetype::reset_version | ( |  | ) | `[inline, virtual]`

Resets the virtual version.

See also:
  set_version()

Reimplemented from synfig::Layer.

synfig::Rect Layer_Freetype::get_bounding_rect | ( |  | ) | const`[virtual]`

Reimplemented from synfig::Layer.

References synfig::Rect::full_plane().

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

- lyr_freetype.h
- lyr_freetype.cpp