Class Efl.Ui.WidgetPartBg
Elementary widget internal part background class This part will proxy the calls on it to the Efl.Ui.Bg internal object of this widget. This internal object is stacked below the Efl.Ui.Widget.SetResizeObject(Efl.Canvas.Object) and co-located with the widget.
All Efl.Ui.Widget objects have this part, allowing the background of the widget to be customized.
Inheritance
Syntax
public class WidgetPartBg : WidgetPart, IPropertyBind, IFile, IColor, IImage, IWrapper, IDisposable
Constructors
WidgetPartBg(EoWrapper.ConstructingHandle)
Subclasses should override this constructor if they are expected to be instantiated from native code. Do not call this constructor directly.
Declaration
protected WidgetPartBg(EoWrapper.ConstructingHandle ch)
Parameters
Type | Name | Description |
---|---|---|
Efl.Eo.EoWrapper.ConstructingHandle | ch | Tag struct storing the native handle of the object being constructed. |
WidgetPartBg(Object)
Initializes a new instance of the Efl.Ui.WidgetPartBg class.
Declaration
public WidgetPartBg(Object parent = null)
Parameters
Type | Name | Description |
---|---|---|
Efl.Object | parent | Parent instance. |
WidgetPartBg(IntPtr, Object)
Initializes a new instance of the Efl.Ui.WidgetPartBg class. Internal usage: Constructor to forward the wrapper initialization to the root class that interfaces with native code. Should not be used directly.
Declaration
protected WidgetPartBg(IntPtr baseKlass, Object parent)
Parameters
Type | Name | Description |
---|---|---|
System.IntPtr | baseKlass | The pointer to the base native Eo class. |
Efl.Object | parent | The Efl.Object parent of this instance. |
Properties
BorderInsets
Dimensions of this image's border, a region that does not scale with the center area. When EFL renders an image, its source may be scaled to fit the size of the object. This function sets an area from the borders of the image inwards which is not to be scaled. This function is useful for making frames and for widget theming, where, for example, buttons may be of varying sizes, but their border size must remain constant.
The units used for l
, r
, t
and b
are canvas units (pixels).
Note: The border region itself may be scaled by the Efl.Gfx.IImage.SetBorderInsetsScale(System.Double) function.
Note: By default, image objects have no borders set, i.e. l
, r
, t
and b
start as 0.
Note: Similar to the concepts of 9-patch images or cap insets.
Declaration
public (int, int, int, int)BorderInsets { get; set; }
Property Value
Type | Description |
---|---|
System.ValueTuple<System.Int32, System.Int32, System.Int32, System.Int32> | The border's left width. |
BorderInsetsScale
Scaling factor applied to the image borders. This value multiplies the size of the Efl.Gfx.IImage.GetBorderInsets(out System.Int32, out System.Int32, out System.Int32, out System.Int32) when scaling an object.
Declaration
public double BorderInsetsScale { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The scale factor. |
CanDownscale
If true
, the image may be scaled to a smaller size. If false
, the image will never be resized smaller than its native size.
Declaration
public bool CanDownscale { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | Whether to allow image downscaling. |
CanUpscale
If true
, the image may be scaled to a larger size. If false
, the image will never be resized larger than its native size.
Declaration
public bool CanUpscale { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | Whether to allow image upscaling. |
CenterFillMode
Specifies how the center part of the object (not the borders) should be drawn when EFL is rendering it. This function sets how the center part of the image object's source image is to be drawn, which must be one of the values in Efl.Gfx.CenterFillMode. By center we mean the complementary part of that defined by Efl.Gfx.IImage.GetBorderInsets(out System.Int32, out System.Int32, out System.Int32, out System.Int32). This is very useful for making frames and decorations. You would most probably also be using a filled image (as in Efl.Gfx.IFill.FillAuto (object still in beta stage)) to use as a frame.
Declaration
public CenterFillMode CenterFillMode { get; set; }
Property Value
Type | Description |
---|---|
Efl.Gfx.CenterFillMode | Fill mode of the center region. The default behavior is to render and scale the center area, respecting its transparency. |
Color
The general/main color of the given Evas object. Represents the main color's RGB component (and alpha channel) values, which range from 0 to 255. For the alpha channel, which defines the object's transparency level, 0 means totally transparent, while 255 means opaque. These color values are premultiplied by the alpha value.
Usually you'll use this attribute for text and rectangle objects, where the main color is the only color. If set for objects which themselves have colors, like the images one, those colors get modulated by this one.
All newly created Evas rectangles get the default color values of 255 255 255 255 (opaque white).
When reading this property, use NULL
pointers on the components you're not interested in and they'll be ignored by the function.
(Since EFL 1.22)
Declaration
public (int, int, int, int)Color { get; set; }
Property Value
Type | Description |
---|---|
System.ValueTuple<System.Int32, System.Int32, System.Int32, System.Int32> |
ColorCode
Hexadecimal color code of given Evas object (#RRGGBBAA). (Since EFL 1.22)
Declaration
public string ColorCode { get; set; }
Property Value
Type | Description |
---|---|
System.String | the hex color code. |
ContentHint
Content hint setting for the image. These hints might be used by EFL to enable optimizations. For example, if you're on the GL engine and your driver implementation supports it, setting this hint to Efl.Gfx.ImageContentHint.Dynamic will make it need zero copies at texture upload time, which is an "expensive" operation.
Declaration
public ImageContentHint ContentHint { get; set; }
Property Value
Type | Description |
---|---|
Efl.Gfx.ImageContentHint | Dynamic or static content hint. |
ContentRegion
Return the relative area enclosed inside the image where content is expected. We do expect content to be inside the limit defined by the border or inside the stretch region. If a stretch region is provided, the content region will encompass the non-stretchable area that are surrounded by stretchable area. If no border and no stretch region is set, they are assumed to be zero and the full object geometry is where content can be layout on top. The area size change with the object size.
The geometry of the area is expressed relative to the geometry of the object.
Declaration
public Rect ContentRegion { get; }
Property Value
Type | Description |
---|---|
Eina.Rect | A rectangle inside the object boundary where content is expected. The default value is the image object's geometry with the Efl.Gfx.IImage.GetBorderInsets(out System.Int32, out System.Int32, out System.Int32, out System.Int32) values subtracted. |
File
The file path from where an object will fetch the data. If file is set during object construction, the object will automatically call Efl.IFile.Load() during the finalize phase of construction.
You must not modify the strings on the returned pointers. (Since EFL 1.22)
Declaration
public string File { get; set; }
Property Value
Type | Description |
---|---|
System.String | The file path. |
ImageLoadError
The (last) file loading error for a given object. This value is set to a nonzero value if an error has occurred.
Declaration
public Error ImageLoadError { get; }
Property Value
Type | Description |
---|---|
Eina.Error | The load error code. A value of $0 indicates no error. |
ImageSize
This represents the size of the original image in pixels. This may be different from the actual geometry on screen or even the size of the loaded pixel buffer. This is the size of the image as stored in the original file.
This is a read-only property and may return 0x0.
Declaration
public Size2D ImageSize { get; }
Property Value
Type | Description |
---|---|
Eina.Size2D | The size in pixels. The default value is the size of the image's internal buffer. |
Key
The key which corresponds to the target data within a file. Some file types can contain multiple data streams which are indexed by a key. Use this property for such cases (See for example Efl.Ui.Image or Efl.Ui.Layout).
You must not modify the strings on the returned pointers. (Since EFL 1.22)
Declaration
public string Key { get; set; }
Property Value
Type | Description |
---|---|
System.String | The group that the data belongs to. See the class documentation for particular implementations of this interface to see how this property is used. |
Loaded
The load state of the object. (Since EFL 1.22)
Declaration
public bool Loaded { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Mmap
The mmaped file from where an object will fetch the real data (it must be an Eina.File). If mmap is set during object construction, the object will automatically call Efl.IFile.Load() during the finalize phase of construction. (Since EFL 1.22)
Declaration
public File Mmap { get; set; }
Property Value
Type | Description |
---|---|
Eina.File | The handle to the Eina.File that will be used |
Ratio
The native width/height ratio of the image. The ratio will be 1.0 if it cannot be calculated (e.g. height = 0).
Declaration
public double Ratio { get; }
Property Value
Type | Description |
---|---|
System.Double | The image's ratio. |
ScaleHint
The scale hint of a given image of the canvas. The scale hint affects how EFL is to cache scaled versions of its original source image.
Declaration
public ImageScaleHint ScaleHint { get; set; }
Property Value
Type | Description |
---|---|
Efl.Gfx.ImageScaleHint | Scalable or static size hint. |
ScaleMethod
Determine how the image is scaled at render time. This allows more granular controls for how an image object should display its internal buffer. The underlying image data will not be modified.
Declaration
public ImageScaleMethod ScaleMethod { get; set; }
Property Value
Type | Description |
---|---|
Efl.Gfx.ImageScaleMethod | Image scale type to use. |
SmoothScale
Whether to use high-quality image scaling algorithm for this image. When enabled, a higher quality image scaling algorithm is used when scaling images to sizes other than the source image's original one. This gives better results but is more computationally expensive.
Declaration
public bool SmoothScale { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | Whether to use smooth scale or not. |
StretchRegion
This property defines the stretchable pixels region of an image.
When the regions are set by the user, the method will walk the iterators once and then destroy them. When the regions are retrieved by the user, it is his responsibility to destroy the iterators.. It will remember the information for the lifetime of the object. It will ignore all value of Efl.Gfx.IImage.GetBorderInsets(out System.Int32, out System.Int32, out System.Int32, out System.Int32), Efl.Gfx.IImage.BorderInsetsScale and Efl.Gfx.IImage.CenterFillMode . To reset the object you can just pass null
to both horizontal and vertical at the same time.
Declaration
public (Iterator<ImageStretchRegion>, Iterator<ImageStretchRegion>)StretchRegion { get; set; }
Property Value
Type | Description |
---|---|
System.ValueTuple<Eina.Iterator<Efl.Gfx.ImageStretchRegion>, Eina.Iterator<Efl.Gfx.ImageStretchRegion>> | Representation of areas that are stretchable in the image horizontal space. |
Methods
GetBorderInsets(out Int32, out Int32, out Int32, out Int32)
Dimensions of this image's border, a region that does not scale with the center area. When EFL renders an image, its source may be scaled to fit the size of the object. This function sets an area from the borders of the image inwards which is not to be scaled. This function is useful for making frames and for widget theming, where, for example, buttons may be of varying sizes, but their border size must remain constant.
The units used for l
, r
, t
and b
are canvas units (pixels).
Note: The border region itself may be scaled by the Efl.Gfx.IImage.SetBorderInsetsScale(System.Double) function.
Note: By default, image objects have no borders set, i.e. l
, r
, t
and b
start as 0.
Note: Similar to the concepts of 9-patch images or cap insets.
Declaration
public virtual void GetBorderInsets(out int l, out int r, out int t, out int b)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | l | The border's left width. |
System.Int32 | r | The border's right width. |
System.Int32 | t | The border's top height. |
System.Int32 | b | The border's bottom height. |
GetBorderInsetsScale()
Scaling factor applied to the image borders. This value multiplies the size of the Efl.Gfx.IImage.GetBorderInsets(out System.Int32, out System.Int32, out System.Int32, out System.Int32) when scaling an object.
Declaration
public virtual double GetBorderInsetsScale()
Returns
Type | Description |
---|---|
System.Double | The scale factor. |
GetCanDownscale()
If true
, the image may be scaled to a smaller size. If false
, the image will never be resized smaller than its native size.
Declaration
public virtual bool GetCanDownscale()
Returns
Type | Description |
---|---|
System.Boolean | Whether to allow image downscaling. |
GetCanUpscale()
If true
, the image may be scaled to a larger size. If false
, the image will never be resized larger than its native size.
Declaration
public virtual bool GetCanUpscale()
Returns
Type | Description |
---|---|
System.Boolean | Whether to allow image upscaling. |
GetCenterFillMode()
Specifies how the center part of the object (not the borders) should be drawn when EFL is rendering it. This function sets how the center part of the image object's source image is to be drawn, which must be one of the values in Efl.Gfx.CenterFillMode. By center we mean the complementary part of that defined by Efl.Gfx.IImage.GetBorderInsets(out System.Int32, out System.Int32, out System.Int32, out System.Int32). This is very useful for making frames and decorations. You would most probably also be using a filled image (as in Efl.Gfx.IFill.FillAuto (object still in beta stage)) to use as a frame.
Declaration
public virtual CenterFillMode GetCenterFillMode()
Returns
Type | Description |
---|---|
Efl.Gfx.CenterFillMode | Fill mode of the center region. The default behavior is to render and scale the center area, respecting its transparency. |
GetColor(out Int32, out Int32, out Int32, out Int32)
The general/main color of the given Evas object. Represents the main color's RGB component (and alpha channel) values, which range from 0 to 255. For the alpha channel, which defines the object's transparency level, 0 means totally transparent, while 255 means opaque. These color values are premultiplied by the alpha value.
Usually you'll use this attribute for text and rectangle objects, where the main color is the only color. If set for objects which themselves have colors, like the images one, those colors get modulated by this one.
All newly created Evas rectangles get the default color values of 255 255 255 255 (opaque white).
When reading this property, use NULL
pointers on the components you're not interested in and they'll be ignored by the function.
(Since EFL 1.22)
Declaration
public virtual void GetColor(out int r, out int g, out int b, out int a)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | r | |
System.Int32 | g | |
System.Int32 | b | |
System.Int32 | a |
GetColorCode()
Hexadecimal color code of given Evas object (#RRGGBBAA). (Since EFL 1.22)
Declaration
public virtual string GetColorCode()
Returns
Type | Description |
---|---|
System.String | the hex color code. |
GetContentHint()
Content hint setting for the image. These hints might be used by EFL to enable optimizations. For example, if you're on the GL engine and your driver implementation supports it, setting this hint to Efl.Gfx.ImageContentHint.Dynamic will make it need zero copies at texture upload time, which is an "expensive" operation.
Declaration
public virtual ImageContentHint GetContentHint()
Returns
Type | Description |
---|---|
Efl.Gfx.ImageContentHint | Dynamic or static content hint. |
GetContentRegion()
Return the relative area enclosed inside the image where content is expected. We do expect content to be inside the limit defined by the border or inside the stretch region. If a stretch region is provided, the content region will encompass the non-stretchable area that are surrounded by stretchable area. If no border and no stretch region is set, they are assumed to be zero and the full object geometry is where content can be layout on top. The area size change with the object size.
The geometry of the area is expressed relative to the geometry of the object.
Declaration
public virtual Rect GetContentRegion()
Returns
Type | Description |
---|---|
Eina.Rect | A rectangle inside the object boundary where content is expected. The default value is the image object's geometry with the Efl.Gfx.IImage.GetBorderInsets(out System.Int32, out System.Int32, out System.Int32, out System.Int32) values subtracted. |
GetFile()
The file path from where an object will fetch the data. If file is set during object construction, the object will automatically call Efl.IFile.Load() during the finalize phase of construction.
You must not modify the strings on the returned pointers. (Since EFL 1.22)
Declaration
public virtual string GetFile()
Returns
Type | Description |
---|---|
System.String | The file path. |
GetImageLoadError()
The (last) file loading error for a given object. This value is set to a nonzero value if an error has occurred.
Declaration
public virtual Error GetImageLoadError()
Returns
Type | Description |
---|---|
Eina.Error | The load error code. A value of $0 indicates no error. |
GetImageSize()
This represents the size of the original image in pixels. This may be different from the actual geometry on screen or even the size of the loaded pixel buffer. This is the size of the image as stored in the original file.
This is a read-only property and may return 0x0.
Declaration
public virtual Size2D GetImageSize()
Returns
Type | Description |
---|---|
Eina.Size2D | The size in pixels. The default value is the size of the image's internal buffer. |
GetKey()
The key which corresponds to the target data within a file. Some file types can contain multiple data streams which are indexed by a key. Use this property for such cases (See for example Efl.Ui.Image or Efl.Ui.Layout).
You must not modify the strings on the returned pointers. (Since EFL 1.22)
Declaration
public virtual string GetKey()
Returns
Type | Description |
---|---|
System.String | The group that the data belongs to. See the class documentation for particular implementations of this interface to see how this property is used. |
GetLoaded()
The load state of the object. (Since EFL 1.22)
Declaration
public virtual bool GetLoaded()
Returns
Type | Description |
---|---|
System.Boolean |
|
GetMmap()
The mmaped file from where an object will fetch the real data (it must be an Eina.File). If mmap is set during object construction, the object will automatically call Efl.IFile.Load() during the finalize phase of construction. (Since EFL 1.22)
Declaration
public virtual File GetMmap()
Returns
Type | Description |
---|---|
Eina.File | The handle to the Eina.File that will be used |
GetRatio()
The native width/height ratio of the image. The ratio will be 1.0 if it cannot be calculated (e.g. height = 0).
Declaration
public virtual double GetRatio()
Returns
Type | Description |
---|---|
System.Double | The image's ratio. |
GetScaleHint()
The scale hint of a given image of the canvas. The scale hint affects how EFL is to cache scaled versions of its original source image.
Declaration
public virtual ImageScaleHint GetScaleHint()
Returns
Type | Description |
---|---|
Efl.Gfx.ImageScaleHint | Scalable or static size hint. |
GetScaleMethod()
Determine how the image is scaled at render time. This allows more granular controls for how an image object should display its internal buffer. The underlying image data will not be modified.
Declaration
public virtual ImageScaleMethod GetScaleMethod()
Returns
Type | Description |
---|---|
Efl.Gfx.ImageScaleMethod | Image scale type to use. |
GetSmoothScale()
Whether to use high-quality image scaling algorithm for this image. When enabled, a higher quality image scaling algorithm is used when scaling images to sizes other than the source image's original one. This gives better results but is more computationally expensive.
Declaration
public virtual bool GetSmoothScale()
Returns
Type | Description |
---|---|
System.Boolean | Whether to use smooth scale or not. |
GetStretchRegion(out Iterator<ImageStretchRegion>, out Iterator<ImageStretchRegion>)
This property defines the stretchable pixels region of an image.
When the regions are set by the user, the method will walk the iterators once and then destroy them. When the regions are retrieved by the user, it is his responsibility to destroy the iterators.. It will remember the information for the lifetime of the object. It will ignore all value of Efl.Gfx.IImage.GetBorderInsets(out System.Int32, out System.Int32, out System.Int32, out System.Int32), Efl.Gfx.IImage.BorderInsetsScale and Efl.Gfx.IImage.CenterFillMode . To reset the object you can just pass null
to both horizontal and vertical at the same time.
Declaration
public virtual void GetStretchRegion(out Iterator<ImageStretchRegion> horizontal, out Iterator<ImageStretchRegion> vertical)
Parameters
Type | Name | Description |
---|---|---|
Eina.Iterator<Efl.Gfx.ImageStretchRegion> | horizontal | Representation of areas that are stretchable in the image horizontal space. |
Eina.Iterator<Efl.Gfx.ImageStretchRegion> | vertical | Representation of areas that are stretchable in the image vertical space. |
Load()
Perform all necessary operations to open and load file data into the object using the Efl.IFile.File (or Efl.IFile.Mmap) and Efl.IFile.Key properties. In the case where Efl.IFile.SetFile(System.String) has been called on an object, this will internally open the file and call Efl.IFile.SetMmap(Eina.File) on the object using the opened file handle.
Calling Efl.IFile.Load() on an object which has already performed file operations based on the currently set properties will have no effect. (Since EFL 1.22)
Declaration
public virtual Error Load()
Returns
Type | Description |
---|---|
Eina.Error | 0 on success, error code otherwise |
OnImagePreloadStateChangedEvent(ImageImagePreloadStateChangedEventArgs)
Method to raise event ImagePreloadStateChangedEvent.
Declaration
public void OnImagePreloadStateChangedEvent(ImageImagePreloadStateChangedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
Efl.Gfx.ImageImagePreloadStateChangedEventArgs | e | Event to raise. |
OnImageResizedEvent(ImageImageResizedEventArgs)
Method to raise event ImageResizedEvent.
Declaration
public void OnImageResizedEvent(ImageImageResizedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
Efl.Gfx.ImageImageResizedEventArgs | e | Event to raise. |
SetBorderInsets(Int32, Int32, Int32, Int32)
Dimensions of this image's border, a region that does not scale with the center area. When EFL renders an image, its source may be scaled to fit the size of the object. This function sets an area from the borders of the image inwards which is not to be scaled. This function is useful for making frames and for widget theming, where, for example, buttons may be of varying sizes, but their border size must remain constant.
The units used for l
, r
, t
and b
are canvas units (pixels).
Note: The border region itself may be scaled by the Efl.Gfx.IImage.SetBorderInsetsScale(System.Double) function.
Note: By default, image objects have no borders set, i.e. l
, r
, t
and b
start as 0.
Note: Similar to the concepts of 9-patch images or cap insets.
Declaration
public virtual void SetBorderInsets(int l, int r, int t, int b)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | l | The border's left width. |
System.Int32 | r | The border's right width. |
System.Int32 | t | The border's top height. |
System.Int32 | b | The border's bottom height. |
SetBorderInsetsScale(Double)
Scaling factor applied to the image borders. This value multiplies the size of the Efl.Gfx.IImage.GetBorderInsets(out System.Int32, out System.Int32, out System.Int32, out System.Int32) when scaling an object.
Declaration
public virtual void SetBorderInsetsScale(double scale)
Parameters
Type | Name | Description |
---|---|---|
System.Double | scale | The scale factor. |
SetCanDownscale(Boolean)
If true
, the image may be scaled to a smaller size. If false
, the image will never be resized smaller than its native size.
Declaration
public virtual void SetCanDownscale(bool downscale)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | downscale | Whether to allow image downscaling. |
SetCanUpscale(Boolean)
If true
, the image may be scaled to a larger size. If false
, the image will never be resized larger than its native size.
Declaration
public virtual void SetCanUpscale(bool upscale)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | upscale | Whether to allow image upscaling. |
SetCenterFillMode(CenterFillMode)
Specifies how the center part of the object (not the borders) should be drawn when EFL is rendering it. This function sets how the center part of the image object's source image is to be drawn, which must be one of the values in Efl.Gfx.CenterFillMode. By center we mean the complementary part of that defined by Efl.Gfx.IImage.GetBorderInsets(out System.Int32, out System.Int32, out System.Int32, out System.Int32). This is very useful for making frames and decorations. You would most probably also be using a filled image (as in Efl.Gfx.IFill.FillAuto (object still in beta stage)) to use as a frame.
Declaration
public virtual void SetCenterFillMode(CenterFillMode fill)
Parameters
Type | Name | Description |
---|---|---|
Efl.Gfx.CenterFillMode | fill | Fill mode of the center region. The default behavior is to render and scale the center area, respecting its transparency. |
SetColor(Int32, Int32, Int32, Int32)
The general/main color of the given Evas object. Represents the main color's RGB component (and alpha channel) values, which range from 0 to 255. For the alpha channel, which defines the object's transparency level, 0 means totally transparent, while 255 means opaque. These color values are premultiplied by the alpha value.
Usually you'll use this attribute for text and rectangle objects, where the main color is the only color. If set for objects which themselves have colors, like the images one, those colors get modulated by this one.
All newly created Evas rectangles get the default color values of 255 255 255 255 (opaque white).
When reading this property, use NULL
pointers on the components you're not interested in and they'll be ignored by the function.
(Since EFL 1.22)
Declaration
public virtual void SetColor(int r, int g, int b, int a)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | r | |
System.Int32 | g | |
System.Int32 | b | |
System.Int32 | a |
SetColorCode(String)
Hexadecimal color code of given Evas object (#RRGGBBAA). (Since EFL 1.22)
Declaration
public virtual void SetColorCode(string colorcode)
Parameters
Type | Name | Description |
---|---|---|
System.String | colorcode | the hex color code. |
SetContentHint(ImageContentHint)
Content hint setting for the image. These hints might be used by EFL to enable optimizations. For example, if you're on the GL engine and your driver implementation supports it, setting this hint to Efl.Gfx.ImageContentHint.Dynamic will make it need zero copies at texture upload time, which is an "expensive" operation.
Declaration
public virtual void SetContentHint(ImageContentHint hint)
Parameters
Type | Name | Description |
---|---|---|
Efl.Gfx.ImageContentHint | hint | Dynamic or static content hint. |
SetFile(String)
The file path from where an object will fetch the data. If file is set during object construction, the object will automatically call Efl.IFile.Load() during the finalize phase of construction.
You must not modify the strings on the returned pointers. (Since EFL 1.22)
Declaration
public virtual Error SetFile(string file)
Parameters
Type | Name | Description |
---|---|---|
System.String | file | The file path. |
Returns
Type | Description |
---|---|
Eina.Error | 0 on success, error code otherwise |
SetKey(String)
The key which corresponds to the target data within a file. Some file types can contain multiple data streams which are indexed by a key. Use this property for such cases (See for example Efl.Ui.Image or Efl.Ui.Layout).
You must not modify the strings on the returned pointers. (Since EFL 1.22)
Declaration
public virtual void SetKey(string key)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The group that the data belongs to. See the class documentation for particular implementations of this interface to see how this property is used. |
SetMmap(File)
The mmaped file from where an object will fetch the real data (it must be an Eina.File). If mmap is set during object construction, the object will automatically call Efl.IFile.Load() during the finalize phase of construction. (Since EFL 1.22)
Declaration
public virtual Error SetMmap(File f)
Parameters
Type | Name | Description |
---|---|---|
Eina.File | f | The handle to the Eina.File that will be used |
Returns
Type | Description |
---|---|
Eina.Error | 0 on success, error code otherwise |
SetScaleHint(ImageScaleHint)
The scale hint of a given image of the canvas. The scale hint affects how EFL is to cache scaled versions of its original source image.
Declaration
public virtual void SetScaleHint(ImageScaleHint hint)
Parameters
Type | Name | Description |
---|---|---|
Efl.Gfx.ImageScaleHint | hint | Scalable or static size hint. |
SetScaleMethod(ImageScaleMethod)
Determine how the image is scaled at render time. This allows more granular controls for how an image object should display its internal buffer. The underlying image data will not be modified.
Declaration
public virtual void SetScaleMethod(ImageScaleMethod scale_method)
Parameters
Type | Name | Description |
---|---|---|
Efl.Gfx.ImageScaleMethod | scale_method | Image scale type to use. |
SetSmoothScale(Boolean)
Whether to use high-quality image scaling algorithm for this image. When enabled, a higher quality image scaling algorithm is used when scaling images to sizes other than the source image's original one. This gives better results but is more computationally expensive.
Declaration
public virtual void SetSmoothScale(bool smooth_scale)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | smooth_scale | Whether to use smooth scale or not. |
SetStretchRegion(Iterator<ImageStretchRegion>, Iterator<ImageStretchRegion>)
This property defines the stretchable pixels region of an image.
When the regions are set by the user, the method will walk the iterators once and then destroy them. When the regions are retrieved by the user, it is his responsibility to destroy the iterators.. It will remember the information for the lifetime of the object. It will ignore all value of Efl.Gfx.IImage.GetBorderInsets(out System.Int32, out System.Int32, out System.Int32, out System.Int32), Efl.Gfx.IImage.BorderInsetsScale and Efl.Gfx.IImage.CenterFillMode . To reset the object you can just pass null
to both horizontal and vertical at the same time.
Declaration
public virtual Error SetStretchRegion(Iterator<ImageStretchRegion> horizontal, Iterator<ImageStretchRegion> vertical)
Parameters
Type | Name | Description |
---|---|---|
Eina.Iterator<Efl.Gfx.ImageStretchRegion> | horizontal | Representation of areas that are stretchable in the image horizontal space. |
Eina.Iterator<Efl.Gfx.ImageStretchRegion> | vertical | Representation of areas that are stretchable in the image vertical space. |
Returns
Type | Description |
---|---|
Eina.Error | Return an error code if the provided values are incorrect. |
Unload()
Perform all necessary operations to unload file data from the object. In the case where Efl.IFile.SetMmap(Eina.File) has been externally called on an object, the file handle stored in the object will be preserved.
Calling Efl.IFile.Unload() on an object which is not currently loaded will have no effect. (Since EFL 1.22)
Declaration
public virtual void Unload()
Events
ImagePreloadStateChangedEvent
If true
, image data has been preloaded and can be displayed. If false
, the image data has been unloaded and can no longer be displayed.
Declaration
public event EventHandler<ImageImagePreloadStateChangedEventArgs> ImagePreloadStateChangedEvent
Event Type
Type | Description |
---|---|
System.EventHandler<Efl.Gfx.ImageImagePreloadStateChangedEventArgs> |
ImageResizedEvent
Image was resized (its pixel data). The event data is the image's new size.
Declaration
public event EventHandler<ImageImageResizedEventArgs> ImageResizedEvent
Event Type
Type | Description |
---|---|
System.EventHandler<Efl.Gfx.ImageImageResizedEventArgs> |