20 #ifndef BACKEND_RENDER_HANDLER_CAIRO_H 21 #define BACKEND_RENDER_HANDLER_CAIRO_H 24 #include <cairo/cairo.h> 47 CachedBitmap* createCachedBitmap(std::unique_ptr<image::GnashImage> im);
50 const SWFRect* bounds,
bool smooth);
55 virtual point pixel_to_world(
int x,
int y)
const;
57 void set_color(
const rgba&
c);
67 virtual void begin_display(
const rgba& bg_color,
68 int viewport_width,
int viewport_height,
69 float x0,
float x1,
float y0,
float y1);
71 virtual void end_display();
73 void set_scale(
float xscale,
float yscale);
75 void set_translation(
float xoff,
float yoff);
77 void drawLine(
const std::vector<point>& coords,
const rgba&
color,
80 void draw_poly(
const std::vector<point>& corners,
84 void set_antialiased(
bool enable);
86 void begin_submit_mask();
87 void end_submit_mask();
90 void add_path(cairo_t* cr,
const Path& cur_path);
95 void draw_outlines(
const PathVec& path_vec,
96 const std::vector<LineStyle>& line_styles,
100 std::vector<PathVec::const_iterator> find_subshapes(
const PathVec& path_vec);
102 void draw_subshape(
const PathVec& path_vec,
104 const std::vector<FillStyle>& FillStyles,
105 const std::vector<LineStyle>& line_styles);
107 void draw_mask(
const PathVec& path_vec);
109 void add_paths(
const PathVec& path_vec);
111 void apply_matrix_to_paths(std::vector<Path>& paths,
const SWFMatrix& mat);
120 unsigned int getBitsPerPixel()
const;
122 bool getPixel(
rgba& color_return,
int x,
int y)
const;
124 bool initTestBuffer(
unsigned width,
unsigned height);
129 std::unique_ptr<std::uint8_t[]> _video_buffer;
130 std::vector<PathVec> _masks;
131 size_t _video_bufsize;
134 cairo_matrix_t _stage_mat;
154 #endif // BACKEND_RENDER_HANDLER_CAIRO_H Renderer * create_handler(const char *pixelformat)
Definition: Renderer_DirectFB.cpp:267
DSOEXPORT void set_context(Renderer *handler, cairo_t *context)
Make sure to call this before starting display.
Definition: Renderer_cairo.cpp:1143
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
std::string description() const
Return a description of this renderer.
Definition: Renderer_cairo.h:45
Definition: klash_part.cpp:329
2D Point class
Definition: Point2d.h:38
Definition: GnashKey.h:149
Base class for render handlers.
Definition: Renderer.h:188
virtual Renderer * startInternalRender(image::GnashImage &)
Setup the renderer to draw to an internal buffer.
Definition: Renderer_cairo.h:61
const VGfloat color[4]
Definition: testr_gtk.cpp:82
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:38
std::int32_t x
Definition: BitmapData_as.cpp:434
virtual void endInternalRender()
Finish internal rendering.
Definition: Renderer_cairo.h:65
#define DSOEXPORT
Definition: dsodefs.h:55
std::vector< const Path * > PathPtrVec
Definition: Renderer_cairo.h:36
For the outside of outline shapes, or just bare lines.
Definition: LineStyle.h:50
std::vector< Path > PathVec
Definition: Renderer_cairo.h:35
std::int32_t y
Definition: BitmapData_as.cpp:435
Base class for different types of bitmaps.
Definition: GnashImage.h:77
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