Simple GUI Library
border.h
Go to the documentation of this file.
1/**
2 * @author Nikita Mochalov (github.com/tralf-strues)
3 * @file border.h
4 * @date 2021-11-06
5 *
6 * @copyright Copyright (c) 2021
7 */
8
9#pragma once
10
11#include "sml/graphics_wrapper/color.h"
12#include "sml/math/rectangle.h"
13#include "insets.h"
14
15namespace Sgl
16{
17 class Border
18 {
19 public:
20 static void encloseArea(const Border* border, const Sml::Rectangle<int32_t>& targetRegion);
21
22 public:
23 Border() = default;
24 Border(int32_t thickness, Sml::Color color);
25 Border(const Insets& thickness, Sml::Color color);
26
27 const Insets& getThickness() const;
28 Sml::Color getColor() const;
29
30 private:
31 Insets m_Thickness = 0;
32 Sml::Color m_Color = Sml::COLOR_TRANSPARENT;
33 };
34}