C# 클래스 Xwt.Drawing.Image

상속: XwtObject, IDisposable
파일 보기 프로젝트 열기: mono/xwt 1 사용 예제들

공개 메소드들

메소드 설명
CreateMultiResolutionImage ( IEnumerable images ) : Image
CreateMultiSizeIcon ( IEnumerable images ) : Image
Dispose ( ) : void
FromCustomLoader ( IImageLoader loader, string fileName ) : Image
FromFile ( string file ) : Image
FromResource ( Assembly assembly, string resource ) : Image

Loads an image from a resource

This method will look for alternative versions of the image with different resolutions. For example, if a resource is named "foo.png", this method will load other resources with the name "[email protected]", where XXX can be any arbitrary string. For example "[email protected]". Each of those resources will be considered different versions of the same image.

FromResource ( Type type, string resource ) : Image

Loads an image from a resource

This method will look for alternative versions of the image with different resolutions. For example, if a resource is named "foo.png", this method will load other resources with the name "[email protected]", where XXX can be any arbitrary string. For example "[email protected]". Each of those resources will be considered different versions of the same image.

FromResource ( string resource ) : Image

Loads an image from a resource

This method will look for alternative versions of the image with different resolutions. For example, if a resource is named "foo.png", this method will load other resources with the name "[email protected]", where XXX can be any arbitrary string. For example "[email protected]". Each of those resources will be considered different versions of the same image.

FromStream ( Stream stream ) : Image
Image ( Image image ) : System

Creates a new image that is a copy of another image

Save ( Stream stream, ImageFileType fileType ) : void
Save ( string file, ImageFileType fileType ) : void
Scale ( double scale ) : Image

Retuns a scaled copy of the image

This is a lightweight operation. The image is scaled when it is rendered. The method doesn't make a copy of the image data.

Scale ( double scaleX, double scaleY ) : Image

Retuns a scaled copy of the image

This is a lightweight operation. The image is scaled when it is rendered. The method doesn't make a copy of the image data.

ToBitmap ( ImageFormat format = ImageFormat.ARGB32 ) : BitmapImage

Converts the image to a bitmap

ToBitmap ( Screen renderTarget, ImageFormat format = ImageFormat.ARGB32 ) : BitmapImage

Converts the image to a bitmap

ToBitmap ( Widget renderTarget, ImageFormat format = ImageFormat.ARGB32 ) : BitmapImage

Converts the image to a bitmap

ToBitmap ( WindowFrame renderTarget, ImageFormat format = ImageFormat.ARGB32 ) : BitmapImage

Converts the image to a bitmap

ToBitmap ( double scaleFactor, ImageFormat format = ImageFormat.ARGB32 ) : BitmapImage

Converts the image to a bitmap

WithAlpha ( double alpha ) : Image

Applies an alpha filter to the image

This is a lightweight operation. The alpha filter is applied when the image is rendered. The method doesn't make a copy of the image data.

WithBoxSize ( Size size ) : Image

Retuns a copy of the image with a size that fits the provided size limits

This is a lightweight operation. The image is scaled when it is rendered. The method doesn't make a copy of the image data.

WithBoxSize ( double maxSize ) : Image

Retuns a copy of the image with a size that fits the provided size limits

This is a lightweight operation. The image is scaled when it is rendered. The method doesn't make a copy of the image data.

WithBoxSize ( double maxWidth, double maxHeight ) : Image

Retuns a copy of the image with a size that fits the provided size limits

This is a lightweight operation. The image is scaled when it is rendered. The method doesn't make a copy of the image data.

WithSize ( IconSize size ) : Image

Retuns a copy of the image with a specific size

This is a lightweight operation. The image is scaled when it is rendered. The method doesn't make a copy of the image data.

WithSize ( Size size ) : Image

Retuns a copy of the image with a specific size

This is a lightweight operation. The image is scaled when it is rendered. The method doesn't make a copy of the image data.

WithSize ( double squaredSize ) : Image

Retuns a copy of the image with a specific size

This is a lightweight operation. The image is scaled when it is rendered. The method doesn't make a copy of the image data.

WithSize ( double width, double height ) : Image

Retuns a copy of the image with a specific size

This is a lightweight operation. The image is scaled when it is rendered. The method doesn't make a copy of the image data.

WithStyles ( ) : Image

Retuns a copy of the image with a set of specific styles

This is a lightweight operation. The method doesn't make a copy of the image data.

보호된 메소드들

메소드 설명
Dispose ( bool disposing ) : void
GetDefaultSize ( ) : Size

비공개 메소드들

메소드 설명
CreateComposedNinePatch ( Toolkit toolkit, IEnumerable altImages ) : Image
FromCustomLoader ( IImageLoader loader, string fileName, ImageTagSet tags ) : Image
GetExtension ( string fileName ) : string
GetFixedSize ( ) : Size
GetImageDescription ( Toolkit toolkit ) : ImageDescription
Image ( ) : System
Image ( object backend ) : System
Image ( object backend, Toolkit toolkit ) : System
Init ( ) : void
InitForToolkit ( Toolkit t ) : void
LoadImage ( ImageLoader loader, string fileName, ImageTagSet tagFilter ) : Image
ParseImageHints ( string baseName, string fileName, string ext, int &scale, ImageTagSet &tags ) : bool

메소드 상세

CreateMultiResolutionImage() 공개 정적인 메소드

public static CreateMultiResolutionImage ( IEnumerable images ) : Image
images IEnumerable
리턴 Image

CreateMultiSizeIcon() 공개 정적인 메소드

public static CreateMultiSizeIcon ( IEnumerable images ) : Image
images IEnumerable
리턴 Image

Dispose() 공개 메소드

public Dispose ( ) : void
리턴 void

Dispose() 보호된 메소드

protected Dispose ( bool disposing ) : void
disposing bool
리턴 void

FromCustomLoader() 공개 정적인 메소드

public static FromCustomLoader ( IImageLoader loader, string fileName ) : Image
loader IImageLoader
fileName string
리턴 Image

FromFile() 공개 정적인 메소드

public static FromFile ( string file ) : Image
file string
리턴 Image

FromResource() 공개 정적인 메소드

Loads an image from a resource
This method will look for alternative versions of the image with different resolutions. For example, if a resource is named "foo.png", this method will load other resources with the name "[email protected]", where XXX can be any arbitrary string. For example "[email protected]". Each of those resources will be considered different versions of the same image.
public static FromResource ( Assembly assembly, string resource ) : Image
assembly System.Reflection.Assembly The assembly from which to load the image
resource string Resource name
리턴 Image

FromResource() 공개 정적인 메소드

Loads an image from a resource
This method will look for alternative versions of the image with different resolutions. For example, if a resource is named "foo.png", this method will load other resources with the name "[email protected]", where XXX can be any arbitrary string. For example "[email protected]". Each of those resources will be considered different versions of the same image.
public static FromResource ( Type type, string resource ) : Image
type System.Type Type which identifies the assembly from which to load the image
resource string Resource name
리턴 Image

FromResource() 공개 정적인 메소드

Loads an image from a resource
This method will look for alternative versions of the image with different resolutions. For example, if a resource is named "foo.png", this method will load other resources with the name "[email protected]", where XXX can be any arbitrary string. For example "[email protected]". Each of those resources will be considered different versions of the same image.
public static FromResource ( string resource ) : Image
resource string Resource name
리턴 Image

FromStream() 공개 정적인 메소드

public static FromStream ( Stream stream ) : Image
stream Stream
리턴 Image

GetDefaultSize() 보호된 메소드

protected GetDefaultSize ( ) : Size
리턴 Size

Image() 공개 메소드

Creates a new image that is a copy of another image
public Image ( Image image ) : System
image Image Image.
리턴 System

Save() 공개 메소드

public Save ( Stream stream, ImageFileType fileType ) : void
stream Stream
fileType ImageFileType
리턴 void

Save() 공개 메소드

public Save ( string file, ImageFileType fileType ) : void
file string
fileType ImageFileType
리턴 void

Scale() 공개 메소드

Retuns a scaled copy of the image
This is a lightweight operation. The image is scaled when it is rendered. The method doesn't make a copy of the image data.
public Scale ( double scale ) : Image
scale double Scale to apply to the image size
리턴 Image

Scale() 공개 메소드

Retuns a scaled copy of the image
This is a lightweight operation. The image is scaled when it is rendered. The method doesn't make a copy of the image data.
public Scale ( double scaleX, double scaleY ) : Image
scaleX double Scale to apply to the width of the image
scaleY double Scale to apply to the height of the image
리턴 Image

ToBitmap() 공개 메소드

Converts the image to a bitmap
public ToBitmap ( ImageFormat format = ImageFormat.ARGB32 ) : BitmapImage
format ImageFormat Bitmap format
리턴 BitmapImage

ToBitmap() 공개 메소드

Converts the image to a bitmap
public ToBitmap ( Screen renderTarget, ImageFormat format = ImageFormat.ARGB32 ) : BitmapImage
renderTarget Screen Screen to be used as reference for determining the resolution of the bitmap
format ImageFormat Bitmap format
리턴 BitmapImage

ToBitmap() 공개 메소드

Converts the image to a bitmap
public ToBitmap ( Widget renderTarget, ImageFormat format = ImageFormat.ARGB32 ) : BitmapImage
renderTarget Widget Widget to be used as reference for determining the resolution of the bitmap
format ImageFormat Bitmap format
리턴 BitmapImage

ToBitmap() 공개 메소드

Converts the image to a bitmap
public ToBitmap ( WindowFrame renderTarget, ImageFormat format = ImageFormat.ARGB32 ) : BitmapImage
renderTarget WindowFrame Window to be used as reference for determining the resolution of the bitmap
format ImageFormat Bitmap format
리턴 BitmapImage

ToBitmap() 공개 메소드

Converts the image to a bitmap
public ToBitmap ( double scaleFactor, ImageFormat format = ImageFormat.ARGB32 ) : BitmapImage
scaleFactor double Scale factor of the bitmap
format ImageFormat Bitmap format
리턴 BitmapImage

WithAlpha() 공개 메소드

Applies an alpha filter to the image
This is a lightweight operation. The alpha filter is applied when the image is rendered. The method doesn't make a copy of the image data.
public WithAlpha ( double alpha ) : Image
alpha double Alpha to apply
리턴 Image

WithBoxSize() 공개 메소드

Retuns a copy of the image with a size that fits the provided size limits
This is a lightweight operation. The image is scaled when it is rendered. The method doesn't make a copy of the image data.
public WithBoxSize ( Size size ) : Image
size Size Max width and height
리턴 Image

WithBoxSize() 공개 메소드

Retuns a copy of the image with a size that fits the provided size limits
This is a lightweight operation. The image is scaled when it is rendered. The method doesn't make a copy of the image data.
public WithBoxSize ( double maxSize ) : Image
maxSize double Max width and height (the image is expected to be squared)
리턴 Image

WithBoxSize() 공개 메소드

Retuns a copy of the image with a size that fits the provided size limits
This is a lightweight operation. The image is scaled when it is rendered. The method doesn't make a copy of the image data.
public WithBoxSize ( double maxWidth, double maxHeight ) : Image
maxWidth double Max width.
maxHeight double Max height.
리턴 Image

WithSize() 공개 메소드

Retuns a copy of the image with a specific size
This is a lightweight operation. The image is scaled when it is rendered. The method doesn't make a copy of the image data.
public WithSize ( IconSize size ) : Image
size IconSize New size
리턴 Image

WithSize() 공개 메소드

Retuns a copy of the image with a specific size
This is a lightweight operation. The image is scaled when it is rendered. The method doesn't make a copy of the image data.
public WithSize ( Size size ) : Image
size Size The size.
리턴 Image

WithSize() 공개 메소드

Retuns a copy of the image with a specific size
This is a lightweight operation. The image is scaled when it is rendered. The method doesn't make a copy of the image data.
public WithSize ( double squaredSize ) : Image
squaredSize double Width and height of the image (the image is expected to be squared)
리턴 Image

WithSize() 공개 메소드

Retuns a copy of the image with a specific size
This is a lightweight operation. The image is scaled when it is rendered. The method doesn't make a copy of the image data.
public WithSize ( double width, double height ) : Image
width double Width.
height double Height.
리턴 Image

WithStyles() 공개 메소드

Retuns a copy of the image with a set of specific styles
This is a lightweight operation. The method doesn't make a copy of the image data.
public WithStyles ( ) : Image
리턴 Image