set_anchor_point_from_gravity


Description:

[ Version ( deprecated = true , deprecated_since = "1.12" , since = "0.6" ) ]
public void set_anchor_point_from_gravity (Gravity gravity)

Warning: set_anchor_point_from_gravity is deprecated since 1.12.

Sets an anchor point on the actor, based on the given gravity (this is a convenience function wrapping set_anchor_point).

Note:

Use pivot_point and set_translation instead.

E.g. For CENTER set pivot_point to (0.5,0.5) and the translation to (width/2,height/2).

Since version 1.0 the anchor point will be stored as a gravity so that if the actor changes size then the anchor point will move. For example, if you set the anchor point to SOUTH_EAST and later double the size of the actor, the anchor point will move to the bottom right.

Parameters:

this

a Actor

gravity

Gravity.