mirror of
https://github.com/thorvg/thorvg.git
synced 2025-07-23 22:58:44 +00:00
capi: tvg_shape_set_paint_order introduced
Capi sets the rendering order of the stroke and the fill.
This commit is contained in:
parent
5ceeb32ef0
commit
2309a48369
2 changed files with 23 additions and 0 deletions
|
@ -1475,6 +1475,22 @@ TVG_API Tvg_Result tvg_shape_set_fill_rule(Tvg_Paint* paint, Tvg_Fill_Rule rule)
|
|||
TVG_API Tvg_Result tvg_shape_get_fill_rule(const Tvg_Paint* paint, Tvg_Fill_Rule* rule);
|
||||
|
||||
|
||||
/*!
|
||||
* \brief Sets the rendering order of the stroke and the fill.
|
||||
*
|
||||
* \param[in] paint A Tvg_Paint pointer to the shape object.
|
||||
* \param[in] strokeFirst If @c true the stroke is rendered before the fill, otherwise the stroke is rendered as the second one (the default option).
|
||||
*
|
||||
* \return Tvg_Result enumeration.
|
||||
* \retval TVG_RESULT_SUCCESS Succeed.
|
||||
* \retval TVG_RESULT_INVALID_ARGUMENT An invalid Tvg_Paint pointer.
|
||||
* \retval TVG_RESULT_FAILED_ALLOCATION An internal error with a memory allocation.
|
||||
*
|
||||
* \since 0.10
|
||||
*/
|
||||
TVG_API Tvg_Result tvg_shape_set_paint_order(Tvg_Paint* paint, bool strokeFirst);
|
||||
|
||||
|
||||
/*!
|
||||
* \brief Sets the linear gradient fill for all of the figures from the path.
|
||||
*
|
||||
|
|
|
@ -442,6 +442,13 @@ TVG_API Tvg_Result tvg_shape_get_fill_rule(const Tvg_Paint* paint, Tvg_Fill_Rule
|
|||
}
|
||||
|
||||
|
||||
TVG_API Tvg_Result tvg_shape_set_paint_order(Tvg_Paint* paint, bool strokeFirst)
|
||||
{
|
||||
if (!paint) return TVG_RESULT_INVALID_ARGUMENT;
|
||||
return (Tvg_Result) reinterpret_cast<Shape*>(paint)->order(strokeFirst);
|
||||
}
|
||||
|
||||
|
||||
TVG_API Tvg_Result tvg_shape_set_linear_gradient(Tvg_Paint* paint, Tvg_Gradient* gradient)
|
||||
{
|
||||
if (!paint) return TVG_RESULT_INVALID_ARGUMENT;
|
||||
|
|
Loading…
Add table
Reference in a new issue