Tizen Native API
Coordinate Mapping Functions

This group provides functions that are used to map coordinates from the canvas to the screen or the screen to the canvas.

Functions

Evas_Coord evas_coord_screen_x_to_world (const Evas *e, int x)
 Converts or scales an ouput screen co-ordinate into canvas co-ordinates.
Evas_Coord evas_coord_screen_y_to_world (const Evas *e, int y)
 Converts or scales an ouput screen co-ordinate into canvas co-ordinates.
int evas_coord_world_x_to_screen (const Evas *e, Evas_Coord x)
 Converts or scales a canvas co-ordinate into output screen co-ordinates.
int evas_coord_world_y_to_screen (const Evas *e, Evas_Coord y)
 Converts or scales a canvas co-ordinate into output screen co-ordinates.

Function Documentation

Evas_Coord evas_coord_screen_x_to_world ( const Evas e,
int  x 
)

Converts or scales an ouput screen co-ordinate into canvas 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.

Since :
2.3.1
Remarks:
The following is an example:
 extern Evas *evas;
 extern int screen_x;
 Evas_Coord canvas_x;

 canvas_x = evas_coord_screen_x_to_world(evas, screen_x);
Parameters:
[in]eThe pointer to the Evas Canvas
[in]xThe screen or output x co-ordinate
Returns:
The screen co-ordinate translated to canvas unit co-ordinates
Evas_Coord evas_coord_screen_y_to_world ( const Evas e,
int  y 
)

Converts or scales an ouput screen co-ordinate into canvas 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.

Since :
2.3.1
Remarks:
The following is an example:
 extern Evas *evas;
 extern int screen_y;
 Evas_Coord canvas_y;

 canvas_y = evas_coord_screen_y_to_world(evas, screen_y);
Parameters:
[in]eThe pointer to the Evas Canvas
[in]yThe screen or output y co-ordinate
Returns:
The screen co-ordinate translated to canvas unit co-ordinates
int evas_coord_world_x_to_screen ( const Evas e,
Evas_Coord  x 
)

Converts or scales a canvas co-ordinate into output screen 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.

Since :
2.3.1
Remarks:
The following is an example:
 extern Evas *evas;
 int screen_x;
 extern Evas_Coord canvas_x;

 screen_x = evas_coord_world_x_to_screen(evas, canvas_x);
Parameters:
[in]eThe pointer to the Evas canvas
[in]xThe canvas x co-ordinate
Returns:
The output or screen co-ordinate translated to output co-ordinates
int evas_coord_world_y_to_screen ( const Evas e,
Evas_Coord  y 
)

Converts or scales a canvas co-ordinate into output screen 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.

Since :
2.3.1
Remarks:
The following is an example:
 extern Evas *evas;
 int screen_y;
 extern Evas_Coord canvas_y;

 screen_y = evas_coord_world_y_to_screen(evas, canvas_y);
Parameters:
[in]eThe pointer to the Evas Canvas
[in]yThe canvas y co-ordinate
Returns:
The output or screen co-ordinate translated to output co-ordinates