Simple GUI Library
background.h
Go to the documentation of this file.
1/**
2 * @author Nikita Mochalov (github.com/tralf-strues)
3 * @file background.h
4 * @date 2021-11-06
5 *
6 * @copyright Copyright (c) 2021
7 */
8
9#pragma once
10
11#include <vector>
12#include "sml/math/rectangle.h"
13#include "fill.h"
14#include "../media/image.h"
15
16namespace Sgl
17{
18 class Fill;
19 class Image;
20
22 {
23 public:
24 static void fillArea(const Background* background,
25 const Sml::Rectangle<int32_t>& targetRegion);
26
27 public:
28 Background() = default;
29
30 Background(const std::initializer_list<const Fill*>& fills,
31 const std::initializer_list<const Image*>& images);
32
33 Background(const std::initializer_list<const Fill*>& fills);
34
35 Background(const Fill* fill);
36
37 void addFill(const Fill* fill);
38 void addImage(const Image* image);
39
40 void clearFills();
41 void clearImages();
42
43 const std::vector<const Fill*>& getFills() const;
44 const std::vector<const Image*> getImages() const;
45
46 private:
47 std::vector<const Fill*> m_Fills;
48 std::vector<const Image*> m_Images;
49 };
50}
Definition: fill.h:19