blob: 319305f8c68dea06e8797bcbe8b53e8c71d7aeef (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
|
#ifndef _EVAS_OBJECT_VG_EO_LEGACY_H_
#define _EVAS_OBJECT_VG_EO_LEGACY_H_
#ifndef _EVAS_OBJECT_VG_EO_LEGACY_TYPES
#define _EVAS_OBJECT_VG_EO_LEGACY_TYPES
/** Enumeration that defines how viewbox will be filled int the vg canvs's
* viewport. default Fill_Mode is @c none
*
* @ingroup Evas_Object_Vg_Group
*/
typedef enum
{
EVAS_OBJECT_VG_FILL_MODE_NONE = 0, /**< Don't scale the viewbox. Placed it
* inside viewport taking align property
* into account */
EVAS_OBJECT_VG_FILL_MODE_STRETCH, /**< Scale the viewbox so that it matches the
* canvas viewport. Aaspect ratio might be
* changed. */
EVAS_OBJECT_VG_FILL_MODE_MEET, /**< Scale the viewbox so that it fits inside
* canvas viewport while maintaining the aspect
* ratio. At least one of the dimensions of the
* viewbox should be equal to the corresponding
* dimension of the viewport. */
EVAS_OBJECT_VG_FILL_MODE_SLICE /**< Scale the viewbox so that it covers the
* entire canvas viewport while maintaining the
* aspect ratio. At least one of the dimensions
* of the viewbox should be equal to the
* corresponding dimension of the viewport. */
} Evas_Object_Vg_Fill_Mode;
#endif
/**
* @brief Control how the viewbox is mapped to the vg canvas's viewport.
*
* @param[in] obj The object.
* @param[in] fill_mode Fill mode type
*
* @ingroup Evas_Object_Vg_Group
*/
EAPI void evas_object_vg_fill_mode_set(Efl_VG *obj, Evas_Object_Vg_Fill_Mode fill_mode);
/**
* @brief Control how the viewbox is mapped to the vg canvas's viewport.
*
* @param[in] obj The object.
*
* @return Fill mode type
*
* @ingroup Evas_Object_Vg_Group
*/
EAPI Evas_Object_Vg_Fill_Mode evas_object_vg_fill_mode_get(const Efl_VG *obj);
/**
* @brief Sets the viewbox for the evas vg canvas. viewbox if set should be
* mapped to the canvas geometry when rendering the vg tree.
*
* @param[in] obj The object.
* @param[in] viewbox viewbox for the vg canvas
*
* @ingroup Evas_Object_Vg_Group
*/
EAPI void evas_object_vg_viewbox_set(Efl_VG *obj, Eina_Rect viewbox);
/**
* @brief Get the current viewbox from the evas_object_vg
*
* @param[in] obj The object.
*
* @return viewbox for the vg canvas
*
* @ingroup Evas_Object_Vg_Group
*/
EAPI Eina_Rect evas_object_vg_viewbox_get(const Efl_VG *obj);
/**
* @brief Control how the viewbox is positioned inside the viewport.
*
* @param[in] obj The object.
* @param[in] align_x Alignment in the horizontal axis (0 <= align_x <= 1).
* @param[in] align_y Alignment in the vertical axis (0 <= align_y <= 1).
*
* @ingroup Evas_Object_Vg_Group
*/
EAPI void evas_object_vg_viewbox_align_set(Efl_VG *obj, double align_x, double align_y);
/**
* @brief Control how the viewbox is positioned inside the viewport.
*
* @param[in] obj The object.
* @param[out] align_x Alignment in the horizontal axis (0 <= align_x <= 1).
* @param[out] align_y Alignment in the vertical axis (0 <= align_y <= 1).
*
* @ingroup Evas_Object_Vg_Group
*/
EAPI void evas_object_vg_viewbox_align_get(const Efl_VG *obj, double *align_x, double *align_y);
/**
* @brief Set the root node of the evas_object_vg.
*
* @note To manually create the shape object and show in the Vg object canvas
* you must create the hierarchy and set as root node.
*
* It takes the ownership of the root node.
*
* @param[in] obj The object.
* @param[in] root Root node(Efl_Canvas_Vg_Container) of the VG canvas.
*
* @ingroup Evas_Object_Vg_Group
*/
EAPI void evas_object_vg_root_node_set(Efl_VG *obj, Efl_Canvas_Vg_Node *root);
/**
* @brief Get the root node of the evas_object_vg.
*
* @param[in] obj The object.
*
* @return Root node of the VG canvas.
*
* @since 1.14
*
* @ingroup Evas_Object_Vg_Group
*/
EAPI Efl_Canvas_Vg_Node *evas_object_vg_root_node_get(const Efl_VG *obj);
#endif
|