Loading images when the MIME type is incorrect is unnecessary
and often results in failure, adding unnecessary processing overhead.
Pictures should have a clear MIME type assigned by users.
VAO is new object in modern GL API, which can split and manage vertex
buffer and attribute state. This is optional in GLES and is mandatory in
GL.
Also index buffer is faster then pass cpu data in GL draw call.
- add an execeptional hanlding at parsing the assets.
- The precomp layer failed to prepare its instance in the parsing stage. This corrects the mistake.
The 3x3 matrix already contains the geometric transformation
information required for 2D rendering.
We can directly convert from the 3x3 matrix to
the 4x4 matrix to facilitate subsequent GPU rendering.
Added strDirname(), which returns the directory path name from the given string.
Added str2int(), which converts from the string to the integer.
These functions are used to supplement the existing string manipulation functions in the utils/str module.
- const uint32_t* Picture::data(uint32_t* w, uint32_t* h) const
Returning pixel data is not guaranteed as the picture may contain vector resources.
Remove it unless it's absolutely necessary.
@Issue: https://github.com/thorvg/thorvg/issues/1372
The custom implementations of 'strtof' and 'strndup'
present in the svg loader have been moved into a new
'utils' directory (strToFloat and strDuplicate, respectively).
We've changed the behavior of Canvas::clear(false).
The canvas::clear(false) now retains the paints, allowing the user to update the next frame
more easily without having to recompose the paint list.
Previously, clear(false) removed the paint list from the canvas,
requiring the user to re-push all of them in the next frame.
Now, we offer the Canvas::paints() API, allowing users to modify the paint list directly instead.
This change will break compatibility with previous versions of Canvas.
Therefore, this update is included in ThorVG 1.0.
@Issue: https://github.com/thorvg/thorvg/issues/1372
While building on windows (MinGW) no 'libwebp' was found,
which resulted in build errors. The building process should
have been stopp ed earlier for clarity.
The math.h was included before the _USE_MATH_DEFINES
was defined (in tvgMath.h) causing an error while
MinGw was used.
Since non of these header is needed directly, the header
is removed.