class

AImage

Module
Arc
Header
#include "Arc/Widgets/AImage.h"
Namespace
Arcf

Public functions

ReturnsNameDescription
ARC_WIDGET_ARGS
ArcVec2ComputeDesiredSize
int32_tOnPaint
voidSetImageWithout 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.
voidSetBrush
voidSetColorAndOpacityThe tint is owned, so the write itself drops the retained slice.
ArcColorGetColorAndOpacity
boolCanCacheDesiredSizeOverride, else the source texture's extent.
boolCanRetainPaintA 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 override

OnPaint

C++
int32_t OnPaint(const CArcPaintArgs& args, const CGeometry& geo, CArcUIRenderer& renderer, int32_t layerId) const override

SetImage

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() const

CanCacheDesiredSize

C++
bool CanCacheDesiredSize() const override

Override, 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 override

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. Swapping the widget to a DIFFERENT texture is the case that has to announce itself, and SetImage does.

GetTypeName

C++
const char* GetTypeName() const override
Generated from Arc/Widgets/AImage.h via arc.json · Nov 5, 2026Version 1.0.0