Class EvasImage
Definition
- Namespace:
- ElmSharp
- Assembly:
- ElmSharp.dll
- API Level:
- preview
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. |
API Level: preview
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.
API Level: preview
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 |
---|---|
System.Double |
API Level: preview
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 |
---|---|
System.String |
API Level: preview
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 |
---|---|
System.Boolean |
API Level: preview
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 |
---|---|
System.Boolean |
API Level: preview
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 |
---|---|
System.Boolean |
API Level: preview
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 |
---|---|
System.Boolean |
API Level: preview
Declaration
C#Copypublic bool IsSourceVisible { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
API Level: preview
Declaration
C#Copypublic Size Size { get; set; }
Property Value
Type | Description |
---|---|
Size |
API Level: preview
Declaration
C#Copypublic int Stride { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
API Level: preview
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
API Level: preview
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 |
---|---|---|
System.String | file | The filename to be used to save the image (extension obligatory). |
System.String | key | The image key in the file (if an Eet one), or null, otherwise. |
System.String | flags | String containing the flags to be used (null for none). |
SetBorder(Int32, Int32, Int32, Int32)
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 |
---|---|---|
System.Int32 | left | The border's left width. |
System.Int32 | right | The border's right width. |
System.Int32 | top | The border's top width. |
System.Int32 | bottom | The border's bottom width. |
API Level: preview
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 |
---|---|---|
System.String | file | The image file path. |
System.String | key | The image key in file (if its an Eet one), otherwise set null. |
API Level: preview
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. |
API Level: preview
Declaration
C#Copypublic bool SetSource(EvasObject source)
Parameters
Type | Name | Description |
---|---|---|
EvasObject | source | The proxy (image) object. |
Returns
Type | Description |
---|---|
System.Boolean | true if the source object is set successfully, otherwise false on error. |
API Level: preview
Declaration
C#Copypublic void SetStream(Stream stream)
Parameters
Type | Name | Description |
---|---|---|
Stream | stream | memory stream |