18#ifndef INCLUDED_CANVAS2D
19#define INCLUDED_CANVAS2D
39 const uint32_t widthInPixels,
const uint32_t heightInPixels,
const float scale,
52 const std::vector<CVector2D>& points,
53 const float width,
const CColor& color);
69 const CColor& multiply,
const CColor& add,
const float grayscaleFactor);
84 const CColor& multiply,
const CColor& add,
const float grayscaleFactor,
85 const CVector2D& origin,
const float angle);
130 std::unique_ptr<Impl>
m;
Definition: Canvas2D.cpp:82
Definition: Canvas2D.h:105
CCanvas2D & m_Canvas
Definition: Canvas2D.h:119
~ScopedScissor()
Definition: Canvas2D.h:113
ScopedScissor(CCanvas2D &canvas, const CRect &scissor)
Definition: Canvas2D.h:107
Definition: Canvas2D.h:36
CCanvas2D & operator=(const CCanvas2D &)=delete
void DrawTexture(const CTexturePtr &texture, const CRect &destination, const CRect &source, const CColor &multiply, const CColor &add, const float grayscaleFactor)
Draws a piece of the texture from the source rect into the destination rect.
Definition: Canvas2D.cpp:392
CCanvas2D(const uint32_t widthInPixels, const uint32_t heightInPixels, const float scale, Renderer::Backend::IDeviceCommandContext *deviceCommandContext)
Definition: Canvas2D.cpp:197
CCanvas2D(CCanvas2D &&)=delete
CCanvas2D(const CCanvas2D &)=delete
void DrawText(CTextRenderer &textRenderer)
Draws a text using canvas materials.
Definition: Canvas2D.cpp:460
std::unique_ptr< Impl > m
Definition: Canvas2D.h:130
void Flush()
Unbinds all bound resources and clears caches.
Definition: Canvas2D.cpp:485
~CCanvas2D()
Definition: Canvas2D.cpp:205
void PushScissor(const CRect &scissor)
Adds the scissor rect to a scissor stack.
Definition: Canvas2D.cpp:471
void DrawLine(const std::vector< CVector2D > &points, const float width, const CColor &color)
Draws a line by the given points with the width and color.
Definition: Canvas2D.cpp:211
CCanvas2D & operator=(CCanvas2D &&)=delete
void DrawRect(const CRect &rect, const CColor &color)
Draws the rect filled with the color.
Definition: Canvas2D.cpp:360
void PopScissor()
Removes the top scissor rect from a scissor stack.
Definition: Canvas2D.cpp:478
void DrawRotatedTexture(const CTexturePtr &texture, const CRect &destination, const CRect &source, const CColor &multiply, const CColor &add, const float grayscaleFactor, const CVector2D &origin, const float angle)
A similar to the original one, draws the texture into the destination rect but rotates it first aroun...
Definition: Canvas2D.cpp:421
Rectangle class used for screen rectangles.
Definition: Rect.h:31
Definition: TextRenderer.h:34
Definition: Vector2D.h:32
Definition: IDeviceCommandContext.h:42
std::shared_ptr< CTexture > CTexturePtr
Definition: Texture.h:23
unsigned int uint32_t
Definition: wposix_types.h:53