コード例 #1
0
        /// <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
 public PixelData(PixelVolume volume, PixelFormat format = PixelFormat.BGRA8)
 {
     Internal_create(this, ref volume, format);
 }
コード例 #3
0
 private static extern void Internal_create(PixelData managedInstance, ref PixelVolume volume, PixelFormat format);
コード例 #4
0
 private static extern void Internal_getExtents(IntPtr thisPtr, out PixelVolume __output);
コード例 #5
0
 private static extern PixelData Internal_Scale(PixelData source, ref PixelVolume newSize, ScaleFilter filter);
コード例 #6
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));
 }