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:
Robert Bragg
2009-01-28 14:47:03 +00:00
parent 1d86b04e06
commit c4b4500059
5 changed files with 31 additions and 26 deletions

View File

@@ -52,17 +52,17 @@ G_BEGIN_DECLS
/**
* cogl_rectangle:
* @x: X coordinate of the top-left corner
* @y: Y coordinate of the top-left corner
* @width: Width of the rectangle
* @height: Height of the rectangle
* @x1: X coordinate of the top-left corner
* @y1: Y coordinate of the top-left corner
* @x2: X coordinate of the bottom-right corner
* @y2: Y coordinate of the bottom-right corner
*
* Fills a rectangle at the given coordinates with the current source material
**/
void cogl_rectangle (float x,
float y,
float width,
float height);
void cogl_rectangle (float x1,
float y1,
float x2,
float y2);
/**
* cogl_path_fill: