S or /

SourceClass Shadow

from egui import Shadow
class Shadow:

The color and fuzziness of a fuzzy shape.

Can be used for a rectangular shadow with a soft penumbra.

Very similar to a box-shadow in CSS.

Properties§

@property def blur(self, /) -> int§
@blur.setter def blur(self, /, blur: int) -> None§
@property def color(self, /) -> Color32§
@color.setter def color(self, /, color: Color32) -> None§
@property def offset(self, /) -> tuple[int, int]§
@offset.setter def offset(self, /, offset: tuple[int, int]) -> None§
@property def offset_x(self, /) -> int§
@offset_x.setter def offset_x(self, /, offset_x: int) -> None§
@property def offset_y(self, /) -> int§
@offset_y.setter def offset_y(self, /, offset_y: int) -> None§
@property def spread(self, /) -> int§
@spread.setter def spread(self, /, spread: int) -> None§

Methods§

Sourcedef as_shape(self, /, rect: Rect, corner_radius: Any) -> RectShape§

The argument is the rectangle of the shadow caster.

Sourcedef margin(self, /) -> MarginF32§

How much larger than the parent rect are we in each direction?

@staticmethod def none() -> Shadow§