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