Ejemplo n.º 1
0
        internal OverlayHandle(CoordinatesHandle coordinates, EvasObject viewObject, ViewOverlayType type) : base(IntPtr.Zero, true)
        {
            var clonedCoordinatesHandle = CoordinatesHandle.CloneFrom(coordinates);

            CreateOverlay(clonedCoordinatesHandle, viewObject, type, out handle).ThrowIfFailed("Failed to create native overlay handle");
            clonedCoordinatesHandle.HasOwnership = false;
        }
Ejemplo n.º 2
0
        internal MarkerHandle(CoordinatesHandle coordinates, string imagePath, ViewMarkerType type) : base(IntPtr.Zero, true)
        {
            var clonedCoordinatesHandle = CoordinatesHandle.CloneFrom(coordinates);

            CreateMarker(clonedCoordinatesHandle, imagePath, type, out handle).ThrowIfFailed("Failed to create native handle for marker");
            clonedCoordinatesHandle.HasOwnership = false;
        }
Ejemplo n.º 3
0
        internal void ForEach(Action <CoordinatesHandle> action)
        {
            CoordinatesCallback callback = (index, handle, userData) =>
            {
                action(CoordinatesHandle.CloneFrom(handle));
                return(true);
            };

            Foreach(handle, callback, IntPtr.Zero).WarnIfFailed("Failed to get coordinates list from native handle");
        }
Ejemplo n.º 4
0
 internal void Add(CoordinatesHandle handleToAdd)
 {
     using (var clonedHandle = CoordinatesHandle.CloneFrom(handleToAdd))
     {
         if (this.Append(clonedHandle).WarnIfFailed("Failed to add coordinates to the list"))
         {
             clonedHandle.HasOwnership = false;
         }
     }
 }
Ejemplo n.º 5
0
        internal void ForeachPath(Action <CoordinatesHandle> action)
        {
            PathCallback callback = (index, total, nativeHandle, userData) =>
            {
                if (handle != IntPtr.Zero)
                {
                    action(CoordinatesHandle.CloneFrom(nativeHandle));
                    //Destroy(nativeHandle);
                }
                return(true);
            };

            ForeachPath(handle, callback, IntPtr.Zero).WarnIfFailed("Failed to get path coordinates list from native handle");
        }