Implementation of the BigResource_Clear() function and the BigResource_Render() function used to render portions of the big resource into a "display" window as used in the Flyweight Pattern. More...
Go to the source code of this file.
Functions | |
void | BigResource_Clear (BigResource *resource) |
Clear the BigResource object, freeing any memory associated with it. | |
void | BigResource_Render (Display *display, int bigResourceId, int offset_x, int image_width, int image_height, int position_x, int position_y) |
Render the specified portion of the big resource into the given display at the given coordinates in the display. | |
Implementation of the BigResource_Clear() function and the BigResource_Render() function used to render portions of the big resource into a "display" window as used in the Flyweight Pattern.
Definition in file Flyweight_BigResource.c.
void BigResource_Clear | ( | BigResource * | resource | ) |
Clear the BigResource object, freeing any memory associated with it.
resource | A BitResource object to clear. |
Definition at line 16 of file Flyweight_BigResource.c.
References BigResource::data.
Referenced by BigResourceList_Clear().
void BigResource_Render | ( | Display * | display, |
int | bigResourceId, | ||
int | offset_x, | ||
int | image_width, | ||
int | image_height, | ||
int | position_x, | ||
int | position_y | ||
) |
Render the specified portion of the big resource into the given display at the given coordinates in the display.
display | The Display object representing the "display" window. |
bigResourceId | The handle to the big resource from which to render images. |
offset_x | Offset from left edge in the big resource to the left edge of the image to use. |
image_width | With of the image to render. |
image_height | Height of the image to render. |
position_x | Horizontal position in the display of the upper left corner of the image to render. |
position_y | Vertical position in the display of the upper left corner of the image to render. |
Definition at line 28 of file Flyweight_BigResource.c.
References Display::area, BigResourceManager_GetResource(), BigResource::data, Display::height, BigResource::numImages, and Display::width.
Referenced by _Flyweight_RenderFlyweights().