Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
DataRectangle.cs
Go to the documentation of this file.
1 // Copyright (c) 2014 Silicon Studio Corp. (http://siliconstudio.co.jp)
2 // This file is distributed under GPL v3. See LICENSE.md for details.
3 using System;
4 using System.Runtime.InteropServices;
5 
6 namespace SiliconStudio.Paradox.Graphics
7 {
8  /// <summary>
9  /// Provides a pointer to 2D data.
10  /// </summary>
11  [StructLayout(LayoutKind.Sequential)]
12  public struct DataRectangle
13  {
14  /// <summary>
15  /// Initializes a new instance of the <see cref="DataRectangle"/> class.
16  /// </summary>
17  /// <param name="dataPointer">The pointer to the data.</param>
18  /// <param name="pitch">The stride.</param>
19  public DataRectangle(IntPtr dataPointer, int pitch)
20  {
21  DataPointer = dataPointer;
22  Pitch = pitch;
23  }
24 
25  /// <summary>
26  /// Gets or sets a pointer to the data.
27  /// </summary>
28  /// <value>
29  /// The stream.
30  /// </value>
31  public IntPtr DataPointer;
32 
33  /// <summary>
34  /// Gets or sets the number of bytes per row.
35  /// </summary>
36  /// <value>
37  /// The row pitch in bytes.
38  /// </value>
39  public int Pitch;
40  }
41 }
DataRectangle(IntPtr dataPointer, int pitch)
Initializes a new instance of the DataRectangle class.
IntPtr DataPointer
Gets or sets a pointer to the data.
int Pitch
Gets or sets the number of bytes per row.
Provides a pointer to 2D data.