131 if (drawpt.
x < cv.
x || drawpt.
x > cv.
x + cv.
w ||
132 drawpt.
y < cv.
y || drawpt.
y > cv.
y + cv.
h) {
138 std::stringstream sts;
Abstract interface for all the renderbackends.
void setLayerCoordinates(const ModelCoordinate &coordinates)
Sets "cell precise" layer coordinates to this location.
std::vector< RenderItem * > RenderList
T h
Height of the rectangle.
void setLayer(Layer *layer)
Sets layer where this location is pointing to.
void setColor(uint8_t r, uint8_t g, uint8_t b)
Changes the used color.
void setMapCoordinates(const ExactModelCoordinate &coordinates)
Sets map coordinates to this location.
Interface to class owning the renderers Used to get correct subclass of renderer in scripting side (v...
virtual Image * getAsImage(const std::string &text)=0
Gets given text as Image The rsulting image is pooled, so it's not that time critical.
static Logger _log(LM_AUDIO)
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.
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...
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.
uint32_t getHeight() const
static bool Equal(T _val1, T _val2)
Base class for all view renderers View renderer renders one aspect of the view shown on screen...
virtual void setEnabled(bool enabled)
Enables renderer.
RendererBase * clone()
Makes copy of this renderer.
double getZoom() const
Gets camera zoom.
const Rect & getViewPort() const
Gets the viewport for camera in pixel coordinates.
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...
ScreenPoint toScreenCoordinates(const ExactModelCoordinate &map_coords)
Transforms given point from map coordinates to screen coordinates.
ExactModelCoordinate toMapCoordinates(ScreenPoint screen_coords, bool z_calculated=true)
Transforms given point from screen coordinates to map coordinates.
ExactModelCoordinate getMapCoordinates() const
Gets map coordinates set to this location.
ModelCoordinate getLayerCoordinates() const
Gets cell precision layer coordinates set to this location.
virtual ~CoordinateRenderer()
Destructor.
T w
Width of the rectangle.
CoordinateRenderer(RenderBackend *renderbackend, int32_t position)
Constructor.
static CoordinateRenderer * getInstance(IRendererContainer *cnt)
Gets instance for interface access.
uint32_t getWidth() const