Trait avrox_display::gfx::Renderable
source · pub trait Renderable {
type PIXEL;
// Required method
fn get_pixel_at<P: RenderPlane>(
&self,
coord: Point
) -> GfxResult<Self::PIXEL>;
// Provided methods
fn get_dimensions<P: RenderPlane>(&self) -> GfxResult<(XCoord, YCoord)> { ... }
fn has_changes<P: RenderPlane>(&self) -> bool { ... }
fn get_change_area<P: RenderPlane>(&self) -> GfxResult<Option<Area>> { ... }
}
Expand description
Trait implemented by any graphics command that is capable of being rendered onto a 2d plane
Required Associated Types§
Required Methods§
sourcefn get_pixel_at<P: RenderPlane>(&self, coord: Point) -> GfxResult<Self::PIXEL>
fn get_pixel_at<P: RenderPlane>(&self, coord: Point) -> GfxResult<Self::PIXEL>
Return the value of the pixel at the given X-Y coordinate
Provided Methods§
sourcefn get_dimensions<P: RenderPlane>(&self) -> GfxResult<(XCoord, YCoord)>
fn get_dimensions<P: RenderPlane>(&self) -> GfxResult<(XCoord, YCoord)>
Return the dimensions of this primitive. Other container types may use this to aid in optimisation or layout.
sourcefn has_changes<P: RenderPlane>(&self) -> bool
fn has_changes<P: RenderPlane>(&self) -> bool
Indicate if any of the content of this renderable has (or may have) changed.
sourcefn get_change_area<P: RenderPlane>(&self) -> GfxResult<Option<Area>>
fn get_change_area<P: RenderPlane>(&self) -> GfxResult<Option<Area>>
Return the area of this renderable that has (or may have) changed.
Object Safety§
This trait is not object safe.