Functions that are used to map coordinates from the canvas to the screen or the screen to the canvas. More...
Functions | |
Evas_Coord | evas_coord_screen_x_to_world (const Evas *e, int x) |
Convert/scale an ouput screen co-ordinate into canvas co-ordinates. | |
Evas_Coord | evas_coord_screen_y_to_world (const Evas *e, int y) |
Convert/scale an ouput screen co-ordinate into canvas co-ordinates. | |
int | evas_coord_world_x_to_screen (const Evas *e, Evas_Coord x) |
Convert/scale a canvas co-ordinate into output screen co-ordinates. | |
int | evas_coord_world_y_to_screen (const Evas *e, Evas_Coord y) |
Convert/scale a canvas co-ordinate into output screen co-ordinates. |
Detailed Description
Functions that are used to map coordinates from the canvas to the screen or the screen to the canvas.
Function Documentation
Evas_Coord evas_coord_screen_x_to_world | ( | const Evas * | e, |
int | x | ||
) |
Convert/scale an ouput screen co-ordinate into canvas co-ordinates.
- Parameters
-
e The pointer to the Evas Canvas x The screen/output x co-ordinate
- Returns
- The screen co-ordinate translated to canvas unit co-ordinates
This function takes in a horizontal co-ordinate as the x
parameter and converts it into canvas units, accounting for output size, viewport size and location, returning it as the function return value. If e
is invalid, the results are undefined.
Example:
Evas_Coord evas_coord_screen_y_to_world | ( | const Evas * | e, |
int | y | ||
) |
Convert/scale an ouput screen co-ordinate into canvas co-ordinates.
- Parameters
-
e The pointer to the Evas Canvas y The screen/output y co-ordinate
- Returns
- The screen co-ordinate translated to canvas unit co-ordinates
This function takes in a vertical co-ordinate as the y
parameter and converts it into canvas units, accounting for output size, viewport size and location, returning it as the function return value. If e
is invalid, the results are undefined.
Example:
int evas_coord_world_x_to_screen | ( | const Evas * | e, |
Evas_Coord | x | ||
) |
Convert/scale a canvas co-ordinate into output screen co-ordinates.
- Parameters
-
e The pointer to the Evas Canvas x The canvas x co-ordinate
- Returns
- The output/screen co-ordinate translated to output co-ordinates
This function takes in a horizontal co-ordinate as the x
parameter and converts it into output units, accounting for output size, viewport size and location, returning it as the function return value. If e
is invalid, the results are undefined.
Example:
int evas_coord_world_y_to_screen | ( | const Evas * | e, |
Evas_Coord | y | ||
) |
Convert/scale a canvas co-ordinate into output screen co-ordinates.
- Parameters
-
e The pointer to the Evas Canvas y The canvas y co-ordinate
- Returns
- The output/screen co-ordinate translated to output co-ordinates
This function takes in a vertical co-ordinate as the x
parameter and converts it into output units, accounting for output size, viewport size and location, returning it as the function return value. If e
is invalid, the results are undefined.
Example: