Commit graph

18 commits

Author SHA1 Message Date
Benson Muite
633bcd3176 tools/lottie2gif: typo fix
Some checks failed
Android / build_x86_64 (push) Has been cancelled
Android / build_aarch64 (push) Has been cancelled
iOS / build_x86_64 (push) Has been cancelled
iOS / build_arm64 (push) Has been cancelled
macOS / build (push) Has been cancelled
macOS / compact_test (push) Has been cancelled
macOS / unit_test (push) Has been cancelled
Ubuntu / build (push) Has been cancelled
Ubuntu / compact_test (push) Has been cancelled
Ubuntu / unit_test (push) Has been cancelled
Windows / build (push) Has been cancelled
Windows / compact_test (push) Has been cancelled
Windows / unit_test (push) Has been cancelled
2025-05-16 16:05:18 +09:00
Hermet Park
53e5e783b7 api: revise engine initialization and termination
Simplified parameters and ensured proper backend engine
initialization by using reference checking through canvas
instances.

C++ API Modification:
- Result Initializer::init(uint32_t threads, CanvasEngine engine)
 -> Result Initializer::init(uint32_t threads)
- Result Initializer::term(CanvasEngine engine)
 -> Result Initializer::term()

C API Modification:
- Tvg_Result tvg_engine_init(Tvg_Engine engine_method, unsigned threads)
 -> Tvg_Result tvg_engine_init(unsigned threads);
- Tvg_Result tvg_engine_term(Tvg_Engine engine_method)
 ->  Tvg_Result tvg_engine_term()

issue: https://github.com/thorvg/thorvg/issues/3116
2025-04-23 15:46:49 +09:00
Benson Muite
ed658cb8bd tools: Use binary names that are not generic
Prevent installation conflicts.
2025-04-02 15:42:47 +09:00
Hermet Park
a12accbc93 updated copyright 2025-01-03 14:32:31 +09:00
Hermet Park
6761c5c2a0 API: Replace the Canvas::clear() API with Canvas::remove() & draw()
Added a `clear` parameter to Canvas::draw(), allowing users to decide
whether to clear the target buffer before drawing.

To remove the paints from a canvas, please use Canvas::remove()

C++ API Removals:
- Result Canvas::clear(bool paints, bool buffer)

C++ API Modifications:
- Result Canvas::draw()
 -> Result Canvas::draw(bool clear)

C API Removals:
- Tvg_Result tvg_canvas_clear(bool paints, bool buffer)

C API Modifications:
- Tvg_Result tvg_canvas_draw(Tvg_Canvas* canvas)
 -> Tvg_Result tvg_canvas_draw(Tvg_Canvas* canvas, bool clear)

issue: https://github.com/thorvg/thorvg/issues/1372
2024-12-10 11:59:46 +09:00
Hermet Park
ed01ef717e api: revise the spec
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
2024-11-09 12:29:15 +09:00
Hermet Park
9a134fcb90 api: revise the apis for v1.0
replaced std::string with char* in API parameters.

API Modification:
- Result Picture::load(const std::string& path) -> Result Picture::load(const char* filename)
- Result Picture::load(const char* data, uint32_t size, const std::string& mimeType, const std::string& rpath = "", bool copy = false) -> Result Picture::load(const char* data, uint32_t size, const char* mimeType, const char* rpath = "", bool copy = false)
- Result Text::load(const std::string& path) -> Result Text::load(const char* filename)
- Result Text::load(const char* name, const char* data, uint32_t size, const std::string& mimeType = "ttf", bool copy = false) -> Result Text::load(const char* name, const char* data, uint32_t size, const char* mimeType = "ttf", bool copy = false)
- Result Text::unload(const std::string& path) -> Result Text::unload(const char* filename)
- Result Saver::save(std::unique_ptr<Paint> paint, const std::string& path, uint32_t quality = 100) -> Result Saver::save(std::unique_ptr<Paint> paint, const char* filename, uint32_t quality = 100)
- Result Saver::save(std::unique_ptr<Animation> animation, const std::string& path, uint32_t quality = 100, uint32_t fps = 0) -> Result Saver::save(std::unique_ptr<Animation> animation, const char* filename, uint32_t quality = 100, uint32_t fps = 0)

issue: https://github.com/thorvg/thorvg/issues/1372
2024-11-06 21:32:45 +09:00
Hermet Park
f68d053ddb capi: clean up code 2024-11-06 17:17:12 +09:00
Hermet Park
0e45fabb3d spec out tvg binary format
issue: https://github.com/thorvg/thorvg/issues/2721
2024-10-12 21:07:31 +09:00
Hermet Park
9bc900206b api: polish the thorvg API usages.
API Modification:
- SwCanvas::Colorspace -> ColorSpace

API Addition:
- ColorSpace::Unknown

issue: https://github.com/thorvg/thorvg/issues/1372
2024-10-12 15:38:03 +09:00
Elliott Sales de Andrade
5f08b9ade4 build: Remove redundant comparisons
If a Meson option is typed as `boolean`, the `get_option` returns a
boolean, and comparing it with `true` is redundant. Meson also errors if
you try to compare across types, so it couldn't _not_ be a boolean.

Also, Meson is not C, so no need for parentheses around `if` conditions.
2024-08-19 17:42:40 +09:00
Josh Soref
e061fa6628
common: fix 178+ spelling errors 2024-07-01 21:58:46 +09:00
Hermet Park
f281b9c342 svg2png: ++help message 2024-06-24 19:19:37 +09:00
Hermet Park
b85c5ba02f lottie2gif: fix an issue where the background color is omitted
the issus is occurred when the input is a source folder.
2024-06-24 19:19:37 +09:00
Hermet Park
de693c3e3e infra: relocate the tools folder.
Collect only library source code in src
2024-06-13 17:52:14 +09:00
Hermet Park
865f87d15e infra: remove unused resources.
thorvg will revisit this later.
2024-02-04 11:40:49 +09:00
Hermet Park
c1e36bcb01 tools format: remove tizen specific
When ready, we will use this c++ formatter...
2020-12-25 20:06:26 +09:00
pkosko
1712e7d83f
tools: Automatic code format tool added
Tool allows auto formatting of code according to Google coding standard
for easier control and fixing formatting issues.
2020-12-10 10:38:22 +09:00