Design Pattern Examples
Overview of object-oriented design patterns
Flyweight_BigResource.h
Go to the documentation of this file.
1
7
8#pragma once
9#ifndef __FLYWEIGHT_BIGRESOURCE_H__
10#define __FLYWEIGHT_BIGRESOURCE_H__
11
12#include "Flyweight_Display.h"
13
22typedef struct
23{
24 char* data;
27
32void BigResource_Clear(BigResource* resource);
33
49void BigResource_Render(Display* display, int bigResourceId, int offset_x,
50 int image_width, int image_height, int position_x, int position_y);
51
52#endif // __FLYWEIGHT_BIGRESOURCE_H__
53
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 t...
void BigResource_Clear(BigResource *resource)
Clear the BigResource object, freeing any memory associated with it.
Declaration of the Display_Create() and Display_Destroy() functions for managing the Display structur...
Represents a big image. Call the BigResource_Clear() function to release the memory used by each inst...
char * data
Image data, row-oriented.
int numImages
Number of images represented in the big image.
Represents a "display" window, in which to render Flyweight images. This "display" window is then pri...