52 m_renderbackend(renderbackend),
84 RenderList::const_iterator instance_it = instances.begin();
90 for (;instance_it != instances.end(); ++instance_it) {
91 Instance* instance = (*instance_it)->instance;
92 const std::string* saytext = instance->
getSayText();
94 const Rect& ir = (*instance_it)->dimensions;
109 const int32_t overdraw = 5;
135 m_font->
setColor(old_color.r, old_color.g, old_color.b, old_color.a);
void render(Camera *cam, Layer *layer, RenderList &instances)
This method is called by the view to ask renderer to draw its rendering aspect based on given paramet...
Abstract interface for all the renderbackends.
uint32_t getHeight() const
std::vector< RenderItem * > RenderList
RendererBase * clone()
Makes copy of this renderer.
virtual void drawRectangle(const Point &p, uint16_t w, uint16_t h, uint8_t r, uint8_t g, uint8_t b, uint8_t a=255)=0
Draws an axis parallel rectangle.
T h
Height of the rectangle.
void resetBackground()
Disable the default background.
RenderBackend * m_renderbackend
Interface to class owning the renderers Used to get correct subclass of renderer in scripting side (v...
static Logger _log(LM_AUDIO)
virtual Image * getAsImageMultiline(const std::string &text)=0
Gets given text as Image.
static FloatingTextRenderer * getInstance(IRendererContainer *cnt)
Gets instance for interface access.
void setBorder(uint8_t bbr, uint8_t bbg, uint8_t bbb, uint8_t bba=255)
Set default border r,g,b,a values for border.
virtual void setColor(uint8_t r, uint8_t g, uint8_t b, uint8_t a=255)=0
Set the color the text should be rendered in.
virtual RendererBase * getRenderer(const std::string &renderername)=0
Returns renderer with given name.
Camera describes properties of a view port shown in the main screen Main screen can have multiple cam...
virtual SDL_Color getColor() const =0
Get the color the text was rendered in.
virtual uint32_t getLightingModel() const =0
Gets the current light model.
const std::string * getSayText() const
Returns pointer to currently set saytext.
void resetBorder()
Disable the default border.
virtual void changeRenderInfos(RenderDataType type, uint16_t elements, int32_t src, int32_t dst, bool light, bool stentest, uint8_t stenref, GLConstants stenop, GLConstants stenfunc, OverlayType otype=OVERLAY_TYPE_NONE)=0
Dirty helper function to change the render infos.
PointType2D< int32_t > Point
uint32_t getHeight() const
Base class for all view renderers View renderer renders one aspect of the view shown on screen...
void setBackground(uint8_t br, uint8_t bg, uint8_t bb, uint8_t ba=255)
Set default background quad r,g,b,a values for background.
virtual void setEnabled(bool enabled)
Enables renderer.
T right() const
The X coordinate of the right edge.
void setColor(uint8_t r, uint8_t g, uint8_t b, uint8_t a=255)
Changes default font color Only useful for .ttf fonts.
virtual void render(const Rect &rect, uint8_t alpha=255, uint8_t const *rgb=0)=0
Renders itself to the current render target (main screen or attached destination image) at the rectan...
SDL_Color m_backbordercolor
FloatingTextRenderer(RenderBackend *renderbackend, int32_t position)
Constructor.
virtual void fillRectangle(const Point &p, uint16_t w, uint16_t h, uint8_t r, uint8_t g, uint8_t b, uint8_t a=255)=0
Draws a filled axis parallel rectangle.
uint32_t getWidth() const
virtual ~FloatingTextRenderer()
Destructor.
T w
Width of the rectangle.
An Instance is an "instantiation" of an Object at a Location.
T bottom() const
The Y coordinate of the bottom edge.
uint32_t getWidth() const