struct
CBrush
- Module
- Arc
- Header
#include "Arc/Style/CArcStyle.h"- Namespace
Arcf
Properties
| Type | Name | Description |
|---|---|---|
EBrushDrawMode | DrawMode | Default EBrushDrawMode::Rounded. |
CArcStyleColor | Tint | |
ArcMargin | Margin | For 9-slice borders |
float | CornerRadius | Default 0.0f. |
Ref<IArcRHITexture> | Image | Owning reference — a style set outlives the widgets that read it, so a brush must keep its texture alive on its own. |
ArcVec2 | TileSize | Tiled mode only; non-positive components fall back to the texture size. |
Public functions
| Returns | Name | Description |
|---|---|---|
CBrush | RoundedBox | |
CBrush | None | |
CBrush | StretchedImage | |
CBrush | TiledImage | |
CBrush | NineSliceImage | |
CBrush | RoundedImage | |
void | Draw | Paints the brush into rect, honoring DrawMode. |
void | Draw |
Function details
RoundedBox
C++
static CBrush RoundedBox(const CArcStyleColor& color, float radius)None
C++
static CBrush None()StretchedImage
C++
static CBrush StretchedImage(const Ref<IArcRHITexture>& image, const ArcColor& tint = ArcColor::White)TiledImage
C++
static CBrush TiledImage(const Ref<IArcRHITexture>& image, const ArcVec2& tileSize, const ArcColor& tint = ArcColor::White)NineSliceImage
C++
static CBrush NineSliceImage(const Ref<IArcRHITexture>& image, const ArcMargin& borders, const ArcColor& tint = ArcColor::White)RoundedImage
C++
static CBrush RoundedImage(const Ref<IArcRHITexture>& image, float radius, const ArcColor& tint = ArcColor::White)Draw
C++
void Draw(CArcUIRenderer& renderer, const ArcRect& rect, float opacity = 1.0f) constPaints the brush into rect, honoring DrawMode. Image-less brushes degrade to a solid (rounded) rect so every style stays paintable.
Draw
C++
void Draw(CArcUIRenderer& renderer, const ArcRect& rect, const ArcColor& tintOverride, float opacity) constGenerated from Arc/Style/CArcStyle.h via arc.json · Nov 5, 2026Version 1.0.0