From: pius.lee Date: Wed, 30 Aug 2017 08:17:31 +0000 (+0900) Subject: [ElmSharp] Add 2d rotation functions. X-Git-Tag: preview1-00151~9^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=caee148d53300c6e8994facfc675069cf06b0761;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git [ElmSharp] Add 2d rotation functions. Add evas 2D rotation mapping function - evas_map_util_rotate Add evas map function for point populating with object - evas_map_util_points_populate_from_object Change-Id: I5439b6c467a869c0878b8b3b200c10e241a20549 --- diff --git a/src/ElmSharp/ElmSharp/EvasMap.cs b/src/ElmSharp/ElmSharp/EvasMap.cs index b67264ee0..cdf141034 100755 --- a/src/ElmSharp/ElmSharp/EvasMap.cs +++ b/src/ElmSharp/ElmSharp/EvasMap.cs @@ -73,6 +73,15 @@ namespace ElmSharp } } + /// + /// Populates source and destination map points to exactly match the object. + /// + /// The object to use unmapped geometry to populate map coordinates + public void PopulatePoints(EvasObject obj) + { + Interop.Evas.evas_map_util_points_populate_from_object_full(_evasMap, obj, 0); + } + /// /// Populates source and destination map points to exactly match the object. /// @@ -95,6 +104,17 @@ namespace ElmSharp Interop.Evas.evas_map_util_points_populate_from_geometry(_evasMap, geometry.X, geometry.Y, geometry.Width, geometry.Height, z); } + /// + /// Rotate the map + /// + /// The abount of degrees from 0.0 to 360.0 to rotate + /// rotation's center horizontal position. + /// rotation's center vertical position. + public void Rotate(double degrees, int cx, int cy) + { + Interop.Evas.evas_map_util_rotate(_evasMap, degrees, cx, cy); + } + /// /// Rotates the map around 3 axes in 3D. /// diff --git a/src/ElmSharp/Interop/Interop.Evas.cs b/src/ElmSharp/Interop/Interop.Evas.cs index 3dfd188cc..cd4d0b61c 100644 --- a/src/ElmSharp/Interop/Interop.Evas.cs +++ b/src/ElmSharp/Interop/Interop.Evas.cs @@ -321,6 +321,9 @@ internal static partial class Interop [DllImport(Libraries.Evas)] internal static extern void evas_map_util_points_populate_from_geometry(IntPtr map, int x, int y, int w, int h, int z); + [DllImport(Libraries.Evas)] + internal static extern void evas_map_util_rotate(IntPtr map, double degree, int cx, int cy); + [DllImport(Libraries.Evas)] internal static extern void evas_map_util_3d_rotate(IntPtr map, double dx, double dy, double dz, int cx, int cy, int cz);