C# Класс Xwt.Backends.ImageBackendHandler

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

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

Метод Описание
ConvertToBitmap ( object handle, double width, double height, double scaleFactor, ImageFormat format ) : object

Converts an image to a bitmap of the specified size

CopyBitmap ( object handle ) : object
CopyBitmapArea ( object srcHandle, int srcX, int srcY, int width, int height, object destHandle, int destX, int destY ) : void
CreateBackend ( ) : object
CreateCustomDrawn ( ImageDrawCallback drawCallback ) : object

Creates an image that is custom drawn

CreateMultiResolutionImage ( IEnumerable images ) : object

Creates an image with multiple representations in different sizes

The first image of the list if the reference image, the one with scale factor = 1

CreateMultiSizeIcon ( IEnumerable images ) : object
CropBitmap ( object handle, int srcX, int srcY, int width, int height ) : object
GetBitmapPixel ( object handle, int x, int y ) : Color
GetSize ( object handle ) : Size

Gets the size of an image

This method should return a size of (0,0) if the image doesn't have an intrinsic size. For example: if the image is a vecor image, or if is an icon composed of images of different sizes.

GetStockIcon ( string id ) : Image
HasMultipleSizes ( object handle ) : bool

Returns True if the image has multiple representations of different sizes.

For example, it would return True for a .ico file which as several representations of the image in different sizes

IsBitmap ( object handle ) : bool

Determines whether this instance is a bitmap

LoadFromFile ( string file ) : object
LoadFromResource ( Assembly asm, string name ) : object
LoadFromStream ( Stream stream ) : object
SaveToStream ( object backend, System stream, ImageFileType fileType ) : void
SetBitmapPixel ( object handle, int x, int y, Color color ) : void

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

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

Converts an image to a bitmap of the specified size
public abstract ConvertToBitmap ( object handle, double width, double height, double scaleFactor, ImageFormat format ) : object
handle object Image handle.
width double Width.
height double Height.
scaleFactor double
format ImageFormat
Результат object

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

public abstract CopyBitmap ( object handle ) : object
handle object
Результат object

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

public abstract CopyBitmapArea ( object srcHandle, int srcX, int srcY, int width, int height, object destHandle, int destX, int destY ) : void
srcHandle object
srcX int
srcY int
width int
height int
destHandle object
destX int
destY int
Результат void

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

public CreateBackend ( ) : object
Результат object

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

Creates an image that is custom drawn
public CreateCustomDrawn ( ImageDrawCallback drawCallback ) : object
drawCallback ImageDrawCallback The callback to be used to draw the image. The arguments are: the context backend, the bounds where to draw
Результат object

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

Creates an image with multiple representations in different sizes
The first image of the list if the reference image, the one with scale factor = 1
public CreateMultiResolutionImage ( IEnumerable images ) : object
images IEnumerable Backends of the different image representations
Результат object

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

public CreateMultiSizeIcon ( IEnumerable images ) : object
images IEnumerable
Результат object

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

public abstract CropBitmap ( object handle, int srcX, int srcY, int width, int height ) : object
handle object
srcX int
srcY int
width int
height int
Результат object

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

public abstract GetBitmapPixel ( object handle, int x, int y ) : Color
handle object
x int
y int
Результат Color

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

Gets the size of an image
This method should return a size of (0,0) if the image doesn't have an intrinsic size. For example: if the image is a vecor image, or if is an icon composed of images of different sizes.
public abstract GetSize ( object handle ) : Size
handle object Image handle
Результат Size

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

public abstract GetStockIcon ( string id ) : Image
id string
Результат Image

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

Returns True if the image has multiple representations of different sizes.
For example, it would return True for a .ico file which as several representations of the image in different sizes
public abstract HasMultipleSizes ( object handle ) : bool
handle object Image handle.
Результат bool

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

Determines whether this instance is a bitmap
public abstract IsBitmap ( object handle ) : bool
handle object Image handle
Результат bool

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

public LoadFromFile ( string file ) : object
file string
Результат object

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

public LoadFromResource ( Assembly asm, string name ) : object
asm System.Reflection.Assembly
name string
Результат object

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

public abstract LoadFromStream ( Stream stream ) : object
stream Stream
Результат object

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

public abstract SaveToStream ( object backend, System stream, ImageFileType fileType ) : void
backend object
stream System
fileType ImageFileType
Результат void

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

public abstract SetBitmapPixel ( object handle, int x, int y, Color color ) : void
handle object
x int
y int
color Color
Результат void