/// <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); }
public PixelData(PixelVolume volume, PixelFormat format = PixelFormat.BGRA8) { Internal_create(this, ref volume, format); }
private static extern void Internal_create(PixelData managedInstance, ref PixelVolume volume, PixelFormat format);
private static extern void Internal_getExtents(IntPtr thisPtr, out PixelVolume __output);
private static extern PixelData Internal_Scale(PixelData source, ref PixelVolume newSize, ScaleFilter filter);
/// <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)); }