Image Methods |
The Image type exposes the following members.
Name | Description | |
---|---|---|
AddChild |
Add a child entity.
(Inherited from Entity.) | |
AttachAnimator |
Add animator to this entity.
(Inherited from Entity.) | |
BringToFront |
Bring this entity to be on front (inside its parent).
(Inherited from Entity.) | |
CalcAutoHeight |
Calculate height automatically based on width, to maintain texture's original ratio.
For example if you have a texture of 400x200 pixels (eg 2:1 ratio) and its width in pixels is currently
100 units, calling this function will update this image height to be 100 / 2 = 50.
| |
CalcAutoWidth |
Calculate width automatically based on height, to maintain texture's original ratio.
For example if you have a texture of 400x200 pixels (eg 2:1 ratio) and its height in pixels is currently
100 units, calling this function will update this image width to be 100 x 2 = 200.
| |
CalcDestRect |
Calculate and return the destination rectangle, eg the space this entity is rendered on.
(Inherited from Entity.) | |
ClearChildren |
Remove all children entities.
(Inherited from Entity.) | |
Draw |
Draw this entity and its children.
(Inherited from Entity.) | |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
FindT(String, Boolean) |
Find and return first occurance of a child entity with a given identifier and specific type.
(Inherited from Entity.) | |
GetActiveStyle |
Return stylesheet property for current entity state (or default if undefined for state).
(Inherited from Entity.) | |
GetActualDestRect |
Return actual destination rectangle.
This can be override and implemented by things like Paragraph, where the actual destination rect is based on
text content, font and word-wrap.
(Inherited from Entity.) | |
GetColorAt |
Get texture color at a given coordinates.
| |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetRelativeOffset |
Return the relative offset, in pixels, from parent top-left corner.
(Inherited from Entity.) | |
GetStyleProperty |
Return stylesheet property for a given state.
(Inherited from Entity.) | |
GetTextureCoordsAt |
Convert a given position to texture coords of this image.
| |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
IsDeepChildOf |
Check if this entity is a descendant of another entity.
This goes up all the way to root.
(Inherited from Entity.) | |
IsDisabled |
Return if this entity is currently disabled, due to self or one of the parents / grandparents being disabled.
(Inherited from Entity.) | |
IsLocked |
Return if this entity is currently locked, due to self or one of the parents / grandparents being locked.
(Inherited from Entity.) | |
IsTouching |
Test if a given point is inside entity's boundaries.
(Inherited from Entity.) | |
IsVisible |
Return if this entity is currently visible, eg this and all its parents and grandparents are visible.
(Inherited from Entity.) | |
IterateChildren |
Iterate over children and call 'callback' for every direct child of this entity.
(Inherited from Entity.) | |
PropagateEventsTo |
Propagate all events trigger by this entity to a given other entity.
For example, if "OnClick" will be called on this entity, it will trigger OnClick on 'other' as well.
(Inherited from Entity.) | |
RemoveAnimator |
Remove animator from entity.
(Inherited from Entity.) | |
RemoveChild |
Remove child entity.
(Inherited from Entity.) | |
RemoveFromParent |
Remove this entity from its parent.
(Inherited from Entity.) | |
SendToBack |
Push this entity to the back (inside its parent).
(Inherited from Entity.) | |
SetAnchorAndOffset |
Set the position and anchor of this entity.
(Inherited from Entity.) | |
SetStyleProperty |
Set a stylesheet property.
(Inherited from Entity.) | |
SetTextureColorAt |
Set texture color at a given coordinates.
Note: this will affect all entities using this texture.
| |
ToEntitiesDictionary |
Create and return a dictionary of entities, where key is Identifier and value is the entity.
This will include self + all children (and their children), and will only include entities that have Identifier property defined.
Note: if multiple entities share the same identifier, the deepest entity in hirarchy will end up in dict.
(Inherited from Entity.) | |
ToString | Returns a string that represents the current object. (Inherited from Object.) | |
Update |
Called every frame to update entity state and call events.
(Inherited from Entity.) | |
UpdateStyle |
Update the entire stylesheet from a different stylesheet.
(Inherited from Entity.) |