SDLPainter
0.1.0
QPainter benzeri SDL3 + OpenGL/Vulkan 2D çizim kütüphanesi
Toggle main menu visibility
Yüklüyor...
Arıyor...
Eşleşme Yok
brush.h
1
#pragma once
2
3
#include "sdl_painter/color.h"
4
5
namespace
sdl_painter {
6
8
class
Brush
{
9
public
:
11
Brush
() =
default
;
12
14
explicit
Brush
(
const
Color
& color) : mColor(color) {}
15
17
[[nodiscard]]
const
Color
&
GetColor
() const noexcept {
return
mColor; }
18
20
void
SetColor
(
const
Color
& color)
noexcept
{ mColor = color; }
21
23
[[nodiscard]]
bool
IsVisible
() const noexcept {
return
mColor.a > 0; }
24
25
[[nodiscard]]
bool
operator==(
const
Brush
& other)
const
noexcept
{
26
return
mColor == other.mColor;
27
}
28
[[nodiscard]]
bool
operator!=(
const
Brush
& other)
const
noexcept
{
29
return
!(*
this
== other);
30
}
31
33
[[nodiscard]]
static
Brush
NoBrush
() noexcept {
34
return
Brush
(Color::Transparent());
35
}
36
37
private
:
38
Color
mColor{Color::Black()};
39
};
40
41
}
// namespace sdl_painter
sdl_painter::Brush
Dolgu stili — renk tabanlı düz dolgu.
Definition
brush.h:8
sdl_painter::Brush::IsVisible
bool IsVisible() const noexcept
Fırça görünür mü? (alpha > 0).
Definition
brush.h:23
sdl_painter::Brush::GetColor
const Color & GetColor() const noexcept
Dolgu rengini döndür.
Definition
brush.h:17
sdl_painter::Brush::Brush
Brush()=default
Varsayılan fırça: siyah, tam opak.
sdl_painter::Brush::SetColor
void SetColor(const Color &color) noexcept
Dolgu rengini ayarla.
Definition
brush.h:20
sdl_painter::Brush::Brush
Brush(const Color &color)
Renk ile fırça oluştur.
Definition
brush.h:14
sdl_painter::Brush::NoBrush
static Brush NoBrush() noexcept
Şeffaf (dolgu yapmayan) fırça.
Definition
brush.h:33
sdl_painter::Color
RGBA renk temsili. Her kanal [0, 255] aralığında.
Definition
color.h:8
include
sdl_painter
brush.h
Oluşturan
1.17.0