C# Класс Eto.Drawing.Icon

Наследование: Image
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
FindByScale IconFrame
FindBySize IconFrame
GetResources IEnumerable

Открытые методы

Метод Описание
FromResource ( string resourceName, Assembly assembly = null ) : Icon

Loads an icon from an embedded resource of the specified assembly

FromResource ( string resourceName, Type type ) : Icon

Loads an icon from a resource in the same assembly as the specified type

GetFrame ( float scale, Eto.Drawing.Size fittingSize = null ) : IconFrame

Gets the frame with the specified scale that can fit into the fittingSize if specified.

This can be used to determine which frame should be used to draw to the screen, based on the desired logical pixel scale and final drawn size of the icon.

Icon ( ) : System

Initializes a new instance of the Eto.Drawing.Icon class with the specified frames.

This is used when you want to create an icon with specific bitmap frames at different scales or sizes.

Icon ( IEnumerable frames ) : System

Initializes a new instance of the Eto.Drawing.Icon class with the specified frames.

This is used when you want to create an icon with specific bitmap frames at different scales or sizes.

Icon ( IHandler handler ) : System

Initializes a new instance of the Icon class with the specified handler

Icon ( Stream stream ) : System

Initializes a new instance of the Icon class with the contents of the specified stream

Icon ( float scale, Bitmap bitmap ) : System

Initializes a new instance of the Eto.Drawing.Icon class with the specified bitmap.

This is used when you want to create an icon with a single bitmap frame with the specified logical scale.

Icon ( string fileName ) : System

Intitializes a new instanc of the Icon class with the contents of the specified fileName

Приватные методы

Метод Описание
FindByScale ( float scale ) : IconFrame

find based on scale alone, we don't know the final render size

FindBySize ( float scale, Eto.Drawing.Size fittingSize ) : IconFrame

Find based on the fitting pixel size

GetResources ( string resourceName, Assembly assembly ) : IEnumerable

Описание методов

FromResource() публичный статический Метод

Loads an icon from an embedded resource of the specified assembly
public static FromResource ( string resourceName, Assembly assembly = null ) : Icon
resourceName string Fully qualified name of the resource to load
assembly System.Reflection.Assembly Assembly to load the resource from
Результат Icon

FromResource() публичный статический Метод

Loads an icon from a resource in the same assembly as the specified type
public static FromResource ( string resourceName, Type type ) : Icon
resourceName string Full name of the resource in the type's assembly.
type System.Type Type of the assembly to get the resource.
Результат Icon

GetFrame() публичный Метод

Gets the frame with the specified scale that can fit into the fittingSize if specified.
This can be used to determine which frame should be used to draw to the screen, based on the desired logical pixel scale and final drawn size of the icon.
public GetFrame ( float scale, Eto.Drawing.Size fittingSize = null ) : IconFrame
scale float Logical scale to find for, 1 for normal size, 2 for retina, etc.
fittingSize Eto.Drawing.Size Fitting size that the icon will be drawn to, if known.
Результат IconFrame

Icon() публичный Метод

Initializes a new instance of the Eto.Drawing.Icon class with the specified frames.
This is used when you want to create an icon with specific bitmap frames at different scales or sizes.
public Icon ( ) : System
Результат System

Icon() публичный Метод

Initializes a new instance of the Eto.Drawing.Icon class with the specified frames.
This is used when you want to create an icon with specific bitmap frames at different scales or sizes.
public Icon ( IEnumerable frames ) : System
frames IEnumerable Frames for the icon.
Результат System

Icon() публичный Метод

Initializes a new instance of the Icon class with the specified handler
public Icon ( IHandler handler ) : System
handler IHandler Handler for the icon backend
Результат System

Icon() публичный Метод

Initializes a new instance of the Icon class with the contents of the specified stream
public Icon ( Stream stream ) : System
stream Stream Stream to load the content from
Результат System

Icon() публичный Метод

Initializes a new instance of the Eto.Drawing.Icon class with the specified bitmap.
This is used when you want to create an icon with a single bitmap frame with the specified logical scale.
public Icon ( float scale, Bitmap bitmap ) : System
scale float Logical pixel scale of the specified bitmap.
bitmap Bitmap Bitmap for the frame.
Результат System

Icon() публичный Метод

Intitializes a new instanc of the Icon class with the contents of the specified fileName
public Icon ( string fileName ) : System
fileName string Name of the file to loat the content from
Результат System