This repository has been archived by the owner on May 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement perspective rotation (#11821)
- Loading branch information
Showing
2 changed files
with
24 additions
and
1 deletion.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
Xamarin.Forms.Platform.Tizen/Extensions/EvasMapExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
using System; | ||
using System.Runtime.InteropServices; | ||
using ElmSharp; | ||
|
||
namespace Xamarin.Forms.Platform.Tizen | ||
{ | ||
public static class EvasMapExtensions | ||
{ | ||
public static void Perspective3D(this EvasMap map, int px, int py, int z0, int foc) | ||
{ | ||
var mapType = typeof(EvasMap); | ||
var propInfo = mapType.GetProperty("Handle", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance); | ||
var handle = (IntPtr)propInfo.GetValue(map); | ||
evas_map_util_3d_perspective(handle, px, py, z0, foc); | ||
} | ||
|
||
[DllImport("libevas.so.1")] | ||
static extern void evas_map_util_3d_perspective(IntPtr map, int px, int py, int z0, int foc); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters