SourceClass ImageSize
from egui import ImageSizeclass ImageSize:This type determines the constraints on how the size of an image should be calculated.
Properties§
@property
def fit(self, /) -> ImageFit§
@fit.setter
def fit(self, /, fit: ImageFit) -> None§
@property
def maintain_aspect_ratio(self, /) -> bool§
@maintain_aspect_ratio.setter
def maintain_aspect_ratio(self, /, maintain_aspect_ratio: bool) -> None§
@property
def max_size(self, /) -> Vec2§
@max_size.setter
def max_size(self, /, max_size: Vec2) -> None§
Methods§
Sourcedef calc_size(self, /, available_size: Vec2, image_source_size: Vec2) -> Vec2§
Calculate the final on-screen size in points.
@staticmethod
def default() -> ImageSize§
Sourcedef hint(self, /, available_size: Vec2, pixels_per_point: float) -> SizeHint§
Size hint for e.g. rasterizing an svg.