diff options
author | Drew DeVault <sir@cmpwn.com> | 2017-08-15 08:52:30 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2017-08-15 08:52:30 -0400 |
commit | f60b53c6e3c91aefa432ce75deb89560a8e5c0d7 (patch) | |
tree | 1b15b4fad27ed24894d19d882a4c41941e4d5569 /include/wlr | |
parent | 09faf4ff6430bd93fec4269b35c7a87d14e9e8b3 (diff) |
Change how surface matricies are calculated
Diffstat (limited to 'include/wlr')
-rw-r--r-- | include/wlr/types/wlr_surface.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/include/wlr/types/wlr_surface.h b/include/wlr/types/wlr_surface.h index 811097ad..9b13d9cc 100644 --- a/include/wlr/types/wlr_surface.h +++ b/include/wlr/types/wlr_surface.h @@ -55,7 +55,17 @@ struct wlr_renderer; struct wlr_surface *wlr_surface_create(struct wl_resource *res, struct wlr_renderer *renderer); void wlr_surface_flush_damage(struct wlr_surface *surface); -void wlr_surface_get_matrix(struct wlr_surface *surface, float (*matrix)[16], - const float (*projection)[16], int x, int y); +/** + * Gets a matrix you can pass into wlr_render_with_matrix to display this + * surface. `matrix` is the output matrix, `projection` is the wlr_output + * projection matrix, and `transform` is any additional transformations you want + * to perform on the surface (or NULL/the identity matrix if you don't). + * `transform` is used before the surface is scaled, so its geometry extends + * from 0 to 1 in both dimensions. + */ +void wlr_surface_get_matrix(struct wlr_surface *surface, + float (*matrix)[16], + const float (*projection)[16], + const float (*transform)[16]); #endif |