mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-13 19:44:28 +00:00
Capi: Shape bounds binding
Co-authored-by: Michal Maciola <m.maciola@samsung.com>
This commit is contained in:
parent
cfa2d187bf
commit
d0799d8fa1
2 changed files with 9 additions and 0 deletions
|
@ -130,6 +130,7 @@ TVG_EXPORT Tvg_Result tvg_paint_transform(Tvg_Paint* paint, const Tvg_Matrix* m)
|
|||
TVG_EXPORT Tvg_Result tvg_paint_set_opacity(Tvg_Paint* paint, uint8_t opacity);
|
||||
TVG_EXPORT Tvg_Result tvg_paint_get_opacity(Tvg_Paint* paint, uint8_t* opacity);
|
||||
TVG_EXPORT Tvg_Paint* tvg_paint_duplicate(Tvg_Paint* paint);
|
||||
TVG_EXPORT Tvg_Result tvg_paint_get_bounds(const Tvg_Paint* paint, float* x, float* y, float* w, float* h);
|
||||
|
||||
/************************************************************************/
|
||||
/* Shape API */
|
||||
|
|
|
@ -184,6 +184,14 @@ TVG_EXPORT Tvg_Result tvg_paint_get_opacity(Tvg_Paint* paint, uint8_t* opacity)
|
|||
return TVG_RESULT_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
TVG_EXPORT Tvg_Result tvg_paint_get_bounds(const Tvg_Paint* paint, float* x, float* y, float* w, float* h)
|
||||
{
|
||||
if (!paint) return TVG_RESULT_INVALID_ARGUMENT;
|
||||
return (Tvg_Result) reinterpret_cast<const Paint*>(paint)->bounds(x, y, w, h);
|
||||
}
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/* Shape API */
|
||||
/************************************************************************/
|
||||
|
|
Loading…
Add table
Reference in a new issue