Skip to content
Permalink
Browse files

Add color_rgba helper for gradient stops

  • Loading branch information...
RobinD42 committed Jul 28, 2019
1 parent 3dc40a9 commit 12e57b6fbec5e4bbd216f6044727cd0ad2d468ae
Showing with 9 additions and 0 deletions.
  1. +9 −0 wx/svg/_nanosvg.pyx
@@ -518,6 +518,15 @@ cdef class SVGgradientStop:
self._check_ptr()
return self._ptr.color

@property
def color_rgba(self) -> tuple:
""" Returns color as a RGBA tuple """
c = self.color
return ( c & 0xff,
(c >> 8) & 0xff,
(c >> 16) & 0xff,
(c >> 24) & 0xff)

@property
def offset(self) -> float:
self._check_ptr()

0 comments on commit 12e57b6

Please sign in to comment.
You can’t perform that action at this time.