Implement active box using new draw item on draw layers

This commit is contained in:
Dan Paulat 2021-12-18 21:43:15 -06:00
parent 999d322985
commit d30b6d4011
13 changed files with 610 additions and 37 deletions

View file

@ -0,0 +1,48 @@
#pragma once
#include <scwx/qt/gl/gl.hpp>
#include <scwx/qt/gl/draw/draw_item.hpp>
#include <boost/gil.hpp>
namespace scwx
{
namespace qt
{
namespace gl
{
namespace draw
{
class RectangleImpl;
class Rectangle : public DrawItem
{
public:
explicit Rectangle(OpenGLFunctions& gl);
~Rectangle();
Rectangle(const Rectangle&) = delete;
Rectangle& operator=(const Rectangle&) = delete;
Rectangle(Rectangle&&) noexcept;
Rectangle& operator=(Rectangle&&) noexcept;
void Initialize() override;
void Render() override;
void Deinitialize() override;
void SetBorder(float width, boost::gil::rgba8_pixel_t color);
void SetFill(boost::gil::rgba8_pixel_t color);
void SetPosition(float x, float y);
void SetSize(float width, float height);
void SetVisible(bool visible);
private:
std::unique_ptr<RectangleImpl> p;
};
} // namespace draw
} // namespace gl
} // namespace qt
} // namespace scwx