forked from enlightenment/efl
add to the API the function ecore_x_drawable_rectangle_fill() that
fills a rectangle on the specified drawable. It will be used in ecore_evas to factorize the code. SVN revision: 40358
This commit is contained in:
parent
85a494e86c
commit
90061cb121
|
@ -1211,6 +1211,7 @@ EAPI void ecore_x_drawable_geometry_get_fetch(void);
|
|||
EAPI void ecore_x_drawable_geometry_get(Ecore_X_Drawable d, int *x, int *y, int *w, int *h);
|
||||
EAPI int ecore_x_drawable_border_width_get(Ecore_X_Drawable d);
|
||||
EAPI int ecore_x_drawable_depth_get(Ecore_X_Drawable d);
|
||||
EAPI void ecore_x_drawable_rectangle_fill(Ecore_X_Drawable d, Ecore_X_GC gc, int x, int y, int width, int height);
|
||||
|
||||
EAPI int ecore_x_cursor_color_supported_get(void);
|
||||
EAPI Ecore_X_Cursor ecore_x_cursor_new(Ecore_X_Window win, int *pixels, int w, int h, int hot_x, int hot_y);
|
||||
|
|
|
@ -127,3 +127,24 @@ ecore_x_drawable_depth_get(Ecore_X_Drawable drawable __UNUSED__)
|
|||
|
||||
return reply->depth;
|
||||
}
|
||||
|
||||
/**
|
||||
* Fill the specified rectangle on a drawable.
|
||||
* @param d The given drawable.
|
||||
* @param gc The graphic context that controls the fill rules.
|
||||
* @param x The X coordinate of the top-left corner of the rectangle.
|
||||
* @param y The Y coordinate of the top-left corner of the rectangle.
|
||||
* @param width The width of the rectangle.
|
||||
* @param height The height of the rectangle.
|
||||
*/
|
||||
EAPI void
|
||||
ecore_x_drawable_rectangle_fill(Ecore_X_Drawable d, Ecore_X_GC gc, int x, int y, int width, int height)
|
||||
{
|
||||
xcb_rectangle_t rectangle;
|
||||
|
||||
rectangle.x = x;
|
||||
rectangle.y = y;
|
||||
rectangle.width = width;
|
||||
rectangle.height = height;
|
||||
xcb_poly_fill_rectangle(_ecore_xcb_conn, d, gc, 1, &rectangle);
|
||||
}
|
||||
|
|
|
@ -86,3 +86,18 @@ ecore_x_drawable_depth_get(Ecore_X_Drawable d)
|
|||
|
||||
return (int) depth_ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* Fill the specified rectangle on a drawable.
|
||||
* @param d The given drawable.
|
||||
* @param gc The graphic context that controls the fill rules.
|
||||
* @param x The X coordinate of the top-left corner of the rectangle.
|
||||
* @param y The Y coordinate of the top-left corner of the rectangle.
|
||||
* @param width The width of the rectangle.
|
||||
* @param height The height of the rectangle.
|
||||
*/
|
||||
EAPI void
|
||||
ecore_x_drawable_rectangle_fill(Ecore_X_Drawable d, Ecore_X_GC gc, int x, int y, int width, int height)
|
||||
{
|
||||
XFillRectangle(_ecore_x_disp, d, gc, x, y, width, height);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue