- Main Page
- Related Pages
- Modules
- Data Structures
- Files
- Examples

Output and Viewport Resizing Functions
Canvas Functions

Functions that set and retrieve the output and viewport size of an evas. More...

#define | evas_canvas_output_method_set(render_method) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_OUTPUT_METHOD_SET), EO_TYPECHECK(int, render_method)
#define | evas_canvas_output_method_get(ret) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_OUTPUT_METHOD_GET), EO_TYPECHECK(int *, ret)
#define | evas_canvas_engine_info_get(ret) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_ENGINE_INFO_GET), EO_TYPECHECK(Evas_Engine_Info **, ret)
#define | evas_canvas_engine_info_set(info, ret) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_ENGINE_INFO_SET), EO_TYPECHECK(Evas_Engine_Info *, info), EO_TYPECHECK(Eina_Bool *, ret)
#define | evas_canvas_output_size_set(w, h) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_OUTPUT_SIZE_SET), EO_TYPECHECK(int, w), EO_TYPECHECK(int, h)
#define | evas_canvas_output_size_get(w, h) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_OUTPUT_SIZE_GET), EO_TYPECHECK(int *, w), EO_TYPECHECK(int *, h)
#define | evas_canvas_output_viewport_set(x, y, w, h) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_OUTPUT_VIEWPORT_SET), EO_TYPECHECK(Evas_Coord, x), EO_TYPECHECK(Evas_Coord, y), EO_TYPECHECK(Evas_Coord, w), EO_TYPECHECK(Evas_Coord, h)
#define | evas_canvas_output_viewport_get(x, y, w, h) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_OUTPUT_VIEWPORT_GET), EO_TYPECHECK(Evas_Coord *, x), EO_TYPECHECK(Evas_Coord *, y), EO_TYPECHECK(Evas_Coord *, w), EO_TYPECHECK(Evas_Coord *, h)
#define | evas_canvas_output_framespace_set(x, y, w, h) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_OUTPUT_FRAMESPACE_SET), EO_TYPECHECK(Evas_Coord, x), EO_TYPECHECK(Evas_Coord, y), EO_TYPECHECK(Evas_Coord, w), EO_TYPECHECK(Evas_Coord, h)
#define | evas_canvas_output_framespace_get(x, y, w, h) EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_OUTPUT_FRAMESPACE_GET), EO_TYPECHECK(Evas_Coord *, x), EO_TYPECHECK(Evas_Coord *, y), EO_TYPECHECK(Evas_Coord *, w), EO_TYPECHECK(Evas_Coord *, h)
void | evas_output_size_set (Evas *e, int w, int h)
| Sets the output size of the render engine of the given evas. More...
void | evas_output_size_get (const Evas *e, int *w, int *h)
| Retrieve the output size of the render engine of the given evas. More...
void | evas_output_viewport_set (Evas *e, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h)
| Sets the output viewport of the given evas in evas units. More...
void | evas_output_viewport_get (const Evas *e, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h)
| Get the render engine's output viewport co-ordinates in canvas units. More...
void | evas_output_framespace_set (Evas *e, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h)
| Sets the output framespace size of the render engine of the given evas. More...
void | evas_output_framespace_get (const Evas *e, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h)
| Get the render engine's output framespace co-ordinates in canvas units. More...

## Detailed Description

Functions that set and retrieve the output and viewport size of an evas.

## Macro Definition Documentation

#define evas_canvas_output_method_set | ( |  | render_method | ) | EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_OUTPUT_METHOD_SET), EO_TYPECHECK(int, render_method)

Since
  1.8

Sets the output engine for the given evas.

Parameters

  [in] | render_method |

See Also
  evas_output_method_set

Referenced by evas_output_method_set().

#define evas_canvas_output_size_set | ( |  | w,
|  |  | h
| ) |  | EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_OUTPUT_SIZE_SET), EO_TYPECHECK(int, w), EO_TYPECHECK(int, h)

Since
  1.8

Sets the output size of the render engine of the given evas.

Parameters

  [in] | w |
  [in] | h |

See Also
  evas_output_size_set

Referenced by evas_output_size_set().

#define evas_canvas_output_method_get | ( |  | ret | ) | EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_OUTPUT_METHOD_GET), EO_TYPECHECK(int *, ret)

Since
  1.8

Retrieves the number of the output engine used for the given evas.

Parameters

  [out] | ret |

See Also
  evas_output_method_get

Referenced by evas_output_method_get().

#define evas_canvas_engine_info_get | ( |  | ret | ) | EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_ENGINE_INFO_GET), EO_TYPECHECK(Evas_Engine_Info **, ret)

Since
  1.8

Retrieves the current render engine info struct from the given evas.

Parameters

  [out] | ret |

See Also
  evas_engine_info_get

Referenced by evas_engine_info_get().

#define evas_canvas_engine_info_set | ( |  | info,
|  |  | ret
| ) |  | EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_ENGINE_INFO_SET), EO_TYPECHECK(Evas_Engine_Info *, info), EO_TYPECHECK(Eina_Bool *, ret)

Since
  1.8

Applies the engine settings for the given evas from the given `Evas_Engine_Info` structure.

Parameters

  [in] | info |
  [out] | ret |

See Also
  evas_engine_info_set

Referenced by evas_engine_info_set().

#define evas_canvas_output_size_get | ( |  | w,
|  |  | h
| ) |  | EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_OUTPUT_SIZE_GET), EO_TYPECHECK(int *, w), EO_TYPECHECK(int *, h)

Since
  1.8

Retrieve the output size of the render engine of the given evas.

Parameters

  [out] | w |
  [out] | h |

See Also
  evas_output_size_get

Referenced by evas_output_size_get().

#define evas_canvas_output_viewport_set | ( |  | x,
|  |  | y,
|  |  | w,
|  |  | h
| ) |  | EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_OUTPUT_VIEWPORT_SET), EO_TYPECHECK(Evas_Coord, x), EO_TYPECHECK(Evas_Coord, y), EO_TYPECHECK(Evas_Coord, w), EO_TYPECHECK(Evas_Coord, h)

Since
  1.8

Sets the output viewport of the given evas in evas units.

Parameters

  [in] | x |
  [in] | y |
  [in] | w |
  [in] | h |

See Also
  evas_output_viewport_set

Referenced by evas_output_viewport_set().

#define evas_canvas_output_viewport_get | ( |  | x,
|  |  | y,
|  |  | w,
|  |  | h
| ) |  | EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_OUTPUT_VIEWPORT_GET), EO_TYPECHECK(Evas_Coord *, x), EO_TYPECHECK(Evas_Coord *, y), EO_TYPECHECK(Evas_Coord *, w), EO_TYPECHECK(Evas_Coord *, h)

Since
  1.8

Get the render engine's output viewport co-ordinates in canvas units.

Parameters

  [out] | x |
  [out] | y |
  [out] | w |
  [out] | h |

See Also
  evas_output_viewport_get

Referenced by evas_output_viewport_get().

#define evas_canvas_output_framespace_set | ( |  | x,
|  |  | y,
|  |  | w,
|  |  | h
| ) |  | EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_OUTPUT_FRAMESPACE_SET), EO_TYPECHECK(Evas_Coord, x), EO_TYPECHECK(Evas_Coord, y), EO_TYPECHECK(Evas_Coord, w), EO_TYPECHECK(Evas_Coord, h)

Since
  1.8

Sets the output framespace size of the render engine of the given evas.

Parameters

  [in] | x |
  [in] | y |
  [in] | w |
  [in] | h |

See Also
  evas_output_framespace_set

Referenced by evas_output_framespace_set().

#define evas_canvas_output_framespace_get | ( |  | x,
|  |  | y,
|  |  | w,
|  |  | h
| ) |  | EVAS_CANVAS_ID(EVAS_CANVAS_SUB_ID_OUTPUT_FRAMESPACE_GET), EO_TYPECHECK(Evas_Coord *, x), EO_TYPECHECK(Evas_Coord *, y), EO_TYPECHECK(Evas_Coord *, w), EO_TYPECHECK(Evas_Coord *, h)

Since
  1.8

Get the render engine's output framespace co-ordinates in canvas units.

Parameters

  [out] | x |
  [out] | y |
  [out] | w |
  [out] | h |

See Also
  evas_output_framespace_get

Referenced by evas_output_framespace_get().

## Function Documentation

void evas_output_size_set | ( | Evas * | e,
|  | int | w,
|  | int | h
| ) |  |

Sets the output size of the render engine of the given evas.

The evas will render to a rectangle of the given size once this function is called. The output size is independent of the viewport size. The viewport will be stretched to fill the given rectangle.

The units used for `w` and `h` depend on the engine used by the evas.

Parameters

  e | The given evas.
  w | The width in output units, usually pixels.
  h | The height in output units, usually pixels.

References evas_canvas_output_size_set.

Referenced by ecore_evas_buffer_allocfunc_new(), ecore_evas_ews_new(), and ecore_evas_object_image_new().

void evas_output_size_get | ( | const Evas * | e,
|  | int * | w,
|  | int * | h
| ) |  |

Retrieve the output size of the render engine of the given evas.

The output size is given in whatever the output units are for the engine.

If either `w` or `h` is `NULL`, then it is ignored. If `e` is invalid, the returned results are undefined.

Parameters

  e | The given evas.
  w | The pointer to an integer to store the width in.
  h | The pointer to an integer to store the height in.

References evas_canvas_output_size_get.

void evas_output_viewport_set | ( | Evas * | e,
|  | Evas_Coord | x,
|  | Evas_Coord | y,
|  | Evas_Coord | w,
|  | Evas_Coord | h
| ) |  |

Sets the output viewport of the given evas in evas units.

The output viewport is the area of the evas that will be visible to the viewer. The viewport will be stretched to fit the output target of the evas when rendering is performed.

Note
  The coordinate values do not have to map 1-to-1 with the output target. However, it is generally advised that it is done for ease of use.

Parameters

  e | The given evas.
  x | The top-left corner x value of the viewport.
  y | The top-left corner y value of the viewport.
  w | The width of the viewport. Must be greater than 0.
  h | The height of the viewport. Must be greater than 0.

References evas_canvas_output_viewport_set.

Referenced by ecore_evas_buffer_allocfunc_new(), ecore_evas_ews_new(), and ecore_evas_object_image_new().

void evas_output_viewport_get | ( | const Evas * | e,
|  | Evas_Coord * | x,
|  | Evas_Coord * | y,
|  | Evas_Coord * | w,
|  | Evas_Coord * | h
| ) |  |

Get the render engine's output viewport co-ordinates in canvas units.

Parameters

  e | The pointer to the Evas Canvas
  x | The pointer to a x variable to be filled in
  y | The pointer to a y variable to be filled in
  w | The pointer to a width variable to be filled in
  h | The pointer to a height variable to be filled in

Calling this function writes the current canvas output viewport size and location values into the variables pointed to by `x`, `y`, `w` and `h`. On success the variables have the output location and size values written to them in canvas units. Any of `x`, `y`, `w` or `h` that are `NULL` will not be written to. If `e` is invalid, the results are undefined.

Example:

extern Evas *evas;
Evas_Coord x, y, width, height;
evas_output_viewport_get(evas, &x, &y, &w, &h);

References evas_canvas_output_viewport_get.

Referenced by ecore_evas_ews_background_set(), and edje_perspective_new().

void evas_output_framespace_set | ( | Evas * | e,
|  | Evas_Coord | x,
|  | Evas_Coord | y,
|  | Evas_Coord | w,
|  | Evas_Coord | h
| ) |  |

Sets the output framespace size of the render engine of the given evas.

The framespace size is used in the Wayland engines to denote space where the output is not drawn. This is mainly used in ecore_evas to draw borders

The units used for `w` and `h` depend on the engine used by the evas.

Parameters

  e | The given evas.
  x | The left coordinate in output units, usually pixels.
  y | The top coordinate in output units, usually pixels.
  w | The width in output units, usually pixels.
  h | The height in output units, usually pixels.

Since
  1.1

References evas_canvas_output_framespace_set.

void evas_output_framespace_get | ( | const Evas * | e,
|  | Evas_Coord * | x,
|  | Evas_Coord * | y,
|  | Evas_Coord * | w,
|  | Evas_Coord * | h
| ) |  |

Get the render engine's output framespace co-ordinates in canvas units.

Parameters

  e | The pointer to the Evas Canvas
  x | The pointer to a x variable to be filled in
  y | The pointer to a y variable to be filled in
  w | The pointer to a width variable to be filled in
  h | The pointer to a height variable to be filled in

Since
  1.1

References evas_canvas_output_framespace_get.

Referenced by ecore_evas_ews_background_set().