S or /

SourceClass CornerRadius

from egui import CornerRadius
class CornerRadius:

How rounded the corners of things should be.

This specific the corner radius of the underlying geometric shape (e.g. rectangle). If there is a stroke, then the stroke will have an inner and outer corner radius which will depends on its width and egui.StrokeKind.

The rounding uses int to save space, so the amount of rounding is limited to integers in the range [0, 255].

For calculations, you may want to use egui.CornerRadiusF32 instead, which uses float.

Properties§

@property def ne(self, /) -> int§
@ne.setter def ne(self, /, ne: int) -> None§
@property def nw(self, /) -> int§
@nw.setter def nw(self, /, nw: int) -> None§
@property def se(self, /) -> int§
@se.setter def se(self, /, se: int) -> None§
@property def sw(self, /) -> int§
@sw.setter def sw(self, /, sw: int) -> None§

Methods§

Sourcedef at_least(self, /, min: int) -> CornerRadius§

Make sure each corner has a rounding of at least this.

Sourcedef at_most(self, /, max: int) -> CornerRadius§

Make sure each corner has a rounding of at most this.

Sourcedef average(self, /) -> float§

Average rounding of the corners.

Sourcedef is_same(self, /) -> bool§

Do all corners have the same rounding?

Source@staticmethod def same(radius: int) -> CornerRadius§

Same rounding on all four corners.

@staticmethod def zero() -> CornerRadius§