Trait animate::ZoomActionExt[][src]

pub trait ZoomActionExt: 'static {
    fn get_focal_point(&self) -> InternalPoint;
fn get_transformed_focal_point(&self) -> InternalPoint;
fn get_zoom_axis(&self) -> ZoomAxis;
fn set_zoom_axis(&self, axis: ZoomAxis);
fn connect_zoom<F: Fn(&Self, &Actor, &InternalPoint, f64) -> bool + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_zoom_axis_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; }

Trait containing all ZoomAction methods.

Implementors

ZoomAction

Required methods

fn get_focal_point(&self) -> InternalPoint[src]

Retrieves the focal point of the current zoom

point

a Point

fn get_transformed_focal_point(&self) -> InternalPoint[src]

Retrieves the focal point relative to the actor’s coordinates of the current zoom

point

a Point

fn get_zoom_axis(&self) -> ZoomAxis[src]

Retrieves the axis constraint set by ZoomActionExt::set_zoom_axis

Returns

the axis constraint

fn set_zoom_axis(&self, axis: ZoomAxis)[src]

Restricts the zooming action to a specific axis

axis

the axis to constraint the zooming to

fn connect_zoom<F: Fn(&Self, &Actor, &InternalPoint, f64) -> bool + 'static>(
    &self,
    f: F
) -> SignalHandlerId
[src]

The ::zoom signal is emitted for each series of touch events that change the distance and focal point between the touch points.

The default handler of the signal will call ActorExt::set_scale on actor using the ratio of the first distance between the touch points and the current distance. To override the default behaviour, connect to this signal and return false.

actor

the Actor attached to the action

focal_point

the focal point of the zoom

factor

the initial distance between the 2 touch points

Returns

true if the zoom should continue, and false if the zoom should be cancelled.

fn connect_property_zoom_axis_notify<F: Fn(&Self) + 'static>(
    &self,
    f: F
) -> SignalHandlerId
[src]

Loading content...

Implementors

impl<O: IsA<ZoomAction>> ZoomActionExt for O[src]

Loading content...