Skip to main content

Struct SeStringDrawState

Calculated values from Dalamud.Interface.ImGuiSeStringRenderer.SeStringDrawParams using ImGui styles.

Assembly: Dalamud.dll
View Source
Declaration
public ref struct SeStringDrawState

Properties

DrawList

Gets or sets the target draw list.

View Source
Declaration
public readonly ImDrawListPtr DrawList { get; }

Span

Gets the raw SeString byte span.

View Source
Declaration
public readonly ReadOnlySpan<byte> Span { get; }

GetEntity

Gets or sets the function to be called on every codepoint and payload for the purpose of offering chances to draw something else instead of glyphs or SeString payload entities.

View Source
Declaration
public readonly SeStringReplacementEntity.GetEntityDelegate? GetEntity { get; }

ScreenOffset

Gets or sets the screen offset of the left top corner.

View Source
Declaration
public readonly Vector2 ScreenOffset { get; }

Font

Gets or sets the font to use.

View Source
Declaration
public readonly ImFont* Font { get; }

FontSize

Gets or sets the font size.

View Source
Declaration
public readonly float FontSize { get; }

FontSizeScale

Gets the multiplier value for glyph metrics, so that it scales to Dalamud.Interface.ImGuiSeStringRenderer.SeStringDrawState.FontSize.

View Source
Declaration
public readonly float FontSizeScale { get; }

LineHeight

Gets or sets the line height ratio.

View Source
Declaration
public readonly float LineHeight { get; }

WrapWidth

Gets or sets the wrapping width.

View Source
Declaration
public readonly float WrapWidth { get; }

LinkUnderlineThickness

Gets or sets the thickness of underline under links.

View Source
Declaration
public readonly float LinkUnderlineThickness { get; }

Opacity

Gets or sets the opacity, commonly called "alpha".

View Source
Declaration
public readonly float Opacity { get; }

EdgeOpacity

Gets or sets the strength of the edge, which will have effects on the edge opacity.

View Source
Declaration
public readonly float EdgeOpacity { get; }

ThemeIndex

Gets or sets the theme that will decide the colors to use for Lumina.Text.Payloads.MacroCode.ColorType and Lumina.Text.Payloads.MacroCode.EdgeColorType.

View Source
Declaration
public readonly int ThemeIndex { get; }

Color

Gets or sets the color of the rendered text.

View Source
Declaration
public uint Color { readonly get; set; }

EdgeColor

Gets or sets the color of the rendered text edge.

View Source
Declaration
public uint EdgeColor { readonly get; set; }

ShadowColor

Gets or sets the color of the rendered text shadow.

View Source
Declaration
public uint ShadowColor { readonly get; set; }

LinkHoverBackColor

Gets or sets the background color of a link when hovered.

View Source
Declaration
public readonly uint LinkHoverBackColor { get; }

LinkActiveBackColor

Gets or sets the background color of a link when active.

View Source
Declaration
public readonly uint LinkActiveBackColor { get; }

ForceEdgeColor

Gets or sets a value indicating whether to force the color of the rendered text edge.

View Source
Declaration
public readonly bool ForceEdgeColor { get; }

Bold

Gets or sets a value indicating whether the text is rendered bold.

View Source
Declaration
public bool Bold { readonly get; set; }

Italic

Gets or sets a value indicating whether the text is rendered italic.

View Source
Declaration
public bool Italic { readonly get; set; }

Edge

Gets or sets a value indicating whether the text is rendered with edge.

View Source
Declaration
public bool Edge { readonly get; set; }

Shadow

Gets or sets a value indicating whether the text is rendered with shadow.

View Source
Declaration
public bool Shadow { readonly get; set; }

ShouldDrawEdge

Gets a value indicating whether the edge should be drawn.

View Source
Declaration
public readonly bool ShouldDrawEdge { get; }

ShouldDrawShadow

Gets a value indicating whether the edge should be drawn.

View Source
Declaration
public readonly bool ShouldDrawShadow { get; }

ShouldDrawForeground

Gets a value indicating whether the edge should be drawn.

View Source
Declaration
public readonly bool ShouldDrawForeground { get; }

Methods

SetCurrentChannel(SeStringDrawChannel)

Sets the current channel in the ImGui draw list splitter.

View Source
Declaration
public readonly void SetCurrentChannel(SeStringDrawChannel channelIndex)
Parameters
TypeNameDescription
Dalamud.Interface.ImGuiSeStringRenderer.SeStringDrawChannelchannelIndexChannel to switch to.

Draw(nint, Vector2, Vector2, Vector2, Vector2, uint)

Draws a single texture.

View Source
Declaration
public readonly void Draw(nint igTextureId, Vector2 offset, Vector2 size, Vector2 uv0, Vector2 uv1, uint color = 4294967295)
Parameters
TypeNameDescription
System.IntPtrigTextureIdImGui texture ID to draw from.
System.Numerics.Vector2offsetOffset of the glyph in pixels w.r.t. Dalamud.Interface.ImGuiSeStringRenderer.SeStringDrawState.ScreenOffset.
System.Numerics.Vector2sizeRight bottom corner of the glyph w.r.t. its glyph origin in the target draw list.
System.Numerics.Vector2uv0Left top corner of the glyph w.r.t. its glyph origin in the source texture.
System.Numerics.Vector2uv1Right bottom corner of the glyph w.r.t. its glyph origin in the source texture.
System.UInt32colorColor of the glyph in RGBA.

Draw(nint, Vector2, Vector2, Vector2, Vector2, Vector2, uint, Vector2)

Draws a single texture.

View Source
Declaration
public readonly void Draw(nint igTextureId, Vector2 offset, Vector2 xy0, Vector2 xy1, Vector2 uv0, Vector2 uv1, uint color = 4294967295, Vector2 dyItalic = default)
Parameters
TypeNameDescription
System.IntPtrigTextureIdImGui texture ID to draw from.
System.Numerics.Vector2offsetOffset of the glyph in pixels w.r.t. Dalamud.Interface.ImGuiSeStringRenderer.SeStringDrawState.ScreenOffset.
System.Numerics.Vector2xy0Left top corner of the glyph w.r.t. its glyph origin in the target draw list.
System.Numerics.Vector2xy1Right bottom corner of the glyph w.r.t. its glyph origin in the target draw list.
System.Numerics.Vector2uv0Left top corner of the glyph w.r.t. its glyph origin in the source texture.
System.Numerics.Vector2uv1Right bottom corner of the glyph w.r.t. its glyph origin in the source texture.
System.UInt32colorColor of the glyph in RGBA.
System.Numerics.Vector2dyItalicTransformation for <code class="paramref">xy0</code> and <code class="paramref">xy1</code> that will push
    top and bottom pixels to apply faux italicization by `System.Numerics.Vector2.X` and `System.Numerics.Vector2.Y`
respectively. |