Graphics Class Reference

Class for Graphics This class manages the Graphics objects More...

#include <Graphics.h>

Public Member Functions

 Graphics ()
 This is the constructor for the graphics object More...
 
 ~Graphics ()
 This is the destructor for the graphics objects More...
 
bool Inti (HWND engineWindowHandle)
 This is initialize the game window More...
 
ID2D1RenderTarget * Rendertarget ()
 This is allows the handing of bitmap image during the conversion process More...
 
void BeginDarw ()
 This starts the drawing process More...
 
void EndDraw ()
 This ends the drawing process More...
 
void ClearScreen (float r, float g, float b)
 This provides a clear screen More...
 
void DrawCircle (float c, float y, float radius, float r, float g, float b, float a)
 This draws a circle in the game window More...
 

Private Attributes

ID2D1Factory * EngineFactory
 This factory allow many types of D2D resources to be created More...
 
ID2D1HwndRenderTarget * EngineRendertarget
 The render-target is similar to a back buffer from the GPU memory More...
 
ID2D1SolidColorBrush * brush
 This is a COM interface that should also be release at the end More...
 

Detailed Description

Class for Graphics This class manages the Graphics objects

: Graphics.h Brian Hinds : 07-02-2017 : 1.0.2

Constructor & Destructor Documentation

◆ Graphics()

Graphics::Graphics ( )

This is the constructor for the graphics object

This method is a constructor that Sets the graphics objects to NULL

: Graphics.cpp Brian Hinds : 07-02-2017 : 1.0.2 <method name="Grapgics"></method>

Parameters
None
Returns
None

◆ ~Graphics()

Graphics::~Graphics ( )

This is the destructor for the graphics objects

This method is a destructor for the graphics object Freeing the memory when no longer needed

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

Parameters
None
Returns
None

Member Function Documentation

◆ BeginDarw()

void Graphics::BeginDarw ( )
inline

This starts the drawing process

◆ ClearScreen()

void Graphics::ClearScreen ( float  r,
float  g,
float  b 
)

This provides a clear screen

This method clears the screen for each graphics

<method name="ClearScreen"></method>

Parameters
float r,g,b
Returns
void

◆ DrawCircle()

void Graphics::DrawCircle ( float  x,
float  y,
float  radius,
float  r,
float  g,
float  b,
float  a 
)

This draws a circle in the game window

Draws a circle with a define color and size

◆ EndDraw()

void Graphics::EndDraw ( )
inline

This ends the drawing process

◆ Inti()

bool Graphics::Inti ( HWND  engineWindowHandle)

This is initialize the game window

This method Initialize the game window from the graphics It also sets the render properties and objects needed for the graphics

<method name="Inti"></method> <param name="HWND engineWindowHandle>

Returns
bool

◆ Rendertarget()

ID2D1RenderTarget* Graphics::Rendertarget ( )
inline

This is allows the handing of bitmap image during the conversion process

Member Data Documentation

◆ brush

ID2D1SolidColorBrush* Graphics::brush
private

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

◆ EngineFactory

ID2D1Factory* Graphics::EngineFactory
private

This factory allow many types of D2D resources to be created

◆ EngineRendertarget

ID2D1HwndRenderTarget* Graphics::EngineRendertarget
private

The render-target is similar to a back buffer from the GPU memory


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