Class ImageElement

GoDiagram®
v10.0.11
by Northwoods Software®

Provides some kind of visual image for a Picture, with a reference to a SkiaSharp image for drawing.

Inheritance
ImageElement
Namespace: Northwoods.Go
Assembly: Northwoods.GoDiagram.Avalonia.dll
Syntax
public class ImageElement
Remarks

When specifying a Source, valid strings are:

  • an Avalonia resource image
  • an accessible image file
  • a web image URL
  • a base64 image string

Constructors

ImageElement(string, Bitmap)

Contructs an element to be displayed by a Picture.

Declaration
public ImageElement(string uri, Bitmap img)
Parameters
Type Name Description
string uri

the source attibute, which serves as an identifier

Bitmap img

the Bitmap to be displayed

Remarks

This class should only be constructed when setting Element directly.

Properties

Height

Gets the height of the element.

Declaration
public double Height { get; }
Property Value
Type Description
double

Image

Gets the SKImage displayed by this ImageElement.

Declaration
public SKImage Image { get; }
Property Value
Type Description
SKImage

IsComplete

Gets whether this element has completed loading, successfully or not.

Declaration
public bool IsComplete { get; }
Property Value
Type Description
bool

IsLoaded

Gets whether this element loaded successfully.

Declaration
public bool IsLoaded { get; }
Property Value
Type Description
bool

PlatformImage

Gets the Avalonia Bitmap displayed by this ImageElement.

Declaration
public Bitmap PlatformImage { get; }
Property Value
Type Description
Bitmap

Src

Gets the URI pointing to the image.

Declaration
public string Src { get; }
Property Value
Type Description
string

Svg

Gets the SKSvg displayed by this ImageElement.

Declaration
public SKSvg Svg { get; }
Property Value
Type Description
SKSvg
Remarks

This property is only set if the image source was an SVG file.

Width

Gets the width of the element.

Declaration
public double Width { get; }
Property Value
Type Description
double