mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-05 11:30:06 +01:00
Add color_rgba helper for gradient stops
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user