libeek: add eek_keyboard_find_key_by_position().
This commit is contained in:
@ -28,6 +28,7 @@
|
||||
#endif /* HAVE_CONFIG_H */
|
||||
|
||||
#include "eek-types.h"
|
||||
#include <math.h>
|
||||
|
||||
/* EekKeysymMatrix */
|
||||
static EekKeysymMatrix *
|
||||
@ -81,6 +82,19 @@ eek_point_get_type (void)
|
||||
return our_type;
|
||||
}
|
||||
|
||||
void
|
||||
eek_point_rotate (EekPoint *point, gint angle)
|
||||
{
|
||||
EekPoint *p;
|
||||
gdouble r, phi;
|
||||
|
||||
phi = atan2 (point->y, point->x);
|
||||
r = sqrt (point->x * point->x + point->y * point->y);
|
||||
phi += angle * M_PI / 180;
|
||||
point->x = r * cos (phi);
|
||||
point->y = r * sin (phi);
|
||||
}
|
||||
|
||||
/* EekBounds */
|
||||
static EekBounds *
|
||||
eek_bounds_copy (const EekBounds *bounds)
|
||||
|
||||
Reference in New Issue
Block a user