Class EvasImage
Definition
- Namespace:
- ElmSharp
- Assembly:
- ElmSharp.dll
This group provides the functions for image objects.
C#Copypublic class EvasImage : EvasObject
- Inheritance
Constructors
Declaration
C#Copypublic EvasImage(EvasObject parent)
Parameters
| Type | Name | Description |
|---|---|---|
| EvasObject | parent | The parent is a given container, which will be attached by EvasImage as a child. It's EvasObject type. |
Properties
BorderCenterFillMode
Sets or gets if the center part of the given image object (not the border) should be drawn.
Declaration
C#Copypublic ImageBorderFillMode BorderCenterFillMode { get; set; }
Property Value
| Type | Description |
|---|---|
| ImageBorderFillMode |
Remarks
When rendering, the image may be scaled to fit the size of the image object. This function sets if the center part of the scaled image is to be drawn or left completely blank, or forced to be solid. Very useful for frames and decorations.
BorderScale
Sets or gets the scaling factor (multiplier) for the borders of the image object.
Declaration
C#Copypublic double BorderScale { get; set; }
Property Value
| Type | Description |
|---|---|
| double |
File
Sets or gets the source file from where an image object must fetch the real image data.
Declaration
C#Copypublic string File { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
IsFilled
Sets or gets whether the image object's fill property should track the object's size.
Declaration
C#Copypublic bool IsFilled { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
IsOpaque
Sets or gets whether the alpha channel data is being used on the given image object.
Declaration
C#Copypublic bool IsOpaque { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
IsSmoothScaled
Sets or gets whether to use a high-quality image scaling algorithm on the given image object.
Declaration
C#Copypublic bool IsSmoothScaled { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
IsSourceClipped
Sets or gets whether an object is clipped by the source object's clipper.
Declaration
C#Copypublic bool IsSourceClipped { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
Declaration
C#Copypublic bool IsSourceVisible { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
Declaration
C#Copypublic Size Size { get; set; }
Property Value
| Type | Description |
|---|---|
| Size |
Declaration
C#Copypublic int Stride { get; }
Property Value
| Type | Description |
|---|---|
| int |
Methods
Declaration
C#Copyprotected override IntPtr CreateHandle(EvasObject parent)
Parameters
| Type | Name | Description |
|---|---|---|
| EvasObject | parent | The parent is a given container, which will be attached by the image as a child. It's EvasObject type. |
Returns
| Type | Description |
|---|---|
| System.IntPtr | The new object, otherwise null if it cannot be created. |
Overrides
Save(string, string, string)
Save the given image object's contents to an (image) file.
The extension suffix on file will determine which saver module Evas is to use when saving, thus the final file's format. If the file supports multiple data stored in it (Eet ones), you can specify the key to be used as the index of the image in it.
You can specify some flags when saving the image.Currently acceptable flags are quality and compress.Eg.: "quality=100 compress=9"
Declaration
C#Copypublic void Save(string file, string key, string flags)
Parameters
| Type | Name | Description |
|---|---|---|
| string | file | The filename to be used to save the image (extension obligatory). |
| string | key | The image key in the file (if an Eet one), or null, otherwise. |
| string | flags | String containing the flags to be used (null for none). |
SetBorder(int, int, int, int)
Sets the dimensions for an image object's border, a region which is not scaled together with its center ever.
Declaration
C#Copypublic void SetBorder(int left, int right, int top, int bottom)
Parameters
| Type | Name | Description |
|---|---|---|
| int | left | The border's left width. |
| int | right | The border's right width. |
| int | top | The border's top width. |
| int | bottom | The border's bottom width. |
SetFile(string, string)
Sets the source file from where an image object must fetch the real image data (it may be an Eet file, besides pure image ones).
Declaration
C#Copypublic void SetFile(string file, string key)
Parameters
| Type | Name | Description |
|---|---|---|
| string | file | The image file path. |
| string | key | The image key in file (if its an Eet one), otherwise set null. |
SetFill(Rect)
Sets how to fill an image object's drawing rectangle given the (real) image bound to it.
Declaration
C#Copypublic void SetFill(Rect geometry)
Parameters
| Type | Name | Description |
|---|---|---|
| Rect | geometry | The rectangle of the given image object that the image will be drawn to. |
Declaration
C#Copypublic bool SetSource(EvasObject source)
Parameters
| Type | Name | Description |
|---|---|---|
| EvasObject | source | The proxy (image) object. |
Returns
| Type | Description |
|---|---|
| bool | true if the source object is set successfully, otherwise false on error. |
Declaration
C#Copypublic void SetStream(Stream stream)
Parameters
| Type | Name | Description |
|---|---|---|
| System.IO.Stream | stream | memory stream |