Skip to main content

Struct SeStringDrawState

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

Assembly: Dalamud.dll
Declaration
public ref struct SeStringDrawState : IDisposable

Implements:
System.IDisposable

Properties

DrawList

Gets or sets the target draw list.

Declaration
public readonly ImDrawListPtr DrawList { get; }

Span

Gets the raw SeString byte span.

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.

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

ScreenOffset

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

Declaration
public readonly Vector2 ScreenOffset { get; }

Font

Gets or sets the font to use.

Declaration
public readonly ImFontPtr Font { get; }

FontSize

Gets or sets the font size.

Declaration
public readonly float FontSize { get; }

FontSizeScale

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

Declaration
public readonly float FontSizeScale { get; }

LineHeight

Gets or sets the line height ratio.

Declaration
public readonly float LineHeight { get; }

WrapWidth

Gets or sets the wrapping width.

Declaration
public readonly float WrapWidth { get; }

LinkUnderlineThickness

Gets or sets the thickness of underline under links.

Declaration
public readonly float LinkUnderlineThickness { get; }

Opacity

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

Declaration
public readonly float Opacity { get; }

EdgeOpacity

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

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.

Declaration
public readonly int ThemeIndex { get; }

Color

Gets or sets the color of the rendered text.

Declaration
public uint Color { readonly get; set; }

EdgeColor

Gets or sets the color of the rendered text edge.

Declaration
public uint EdgeColor { readonly get; set; }

ShadowColor

Gets or sets the color of the rendered text shadow.

Declaration
public uint ShadowColor { readonly get; set; }

LinkHoverBackColor

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

Declaration
public readonly uint LinkHoverBackColor { get; }

LinkActiveBackColor

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

Declaration
public readonly uint LinkActiveBackColor { get; }

ForceEdgeColor

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

Declaration
public readonly bool ForceEdgeColor { get; }

Bold

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

Declaration
public bool Bold { readonly get; set; }

Italic

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

Declaration
public bool Italic { readonly get; set; }

Edge

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

Declaration
public bool Edge { readonly get; set; }

Shadow

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

Declaration
public bool Shadow { readonly get; set; }

ShouldDrawEdge

Gets a value indicating whether the edge should be drawn.

Declaration
public readonly bool ShouldDrawEdge { get; }

ShouldDrawShadow

Gets a value indicating whether the edge should be drawn.

Declaration
public readonly bool ShouldDrawShadow { get; }

ShouldDrawForeground

Gets a value indicating whether the edge should be drawn.

Declaration
public readonly bool ShouldDrawForeground { get; }

Methods

Dispose()

Declaration
public void Dispose()

SetCurrentChannel(SeStringDrawChannel)

Sets the current channel in the ImGui draw list splitter.

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

Draw(ImTextureID, Vector2, Vector2, Vector2, Vector2, uint)

Draws a single texture.

Declaration
public readonly void Draw(ImTextureID igTextureId, Vector2 offset, Vector2 size, Vector2 uv0, Vector2 uv1, uint color = 4294967295)
Parameters
TypeNameDescription
Dalamud.Bindings.ImGui.ImTextureIDigTextureIdImGui 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(ImTextureID, Vector2, Vector2, Vector2, Vector2, Vector2, uint, Vector2)

Draws a single texture.

Declaration
public readonly void Draw(ImTextureID igTextureId, Vector2 offset, Vector2 xy0, Vector2 xy1, Vector2 uv0, Vector2 uv1, uint color = 4294967295, Vector2 dyItalic = default)
Parameters
TypeNameDescription
Dalamud.Bindings.ImGui.ImTextureIDigTextureIdImGui 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. |

Implements

  • System.IDisposable