class
AImage
- Module
- Arc
- Header
#include "Arc/Widgets/AImage.h"- Namespace
Arcf
Public functions
| Returns | Name | Description |
|---|---|---|
ARC_WIDGET_ARGS | ||
ArcVec2 | ComputeDesiredSize | |
int32_t | OnPaint | |
void | SetImage | Without an explicit override the desired size IS the texture's extent, so swapping the texture resizes the widget — the assignment has to announce itself or the cache keeps the old icon's box. |
void | SetBrush | |
void | SetColorAndOpacity | The tint is owned, so the write itself drops the retained slice. |
ArcColor | GetColorAndOpacity | |
bool | CanCacheDesiredSize | Override, else the source texture's extent. |
bool | CanRetainPaint | A live texture is NOT a disqualifier: the slice stores the texture pointer in its draw command, so a thumbnail re-rendered into the same image replays with the new pixels. |
const char* | GetTypeName |
Function details
ARC_WIDGET_ARGS
C++
ARC_WIDGET_ARGS(AImage) ARC_ARG(IArcRHITexture*, Image) ARC_ATTR(ArcColor, ColorAndOpacity) ARC_ATTR(ArcVec2, DesiredSizeOverride) ARC_ARG(EImageSizing, Sizing) ARC_ARG(CBrush, Brush) ARC_WIDGET_ARGS_END() void Construct(const CArguments& args)ComputeDesiredSize
C++
ArcVec2 ComputeDesiredSize(float scale) const overrideOnPaint
C++
int32_t OnPaint(const CArcPaintArgs& args, const CGeometry& geo, CArcUIRenderer& renderer, int32_t layerId) const overrideSetImage
C++
void SetImage(IArcRHITexture* image)Without an explicit override the desired size IS the texture's extent, so swapping the texture resizes the widget — the assignment has to announce itself or the cache keeps the old icon's box.
SetBrush
C++
void SetBrush(const CBrush& brush)SetColorAndOpacity
C++
void SetColorAndOpacity(const ArcColor& tint)The tint is owned, so the write itself drops the retained slice.
GetColorAndOpacity
C++
ArcColor GetColorAndOpacity() constCanCacheDesiredSize
C++
bool CanCacheDesiredSize() const overrideOverride, else the source texture's extent. A texture resized in place behind the widget's back is the one case this misses; hand the widget the new texture through SetImage instead.
CanRetainPaint
C++
bool CanRetainPaint() const overrideA live texture is NOT a disqualifier: the slice stores the texture pointer in its draw command, so a thumbnail re-rendered into the same image replays with the new pixels. Swapping the widget to a DIFFERENT texture is the case that has to announce itself, and SetImage does.
GetTypeName
C++
const char* GetTypeName() const overrideGenerated from Arc/Widgets/AImage.h via arc.json · Nov 5, 2026Version 1.0.0