/// <summary>Initializes the struct with default values.</summary>
        public static PixelVolume Default()
        {
            PixelVolume value = new PixelVolume();

            value.left   = 0;
            value.top    = 0;
            value.right  = 1;
            value.bottom = 1;
            value.front  = 0;
            value.back   = 1;

            return(value);
        }
Пример #2
0
 private static extern PixelData Internal_Scale(PixelData source, ref PixelVolume newSize, ScaleFilter filter);
Пример #3
0
 /// <summary>
 /// Scales pixel data in the source buffer and stores the scaled data in the destination buffer.
 /// </summary>
 /// <param name="source">Source pixels to scale.</param>
 /// <param name="newSize">New dimensions to scale to.</param>
 /// <param name="filter">Filter to use when scaling.</param>
 /// <returns>New pixel data object containing the scaled pixels.</returns>
 public static PixelData Scale(PixelData source, PixelVolume newSize, ScaleFilter filter = ScaleFilter.Linear)
 {
     return Internal_Scale(source, ref newSize, filter);
 }
Пример #4
0
 private static extern PixelData Internal_Scale(PixelData source, ref PixelVolume newSize, ScaleFilter filter);
Пример #5
0
 /// <summary>
 /// Scales pixel data in the source buffer and stores the scaled data in the destination buffer.
 /// </summary>
 /// <param name="source">Source pixels to scale.</param>
 /// <param name="newSize">New dimensions to scale to.</param>
 /// <param name="filter">Filter to use when scaling.</param>
 /// <returns>New pixel data object containing the scaled pixels.</returns>
 public static PixelData Scale(PixelData source, PixelVolume newSize, ScaleFilter filter = ScaleFilter.Linear)
 {
     return(Internal_Scale(source, ref newSize, filter));
 }
Пример #6
0
 private static extern void Internal_GetExtents(IntPtr thisPtr, out PixelVolume value);
Пример #7
0
 private static extern void Internal_CreateInstance(PixelData instance, ref PixelVolume volume, PixelFormat format);
Пример #8
0
        /// <summary>
        /// Creates a new 3D pixel data buffer capable of storing the specified amount of pixels.
        /// </summary>
        /// <param name="width">Number of pixels in each row.</param>
        /// <param name="height">Number of pixels in each column.</param>
        /// <param name="depth">Number of 2D slices.</param>
        /// <param name="format">Format of individual pixels.</param>
        public PixelData(int width, int height, int depth, PixelFormat format = PixelFormat.R8G8B8A8)
        {
            PixelVolume volume = new PixelVolume(0, 0, 0, width, height, depth);

            Internal_CreateInstance(this, ref volume, format);
        }
Пример #9
0
 /// <summary>
 /// Creates a new pixel data buffer capable of storing the specified amount of pixels.
 /// </summary>
 /// <param name="volume">Width, height and depth determining number of pixels to store.</param>
 /// <param name="format">Format of individual pixels.</param>
 public PixelData(PixelVolume volume, PixelFormat format = PixelFormat.R8G8B8A8)
 {
     Internal_CreateInstance(this, ref volume, format);
 }
Пример #10
0
 public PixelData(PixelVolume volume, PixelFormat format = PixelFormat.BGRA8)
 {
     Internal_create(this, ref volume, format);
 }
Пример #11
0
 private static extern void Internal_create(PixelData managedInstance, ref PixelVolume volume, PixelFormat format);
Пример #12
0
 private static extern void Internal_getExtents(IntPtr thisPtr, out PixelVolume __output);
Пример #13
0
 private static extern void Internal_GetExtents(IntPtr thisPtr, out PixelVolume value);
Пример #14
0
 private static extern void Internal_CreateInstance(PixelData instance, ref PixelVolume volume, PixelFormat format);
Пример #15
0
        /// <summary>
        /// Creates a new 3D pixel data buffer capable of storing the specified amount of pixels.
        /// </summary>
        /// <param name="width">Number of pixels in each row.</param>
        /// <param name="height">Number of pixels in each column.</param>
        /// <param name="depth">Number of 2D slices.</param>
        /// <param name="format">Format of individual pixels.</param>
        public PixelData(int width, int height, int depth, PixelFormat format = PixelFormat.R8G8B8A8)
        {
            PixelVolume volume = new PixelVolume(0, 0, 0, width, height, depth);

            Internal_CreateInstance(this, ref volume, format);
        }
Пример #16
0
 /// <summary>
 /// Creates a new pixel data buffer capable of storing the specified amount of pixels.
 /// </summary>
 /// <param name="volume">Width, height and depth determining number of pixels to store.</param>
 /// <param name="format">Format of individual pixels.</param>
 public PixelData(PixelVolume volume, PixelFormat format = PixelFormat.R8G8B8A8)
 {
     Internal_CreateInstance(this, ref volume, format);
 }