AUI Framework  develop
Cross-platform base for C++ UI apps
Loading...
Searching...
No Matches
ABrush.h
1/*
2 * AUI Framework - Declarative UI toolkit for modern C++20
3 * Copyright (C) 2020-2024 Alex2772 and Contributors
4 *
5 * SPDX-License-Identifier: MPL-2.0
6 *
7 * This Source Code Form is subject to the terms of the Mozilla Public
8 * License, v. 2.0. If a copy of the MPL was not distributed with this
9 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 */
11
12//
13// Created by Alex2772 on 11/18/2021.
14//
15
16#pragma once
17
18
19#include <span>
20#include <variant>
21#include <AUI/Common/AColor.h>
22#include <AUI/Common/ASmallVector.h>
23#include <AUI/Enum/Repeat.h>
24#include "AUI/Enum/ImageRendering.h"
25#include "AUI/Util/AAngleRadians.h"
26#include "AUI/Traits/values.h"
27
28
33 AColor solidColor = AColor::WHITE;
34};
35
36
41
42};
43
44
49 struct ColorEntry {
50 aui::float_within_0_1 position;
51 AColor color;
52 };
54
63};
64
65class ITexture;
66
71 _<ITexture> texture;
72
81
90
98 ImageRendering imageRendering = ImageRendering::PIXELATED;
99
103 Repeat repeat = Repeat::NONE;
104};
105
106
110using ABrush = std::variant<ASolidBrush,
Strong type used to store angle in radians.
Definition AAngleRadians.h:42
Represents a 4-component floating point color (RGBA).
Definition AColor.h:26
Utility wrapper implementing the stack-allocated (fast) optional idiom.
Definition AOptional.h:32
A std::vector with AUI extensions.
Definition AVector.h:39
Renderer-friendly image representation.
Definition ITexture.h:20
An std::weak_ptr with AUI extensions.
Definition SharedPtrTypes.h:178
ImageRendering
Controls the image rendering type.
Definition ImageRendering.h:25
Definition ABrush.h:40
Definition ABrush.h:49
Definition ABrush.h:48
AAngleRadians rotation
Clockwise gradient angle.
Definition ABrush.h:62
Definition ABrush.h:32
Definition ABrush.h:70
AOptional< glm::vec2 > uv2
Definition ABrush.h:89
AOptional< glm::vec2 > uv1
Definition ABrush.h:80
Repeat repeat
Definition ABrush.h:103
ImageRendering imageRendering
Definition ABrush.h:98