ImageManager Class Reference

Class for ImageManager This class loads the image from file and converts it to a ID2D1Bitmap image It also manage chroma-key and composite images More...

#include <ImageManager.h>

Public Member Functions

 ImageManager (wchar_t *filename, Graphics *EngineGFX)
 Constructor that Gets the bitmap image from file More...
 
 ImageManager (wchar_t *filename, Graphics *EngineGFX, int NPC_Width, int NPC_Height)
 Constructor that Gets the NPC sprite bitmap image from file More...
 
 ImageManager (wchar_t *filename, Graphics *EngineGFX, int ChromaValue)
 Constructor that Gets the bitmap to chroma-key image from file More...
 
 ~ImageManager ()
 Destructor that destroys bitmap object when no longer needed More...
 
void Draw (float x, float y)
 Draws the bitmap More...
 
void DrawNPC (int index, float X_Position, float Y_Position)
 Draws the NPCs bitmap More...
 
void DrawChromaKeyedImage (float X_Position, float Y_Position)
 Draws the chroma-keyed bitmap More...
 

Private Attributes

GraphicsEngineGFX
 Setting up a graphic object More...
 
ComPtr< ID2D1DeviceContext > m_d2dContext
 
ComPtr< ID2D1Effect > chromakeyEffect
 This is a effect interface that should also be release at the end More...
 
ID2D1Bitmap * GameBmpAsset
 Instantiating bitmap object More...
 
int NPC_Width
 Variables for NPCs bitmap information More...
 
int NPC_Height
 
int NPC_Accross
 
int ChomaKeyImg_Width
 Variables for chroma-key bitmap information More...
 
int ChomaKeyImg_Height
 

Detailed Description

Class for ImageManager This class loads the image from file and converts it to a ID2D1Bitmap image It also manage chroma-key and composite images

Constructor & Destructor Documentation

◆ ImageManager() [1/3]

ImageManager::ImageManager ( wchar_t *  filename,
Graphics EngineGFX 
)

Constructor that Gets the bitmap image from file

Constructor for loading bitmaps from file

: ImageManager.cpp : Brian Hinds : 18-01-2017 : 1.0.2 <method name="ImagaeManager"></method>

Parameters
wchar_t * filename, Graphics * EngineGFX
Returns
Bitmap Image

Setting up objects to process bitmap image

Create factory needed for the bitmap image

Gets the bitmap image from file

Read the image frame

Create a converter for the bitmap image

Setup the converter for the bitmap image

Creates a D2D1Bitmap image

Releases the factory objects

◆ ImageManager() [2/3]

ImageManager::ImageManager ( wchar_t *  filename,
Graphics EngineGFX,
int  NPC_Width,
int  NPC_Height 
)

Constructor that Gets the NPC sprite bitmap image from file

Constructor for loading NPCs from file

<method name="ImagaeManager"></method>

Parameters
wchar_t * filename, Graphics * EngineGFX, int NPC_Width, int NPC_Height
Returns
Bitmap Image

◆ ImageManager() [3/3]

ImageManager::ImageManager ( wchar_t *  filename,
Graphics EngineGFX,
int  ChromaValue 
)

Constructor that Gets the bitmap to chroma-key image from file

Constructor for chroma-key bitmap from file

<method name="ImagaeManager"></method>

Parameters
wchar_t * filename, Graphics * EngineGFX, int ChromaValue
Returns
Bitmap Image

◆ ~ImageManager()

ImageManager::~ImageManager ( )

Destructor that destroys bitmap object when no longer needed

Destructor for bitmap

<method name="~ImageManager"></method>

Parameters
None
Returns
None

Member Function Documentation

◆ Draw()

void ImageManager::Draw ( float  X_Position,
float  Y_Position 
)

Draws the bitmap

Draws the bitmap image

<method name="Draw"></method>

Parameters
None
Returns
void

◆ DrawChromaKeyedImage()

void ImageManager::DrawChromaKeyedImage ( float  X_Position,
float  Y_Position 
)

Draws the chroma-keyed bitmap

Draws chroma-keyed assets

<method name="DrawChromaKeyedImage"></method>

Parameters
int index, float X_Position, float Y_Position
Returns
void

◆ DrawNPC()

void ImageManager::DrawNPC ( int  index,
float  X_Position,
float  Y_Position 
)

Draws the NPCs bitmap

Draws animated none playable characters

<method name="DrawNPC"></method>

Parameters
int index, float X_Position, float Y_Position
Returns
void

Member Data Documentation

◆ ChomaKeyImg_Width

int ImageManager::ChomaKeyImg_Width
private

Variables for chroma-key bitmap information

◆ chromakeyEffect

ComPtr<ID2D1Effect> ImageManager::chromakeyEffect
private

This is a effect interface that should also be release at the end

◆ EngineGFX

Graphics* ImageManager::EngineGFX
private

Setting up a graphic object

◆ GameBmpAsset

ID2D1Bitmap* ImageManager::GameBmpAsset
private

Instantiating bitmap object

◆ NPC_Width

int ImageManager::NPC_Width
private

Variables for NPCs bitmap information


The documentation for this class was generated from the following files: