mirror of
https://github.com/thorvg/thorvg.git
synced 2025-07-23 06:38:43 +00:00
sw_engine: fix safety check
An incorrect check introduced in bf07eb11f2
as a solution of the #1327 issue. As a consequence rotated images
were not drawn. Fixed.
This commit is contained in:
parent
1a9ff13165
commit
f65d410b9f
1 changed files with 2 additions and 2 deletions
|
@ -548,7 +548,7 @@ static bool _apply(SwSurface* surface, AASpans* aaSpans)
|
|||
static bool _rasterTexmapPolygon(SwSurface* surface, const SwImage* image, const Matrix* transform, const SwBBox* region, uint32_t opacity, uint32_t (*blendMethod)(uint32_t))
|
||||
{
|
||||
//Exceptions: No dedicated drawing area?
|
||||
if (!image->rle || (!region && image->rle->size == 0)) return false;
|
||||
if ((!image->rle && !region) || (image->rle && image->rle->size == 0)) return false;
|
||||
|
||||
/* Prepare vertices.
|
||||
shift XY coordinates to match the sub-pixeling technique. */
|
||||
|
@ -605,7 +605,7 @@ static bool _rasterTexmapPolygon(SwSurface* surface, const SwImage* image, const
|
|||
static bool _rasterTexmapPolygonMesh(SwSurface* surface, const SwImage* image, const Polygon* triangles, const uint32_t triangleCount, const Matrix* transform, const SwBBox* region, uint32_t opacity, uint32_t (*blendMethod)(uint32_t))
|
||||
{
|
||||
//Exceptions: No dedicated drawing area?
|
||||
if (!image->rle || (!region && image->rle->size == 0)) return false;
|
||||
if ((!image->rle && !region) || (image->rle && image->rle->size == 0)) return false;
|
||||
|
||||
// Step polygons once to transform
|
||||
auto transformedTris = (Polygon*)malloc(sizeof(Polygon) * triangleCount);
|
||||
|
|
Loading…
Add table
Reference in a new issue