more radial gradient tweaks

This commit is contained in:
Robin Dunn
2019-07-27 22:37:11 -07:00
parent b4e40843d5
commit 68357daec7
2 changed files with 2061 additions and 1323 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -516,15 +516,17 @@ cdef class SVGgradient:
@property
def radialPoint(self):
cdef float inverse[6]
cdef float xo, yo, xc, yc, radius
cdef float cx, cy, radius
cdef float r1, r2
nsvg__xformInverse(inverse, self._ptr.xform)
nsvg__xformPoint(&xc, &yc, 0, 0, inverse)
nsvg__xformPoint(&xo, &yo, 0, 1, inverse)
radius = yo - yc;
nsvg__xformPoint(&cx, &cy, 0, 0, inverse)
nsvg__xformPoint(&r1, &r2, 0, 1, inverse)
radius = r2 - cy
return (cx, cy, radius)
return (xo, yo, xc, yc, radius)
#----------------------------------------------------------------------------