Skip to main content
Version: 14.x (API 14) [Legacy]

Interface IDrawListTextureWrap

A texture wrap that can be drawn using ImGui draw data.

Assembly: Dalamud.dll
Declaration
public interface IDrawListTextureWrap : IDalamudTextureWrap, IDisposable

Properties

Width

Gets or sets the width of the texture.

Declaration
int Width { get; set; }
Remarks

If Dalamud.Interface.Textures.TextureWraps.IDrawListTextureWrap.Height is to be set together, set use Dalamud.Interface.Textures.TextureWraps.IDrawListTextureWrap.Size instead.

Height

Gets or sets the width of the texture.

Declaration
int Height { get; set; }
Remarks

If Dalamud.Interface.Textures.TextureWraps.IDrawListTextureWrap.Width is to be set together, set use Dalamud.Interface.Textures.TextureWraps.IDrawListTextureWrap.Size instead.

Size

Gets or sets the size of the texture.

Declaration
Vector2 Size { get; set; }
Remarks

Components will be rounded up.

ClearColor

Gets or sets the color to use when clearing this texture.

Declaration
Vector4 ClearColor { get; set; }

Methods

Draw(ImDrawListPtr, Vector2, Vector2)

Draws a draw list to this texture.

Declaration
void Draw(ImDrawListPtr drawListPtr, Vector2 displayPos, Vector2 scale)
Parameters
TypeNameDescription
Dalamud.Bindings.ImGui.ImDrawListPtrdrawListPtrDraw list to draw from.
System.Numerics.Vector2displayPosLeft-top coordinates of the draw commands in the draw list.
System.Numerics.Vector2scaleScale to apply to all draw commands in the draw list.
Remarks

This function can be called only from the main thread.

Draw(scoped in ImDrawData)

Draws from a draw data to this texture.

Declaration
void Draw(scoped in ImDrawData drawData)
Parameters
TypeNameDescription
Dalamud.Bindings.ImGui.ImDrawDatadrawDataDraw data to draw.
Remarks

<ul> <li>Texture size will be kept as specified in Dalamud.Interface.Textures.TextureWraps.IDrawListTextureWrap.Size. Dalamud.Bindings.ImGui.ImDrawData.DisplaySize will be used only as shader parameters.</li> <li>This function can be called only from the main thread.</li> </ul>

Draw(ImDrawDataPtr)

Draws from a draw data to this texture.

Declaration
void Draw(ImDrawDataPtr drawData)
Parameters
TypeNameDescription
Dalamud.Bindings.ImGui.ImDrawDataPtrdrawDataDraw data to draw.
Remarks

<ul> <li>Texture size will be kept as specified in Dalamud.Interface.Textures.TextureWraps.IDrawListTextureWrap.Size. Dalamud.Bindings.ImGui.ImDrawData.DisplaySize will be used only as shader parameters.</li> <li>This function can be called only from the main thread.</li> </ul>

ResizeAndDrawWindow(ReadOnlySpan<char>, Vector2)

Resizes this texture and draws an ImGui window.

Declaration
void ResizeAndDrawWindow(ReadOnlySpan<char> windowName, Vector2 scale)
Parameters
TypeNameDescription
System.ReadOnlySpan<System.Char>windowNameName and ID of the window to draw. Use the value that goes into
        `Dalamud.Bindings.ImGui.ImGui.Begin(Dalamud.Bindings.ImGui.ImU8String,Dalamud.Bindings.ImGui.ImGuiWindowFlags)`. |

| System.Numerics.Vector2 | scale | Scale to apply to all draw commands in the draw list. |