Struct egui_fltk_frontend::RetainedEguiImage
source · [−]pub struct RetainedEguiImage { /* private fields */ }Expand description
An image to be shown in egui.
Load once, and save somewhere in your app state.
Use the svg and image features to enable more constructors.
Implementations
sourceimpl RetainedEguiImage
impl RetainedEguiImage
pub fn from_color_image(
debug_name: impl Into<String>,
image: ColorImage
) -> Self
pub fn from_fltk_image<I: ImageExt>(
debug_name: impl Into<String>,
image: I
) -> Result<RetainedEguiImage, FltkError>
pub fn from_fltk_image_as_ref<I: ImageExt>(
debug_name: impl Into<String>,
image: &I
) -> Result<RetainedEguiImage, FltkError>
pub fn from_fltk_svg_image_as_ref(
debug_name: impl Into<String>,
svg_image: &mut SvgImage
) -> Result<RetainedEguiImage, FltkError>
pub fn from_fltk_svg_image(
debug_name: impl Into<String>,
svg_image: SvgImage
) -> Result<RetainedEguiImage, FltkError>
sourcepub fn debug_name(&self) -> &str
pub fn debug_name(&self) -> &str
The debug name of the image, e.g. the file name.
sourcepub fn texture_id(&self, ctx: &Context) -> TextureId
pub fn texture_id(&self, ctx: &Context) -> TextureId
The texture if for this image.
sourcepub fn show_max_size(&self, ui: &mut Ui, max_size: Vec2) -> Response
pub fn show_max_size(&self, ui: &mut Ui, max_size: Vec2) -> Response
Show the image with the given maximum size.
sourcepub fn show(&self, ui: &mut Ui) -> Response
pub fn show(&self, ui: &mut Ui) -> Response
Show the image with the original size (one image pixel = one gui point).
sourcepub fn show_scaled(&self, ui: &mut Ui, scale: f32) -> Response
pub fn show_scaled(&self, ui: &mut Ui, scale: f32) -> Response
Show the image with the given scale factor (1.0 = original size).
Auto Trait Implementations
impl RefUnwindSafe for RetainedEguiImage
impl Send for RetainedEguiImage
impl Sync for RetainedEguiImage
impl Unpin for RetainedEguiImage
impl UnwindSafe for RetainedEguiImage
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more