Interface Efl.Gfx.IEntity
Efl graphics interface (Since EFL 1.22)
Syntax
public interface IEntity : IWrapper, IDisposable
Properties
Geometry
Rectangular geometry that combines both position and size. (Since EFL 1.22)
Declaration
Rect Geometry { get; set; }
Property Value
Type | Description |
---|---|
Eina.Rect | The X,Y position and W,H size, in pixels. |
Position
The 2D position of a canvas object. The position is absolute, in pixels, relative to the top-left corner of the window, within its border decorations (application space). (Since EFL 1.22)
Declaration
Position2D Position { get; set; }
Property Value
Type | Description |
---|---|
Eina.Position2D | A 2D coordinate in pixel units. |
Scale
The scaling factor of an object. This property is an individual scaling factor on the object (Edje or UI widget). This property (or Edje's global scaling factor, when applicable), will affect this object's part sizes. If scale is not zero, then the individual scaling will override any global scaling set, for the object obj's parts. Set it back to zero to get the effects of the global scaling again.
Warning: In Edje, only parts which, at EDC level, had the "scale" property set to 1, will be affected by this function. Check the complete "syntax reference" for EDC files. (Since EFL 1.22)
Declaration
double Scale { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The scaling factor. |
Size
The 2D size of a canvas object. (Since EFL 1.22)
Declaration
Size2D Size { get; set; }
Property Value
Type | Description |
---|---|
Eina.Size2D | A 2D size in pixel units. |
Visible
The visibility of a canvas object. All canvas objects will become visible by default just before render. This means that it is not required to call Efl.Gfx.IEntity.SetVisible(System.Boolean) after creating an object unless you want to create it without showing it. Note that this behavior is new since 1.21, and only applies to canvas objects created with the EO API (i.e. not the legacy C-only API). Other types of Gfx objects may or may not be visible by default.
Note that many other parameters can prevent a visible object from actually being "visible" on screen. For instance if its color is fully transparent, or its parent is hidden, or it is clipped out, etc... (Since EFL 1.22)
Declaration
bool Visible { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Methods
GetGeometry()
Rectangular geometry that combines both position and size. (Since EFL 1.22)
Declaration
Rect GetGeometry()
Returns
Type | Description |
---|---|
Eina.Rect | The X,Y position and W,H size, in pixels. |
GetPosition()
Retrieves the position of the given canvas object. (Since EFL 1.22)
Declaration
Position2D GetPosition()
Returns
Type | Description |
---|---|
Eina.Position2D | A 2D coordinate in pixel units. |
GetScale()
Gets an object's scaling factor. (Since EFL 1.22)
Declaration
double GetScale()
Returns
Type | Description |
---|---|
System.Double | The scaling factor. |
GetSize()
Retrieves the (rectangular) size of the given Evas object. (Since EFL 1.22)
Declaration
Size2D GetSize()
Returns
Type | Description |
---|---|
Eina.Size2D | A 2D size in pixel units. |
GetVisible()
Retrieves whether or not the given canvas object is visible. (Since EFL 1.22)
Declaration
bool GetVisible()
Returns
Type | Description |
---|---|
System.Boolean |
|
SetGeometry(Rect)
Rectangular geometry that combines both position and size. (Since EFL 1.22)
Declaration
void SetGeometry(Rect rect)
Parameters
Type | Name | Description |
---|---|---|
Eina.Rect | rect | The X,Y position and W,H size, in pixels. |
SetPosition(Position2D)
Moves the given canvas object to the given location inside its canvas' viewport. If unchanged this call may be entirely skipped, but if changed this will trigger move events, as well as potential pointer,in or pointer,out events. (Since EFL 1.22)
Declaration
void SetPosition(Position2D pos)
Parameters
Type | Name | Description |
---|---|---|
Eina.Position2D | pos | A 2D coordinate in pixel units. |
SetScale(Double)
Sets the scaling factor of an object. (Since EFL 1.22)
Declaration
void SetScale(double scale)
Parameters
Type | Name | Description |
---|---|---|
System.Double | scale | The scaling factor. |
SetSize(Size2D)
Changes the size of the given object. Note that setting the actual size of an object might be the job of its container, so this function might have no effect. Look at Efl.Gfx.IHint instead, when manipulating widgets. (Since EFL 1.22)
Declaration
void SetSize(Size2D size)
Parameters
Type | Name | Description |
---|---|---|
Eina.Size2D | size | A 2D size in pixel units. |
SetVisible(Boolean)
Shows or hides this object. (Since EFL 1.22)
Declaration
void SetVisible(bool v)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | v |
|
Events
PositionChangedEvent
Object was moved, its position during the event is the new one. (Since EFL 1.22)
Declaration
event EventHandler<EntityPositionChangedEventArgs> PositionChangedEvent
Event Type
Type | Description |
---|---|
System.EventHandler<Efl.Gfx.EntityPositionChangedEventArgs> |
SizeChangedEvent
Object was resized, its size during the event is the new one. (Since EFL 1.22)
Declaration
event EventHandler<EntitySizeChangedEventArgs> SizeChangedEvent
Event Type
Type | Description |
---|---|
System.EventHandler<Efl.Gfx.EntitySizeChangedEventArgs> |
VisibilityChangedEvent
Object's visibility state changed, the event value is the new state. (Since EFL 1.22)
Declaration
event EventHandler<EntityVisibilityChangedEventArgs> VisibilityChangedEvent
Event Type
Type | Description |
---|---|
System.EventHandler<Efl.Gfx.EntityVisibilityChangedEventArgs> |