Lines Matching defs:sx
476 static void nsvg__xformSetScale(float* t, float sx, float sy)
478 t[0] = sx; t[1] = 0.0f;
902 float sx = sqrtf(t[0]*t[0] + t[2]*t[2]);
904 return (sx + sy) * 0.5f;
2775 static void nsvg__scaleGradient(NSVGgradient* grad, float tx, float ty, float sx, float sy)
2781 nsvg__xformSetScale(t, sx, sy);
2789 float tx, ty, sx, sy, us, bounds[4], t[6], avgs;
2819 sx = p->viewWidth > 0 ? p->image->width / p->viewWidth : 0;
2827 sx = sy = nsvg__minf(sx, sy);
2828 tx += nsvg__viewAlign(p->viewWidth*sx, p->image->width, p->alignX) / sx;
2832 sx = sy = nsvg__maxf(sx, sy);
2833 tx += nsvg__viewAlign(p->viewWidth*sx, p->image->width, p->alignX) / sx;
2838 sx *= us;
2840 avgs = (sx+sy) / 2.0f;
2842 shape->bounds[0] = (shape->bounds[0] + tx) * sx;
2844 shape->bounds[2] = (shape->bounds[2] + tx) * sx;
2847 path->bounds[0] = (path->bounds[0] + tx) * sx;
2849 path->bounds[2] = (path->bounds[2] + tx) * sx;
2853 pt[0] = (pt[0] + tx) * sx;
2859 nsvg__scaleGradient(shape->fill.gradient, tx,ty, sx,sy);
2864 nsvg__scaleGradient(shape->stroke.gradient, tx,ty, sx,sy);