diff options
author | Neil Roberts <neil@linux.intel.com> | 2012-04-18 15:57:33 +0100 |
---|---|---|
committer | Robert Bragg <robert@linux.intel.com> | 2012-08-06 14:27:39 +0100 |
commit | 8dd77de00967ac332e89a7e4264c6b44f93db19e (patch) | |
tree | 5481e6cf38d082ea11e30cec9ffda515480828af /cogl/cogl-framebuffer.h | |
parent | 54735dec849a0f687d71288f458ab1050b7dd806 (diff) | |
download | cogl-8dd77de00967ac332e89a7e4264c6b44f93db19e.tar.gz |
Replace cogl_path_{stroke,fill} with framebuffer API
The existing functions for stroking and filling a path depend on the
global framebuffer and source stacks. These are now replaced with
cogl_framebuffer_{stroke,fill}_path which get explicitly passed the
framebuffer and pipeline.
Reviewed-by: Robert Bragg <robert@linux.intel.com>
(cherry picked from commit 713a8f8160bc5884b091c69eb7a84b069e0950e6)
Diffstat (limited to 'cogl/cogl-framebuffer.h')
-rw-r--r-- | cogl/cogl-framebuffer.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/cogl/cogl-framebuffer.h b/cogl/cogl-framebuffer.h index 3750ca1a..76ce811a 100644 --- a/cogl/cogl-framebuffer.h +++ b/cogl/cogl-framebuffer.h @@ -1491,6 +1491,47 @@ cogl_framebuffer_draw_textured_rectangles (CoglFramebuffer *framebuffer, const float *coordinates, unsigned int n_rectangles); +/** + * cogl_framebuffer_fill_path: + * @framebuffer: A #CoglFramebuffer + * @pipeline: A #CoglPipeline to render with + * @path: The #CoglPath to fill + * + * Fills the interior of the path using the fragment operations + * defined by the pipeline. + * + * The interior of the shape is determined using the fill rule of the + * path. See %CoglPathFillRule for details. + * + * <note>The result of referencing sliced textures in your current + * pipeline when filling a path are undefined. You should pass + * the %COGL_TEXTURE_NO_SLICING flag when loading any texture you will + * use while filling a path.</note> + * + * Since: 2.0 + */ +void +cogl_framebuffer_fill_path (CoglFramebuffer *framebuffer, + CoglPipeline *pipeline, + CoglPath *path); + +/** + * cogl_framebuffer_stroke_path: + * @framebuffer: A #CoglFramebuffer + * @pipeline: A #CoglPipeline to render with + * @path: The #CoglPath to stroke + * + * Strokes the edge of the path using the fragment operations defined + * by the pipeline. The stroke line will have a width of 1 pixel + * regardless of the current transformation matrix. + * + * Since: 2.0 + */ +void +cogl_framebuffer_stroke_path (CoglFramebuffer *framebuffer, + CoglPipeline *pipeline, + CoglPath *path); + /* XXX: Should we take an n_buffers + buffer id array instead of using * the CoglBufferBits type which doesn't seem future proof? */ /** |