SixelExtensions
Namespace: Hex1b
Assembly: Hex1b.dll
Extension methods for creating SixelWidget.
csharp
[Experimental("HEX1B_SIXEL", UrlFormat = "https://github.com/hex1b/hex1b/blob/main/docs/experimental/sixel.md")]
public static class SixelExtensionsInheritance
Object → SixelExtensions
Methods
Sixel<TParent>(WidgetContext<TParent>, string, Func<WidgetContext<SixelWidget>, Hex1bWidget>, int?, int?)
Creates a SixelWidget with image data and a fallback widget builder.
Parameters:
ctx(WidgetContext<<TParent>>): The widget context.imageData(String): The Sixel-encoded image data.fallbackBuilder(Func<SixelWidget>, Hex1bWidget>): Builder for the fallback widget.width(Nullable<Int32>): Optional width in character cells.height(Nullable<Int32>): Optional height in character cells.
Returns: SixelWidget
csharp
public static SixelWidget Sixel<TParent>(this WidgetContext<TParent> ctx, string imageData, Func<WidgetContext<SixelWidget>, Hex1bWidget> fallbackBuilder, int? width = null, int? height = null) where TParent : Hex1bWidgetSixel<TParent>(WidgetContext<TParent>, string, Func<WidgetContext<VStackWidget>, Hex1bWidget[]>, int?, int?)
Creates a SixelWidget with image data and a VStack fallback.
Parameters:
ctx(WidgetContext<<TParent>>): The widget context.imageData(String): The Sixel-encoded image data.fallbackBuilder(Func<VStackWidget>, Hex1bWidget[]>): Builder for the fallback widgets (wrapped in VStack).width(Nullable<Int32>): Optional width in character cells.height(Nullable<Int32>): Optional height in character cells.
Returns: SixelWidget
csharp
public static SixelWidget Sixel<TParent>(this WidgetContext<TParent> ctx, string imageData, Func<WidgetContext<VStackWidget>, Hex1bWidget[]> fallbackBuilder, int? width = null, int? height = null) where TParent : Hex1bWidgetSixel<TParent>(WidgetContext<TParent>, string, Hex1bWidget, int?, int?)
Creates a SixelWidget with the specified image data and fallback widget.
Parameters:
ctx(WidgetContext<<TParent>>): The widget context.imageData(String): The Sixel-encoded image data.fallback(Hex1bWidget): A widget to display if Sixel is not supported.width(Nullable<Int32>): Optional width in character cells.height(Nullable<Int32>): Optional height in character cells.
Returns: SixelWidget
csharp
public static SixelWidget Sixel<TParent>(this WidgetContext<TParent> ctx, string imageData, Hex1bWidget fallback, int? width = null, int? height = null) where TParent : Hex1bWidgetSixel<TParent>(WidgetContext<TParent>, string, string, int?, int?)
Creates a SixelWidget with the specified image data and a text fallback.
Parameters:
ctx(WidgetContext<<TParent>>): The widget context.imageData(String): The Sixel-encoded image data.fallbackText(String): Text to display if Sixel is not supported.width(Nullable<Int32>): Optional width in character cells.height(Nullable<Int32>): Optional height in character cells.
Returns: SixelWidget
csharp
public static SixelWidget Sixel<TParent>(this WidgetContext<TParent> ctx, string imageData, string fallbackText, int? width = null, int? height = null) where TParent : Hex1bWidget