Class EvasImage
Definition
- Namespace:
- ElmSharp
- Assembly:
- ElmSharp.dll
This group provides the functions for image objects.
public class EvasImage : EvasObject
- Inheritance
Constructors
View SourceEvasImage(EvasObject)
Creates and initializes a new instance of the EvasImage class.
Declaration
public 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
View SourceBorderCenterFillMode
Sets or gets if the center part of the given image object (not the border) should be drawn.
Declaration
public 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
public 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
public 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
public 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
public 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
public 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
public bool IsSourceClipped { get; set; }
Property Value
Type | Description |
---|---|
bool |
IsSourceVisible
Sets or gets the source object to be visible.
Declaration
public bool IsSourceVisible { get; set; }
Property Value
Type | Description |
---|---|
bool |
Size
Sets or gets the size of the given image object.
Declaration
public Size Size { get; set; }
Property Value
Type | Description |
---|---|
Size |
Stride
Gets the row stride of the given image object.
Declaration
public int Stride { get; }
Property Value
Type | Description |
---|---|
int |
Methods
View SourceCreateHandle(EvasObject)
Sets the content at a part of a given container widget.
Declaration
protected 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
View SourceSetBorder(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
public 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
public 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
public void SetFill(Rect geometry)
Parameters
Type | Name | Description |
---|---|---|
Rect | geometry | The rectangle of the given image object that the image will be drawn to. |
SetSource(EvasObject)
Sets the source object on an image object to be used as a proxy.
Declaration
public 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. |
SetStream(Stream)
Sets the data for an image from the memory to be loaded.
Declaration
public void SetStream(Stream stream)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | stream | memory stream |