Struct SeStringDrawState
Calculated values from Dalamud.Interface.ImGuiSeStringRenderer.SeStringDrawParams using ImGui styles.
Assembly: Dalamud.dll
public ref struct SeStringDrawState : IDisposable
Implements:
System.IDisposable
Properties
DrawList
Gets or sets the target draw list.
public readonly ImDrawListPtr DrawList { get; }
Span
Gets the raw SeString byte span.
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.
public readonly SeStringReplacementEntity.GetEntityDelegate? GetEntity { get; }
ScreenOffset
Gets or sets the screen offset of the left top corner.
public readonly Vector2 ScreenOffset { get; }
Font
Gets or sets the font to use.
public readonly ImFontPtr Font { get; }
FontSize
Gets or sets the font size.
public readonly float FontSize { get; }
FontSizeScale
Gets the multiplier value for glyph metrics, so that it scales to Dalamud.Interface.ImGuiSeStringRenderer.SeStringDrawState.FontSize.
public readonly float FontSizeScale { get; }
LineHeight
Gets or sets the line height ratio.
public readonly float LineHeight { get; }
WrapWidth
Gets or sets the wrapping width.
public readonly float WrapWidth { get; }
LinkUnderlineThickness
Gets or sets the thickness of underline under links.
public readonly float LinkUnderlineThickness { get; }
Opacity
Gets or sets the opacity, commonly called "alpha".
public readonly float Opacity { get; }
EdgeOpacity
Gets or sets the strength of the edge, which will have effects on the edge opacity.
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.
public readonly int ThemeIndex { get; }
Color
Gets or sets the color of the rendered text.
public uint Color { readonly get; set; }
EdgeColor
Gets or sets the color of the rendered text edge.
public uint EdgeColor { readonly get; set; }
ShadowColor
Gets or sets the color of the rendered text shadow.
public uint ShadowColor { readonly get; set; }
LinkHoverBackColor
Gets or sets the background color of a link when hovered.
public readonly uint LinkHoverBackColor { get; }
LinkActiveBackColor
Gets or sets the background color of a link when active.
public readonly uint LinkActiveBackColor { get; }
ForceEdgeColor
Gets or sets a value indicating whether to force the color of the rendered text edge.
public readonly bool ForceEdgeColor { get; }
Bold
Gets or sets a value indicating whether the text is rendered bold.
public bool Bold { readonly get; set; }
Italic
Gets or sets a value indicating whether the text is rendered italic.
public bool Italic { readonly get; set; }
Edge
Gets or sets a value indicating whether the text is rendered with edge.
public bool Edge { readonly get; set; }
Shadow
Gets or sets a value indicating whether the text is rendered with shadow.
public bool Shadow { readonly get; set; }
ShouldDrawEdge
Gets a value indicating whether the edge should be drawn.
public readonly bool ShouldDrawEdge { get; }
ShouldDrawShadow
Gets a value indicating whether the edge should be drawn.
public readonly bool ShouldDrawShadow { get; }
ShouldDrawForeground
Gets a value indicating whether the edge should be drawn.
public readonly bool ShouldDrawForeground { get; }
Methods
Dispose()
public void Dispose()
SetCurrentChannel(SeStringDrawChannel)
Sets the current channel in the ImGui draw list splitter.
public void SetCurrentChannel(SeStringDrawChannel channelIndex)
Parameters
| Type | Name | Description |
|---|---|---|
| Dalamud.Interface.ImGuiSeStringRenderer.SeStringDrawChannel | channelIndex | Channel to switch to. |
Draw(ImTextureID, Vector2, Vector2, Vector2, Vector2, uint)
Draws a single texture.
public readonly void Draw(ImTextureID igTextureId, Vector2 offset, Vector2 size, Vector2 uv0, Vector2 uv1, uint color = 4294967295)
Parameters
| Type | Name | Description |
|---|---|---|
Dalamud.Bindings.ImGui.ImTextureID | igTextureId | ImGui texture ID to draw from. |
System.Numerics.Vector2 | offset | Offset of the glyph in pixels w.r.t. Dalamud.Interface.ImGuiSeStringRenderer.SeStringDrawState.ScreenOffset. |
System.Numerics.Vector2 | size | Right bottom corner of the glyph w.r.t. its glyph origin in the target draw list. |
System.Numerics.Vector2 | uv0 | Left top corner of the glyph w.r.t. its glyph origin in the source texture. |
System.Numerics.Vector2 | uv1 | Right bottom corner of the glyph w.r.t. its glyph origin in the source texture. |
System.UInt32 | color | Color of the glyph in RGBA. |
Draw(ImTextureID, Vector2, Vector2, Vector2, Vector2, Vector2, uint, Vector2)
Draws a single texture.
public readonly void Draw(ImTextureID igTextureId, Vector2 offset, Vector2 xy0, Vector2 xy1, Vector2 uv0, Vector2 uv1, uint color = 4294967295, Vector2 dyItalic = default)
Parameters
| Type | Name | Description |
|---|---|---|
Dalamud.Bindings.ImGui.ImTextureID | igTextureId | ImGui texture ID to draw from. |
System.Numerics.Vector2 | offset | Offset of the glyph in pixels w.r.t. Dalamud.Interface.ImGuiSeStringRenderer.SeStringDrawState.ScreenOffset. |
System.Numerics.Vector2 | xy0 | Left top corner of the glyph w.r.t. its glyph origin in the target draw list. |
System.Numerics.Vector2 | xy1 | Right bottom corner of the glyph w.r.t. its glyph origin in the target draw list. |
System.Numerics.Vector2 | uv0 | Left top corner of the glyph w.r.t. its glyph origin in the source texture. |
System.Numerics.Vector2 | uv1 | Right bottom corner of the glyph w.r.t. its glyph origin in the source texture. |
System.UInt32 | color | Color of the glyph in RGBA. |
System.Numerics.Vector2 | dyItalic | Transformation 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