Change in the algorithm for selecting characters included
in the range selector. This is the first step towards adding
support for maxAmount, smoothness, and easing.
@Issue: https://github.com/thorvg/thorvg/issues/2178
Remove the requirement for unique_ptr in the function prototypes.
This change will simplify the API usage, making it more streamlined
and user-friendly. However, memory management will now be the
responsibility of the user.
C++ API Modification:
- Result Paint::mask(std::unique_ptr<Paint> target, MaskMethod method) -> Result Paint::mask(Paint* target, MaskMethod method)
- Result Paint::clip(std::unique_ptr<Paint> clipper) -> Result Paint::clip(Paint* clipper)
- virtual Result Canvas::push(std::unique_ptr<Paint> paint) -> virtual Result Canvas::push(Paint* paint)
- std::unique_ptr<LinearGradient> LinearGradient::gen() -> LinearGradient* LinearGradient::gen()
- std::unique_ptr<RadialGradient> RadialGradient::gen() -> RadialGradient* RadialGradient::gen()
- Result Shape::strokeFill(std::unique_ptr<Fill> f) -> Result Shape::strokeFill(Fill* f)
- Result Shape::fill(std::unique_ptr<Fill> f) -> Result Shape::fill(Fill* f)
- std::unique_ptr<Shape> Shape::gen() -> Shape* Shape::gen()
- std::unique_ptr<Picture> Picture::gen() -> Result Picture::push(Paint* paint)
- std::unique_ptr<Scene> Scene::gen() -> Scene* Scene::gen()
- Result Text::fill(std::unique_ptr<Fill> f) -> Result Text::fill(Fill* f)
- std::unique_ptr<Text> Text::gen() -> Text* Text::gen()
- std::unique_ptr<SwCanvas> SwCanvas::gen() -> SwCanvas* SwCanvas::gen()
- std::unique_ptr<GlCanvas> GlCanvas::gen() -> GlCanvas* GlCanvas::gen()
- std::unique_ptr<Animation> Animation::gen() -> Animation* Animation::gen()
- Result Saver::background(std::unique_ptr<Paint> paint) -> Result Saver::background(Paint* paint)
- Result Saver::save(std::unique_ptr<Paint> paint, const char* filename, uint32_t quality = 100) -> Result Saver::save(Paint* paint, const char* filename, uint32_t quality = 100)
- std::unique_ptr<Saver> Saver::gen() -> Saver* Saver::gen()
- std::unique_ptr<Accessor> Accessor::gen() -> Accessor* Accessor::gen()
C++ API removal:
- template<typename T = tvg::Paint> std::unique_ptr<T> cast(Paint* paint)
- template<typename T = tvg::Paint> std::unique_ptr<T> cast(Paint* paint)
issue: https://github.com/thorvg/thorvg/issues
Shape's bbox represents only fill's render region.
Render region of fill and stroke is stored in SwTask.
This was visible while rendering shapes with a stroke -
fill was to big.
@Issue: https://github.com/thorvg/thorvg/issues/2908
Co-Authored-By: Hermet Park <hermet@lottiefiles.com>
Since the translate API was used while text updating,
the subsequent range selector transformations gets overwritten
when updating the shape (scale and rotate, adding another
translation will persist). This caused unexpected results.
Fixed by using the transform API when additional transformations
are needed - also fixes applying more than one range selector.
WebGL has a strict rule that does not allow the same GLBuffer
to be bound to both ARRAY_BUFFER and ELEMENT_ARRAY_BUFFER at the same time.
(https://registry.khronos.org/webgl/specs/latest/1.0/#5.14.5)
To support WebGL in the future, a separate GLBuffer is used to store index data.