![]() |
YAPOG
0.0.1
Yet Another Pokemon Online Game
|
A common implementation of an IDrawingContext. More...
#include <DrawingContext.hpp>
Public Member Functions | |
| DrawingContext (const Vector2 &size, const String &name) | |
| virtual | ~DrawingContext () |
| sf::RenderWindow & | GetWindow () |
IDrawingContext members. | |
| virtual void | AddCamera (const CameraMode &mode, ICamera *camera) |
| Adds an ICamera associated to a CameraMode. | |
| virtual void | RemoveCamera (const CameraMode &mode) |
| Remove an ICamera associated to a CameraMode. | |
| virtual const ICamera & | GetCamera () const |
| Gets the Camera associated to the CameraMode currently used. | |
| virtual ICamera & | GetCamera () |
| Gets the Camera associated to the CameraMode currently used. | |
| virtual const ICamera & | GetCamera (const CameraMode &mode) const |
| Gets the Camera associated to a CameraMode. | |
| virtual ICamera & | GetCamera (const CameraMode &mode) |
| Gets the Camera associated to a CameraMode. | |
| virtual void | SetMode (const CameraMode &mode) |
| Sets the CameraMode currently used by the IDrawingContext. | |
| virtual void | SetDefaultMode (const CameraMode &mode) |
| Sets the CameraMode used by default i-e the CameraMode when IDrawingContext::SetDefaultCamera () is called. | |
| virtual void | SetDefaultCamera () |
| Sets the default CameraMode as the current one used. | |
| virtual const sf::RenderTarget & | GetRenderTarget () const |
| Gets the RenderTarget of this IDrawingContext. | |
| virtual sf::RenderTarget & | GetRenderTarget () |
| Gets the RenderTarget of this IDrawingContext. | |
| virtual void | Draw (const sf::Drawable &drawable) |
| Renders the Drawable into the RenderTarget of this DrawingContext with the current settings. | |
| virtual void | Draw (const sf::Drawable &drawable, const sf::RenderStates &states) |
| virtual const sf::Color & | GetTargetClearColor () const |
| virtual void | SetTargetClearColor (const sf::Color &color) |
| virtual void | ChangeSize (const Vector2 &size) |
Public Member Functions inherited from yap::IDrawingContext | |
| virtual | ~IDrawingContext () |
Protected Member Functions | |
| virtual void | HandleDraw (const sf::Drawable &drawable, const sf::RenderStates &states) |
Private Member Functions | |
| DISALLOW_COPY (DrawingContext) | |
| void | SetCurrentMode (const CameraMode &mode) |
Private Attributes | |
| sf::RenderWindow | window_ |
| CameraMode | currentMode_ |
| CameraMode | defaultMode_ |
| collection::Map< CameraMode, ICamera * > | cameras_ |
| sf::Color | targetClearColor_ |
Static Private Attributes | |
| static const sf::Color | DEFAULT_TARGET_CLEAR_COLOR |
A common implementation of an IDrawingContext.
Definition at line 15 of file DrawingContext.hpp.
Definition at line 8 of file DrawingContext.cpp.
|
virtual |
Definition at line 17 of file DrawingContext.cpp.
|
virtual |
Adds an ICamera associated to a CameraMode.
Implements yap::IDrawingContext.
Definition at line 23 of file DrawingContext.cpp.
|
virtual |
Implements yap::IDrawingContext.
Definition at line 127 of file DrawingContext.cpp.
|
private |
|
virtual |
Renders the Drawable into the RenderTarget of this DrawingContext with the current settings.
| drawable | Drawable to render into this IDrawingContext. |
Implements yap::IDrawingContext.
Definition at line 86 of file DrawingContext.cpp.
|
virtual |
|
virtual |
Gets the Camera associated to the CameraMode currently used.
Implements yap::IDrawingContext.
Definition at line 41 of file DrawingContext.cpp.
|
virtual |
Gets the Camera associated to the CameraMode currently used.
Implements yap::IDrawingContext.
Definition at line 46 of file DrawingContext.cpp.
|
virtual |
Gets the Camera associated to a CameraMode.
| mode | CameraMode to get the Camera associated with. |
Implements yap::IDrawingContext.
Definition at line 51 of file DrawingContext.cpp.
|
virtual |
Gets the Camera associated to a CameraMode.
| mode | CameraMode to get the Camera associated with. |
Implements yap::IDrawingContext.
Definition at line 56 of file DrawingContext.cpp.
|
virtual |
Gets the RenderTarget of this IDrawingContext.
Implements yap::IDrawingContext.
Definition at line 76 of file DrawingContext.cpp.
|
virtual |
Gets the RenderTarget of this IDrawingContext.
Implements yap::IDrawingContext.
Definition at line 81 of file DrawingContext.cpp.
|
virtual |
Implements yap::IDrawingContext.
Definition at line 98 of file DrawingContext.cpp.
| sf::RenderWindow & yap::DrawingContext::GetWindow | ( | ) |
|
protectedvirtual |
Definition at line 108 of file DrawingContext.cpp.
|
virtual |
Remove an ICamera associated to a CameraMode.
| mode | CameraMode associated to the ICamera to remove. |
Implements yap::IDrawingContext.
Definition at line 36 of file DrawingContext.cpp.
|
private |
Definition at line 115 of file DrawingContext.cpp.
|
virtual |
Sets the default CameraMode as the current one used.
Implements yap::IDrawingContext.
Definition at line 71 of file DrawingContext.cpp.
|
virtual |
Sets the CameraMode used by default i-e the CameraMode when IDrawingContext::SetDefaultCamera () is called.
| mode | CameraMode to set by default. |
Implements yap::IDrawingContext.
Definition at line 66 of file DrawingContext.cpp.
|
virtual |
Sets the CameraMode currently used by the IDrawingContext.
| mode | CameraMode to use. |
Implements yap::IDrawingContext.
Definition at line 61 of file DrawingContext.cpp.
|
virtual |
Implements yap::IDrawingContext.
Definition at line 103 of file DrawingContext.cpp.
|
private |
Definition at line 69 of file DrawingContext.hpp.
|
private |
Definition at line 67 of file DrawingContext.hpp.
|
staticprivate |
Definition at line 64 of file DrawingContext.hpp.
|
private |
Definition at line 68 of file DrawingContext.hpp.
|
private |
Definition at line 71 of file DrawingContext.hpp.
|
private |
Definition at line 66 of file DrawingContext.hpp.