Declaration of the BigResource structure along with the supporting BigResource_Clear function. Also declares the BigResource_Render() function used to render portions of the big resource into a "display" window as used in the Flyweight Pattern. More...
#include "Flyweight_Display.h"

Go to the source code of this file.
Classes | |
| struct | BigResource |
| Represents a big image. Call the BigResource_Clear() function to release the memory used by each instance of the BigResource structure (see the BigResourceList structure). More... | |
Macros | |
| #define | __FLYWEIGHT_BIGRESOURCE_H__ |
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. | |
Declaration of the BigResource structure along with the supporting BigResource_Clear function. Also declares 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.h.
| #define __FLYWEIGHT_BIGRESOURCE_H__ |
Definition at line 10 of file Flyweight_BigResource.h.
| 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().