60 uint32_t fromStyleIndex, uint32_t toStyleIndex,
float blendT,
104 virtual void RenderGlyph(
tachyon::float2 pos,
tachyon::float2 size,
tachyon::float2 uvMin,
tachyon::float2 uvMax,
float scale,
int bpp,
int mode,
VisualColorStyleIndex textColorIndex,
tachyon::IntRect clipRect,
tachyon::ImageIndex textureIndex =
tachyon::ImageIndex::Invalid,
float shadowBlur = -1.0f) = 0;
Definition gui_renderer.h:43
virtual void StopResizing()=0
void RenderLine(tachyon::int2 p0, tachyon::int2 p1, tachyon::IntRect clipRect, const LineStyle &lineStyle)
Definition gui_renderer.h:77
void RenderBox(tachyon::IntRect rect, tachyon::IntRect clipRect, VisualBoxStyleIndex boxStyleIndex, tachyon::ElementState state, tachyon::VisualColorStyleIndex colorStyleIndex={}, tachyon::ImageIndex textureIndex=tachyon::ImageIndex::Invalid, tachyon::IntRect snappedPx={})
virtual void InvalidateScopeCapture(ID)
Drops the capture of scopeId.
Definition gui_renderer.h:135
virtual bool BeginWindow(ID id)=0
virtual void RenderGlyph(tachyon::float2 pos, tachyon::float2 size, tachyon::float2 uvMin, tachyon::float2 uvMax, float scale, int bpp, int mode, VisualColorStyleIndex textColorIndex, tachyon::IntRect clipRect, tachyon::ImageIndex textureIndex=tachyon::ImageIndex::Invalid, float shadowBlur=-1.0f)=0
A glyph from the text atlas.
virtual void RenderDot(tachyon::float2 pos, tachyon::IntRect clipRect, float size, tachyon::color4f color)=0
virtual void SetOpacity(float)
How opaque what is drawn from now on is, 0 to 1 (1 until set).
Definition gui_renderer.h:53
virtual void RenderLine(tachyon::int2 p0, tachyon::int2 p1, tachyon::int2 p2, tachyon::int2 p3, tachyon::IntRect clipRect, const LineStyle &lineStyle)=0
virtual void EndScopeCapture(ID)
Ends the capture of scopeId and draws it into the current window.
Definition gui_renderer.h:129
void RenderFilledPolygon(std::span< const tachyon::float2 > points, tachyon::IntRect clipRect, VisualColorStyleIndex colorIndex, tachyon::ImageIndex textureIndex=tachyon::ImageIndex::Invalid)
Convex polygon, fan-triangulated from points[0]; needs at least 3 points.
virtual void BeginScopeCapture(ID)
Starts recording primitives under scopeId, replacing its previous capture.
Definition gui_renderer.h:127
virtual bool HasScopeCapture(ID) const
True when scopeId has a non-empty capture.
Definition gui_renderer.h:133
virtual void SetTransform(tachyon::float3x2 transformation)=0
virtual ~GUIRenderer()
Definition gui_renderer.h:45
virtual void RenderShadow(tachyon::IntRect rect, tachyon::IntRect clipRect, tachyon::VisualColorStyleIndex colorStyleIndex, float cornerRadius, int blur)=0
A box shadow: rect is the shadow's shape, which fades out over blur pixels on either side of its edge...
virtual void EndWindow()=0
static uint32_t StyleIndex(VisualBoxStyleIndex boxStyleIndex, tachyon::ElementState state)
The flat GPU style index of boxStyleIndex in state, as RenderBox takes it.
virtual void RenderBox(tachyon::IntRect rect, tachyon::IntRect clipRect, uint32_t fromStyleIndex, uint32_t toStyleIndex, float blendT, tachyon::VisualColorStyleIndex colorStyleIndex={}, tachyon::ImageIndex textureIndex=tachyon::ImageIndex::Invalid, tachyon::IntRect snappedPx={})=0
Draws a styled box, blended from fromStyleIndex to toStyleIndex (flat GPU style indices) by blendT in...
virtual void RenderCircle(tachyon::float2 center, float radius, tachyon::IntRect clipRect, const LineStyle &lineStyle)=0
A circle outline lineStyle.lineWidth wide, exactly round.
virtual void RenderQuad(tachyon::IntRect rect, tachyon::IntRect clipRect, tachyon::VisualColorStyleIndex colorStyleIndex, float cornerRadius=0.0f, tachyon::ImageIndex textureIndex=tachyon::ImageIndex::Invalid)=0
Draws a filled, optionally rounded and textured rect: a box without borders, style blending or elemen...
virtual void RenderOccluder(tachyon::IntRect, tachyon::IntRect)
Draws nothing: marks rect as covered by opaque content drawn after this call, so what was drawn befor...
Definition gui_renderer.h:98
virtual bool StartResizing(ID id)=0
virtual void ClearScopeCaptures()
Drops every capture.
Definition gui_renderer.h:137
void RenderBox(tachyon::IntRect rect, tachyon::IntRect clipRect, VisualBoxStyleIndex boxStyleIndex, tachyon::VisualColorStyleIndex colorStyleIndex={}, tachyon::ImageIndex textureIndex=tachyon::ImageIndex::Invalid, tachyon::IntRect snappedPx={})
void RenderPolyline(std::span< const tachyon::int2 > points, bool closed, tachyon::IntRect clipRect, const LineStyle &style)
Outlined polyline; closed adds a segment from the last point back to the first.
virtual void RenderTriangle(tachyon::float2 p0, tachyon::float2 p1, tachyon::float2 p2, tachyon::IntRect clipRect, tachyon::VisualColorStyleIndex colorStyleIndex, tachyon::ImageIndex textureIndex=tachyon::ImageIndex::Invalid, TriangleEdges hardEdges=TriangleEdges::None)=0
A filled triangle.
virtual bool ReplayScopeCapture(ID, tachyon::int2)
Draws the capture of scopeId again, moved by delta pixels; false if there is none.
Definition gui_renderer.h:131
@ None
Definition gui_element_flags.h:19
TriangleEdges
A triangle's edges, for the ones drawn without a soft edge: where it meets another triangle of the sa...
Definition gui_renderer.h:23
ImageIndex
Index of an image in the graphics context's image set, as the shaders sample it.
Definition gui_image.h:37
@ Edge01
p0 to p1
Definition gui_renderer.h:25
@ Edge20
p2 to p0
Definition gui_renderer.h:27
@ None
Definition gui_renderer.h:24
@ Edge12
p1 to p2
Definition gui_renderer.h:26
@ Invalid
Definition gui_image.h:37
VisualColorStyleIndex
Index into StyleManager's color style pool; Invalid (0) draws nothing (transparent).
Definition gui_style.h:33
VisualBoxStyleIndex
Index into StyleManager's visual box style pool; Invalid (0) = none.
Definition gui_style_ref.h:17
ElementState
Interaction state bits of an element; they pick the Style::states variant it draws with.
Definition gui_style.h:42
#define TACHYON_ENUM_OPERATORS(EnumType)
Definition gui_enum_operators.h:6
Definition gui_logging.h:24
A 64-bit element ID whose bit layout depends on its IDMode.
Definition gui_id.h:23
Definition gui_base_types.h:407
Definition gui_renderer.h:32
float gradientScale
fraction of gradient to cover
Definition gui_renderer.h:39
float dashOffset
Definition gui_renderer.h:37
float gradientOffset
start of gradient range [0,1]
Definition gui_renderer.h:38
float dashSize
Definition gui_renderer.h:36
float lineWidth
Definition gui_renderer.h:35
VisualColorStyleIndex colorStyleIndex
Defaults to VisualColorStyleIndex::Invalid.
Definition gui_renderer.h:34
Definition gui_base_types.h:395
Definition gui_base_types.h:121
2D affine transform matrix (2 rows x 3 columns): x' = r0.x*x + r0.y*y + r0.z y' = r1....
Definition gui_base_types.h:219
Integer 2D vector.
Definition gui_base_types.h:19