mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-31 22:25:21 -04:00
render: add wlr_render_subtexture_with_matrix
This renders only a subset of the texture, instead of the full texture.
This commit is contained in:
parent
00ccb89288
commit
315bf08733
4 changed files with 44 additions and 14 deletions
|
|
@ -32,9 +32,9 @@ struct wlr_renderer_impl {
|
|||
void (*end)(struct wlr_renderer *renderer);
|
||||
void (*clear)(struct wlr_renderer *renderer, const float color[static 4]);
|
||||
void (*scissor)(struct wlr_renderer *renderer, struct wlr_box *box);
|
||||
bool (*render_texture_with_matrix)(struct wlr_renderer *renderer,
|
||||
struct wlr_texture *texture, const float matrix[static 9],
|
||||
float alpha);
|
||||
bool (*render_subtexture_with_matrix)(struct wlr_renderer *renderer,
|
||||
struct wlr_texture *texture, const struct wlr_fbox *box,
|
||||
const float matrix[static 9], float alpha);
|
||||
void (*render_quad_with_matrix)(struct wlr_renderer *renderer,
|
||||
const float color[static 4], const float matrix[static 9]);
|
||||
void (*render_ellipse_with_matrix)(struct wlr_renderer *renderer,
|
||||
|
|
|
|||
|
|
@ -54,6 +54,13 @@ bool wlr_render_texture(struct wlr_renderer *r, struct wlr_texture *texture,
|
|||
*/
|
||||
bool wlr_render_texture_with_matrix(struct wlr_renderer *r,
|
||||
struct wlr_texture *texture, const float matrix[static 9], float alpha);
|
||||
/**
|
||||
* Renders the requested texture using the provided matrix, after cropping it
|
||||
* to the provided rectangle.
|
||||
*/
|
||||
bool wlr_render_subtexture_with_matrix(struct wlr_renderer *r,
|
||||
struct wlr_texture *texture, const struct wlr_fbox *box,
|
||||
const float matrix[static 9], float alpha);
|
||||
/**
|
||||
* Renders a solid rectangle in the specified color.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue