mirror of
https://github.com/brl/mutter.git
synced 2025-06-23 13:31:17 +00:00
Changes cogl_rectangle to take x1, y1, x2, y2 args not x1, y1, width, height
This makes it consistent with cogl_rectangle_with_{multi,}texture_coords. Notably the reason cogl_rectangle_with_{multi,}texture_coords wasn't changed instead is that the former approach lets you describe back facing rectangles. (though technically you could pass negative width/height values to achieve this; it doesn't seem as neat.)
This commit is contained in:
@ -174,7 +174,8 @@ _cogl_add_path_to_stencil_buffer (floatVec2 nodes_min,
|
||||
significant bit */
|
||||
GE( glStencilMask (merge ? 6 : 3) );
|
||||
GE( glStencilOp (GL_ZERO, GL_REPLACE, GL_REPLACE) );
|
||||
cogl_rectangle (bounds_x, bounds_y, bounds_w, bounds_h);
|
||||
cogl_rectangle (bounds_x, bounds_y,
|
||||
bounds_x + bounds_w, bounds_y + bounds_h);
|
||||
|
||||
GE( glStencilOp (GL_INVERT, GL_INVERT, GL_INVERT) );
|
||||
}
|
||||
@ -200,8 +201,8 @@ _cogl_add_path_to_stencil_buffer (floatVec2 nodes_min,
|
||||
GE( glMatrixMode (GL_PROJECTION) );
|
||||
GE( glPushMatrix () );
|
||||
GE( glLoadIdentity () );
|
||||
cogl_rectangle (-1.0, -1.0, 2, 2);
|
||||
cogl_rectangle (-1.0, -1.0, 2, 2);
|
||||
cogl_rectangle (-1.0, -1.0, 1.0, 1.0);
|
||||
cogl_rectangle (-1.0, -1.0, 1.0, 1.0);
|
||||
GE( glPopMatrix () );
|
||||
GE( glMatrixMode (GL_MODELVIEW) );
|
||||
GE( glPopMatrix () );
|
||||
@ -235,7 +236,8 @@ _cogl_path_fill_nodes ()
|
||||
CoglPathNode, 0),
|
||||
ctx->clip.stencil_used);
|
||||
|
||||
cogl_rectangle (bounds_x, bounds_y, bounds_w, bounds_h);
|
||||
cogl_rectangle (bounds_x, bounds_y,
|
||||
bounds_x + bounds_w, bounds_y + bounds_h);
|
||||
|
||||
/* The stencil buffer now contains garbage so the clip area needs to
|
||||
be rebuilt */
|
||||
|
Reference in New Issue
Block a user