Menu
Sites
Language

Rotate an object by variable degree value(Clockwise)

Use below code snippet to rotate an object around its center point by a changeable degree value in clockwise direction.
@param[in] object_to_rotate The object you want to rotate
@param[in] degree The degree you want to rotate
@param[in] cx The rotation's center horizontal position
@param[in] cy The rotation's center vertical position

void view_rotate_object(Evas_Object *object_to_rotate, double degree, Evas_Coord cx, Evas_Coord cy)
{
	Evas_Map *m = NULL;

	if (object_to_rotate == NULL) {
		dlog_print(DLOG_ERROR, LOG_TAG, "object is NULL");
		return;
	}

	m = evas_map_new(4);
	evas_map_util_points_populate_from_object(m, object_to_rotate);
	evas_map_util_rotate(m, degree, cx, cy);
	evas_object_map_set(object_to_rotate, m);
	evas_object_map_enable_set(object_to_rotate, EINA_TRUE);
	evas_map_free(m);
}

Responses

1 Replies
An Nguyen

 is a website that allows users to read free manga online. Manga are Japanese comics that are usually drawn in black and white and have a distinctive style of art and storytelling. Manga can cover various genres, such as action, adventure, romance, comedy, horror, fantasy, sci-fi, and more. Manga are often serialized in magazines and later collected into volumes.