sf::RenderImage Class Reference

Target for 2D rendering into an image that can be reused in a sprite. More...

#include <RenderImage.hpp>

Inheritance diagram for sf::RenderImage:

sf::RenderTarget sf::NonCopyable

List of all members.


Public Member Functions

 RenderImage ()
 Default constructor.
virtual ~RenderImage ()
 Destructor.
bool Create (unsigned int Width, unsigned int Height, bool DepthBuffer=false)
 Create the render image from its dimensions.
bool SetActive (bool Active=true) const
 Activate of deactivate the render-image as the current target for rendering.
virtual unsigned int GetWidth () const
 Get the width of the rendering region of the image.
virtual unsigned int GetHeight () const
 Get the height of the rendering region of the image.
const ImageGetImage () const
 Get the target image.
void Clear (const Color &FillColor=Color(0, 0, 0))
 Clear the entire target with a single color.
virtual void Draw (const Drawable &Object)
 Draw something into the target.
void SetView (const View &NewView)
 Change the current active view.
const ViewGetView () const
 Get the current view.
ViewGetDefaultView ()
 Get the default view of the window for read / write.
void PreserveOpenGLStates (bool Preserve)
 Tell SFML to preserve external OpenGL states, at the expense of more CPU charge.

Static Public Member Functions

static bool CanUseRenderImage ()
 Check whether the system supports render images or not.

Protected Member Functions

void Initialize ()
 Called by the derived class when it's ready to be initialized.

Detailed Description

Target for 2D rendering into an image that can be reused in a sprite.

Definition at line 47 of file RenderImage.hpp.


Constructor & Destructor Documentation

sf::RenderImage::RenderImage (  ) 

Default constructor.

Definition at line 39 of file RenderImage.cpp.

sf::RenderImage::~RenderImage (  )  [virtual]

Destructor.

Definition at line 49 of file RenderImage.cpp.


Member Function Documentation

bool sf::RenderImage::CanUseRenderImage (  )  [static]

Check whether the system supports render images or not.

Returns:
True if RenderImage can be used

Definition at line 143 of file RenderImage.cpp.

void sf::RenderTarget::Clear ( const Color FillColor = Color(0, 0, 0)  )  [inherited]

Clear the entire target with a single color.

Parameters:
FillColor : Color to use to clear the render target

Definition at line 60 of file RenderTarget.cpp.

bool sf::RenderImage::Create ( unsigned int  Width,
unsigned int  Height,
bool  DepthBuffer = false 
)

Create the render image from its dimensions.

Parameters:
Width : Width of the render image
Height : Height of the render image
DepthBuffer : Do you want a depth buffer attached ? (false by default)
Returns:
True if creation has been successful

Definition at line 59 of file RenderImage.cpp.

void sf::RenderTarget::Draw ( const Drawable Object  )  [virtual, inherited]

Draw something into the target.

Draw something on the window.

Parameters:
Object : Object to draw

Definition at line 76 of file RenderTarget.cpp.

View & sf::RenderTarget::GetDefaultView (  )  [inherited]

Get the default view of the window for read / write.

Returns:
Default view

Definition at line 147 of file RenderTarget.cpp.

unsigned int sf::RenderImage::GetHeight (  )  const [virtual]

Get the height of the rendering region of the image.

Returns:
Height in pixels

Implements sf::RenderTarget.

Definition at line 125 of file RenderImage.cpp.

const Image & sf::RenderImage::GetImage (  )  const

Get the target image.

Returns:
Target image

Definition at line 134 of file RenderImage.cpp.

const View & sf::RenderTarget::GetView (  )  const [inherited]

Get the current view.

Returns:
Current view active in the window

Definition at line 138 of file RenderTarget.cpp.

unsigned int sf::RenderImage::GetWidth (  )  const [virtual]

Get the width of the rendering region of the image.

Returns:
Width in pixels

Implements sf::RenderTarget.

Definition at line 116 of file RenderImage.cpp.

void sf::RenderTarget::Initialize (  )  [protected, inherited]

Called by the derived class when it's ready to be initialized.

Definition at line 169 of file RenderTarget.cpp.

void sf::RenderTarget::PreserveOpenGLStates ( bool  Preserve  )  [inherited]

Tell SFML to preserve external OpenGL states, at the expense of more CPU charge.

Tell SFML to preserve external OpenGL states, at the expense of more CPU charge.

Use this function if you don't want SFML to mess up your own OpenGL states (if any). Don't enable state preservation if not needed, as it will allow SFML to do internal optimizations and improve performances. This parameter is false by default

Parameters:
Preserve : True to preserve OpenGL states, false to let SFML optimize
Use this function if you don't want SFML to mess up your own OpenGL states (if any). Don't enable state preservation if not needed, as it will allow SFML to do internal optimizations and improve performances. This parameter is false by default

Definition at line 160 of file RenderTarget.cpp.

bool sf::RenderImage::SetActive ( bool  Active = true  )  const

Activate of deactivate the render-image as the current target for rendering.

Activate of deactivate the render-image as the current target for rendering.

Parameters:
Active : True to activate, false to deactivate (true by default)
Returns:
True if operation was successful, false otherwise

Definition at line 107 of file RenderImage.cpp.

void sf::RenderTarget::SetView ( const View NewView  )  [inherited]

Change the current active view.

Parameters:
NewView : New view to use (pass GetDefaultView() to set the default view)

Definition at line 129 of file RenderTarget.cpp.


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