Merge pull request #92 from X-Ryl669/current
Fix for gradient transformation when scaling is used
This commit is contained in:
commit
e41d60761f
@ -2694,12 +2694,12 @@ static float nsvg__viewAlign(float content, float container, int type)
|
|||||||
|
|
||||||
static void nsvg__scaleGradient(NSVGgradient* grad, float tx, float ty, float sx, float sy)
|
static void nsvg__scaleGradient(NSVGgradient* grad, float tx, float ty, float sx, float sy)
|
||||||
{
|
{
|
||||||
grad->xform[0] *= sx;
|
float t[6];
|
||||||
grad->xform[1] *= sx;
|
nsvg__xformSetTranslation(t, tx, ty);
|
||||||
grad->xform[2] *= sy;
|
nsvg__xformMultiply (grad->xform, t);
|
||||||
grad->xform[3] *= sy;
|
|
||||||
grad->xform[4] += tx*sx;
|
nsvg__xformSetScale(t, sx, sy);
|
||||||
grad->xform[5] += ty*sx;
|
nsvg__xformMultiply (grad->xform, t);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void nsvg__scaleToViewbox(NSVGparser* p, const char* units)
|
static void nsvg__scaleToViewbox(NSVGparser* p, const char* units)
|
||||||
|
Loading…
Reference in New Issue
Block a user