animator.skia.Color4f¶
- class animator.skia.Color4f¶
Bases:
pybind11_builtins.pybind11_object
- __init__(*args, **kwargs)¶
Overloaded function.
__init__(self: animator.skia.Color4f, color: int) -> None
Create a new
Color4f
from an ARGB color.- param color
ARGB color to convert
__init__(self: animator.skia.Color4f, red: float, green: float, blue: float, alpha: float = 1.0) -> None
Create a new Color4f instance initialized with the given values.
- red
red components
- green
green components
- blue
blue components
- alpha
alpha components
__init__(self: animator.skia.Color4f, t: tuple) -> None
Create a new Color4f instance given (R, G, B) or (R, G, B, A) tuple.
- param t
tuple of color components
Methods
FromBytes_RGBA
(color)FromColor
(color)FromPMColor
(pmcolor)__init__
(*args, **kwargs)Overloaded function.
array
(self)Return a numpy array of the color components.
fitsInBytes
(self)isOpaque
(self)makeOpaque
(self)premul
(self)toBytes_RGBA
(self)toColor
(self)vec
(self)Attributes
fA
fB
fG
fR
kBlack
kBlue
kCyan
kDkGray
kGray
kGreen
kLtGray
kMagenta
kRed
kTransparent
kWhite
kYellow
- static FromBytes_RGBA(color: int) animator.skia.Color4f ¶
- static FromColor(color: int) animator.skia.Color4f ¶
- static FromPMColor(pmcolor: int) animator.skia.Color4f ¶
- array(self: animator.skia.Color4f) numpy.ndarray[numpy.float32] ¶
Return a numpy array of the color components. Changes to the array will be reflected in the color.
- Returns
numpy array of the color components
- fitsInBytes(self: animator.skia.Color4f) bool ¶
- isOpaque(self: animator.skia.Color4f) bool ¶
- makeOpaque(self: animator.skia.Color4f) animator.skia.Color4f ¶
- premul(self: animator.skia.Color4f) SkRGBA4f<(SkAlphaType)2> ¶
- toBytes_RGBA(self: animator.skia.Color4f) int ¶
- toColor(self: animator.skia.Color4f) int ¶
- vec(self: animator.skia.Color4f) memoryview ¶