26#ifndef TGUI_BACKEND_RENDER_TARGET_HPP
27#define TGUI_BACKEND_RENDER_TARGET_HPP
29#include <TGUI/Rect.hpp>
30#include <TGUI/Color.hpp>
31#include <TGUI/Sprite.hpp>
32#include <TGUI/Text.hpp>
33#include <TGUI/Outline.hpp>
34#include <TGUI/RenderStates.hpp>
56#ifndef TGUI_REMOVE_DEPRECATED_CODE
63 TGUI_DEPRECATED(
"Use setView(view, viewport, targetSize) instead") virtual
void setView(
FloatRect view,
FloatRect viewport);
81 virtual void drawGui(
const std::shared_ptr<RootContainer>& root) = 0;
164 virtual void drawTriangles(
const RenderStates& states,
const Vertex* vertices, std::size_t vertexCount,
const int* indices =
nullptr, std::size_t indexCount = 0) = 0;
202 const Borders& borders = {0},
const Color& borderColor = Color::Black);
229 std::vector<std::pair<FloatRect, FloatRect>> m_clipLayers;
Base class for render targets.
Definition BackendRenderTarget.hpp:48
virtual void addClippingLayer(const RenderStates &states, FloatRect rect)
Adds another clipping region.
virtual void drawTriangles(const RenderStates &states, const Vertex *vertices, std::size_t vertexCount, const int *indices=nullptr, std::size_t indexCount=0)=0
Draws one or more triangles (using the color that is specified in the vertices)
virtual void drawFilledRect(const RenderStates &states, Vector2f size, Color color)
Draws a colored rectangle.
virtual void drawRoundedRectangle(const RenderStates &states, const Vector2f &size, const Color &backgroundColor, float radius, const Borders &borders={0}, const Color &borderColor=Color::Black)
Draws a rounded rectangle.
virtual void setView(FloatRect view, FloatRect viewport, Vector2f targetSize)
Informs the render target about which part of the window is used for rendering.
virtual void drawWidget(const RenderStates &states, const std::shared_ptr< Widget > &widget)
Draws a widget, if the widget is visible.
virtual void drawCircle(const RenderStates &states, float size, const Color &backgroundColor, float borderThickness=0, const Color &borderColor={})
Draws a circle.
virtual void updateClipping(FloatRect clipRect, FloatRect clipViewport)
Called from addClippingLayer and removeClippingLayer to apply the clipping.
Definition BackendRenderTarget.hpp:218
virtual void drawText(const RenderStates &states, const Text &text)=0
Draws some text.
virtual void removeClippingLayer()
Removes the last added clipping region.
virtual ~BackendRenderTargetBase()=default
Virtual destructor.
virtual void drawGui(const std::shared_ptr< RootContainer > &root)=0
Draws the gui and all of its widgets.
virtual void drawSprite(const RenderStates &states, const Sprite &sprite)=0
Draws a texture.
void drawTriangles(const RenderStates &states, std::initializer_list< Vertex > vertices, std::initializer_list< int > indices={})
Draws one or more triangles (using the color that is specified in the vertices)
virtual void drawBorders(const RenderStates &states, const Borders &borders, Vector2f size, Color color)
Draws borders inside a provided rectangle.
Wrapper for colors.
Definition Color.hpp:63
Definition Outline.hpp:39
Namespace that contains all TGUI functions and classes.
Definition AbsoluteOrRelativeValue.hpp:36
States used for drawing.
Definition RenderStates.hpp:39