pub trait OffscreenEffectExt: 'static {
// Required methods
fn get_target_rect(&self) -> Option<Rect>;
fn paint_target(&self);
}Expand description
Trait containing all OffscreenEffect methods.
§Implementors
BlurEffect, BrightnessContrastEffect, ColorizeEffect, DeformEffect, DesaturateEffect, OffscreenEffect, ShaderEffect
Required Methods§
Sourcefn get_target_rect(&self) -> Option<Rect>
fn get_target_rect(&self) -> Option<Rect>
Retrieves the origin and size of the offscreen buffer used by self to
paint the actor to which it has been applied.
This function should only be called by OffscreenEffect
implementations, from within the OffscreenEffectClass.paint_target()
virtual function.
§rect
return location for the target area
§Returns
true if the offscreen buffer has a valid rectangle,
and false otherwise
Sourcefn paint_target(&self)
fn paint_target(&self)
Calls the paint_target virtual function of the self