/// The display rotation.
/// </summary>
/// <since_tizen> 3 </since_tizen>
- /// <value>A <see cref="CameraRotation"/> that specifies the rotation of camera device.</value>
+ /// <value>A <see cref="Rotation"/> that specifies the rotation of camera device.</value>
/// <exception cref="ObjectDisposedException" > The camera already has been disposed.</exception>
- public CameraRotation Rotation
+ public Rotation Rotation
{
get
{
- CameraRotation val = CameraRotation.None;
-
- CameraErrorFactory.ThrowIfError(Native.GetRotation(_camera.GetHandle(), out val),
+ CameraErrorFactory.ThrowIfError(Native.GetRotation(_camera.GetHandle(), out var val),
"Failed to get display rotation");
return val;
set
{
- ValidationUtil.ValidateEnum(typeof(CameraRotation), value);
+ ValidationUtil.ValidateEnum(typeof(Rotation), value);
+
CameraErrorFactory.ThrowIfError(Native.SetRotation(_camera.GetHandle(), value),
"Failed to set display rotation.");
}
/// <since_tizen> 3 </since_tizen>
/// <value>A <see cref="CameraFlip"/> that specifies camera flip type.</value>
/// <exception cref="ObjectDisposedException" > The camera already has been disposed.</exception>
- public CameraFlip Flip
+ public Flips Flip
{
get
{
- CameraFlip val = CameraFlip.None;
-
- CameraErrorFactory.ThrowIfError(Native.GetFlip(_camera.GetHandle(), out val),
+ CameraErrorFactory.ThrowIfError(Native.GetFlip(_camera.GetHandle(), out var val),
"Failed to get display flip");
return val;
set
{
- ValidationUtil.ValidateEnum(typeof(CameraFlip), value);
+ ValidationUtil.ValidateFlagsEnum(value, Flips.Horizontal | Flips.Vertical, nameof(Flips));
+
CameraErrorFactory.ThrowIfError(Native.SetFlip(_camera.GetHandle(), value),
"Failed to set display flip.");
}
}
/// <summary>
- /// Enumeration for the camera flip type.
- /// </summary>
- /// <since_tizen> 3 </since_tizen>
- public enum CameraFlip
- {
- /// <summary>
- /// No Flip.
- /// </summary>
- None,
- /// <summary>
- /// Horizontal flip.
- /// </summary>
- Horizontal,
- /// <summary>
- /// Vertical flip.
- /// </summary>
- Vertical,
- /// <summary>
- /// Horizontal and vertical flip.
- /// </summary>
- Both
- }
-
- /// <summary>
/// Enumeration for the camera focus state.
/// </summary>
/// <since_tizen> 3 </since_tizen>
}
/// <summary>
- /// Enumeration for the camera rotation type.
- /// </summary>
- /// <since_tizen> 3 </since_tizen>
- public enum CameraRotation
- {
- /// <summary>
- /// No rotation.
- /// </summary>
- None,
- /// <summary>
- /// 90 degree rotation.
- /// </summary>
- Rotation90,
- /// <summary>
- /// 180 degree rotation.
- /// </summary>
- Rotation180,
- /// <summary>
- /// 270 degree rotation.
- /// </summary>
- Rotation270
- }
-
- /// <summary>
/// Enumeration for the camera state.
/// </summary>
/// <since_tizen> 3 </since_tizen>
private List<CameraFlashMode> _flashModes;
private List<CameraSceneMode> _sceneModes;
private List<CameraEffectMode> _effectModes;
- private List<CameraRotation> _streamRotations;
- private List<CameraFlip> _streamFlips;
+ private List<Rotation> _streamRotations;
+ private List<Flips> _streamFlips;
private List<CameraPtzType> _ptzTypes;
private delegate CameraError GetRangeDelegate(IntPtr handle, out int min, out int max);
/// </summary>
/// <since_tizen> 3 </since_tizen>
/// <returns>
- /// It returns a list containing all the supported <see cref="CameraRotation"/>.
+ /// An IEnumerable containing all the supported <see cref="Rotation"/>.
/// </returns>
/// <exception cref="ObjectDisposedException">The camera already has been disposed.</exception>
- public IEnumerable<CameraRotation> SupportedStreamRotations
+ public IEnumerable<Rotation> SupportedStreamRotations
{
get
{
{
try
{
- _streamRotations = new List<CameraRotation>();
+ _streamRotations = new List<Rotation>();
- NativeFeatures.StreamRotationCallback callback = (CameraRotation streamRotation, IntPtr userData) =>
+ NativeFeatures.StreamRotationCallback callback = (streamRotation, _) =>
{
_streamRotations.Add(streamRotation);
return true;
/// It returns a list containing all the supported <see cref="CameraFlip"/>.
/// </returns>
/// <exception cref="ObjectDisposedException">The camera already has been disposed.</exception>
- public IEnumerable<CameraFlip> SupportedStreamFlips
+ public IEnumerable<Flips> SupportedStreamFlips
{
get
{
{
try
{
- _streamFlips = new List<CameraFlip>();
+ _streamFlips = new List<Flips>();
- NativeFeatures.StreamFlipCallback callback = (CameraFlip streamFlip, IntPtr userData) =>
+ NativeFeatures.StreamFlipCallback callback = (streamFlip, _) =>
{
_streamFlips.Add(streamFlip);
return true;
/// The stream rotation.
/// </summary>
/// <since_tizen> 3 </since_tizen>
- /// <value>A <see cref="CameraRotation"/> that specifies the rotation of camera device.</value>
+ /// <value>A <see cref="Rotation"/> that specifies the rotation of camera device.</value>
/// <exception cref="ObjectDisposedException">The camera already has been disposed.</exception>
- public CameraRotation StreamRotation
+ public Rotation StreamRotation
{
get
{
set
{
- ValidationUtil.ValidateEnum(typeof(CameraRotation), value);
+ ValidationUtil.ValidateEnum(typeof(Rotation), value);
+
CameraErrorFactory.ThrowIfError(Native.SetStreamRotation(_camera.GetHandle(), value),
"Failed to set camera stream rotation.");
}
/// <since_tizen> 3 </since_tizen>
/// <value>A <see cref="CameraFlip"/> that specifies camera flip type.</value>
/// <exception cref="ObjectDisposedException">The camera already has been disposed.</exception>
- public CameraFlip StreamFlip
+ public Flips StreamFlip
{
get
{
set
{
- ValidationUtil.ValidateEnum(typeof(CameraFlip), value);
+ ValidationUtil.ValidateFlagsEnum(value, Flips.Horizontal | Flips.Vertical, nameof(Flips));
+
CameraErrorFactory.ThrowIfError(Native.SetFlip(_camera.GetHandle(), value),
"Failed to set camera flip.");
}
internal static extern CameraError SetVisible(IntPtr handle, bool visible);
[DllImport(Libraries.Camera, EntryPoint = "camera_get_display_rotation")]
- internal static extern CameraError GetRotation(IntPtr handle, out CameraRotation rotation);
+ internal static extern CameraError GetRotation(IntPtr handle, out Rotation rotation);
[DllImport(Libraries.Camera, EntryPoint = "camera_set_display_rotation")]
- internal static extern CameraError SetRotation(IntPtr handle, CameraRotation rotation);
+ internal static extern CameraError SetRotation(IntPtr handle, Rotation rotation);
[DllImport(Libraries.Camera, EntryPoint = "camera_get_display_flip")]
- internal static extern CameraError GetFlip(IntPtr handle, out CameraFlip flip);
+ internal static extern CameraError GetFlip(IntPtr handle, out Flips flip);
[DllImport(Libraries.Camera, EntryPoint = "camera_set_display_flip")]
- internal static extern CameraError SetFlip(IntPtr handle, CameraFlip flip);
+ internal static extern CameraError SetFlip(IntPtr handle, Flips flip);
[DllImport(Libraries.Camera, EntryPoint = "camera_attr_get_display_roi_area")]
internal static extern CameraError GetRoiArea(IntPtr handle, out int x, out int y, out int width, out int height);
internal delegate bool FlashModeCallback(CameraFlashMode mode, IntPtr userData);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
- internal delegate bool StreamRotationCallback(CameraRotation rotation, IntPtr userData);
+ internal delegate bool StreamRotationCallback(Rotation rotation, IntPtr userData);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
- internal delegate bool StreamFlipCallback(CameraFlip flip, IntPtr userData);
+ internal delegate bool StreamFlipCallback(Flips flip, IntPtr userData);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
internal delegate bool PtzTypeCallback(CameraPtzType type, IntPtr userData);
internal static extern CameraError GetLensOrientation(IntPtr handle, out int angle);
[DllImport(Libraries.Camera, EntryPoint = "camera_attr_set_stream_rotation")]
- internal static extern CameraError SetStreamRotation(IntPtr handle, CameraRotation mode);
+ internal static extern CameraError SetStreamRotation(IntPtr handle, Rotation mode);
[DllImport(Libraries.Camera, EntryPoint = "camera_attr_get_stream_rotation")]
- internal static extern CameraError GetStreamRotation(IntPtr handle, out CameraRotation mode);
+ internal static extern CameraError GetStreamRotation(IntPtr handle, out Rotation mode);
[DllImport(Libraries.Camera, EntryPoint = "camera_attr_set_stream_flip")]
- internal static extern CameraError SetFlip(IntPtr handle, CameraFlip flip);
+ internal static extern CameraError SetFlip(IntPtr handle, Flips flip);
[DllImport(Libraries.Camera, EntryPoint = "camera_attr_get_stream_flip")]
- internal static extern CameraError GetFlip(IntPtr handle, out CameraFlip flip);
+ internal static extern CameraError GetFlip(IntPtr handle, out Flips flip);
[DllImport(Libraries.Camera, EntryPoint = "camera_attr_set_hdr_mode")]
internal static extern CameraError SetHdrMode(IntPtr handle, CameraHdrMode hdr);
internal static extern PlayerErrorCode IsVisible(IntPtr player, out bool visible);
[DllImport(Libraries.Player, EntryPoint = "player_set_display_rotation")]
- internal static extern PlayerErrorCode SetRotation(IntPtr player, PlayerDisplayRotation rotation);
+ internal static extern PlayerErrorCode SetRotation(IntPtr player, Rotation rotation);
[DllImport(Libraries.Player, EntryPoint = "player_get_display_rotation")]
internal static extern PlayerErrorCode GetRotation(IntPtr player, out int rotation);
}
}
- private PlayerDisplayRotation _rotation = PlayerDisplayRotation.RotationNone;
+ private Rotation _rotation = Rotation.Rotate0;
/// <summary>
/// Gets or sets the rotation of the display.
/// </exception>
/// <exception cref="ObjectDisposedException">The player already has been disposed of.</exception>
/// <exception cref="ArgumentException">The specified value to set is invalid.</exception>
- public PlayerDisplayRotation Rotation
+ public Rotation Rotation
{
get
{
return;
}
- ValidationUtil.ValidateEnum(typeof(PlayerDisplayRotation), value);
+ ValidationUtil.ValidateEnum(typeof(Rotation), value);
Native.SetRotation(Player.Handle, value).
ThrowIfFailed("Failed to set the rotation state of the display");
High,
}
-
- /// <summary>
- /// Specifies display rotation modes for <see cref="Player"/>.
- /// </summary>
- /// <seealso cref="Display.Rotation"/>
- public enum PlayerDisplayRotation
- {
- /// <summary>
- /// Display is not rotated
- /// </summary>
- RotationNone,
-
- /// <summary>
- /// Display is rotated 90 degrees
- /// </summary>
- Rotation90,
-
- /// <summary>
- /// Display is rotated 180 degrees
- /// </summary>
- Rotation180,
-
- /// <summary>
- /// Display is rotated 270 degrees
- /// </summary>
- Rotation270
- }
-
-
/// <summary>
/// Specifies display modes for <see cref="Player"/>
/// </summary>
internal static extern RecorderError SetMotionRate(IntPtr handle, double motionRate);
[DllImport(Libraries.Recorder, EntryPoint = "recorder_attr_get_orientation_tag")]
- internal static extern RecorderError GetOrientationTag(IntPtr handle, out RecorderOrientation orientation);
+ internal static extern RecorderError GetOrientationTag(IntPtr handle, out Rotation orientation);
[DllImport(Libraries.Recorder, EntryPoint = "recorder_attr_set_orientation_tag")]
- internal static extern RecorderError SetOrientationTag(IntPtr handle, RecorderOrientation orientation);
+ internal static extern RecorderError SetOrientationTag(IntPtr handle, Rotation orientation);
[DllImport(Libraries.Recorder, EntryPoint = "recorder_get_video_resolution")]
internal static extern RecorderError GetVideoResolution(IntPtr handle, out int width, out int height);
/// Enumeration for the recorder policy.
/// </summary>
/// <since_tizen> 3 </since_tizen>
- public enum RecorderPolicy
+ public enum RecorderPolicy
{
/// <summary>
/// None.
}
/// <summary>
- /// Enumeration for the recorder rotation type.
- /// </summary>
- /// <since_tizen> 3 </since_tizen>
- public enum RecorderOrientation
- {
- /// <summary>
- /// No rotation.
- /// </summary>
- RotationNone,
- /// <summary>
- /// 90 Degree rotation.
- /// </summary>
- Rotation90,
- /// <summary>
- /// 180 Degree rotation.
- /// </summary>
- Rotation180,
- /// <summary>
- /// 270 Degree rotation.
- /// </summary>
- Rotation270
- }
-
- /// <summary>
/// Enumeration for recorder states.
/// </summary>
/// <since_tizen> 3 </since_tizen>
/// The orientation in a video metadata tag.
/// </summary>
/// <since_tizen> 3 </since_tizen>
- /// <value>A <see cref="RecorderOrientation"/> that specifies the type of orientation.</value>
+ /// <value>A <see cref="Rotation"/> that specifies the type of orientation.</value>
/// <exception cref="ObjectDisposedException">The camera already has been disposed.</exception>
- public RecorderOrientation OrientationTag
+ public Rotation OrientationTag
{
get
{
- RecorderOrientation val = 0;
-
- RecorderErrorFactory.ThrowIfError(Native.GetOrientationTag(_recorder.GetHandle(), out val),
+ RecorderErrorFactory.ThrowIfError(Native.GetOrientationTag(_recorder.GetHandle(), out var val),
"Failed to get recorder orientation.");
return val;
/// Specifies how an image is rotated or flipped.
/// </summary>
/// <seealso cref="RotateTransform"/>
- public enum ImageRotation
+ internal enum ImageRotation
{
/// <summary>
/// No rotation.
using System;
using System.Collections;
using System.Collections.Generic;
+using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Threading.Tasks;
using static Interop.ImageUtil;
}
}
+ internal static TransformHandle CreateHandle()
+ {
+ Create(out var handle).ThrowIfFailed("Failed to run ImageTransformer");
+ Debug.Assert(handle != null);
+ return handle;
+ }
+
internal abstract void Configure(TransformHandle handle);
- internal virtual Task<MediaPacket> ApplyAsync(TransformHandle handle, MediaPacket source)
+ internal virtual Task<MediaPacket> ApplyAsync(MediaPacket source)
{
- Configure(handle);
+ using (TransformHandle handle = CreateHandle())
+ {
+ Configure(handle);
- return RunAsync(handle, source);
+ return RunAsync(handle, source);
+ }
}
}
// intended blank
}
- internal override async Task<MediaPacket> ApplyAsync(TransformHandle handle, MediaPacket source)
+ internal override async Task<MediaPacket> ApplyAsync(MediaPacket source)
{
if (Children.Count == 0)
{
var items = Children;
- MediaPacket curPacket = await items[0].ApplyAsync(handle, source);
+ MediaPacket curPacket = await items[0].ApplyAsync(source);
for (int i = 1; i < items.Count; ++i)
{
- var item = items[i];
-
var oldPacket = curPacket;
try
{
- curPacket = await item.ApplyAsync(handle, curPacket);
+ curPacket = await items[i].ApplyAsync(curPacket);
}
finally
{
/// <summary>
/// Rotates or flips an image.
/// </summary>
- /// <seealso cref="ImageRotation"/>
+ /// <seealso cref="Rotation"/>
public class RotateTransform : ImageTransform
{
- private ImageRotation _rotation;
+ private Rotation _rotation;
/// <summary>
/// Initialize a new instance of the <see cref="RotateTransform"/> class.
/// </summary>
/// <param name="rotation">The value how to rotate an image.</param>
/// <exception cref="ArgumentException"><paramref name="rotation"/> is invalid.</exception>
- public RotateTransform(ImageRotation rotation)
+ /// <exception cref="ArgumentOutOfRangeException"><paramref name="rotation"/> is <see cref="Rotation.Rotate90"/>.</exception>
+ public RotateTransform(Rotation rotation)
{
Rotation = rotation;
+
}
/// <summary>
/// Gets or sets the value how to rotate an image.
/// </summary>
/// <exception cref="ArgumentException"><paramref name="value"/> is invalid.</exception>
- public ImageRotation Rotation
+ /// <exception cref="ArgumentOutOfRangeException"><paramref name="value"/> is <see cref="Rotation.Rotate90"/>.</exception>
+ public Rotation Rotation
{
get { return _rotation; }
set
{
- ValidationUtil.ValidateEnum(typeof(ImageRotation), value, nameof(Rotation));
+ ValidationUtil.ValidateEnum(typeof(Rotation), value, nameof(Rotation));
+
+ if (value == Rotation.Rotate0)
+ {
+ throw new ArgumentOutOfRangeException(nameof(value), "Rotation can't be Rotate0.");
+ }
_rotation = value;
}
internal override void Configure(TransformHandle handle)
{
- SetRotation(handle, Rotation);
+ SetRotation(handle, GetImageRotation());
+ }
+
+ private ImageRotation GetImageRotation()
+ {
+ switch (Rotation)
+ {
+ case Rotation.Rotate90: return ImageRotation.Rotate90;
+ case Rotation.Rotate180: return ImageRotation.Rotate180;
+ case Rotation.Rotate270: return ImageRotation.Rotate270;
+ }
+
+ Debug.Fail("Rotation is invalid value!");
+ return ImageRotation.Rotate0;
+ }
+ }
+
+
+ /// <summary>
+ /// Rotates or flips an image.
+ /// </summary>
+ /// <seealso cref="Rotation"/>
+ public class FlipTransform : ImageTransform
+ {
+ private Flips _flip;
+
+ /// <summary>
+ /// Initialize a new instance of the <see cref="RotateTransform"/> class.
+ /// </summary>
+ /// <param name="flip">The value how to flip an image.</param>
+ /// <exception cref="ArgumentException"><paramref name="flip"/> is invalid.</exception>
+ /// <exception cref="ArgumentOutOfRangeException"><paramref name="flip"/> is <see cref="Flip.None"/>.</exception>
+ public FlipTransform(Flips flip)
+ {
+ Flip = flip;
+ }
+
+ /// <summary>
+ /// Gets or sets the value how to rotate an image.
+ /// </summary>
+ /// <exception cref="ArgumentException"><paramref name="value"/> is invalid.</exception>
+ /// <exception cref="ArgumentOutOfRangeException"><paramref name="value"/> is <see cref="Flip.None"/>.</exception>
+ public Flips Flip
+ {
+ get { return _flip; }
+ set
+ {
+ ValidationUtil.ValidateFlagsEnum(value, Flips.Horizontal | Flips.Vertical, nameof(Flips));
+
+ if (value == Flips.None)
+ {
+ throw new ArgumentOutOfRangeException(nameof(value), "Flip can't be None.");
+ }
+
+ _flip = value;
+ }
+ }
+
+ internal override void Configure(TransformHandle handle)
+ {
+ // intended blank
+ }
+
+ private async Task<MediaPacket> ApplyAsync(TransformHandle handle, MediaPacket source,
+ ImageRotation rotation)
+ {
+ SetRotation(handle, rotation);
+ return await RunAsync(handle, source);
+ }
+
+ internal override async Task<MediaPacket> ApplyAsync(MediaPacket source)
+ {
+ using (TransformHandle handle = CreateHandle())
+ {
+ if (Flip.HasFlag(Flips.Vertical | Flips.Horizontal))
+ {
+ var flipped = await ApplyAsync(handle, source, ImageRotation.FlipHorizontal);
+ try
+ {
+ return await ApplyAsync(handle, flipped, ImageRotation.FlipVertical);
+ }
+ finally
+ {
+ flipped.Dispose();
+ }
+ }
+
+ return await ApplyAsync(handle, source, Flip.HasFlag(Flips.Horizontal) ?
+ ImageRotation.FlipHorizontal : ImageRotation.FlipVertical);
+ }
}
}
*/
using System;
-using System.Diagnostics;
using System.Threading.Tasks;
-using static Interop.ImageUtil;
-using static Interop.ImageUtil.Transform;
namespace Tizen.Multimedia.Util
{
/// </summary>
public class ImageTransformer : IDisposable
{
- private TransformHandle _handle = null;
-
/// <summary>
/// Initialize a new instance of the <see cref="ImageTransformer"/> class.
/// </summary>
public ImageTransformer()
{
- Create(out _handle).ThrowIfFailed("Failed to create ImageTransformer");
-
- Debug.Assert(_handle != null);
}
/// <summary>
throw new ArgumentNullException(nameof(item));
}
- return item.ApplyAsync(_handle, source);
+ return item.ApplyAsync(source);
}
#region IDisposable Support
{
if (!_disposed)
{
- if (_handle != null)
- {
- _handle.Dispose();
- }
-
_disposed = true;
}
}
[DllImport(Libraries.ImageUtil, EntryPoint = "image_util_transform_set_hardware_acceleration")]
internal static extern ImageUtilError SetHardwareAcceleration(TransformHandle handle, bool mode);
- [DllImport(Libraries.ImageUtil, EntryPoint = "image_util_transform_get_rotation")]
- internal static extern ImageUtilError GetRotation(TransformHandle handle, out ImageRotation rotation);
-
[DllImport(Libraries.ImageUtil, EntryPoint = "image_util_transform_set_rotation")]
internal static extern ImageUtilError SetRotation(TransformHandle handle, ImageRotation rotation);
*/
using System;
+using System.Globalization;
namespace Tizen.Multimedia
{
}
}
+ internal static void ValidateFlagsEnum<T>(T value, T allMasks, string paramName) where T : IConvertible
+ {
+ if (((~allMasks.ToInt32(CultureInfo.InvariantCulture)) & value.ToInt32(CultureInfo.InvariantCulture)) != 0)
+ {
+ throw new ArgumentException($"Invalid { typeof(T).Name } value : { value }", paramName);
+ }
+ }
+
internal static void ValidateFeatureSupported(string featureKey)
{
if (Features.IsSupported(featureKey) == false)
--- /dev/null
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System;
+
+namespace Tizen.Multimedia
+{
+ /// <summary>
+ /// Specifies the flip operation.
+ /// </summary>
+ [Flags]
+ public enum Flips
+ {
+ /// <summary>
+ /// No flip operation.
+ /// </summary>
+ None = 0,
+
+ /// <summary>
+ /// Flip horizontally.
+ /// </summary>
+ Horizontal = 1,
+
+ /// <summary>
+ /// Flip vertically.
+ /// </summary>
+ Vertical = 2,
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+namespace Tizen.Multimedia
+{
+ /// <summary>
+ /// Specifies the directions of rotation.
+ /// </summary>
+ public enum Rotation
+ {
+ /// <summary>
+ /// No rotation.
+ /// </summary>
+ Rotate0,
+
+ /// <summary>
+ /// Rotate clockwise by 90 degrees.
+ /// </summary>
+ Rotate90,
+
+ /// <summary>
+ /// Rotate clockwise by 180 degrees.
+ /// </summary>
+ Rotate180,
+
+ /// <summary>
+ /// Rotate clockwise by 270 degrees.
+ /// </summary>
+ Rotate270
+ }
+}