20 #ifndef BACKEND_RENDER_HANDLER_CAIRO_H
21 #define BACKEND_RENDER_HANDLER_CAIRO_H
24 #include <boost/scoped_array.hpp>
25 #include <cairo/cairo.h>
48 CachedBitmap* createCachedBitmap(std::auto_ptr<image::GnashImage> im);
51 const SWFRect* bounds,
bool smooth);
56 virtual point pixel_to_world(
int x,
int y)
const;
58 void set_color(
const rgba&
c);
68 virtual void begin_display(
const rgba& bg_color,
69 int viewport_width,
int viewport_height,
70 float x0,
float x1,
float y0,
float y1);
72 virtual void end_display();
74 void set_scale(
float xscale,
float yscale);
76 void set_translation(
float xoff,
float yoff);
78 void drawLine(
const std::vector<point>& coords,
const rgba&
color,
81 void draw_poly(
const std::vector<point>& corners,
85 void set_antialiased(
bool enable);
87 void begin_submit_mask();
88 void end_submit_mask();
91 void add_path(cairo_t* cr,
const Path& cur_path);
96 void draw_outlines(
const PathVec& path_vec,
97 const std::vector<LineStyle>& line_styles,
101 std::vector<PathVec::const_iterator> find_subshapes(
const PathVec& path_vec);
103 void draw_subshape(
const PathVec& path_vec,
105 const std::vector<FillStyle>& FillStyles,
106 const std::vector<LineStyle>& line_styles);
108 void draw_mask(
const PathVec& path_vec);
110 void add_paths(
const PathVec& path_vec);
112 void apply_matrix_to_paths(std::vector<Path>& paths,
const SWFMatrix& mat);
121 unsigned int getBitsPerPixel()
const;
123 bool getPixel(
rgba& color_return,
int x,
int y)
const;
125 bool initTestBuffer(
unsigned width,
unsigned height);
130 boost::scoped_array<boost::uint8_t> _video_buffer;
131 std::vector<PathVec> _masks;
132 size_t _video_bufsize;
135 cairo_matrix_t _stage_mat;
149 void set_context(Renderer* handler, cairo_t* context);
155 #endif // BACKEND_RENDER_HANDLER_CAIRO_H
DSOEXPORT void set_context(Renderer *handler, cairo_t *context)
Make sure to call this before starting display.
Definition: Renderer_cairo.cpp:1157
DSOEXPORT Renderer * create_handler()
Create a render handler.
Definition: Renderer_cairo.cpp:1150
VGPaint fill
Definition: testr_gtk.cpp:86
Definition: SWFMatrix.h:53
Anonymous namespace for callbacks, local functions, event handlers etc.
Definition: dbus_ext.cpp:40
Definition: klash_part.cpp:329
2D Point class
Definition: Point2d.h:38
Definition: GnashKey.h:149
Base class for render handlers.
Definition: Renderer.h:190
virtual Renderer * startInternalRender(image::GnashImage &)
Setup the renderer to draw to an internal buffer.
Definition: Renderer_cairo.h:62
const VGfloat color[4]
Definition: testr_gtk.cpp:82
std::string description() const
Return a description of this renderer.
Definition: Renderer_cairo.h:46
Definition: klash_part.cpp:329
A subset of a shape, a series of edges sharing a single set of styles.
Definition: Geometry.h:166
Definition: Renderer_cairo.h:39
boost::int32_t x
Definition: BitmapData_as.cpp:434
virtual void endInternalRender()
Finish internal rendering.
Definition: Renderer_cairo.h:66
#define DSOEXPORT
Definition: dsodefs.h:55
std::vector< const Path * > PathPtrVec
Definition: Renderer_cairo.h:37
For the outside of outline shapes, or just bare lines.
Definition: LineStyle.h:49
std::vector< Path > PathVec
Definition: Renderer_cairo.h:36
boost::int32_t y
Definition: BitmapData_as.cpp:435
Base class for different types of bitmaps.
Definition: GnashImage.h:79
Rectangle class, see swf defined rectangle record.
Definition: SWFRect.h:44
A CachedBitmap is created by the renderer in a format of its choosing.
Definition: CachedBitmap.h:37
Holds information needed to draw a shape.
Definition: ShapeRecord.h:126
A basic RGBA type.
Definition: RGBA.h:35