FIFE  be64c707dea6b3250bd4355bf5c825d25920087d
FIFE::RenderTarget Class Reference

#include <targetrenderer.h>

+ Collaboration diagram for FIFE::RenderTarget:

Public Member Functions

 ~RenderTarget ()
 Destructor. More...
 
void addLine (const std::string &group, Point n1, Point n2, uint8_t r, uint8_t g, uint8_t b, uint8_t a=255)
 
void addPoint (const std::string &group, Point n, uint8_t r, uint8_t g, uint8_t b, uint8_t a=255)
 
void addTriangle (const std::string &group, Point n1, Point n2, Point n3, uint8_t r, uint8_t g, uint8_t b, uint8_t a=255)
 
void addQuad (const std::string &group, Point n1, Point n2, Point n3, Point n4, uint8_t r, uint8_t g, uint8_t b, uint8_t a=255)
 
void addVertex (const std::string &group, Point n, int32_t size, uint8_t r, uint8_t g, uint8_t b, uint8_t a=255)
 
void addText (const std::string &group, Point n, IFont *font, const std::string &text)
 
void addImage (const std::string &group, Point n, ImagePtr image)
 
void addAnimation (const std::string &group, Point n, AnimationPtr animation)
 
void resizeImage (const std::string &group, Point n, ImagePtr image, int32_t width, int32_t height)
 
void removeAll (const std::string &group)
 
void removeAll ()
 
void render ()
 
ImagePtr getTarget ()
 

Private Member Functions

 RenderTarget (RenderBackend *rb, const std::string &name, uint32_t width, uint32_t height)
 
 RenderTarget (RenderBackend *rb, ImagePtr &image)
 
 RenderTarget (const RenderTarget &rhs)
 
RenderTargetoperator= (const RenderTarget &rhs)
 

Private Attributes

std::map< std::string, std::vector< OffRendererElementInfo * > > m_groups
 
RenderBackendm_renderbackend
 
ImagePtr m_target
 

Friends

class TargetRenderer
 

Detailed Description

Definition at line 37 of file targetrenderer.h.

Constructor & Destructor Documentation

◆ ~RenderTarget()

FIFE::RenderTarget::~RenderTarget ( )

Destructor.

Definition at line 53 of file targetrenderer.cpp.

◆ RenderTarget() [1/3]

FIFE::RenderTarget::RenderTarget ( RenderBackend rb,
const std::string &  name,
uint32_t  width,
uint32_t  height 
)
private

Definition at line 44 of file targetrenderer.cpp.

References FIFE::DynamicSingleton< ImageManager >::instance(), FIFE::ImageManager::loadBlank(), and m_target.

Referenced by getTarget().

+ Here is the caller graph for this function:

◆ RenderTarget() [2/3]

FIFE::RenderTarget::RenderTarget ( RenderBackend rb,
ImagePtr image 
)
private

Definition at line 49 of file targetrenderer.cpp.

◆ RenderTarget() [3/3]

FIFE::RenderTarget::RenderTarget ( const RenderTarget rhs)
private

Member Function Documentation

◆ addAnimation()

void FIFE::RenderTarget::addAnimation ( const std::string &  group,
Point  n,
AnimationPtr  animation 
)

Definition at line 91 of file targetrenderer.cpp.

References m_groups.

◆ addImage()

void FIFE::RenderTarget::addImage ( const std::string &  group,
Point  n,
ImagePtr  image 
)

Definition at line 86 of file targetrenderer.cpp.

References m_groups.

◆ addLine()

void FIFE::RenderTarget::addLine ( const std::string &  group,
Point  n1,
Point  n2,
uint8_t  r,
uint8_t  g,
uint8_t  b,
uint8_t  a = 255 
)

Definition at line 56 of file targetrenderer.cpp.

References m_groups.

◆ addPoint()

void FIFE::RenderTarget::addPoint ( const std::string &  group,
Point  n,
uint8_t  r,
uint8_t  g,
uint8_t  b,
uint8_t  a = 255 
)

Definition at line 61 of file targetrenderer.cpp.

References m_groups.

◆ addQuad()

void FIFE::RenderTarget::addQuad ( const std::string &  group,
Point  n1,
Point  n2,
Point  n3,
Point  n4,
uint8_t  r,
uint8_t  g,
uint8_t  b,
uint8_t  a = 255 
)

Definition at line 71 of file targetrenderer.cpp.

References m_groups.

◆ addText()

void FIFE::RenderTarget::addText ( const std::string &  group,
Point  n,
IFont font,
const std::string &  text 
)

Definition at line 81 of file targetrenderer.cpp.

References m_groups.

◆ addTriangle()

void FIFE::RenderTarget::addTriangle ( const std::string &  group,
Point  n1,
Point  n2,
Point  n3,
uint8_t  r,
uint8_t  g,
uint8_t  b,
uint8_t  a = 255 
)

Definition at line 66 of file targetrenderer.cpp.

References m_groups.

◆ addVertex()

void FIFE::RenderTarget::addVertex ( const std::string &  group,
Point  n,
int32_t  size,
uint8_t  r,
uint8_t  g,
uint8_t  b,
uint8_t  a = 255 
)

Definition at line 76 of file targetrenderer.cpp.

References m_groups.

◆ getTarget()

ImagePtr FIFE::RenderTarget::getTarget ( )
inline

Definition at line 57 of file targetrenderer.h.

References m_target, operator=(), and RenderTarget().

◆ operator=()

RenderTarget& FIFE::RenderTarget::operator= ( const RenderTarget rhs)
private

Referenced by getTarget().

+ Here is the caller graph for this function:

◆ removeAll() [1/2]

void FIFE::RenderTarget::removeAll ( const std::string &  group)

Definition at line 101 of file targetrenderer.cpp.

References m_groups.

◆ removeAll() [2/2]

void FIFE::RenderTarget::removeAll ( )

Definition at line 110 of file targetrenderer.cpp.

References m_groups.

◆ render()

void FIFE::RenderTarget::render ( )

Definition at line 114 of file targetrenderer.cpp.

References m_groups, and m_renderbackend.

Referenced by FIFE::TargetRenderer::render().

+ Here is the caller graph for this function:

◆ resizeImage()

void FIFE::RenderTarget::resizeImage ( const std::string &  group,
Point  n,
ImagePtr  image,
int32_t  width,
int32_t  height 
)

Definition at line 96 of file targetrenderer.cpp.

References m_groups.

Friends And Related Function Documentation

◆ TargetRenderer

friend class TargetRenderer
friend

Definition at line 38 of file targetrenderer.h.

Member Data Documentation

◆ m_groups

std::map<std::string, std::vector<OffRendererElementInfo*> > FIFE::RenderTarget::m_groups
private

◆ m_renderbackend

RenderBackend* FIFE::RenderTarget::m_renderbackend
private

Definition at line 67 of file targetrenderer.h.

Referenced by render().

◆ m_target

ImagePtr FIFE::RenderTarget::m_target
private

Definition at line 68 of file targetrenderer.h.

Referenced by getTarget(), FIFE::TargetRenderer::render(), and RenderTarget().


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