25 #ifndef __SYNFIG_RENDERER_H
26 #define __SYNFIG_RENDERER_H
61 typedef etl::handle<PrimitiveDataBase>
Handle;
69 typedef etl::handle<PrimitiveData>
Handle;
85 primitive_type(primitive_type), renderer_id(renderer_id) { }
104 primitive_type(primitive_type), renderer_id_from(renderer_id_from), renderer_id_to(renderer_id_to) { }
137 static void build_convert_chain();
151 {
return primitive; }
157 typedef std::map<RendererId, PrimitiveDataBase::Handle> Map;
158 typedef Map::value_type Pair;
159 mutable Map primitives;
166 Map::iterator get_entry(
RendererId renderer_id)
const;
179 template<
typename RendererType, Renderer::PrimitiveType primitive_type>
182 template<PrimitiveType primitive_type>
188 template<
typename RendererType>
194 ConstHandle::cast_dynamic(
197 return handle ? &handle->data : NULL;
200 template<
typename RendererType>
211 Handle handle = Handle::cast_dynamic(base_handle);
212 if (handle)
return &handle->data;
267 virtual Result render(
const Params ¶ms,
const PrimitiveBase &primitive);
268 virtual Result render_surface(
const Params ¶ms,
const Primitive<PrimitiveTypeSurface> &primitive);
269 virtual Result render_polygon(
const Params ¶ms,
const Primitive<PrimitiveTypePolygon> &primitive);
271 virtual Result render_mesh(
const Params ¶ms,
const Primitive<PrimitiveTypeMesh> &primitive);