mirror of
https://github.com/orange-cpp/omath.git
synced 2026-08-07 21:42:05 +00:00
added outside glow
This commit is contained in:
@@ -39,9 +39,19 @@ namespace omath::hud::widget
|
||||
float intensity = 1.f;
|
||||
};
|
||||
|
||||
enum class CanvasGlowMode
|
||||
{
|
||||
INSIDE,
|
||||
OUTSIDE,
|
||||
BOTH,
|
||||
};
|
||||
|
||||
struct CanvasGlow
|
||||
{
|
||||
Glow glow;
|
||||
int layers = 64;
|
||||
CanvasGlowMode mode = CanvasGlowMode::INSIDE;
|
||||
float rounding = 20.f;
|
||||
};
|
||||
|
||||
// ── Standalone widgets ────────────────────────────────────────────────────
|
||||
|
||||
@@ -38,6 +38,12 @@ namespace omath::hud
|
||||
virtual void add_filled_circle(const Vector2<float>& center, float radius, const Color& color,
|
||||
int segments = 0) = 0;
|
||||
|
||||
virtual void add_filled_ellipse(const Vector2<float>& center, const Vector2<float>& radius, const Color& color,
|
||||
int segments = 0)
|
||||
{
|
||||
add_filled_circle(center, std::min(radius.x, radius.y), color, segments);
|
||||
}
|
||||
|
||||
/// Draw an arc (partial circle outline). Angles in radians, 0 = right (+X), counter-clockwise.
|
||||
virtual void add_arc(const Vector2<float>& center, float radius, float a_min, float a_max, const Color& color,
|
||||
float thickness, int segments = 0) = 0;
|
||||
|
||||
@@ -24,6 +24,8 @@ namespace omath::hud
|
||||
int segments = 0) override;
|
||||
void add_filled_circle(const Vector2<float>& center, float radius, const Color& color,
|
||||
int segments = 0) override;
|
||||
void add_filled_ellipse(const Vector2<float>& center, const Vector2<float>& radius, const Color& color,
|
||||
int segments = 0) override;
|
||||
void add_arc(const Vector2<float>& center, float radius, float a_min, float a_max, const Color& color,
|
||||
float thickness, int segments = 0) override;
|
||||
void add_image(const std::any& texture_id, const Vector2<float>& min, const Vector2<float>& max,
|
||||
|
||||
Reference in New Issue
Block a user