LuciadCPillar C# 2023.1.04
Luciad.Drawing.ImageIcon Class Reference

Helper class for loading JPEG or PNG files. More...

Classes

class  Builder
 Builder which takes images as input to create an IIcon. More...
 

Static Public Member Functions

static Luciad.Drawing.IIcon Create (string filePath)
 Create an IIcon from a PNG or JPEG file. More...
 
static Luciad.Drawing.ImageIcon.Builder NewBuilder ()
 Creates a Builder which allows to construct an IIcon based on 1 or more images. More...
 
static Luciad.Drawing.IIcon ToIcon (Luciad.Drawing.Image image)
 Converts an Image to an Icon. More...
 

Detailed Description

Helper class for loading JPEG or PNG files.

2020.2

Warning
C# documentation translation is incomplete. You can find more information in the C++ documentation for luciad::ImageIcon.

Member Function Documentation

◆ Create()

Luciad.Drawing.IIcon Luciad.Drawing.ImageIcon.Create ( string  filePath)
inlinestatic

Create an IIcon from a PNG or JPEG file.

Will throw a RuntimeError if the file does not contain any valid data or if the file format could not be recognized. It accepts icon files with following naming convention.

The base icon at display scale 1 is named <name>.<ext> where <ext> is PNG or JPEG. The icon at display scale f is named <name>&lt;f>x.<ext>. f is typically a value like 2 or 4. See the article on high DPI for additional information.

filePath

a file path

an IIcon from a PNG or JPEG file

luciad::RuntimeException

if the file does not contain any valid data or if the file format could not be recognized.

Warning
C# documentation translation is incomplete. You can find more information in the C++ documentation for luciad::ImageIcon::create.

◆ NewBuilder()

Luciad.Drawing.ImageIcon.Builder Luciad.Drawing.ImageIcon.NewBuilder ( )
inlinestatic

Creates a Builder which allows to construct an IIcon based on 1 or more images.

the builder.

2023.1

Warning
C# documentation translation is incomplete. You can find more information in the C++ documentation for luciad::ImageIcon::newBuilder.

◆ ToIcon()

Luciad.Drawing.IIcon Luciad.Drawing.ImageIcon.ToIcon ( Luciad.Drawing.Image  image)
inlinestatic

Converts an Image to an Icon.

The used display scale is 1. The anchor point of the icon is at the center of the image. the IIcon.

luciad::NullArgumentException

when passing a nullptr value.

2023.1

Warning
C# documentation translation is incomplete. You can find more information in the C++ documentation for luciad::ImageIcon::toIcon.