Since no antialiasing is applied for the fastTracking cases,
the shape's rasterization region needs to be edited. To establish
the rastered bbox, the rounding is performed before the bbox corners
are casted to the SwCoords.
Adds an alternative static jpg loader.
The jpg loader copied the jpeg decoding implementation from this open-source
repo: https://github.com/richgel999/jpeg-compressor
That opensource has the public-domain license, it doesn't have any restriction
of the copy.
note: jpgd.cpp is modified version (changed decompress_jpeg_image_from_stream)
for returning BGRA
Non-changeable apis should keep the const parameter so that
user knows the api won't change the internal data.
Thanksfully, we didn't release the capis, we can change it.
We missed the final keyword for the Saver,
This inheritance is out of our policy.
It might be break apis but Saver class is just opened,
and we're pretty sure that there is no any extension of this.
I know this is the bad decision, but we have a chance yet,
so we must correct it before further late.
This identifier is useful when user identify the instance type in runtime.
ThorVG basically don't prefer to dynamic_cast() nor typeid(),
it compiles with -fno-rtti option for the optimial size.
Here is an example for the simple usage.
if (paint->identifier() == Shape::identifier())
auto shape = static_cast<Shape*>(paint);
@Issue: https://github.com/Samsung/thorvg/issues/693
meson's find_library() throws an error when the package cannot be found.
png static library is added, so it should be passed when package is not found.
Therefore, delete unnecessary find_library.
Copied only necessary decoding functions from the lodepng opensource.
See: https://lodev.org/lodepng/
additional changes:
- disabled crc for the optimal size.
- converted the format bgr -> rgb for our png example.
Still we don't have a concrete idea for the image formats,
We should fix the converting methods between bgra <-> rgba.
@Issue: https://github.com/Samsung/thorvg/issues/594
1.
Remove macro function. The existing macro function
was doing meaningless nested `return false`.
2.
Extract the logic to find the type as a function.
3.
The SimpleXMLType::Error case is not actually used,
and in case of invalid XML, Do 'return false' immediately.