2 * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the License);
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
22 /// The EvasMap is an opaque handle to map points.
24 /// <since_tizen> preview </since_tizen>
31 /// Creates and initializes a new instance of the EvasMap class.
33 /// <param name="count">The number of points in the map</param>
34 /// <since_tizen> preview </since_tizen>
35 public EvasMap(int count)
37 _evasMap = Interop.Evas.evas_map_new(count);
41 internal EvasMap(IntPtr handle)
48 /// Destructor for the EvasMap class.
54 Interop.Evas.evas_map_free(_evasMap);
58 internal IntPtr Handle
67 /// Gets or sets the flag of the object to move synchronization for map rendering.
69 /// <since_tizen> preview </since_tizen>
70 public bool IsMoveSync
74 return Interop.Evas.evas_map_util_object_move_sync_get(_evasMap);
78 Interop.Evas.evas_map_util_object_move_sync_set(_evasMap, value);
83 /// Populates the source and destination map points to exactly match the object.
85 /// <param name="obj">The object to use unmapped geometry to populate the map coordinates.</param>
86 /// <since_tizen> preview </since_tizen>
87 public void PopulatePoints(EvasObject obj)
89 Interop.Evas.evas_map_util_points_populate_from_object_full(_evasMap, obj, 0);
93 /// Populates the source and destination map points to exactly match the object.
95 /// <param name="obj">The object to use unmapped geometry to populate the map coordinates.</param>
97 /// The point Z-coordinate hint (pre-perspective transform). This value is used for all the four points.
99 /// <since_tizen> preview </since_tizen>
100 public void PopulatePoints(EvasObject obj, int z)
102 Interop.Evas.evas_map_util_points_populate_from_object_full(_evasMap, obj, z);
106 /// Populates the source and destination map points to match the given geometry.
108 /// <param name="geometry">The geometry value contains X-coordinate, Y-coordinate, the width and height to use, to calculate the second and third points.</param>
109 /// <param name="z">The Z-coordinate hint (pre-perspective transform) This value is used for all the four points.</param>
110 /// <since_tizen> preview </since_tizen>
111 public void PopulatePoints(Rect geometry, int z)
113 Interop.Evas.evas_map_util_points_populate_from_geometry(_evasMap, geometry.X, geometry.Y, geometry.Width, geometry.Height, z);
119 /// <param name="degrees">The abount of degrees from 0.0 to 360.0 to rotate.</param>
120 /// <param name="cx">The rotation's center horizontal position.</param>
121 /// <param name="cy">The rotation's center vertical position.</param>
122 /// <since_tizen> preview </since_tizen>
123 public void Rotate(double degrees, int cx, int cy)
125 Interop.Evas.evas_map_util_rotate(_evasMap, degrees, cx, cy);
129 /// Rotates the map around 3 axes in 3D.
131 /// <param name="dx">The amount of degrees from 0.0 to 360.0 to rotate around the X-axis.</param>
132 /// <param name="dy">The amount of degrees from 0.0 to 360.0 to rotate around the Y-axis.</param>
133 /// <param name="dz">The amount of degrees from 0.0 to 360.0 to rotate around the Z-axis.</param>
134 /// <param name="cx">The rotation's center horizontal position.</param>
135 /// <param name="cy">The rotation's center vertical position.</param>
136 /// <param name="cz">The rotation's center depth position.</param>
137 /// <since_tizen> preview </since_tizen>
138 public void Rotate3D(double dx, double dy, double dz, int cx, int cy, int cz)
140 Interop.Evas.evas_map_util_3d_rotate(_evasMap, dx, dy, dz, cx, cy, cz);
144 /// Changes the map point's coordinate.
146 /// <param name="idx">The index of point to change, this must be smaller than the map size.</param>
147 /// <param name="point">The 3D point coordinate.</param>
148 /// <since_tizen> preview </since_tizen>
149 public void SetPointCoordinate(int idx, Point3D point)
151 Interop.Evas.evas_map_point_coord_set(_evasMap, idx, point.X, point.Y, point.Z);
155 /// Gets the map point's coordinate.
157 /// <param name="idx">The index of point to change, this must be smaller than the map size.</param>
158 /// <returns>The coordinates of a given point in the map.</returns>
159 /// <since_tizen> preview </since_tizen>
160 public Point3D GetPointCoordinate(int idx)
163 Interop.Evas.evas_map_point_coord_get(_evasMap, idx, out point.X, out point.Y, out point.Z);
168 /// Changes the map to apply the given zooming.
170 /// <param name="x">The horizontal zoom to use.</param>
171 /// <param name="y">The vertical zoom to use.</param>
172 /// <param name="cx">The zooming center horizontal position.</param>
173 /// <param name="cy">The zooming center vertical position.</param>
174 /// <since_tizen> preview </since_tizen>
175 public void Zoom(double x, double y, int cx, int cy)
177 Interop.Evas.evas_map_util_zoom(_evasMap, x, y, cx, cy);