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