pub struct FlyweightImage {
pub big_resource_id: usize,
pub context: FlyweightContext,
}
Expand description
Represents an image that associates a context with a big resource.
Fields§
§big_resource_id: usize
The big resource being referenced by this flyweight image. This is represented by a handle to the big resource.
context: FlyweightContext
The context associated with this image. The calling entity uses this context to manipulate the position of the image.
Implementations§
source§impl FlyweightImage
impl FlyweightImage
sourcepub fn render(&self, resource_manager: &BigResourceManager, display: &mut Display)
pub fn render(&self, resource_manager: &BigResourceManager, display: &mut Display)
Render the image associated with this flyweight instance into the given display at the given position.
Parameters
-
resource_manager
The BigResourceManager from which to get the BigResource “image” to use
-
display
The display to render to