Function

Gdkevents_get_angle

Declaration [src]

gboolean
gdk_events_get_angle (
  GdkEvent* event1,
  GdkEvent* event2,
  double* angle
)

Description [src]

Returns the relative angle from event1 to event2.

The relative angle is the angle between the X axis and the line through both events’ positions. The rotation direction for positive angles is from the positive X axis towards the positive Y axis.

This assumes that both events have X/Y information. If not, this function returns FALSE.

Parameters

event1 GdkEvent
 

First GdkEvent

 The data is owned by the caller of the function.
event2 GdkEvent
 

Second GdkEvent

 The data is owned by the caller of the function.
angle double*
 

Return location for the relative angle between both events.

 The argument will be set by the function.

Return value

Returns: gboolean
 

TRUE if the angle could be calculated.