Method CreateClipper
- Namespace
- PaintDotNet.Imaging
- Assembly
- PaintDotNet.Windows.Core.dll
CreateClipper(IBitmapSource, RectInt32)
public static IBitmapSource CreateClipper(this IBitmapSource source, RectInt32 rect)
Parameters
source
IBitmapSourcerect
RectInt32
Returns
CreateClipper(IBitmapSource, Point2Int32)
public static IBitmapSource CreateClipper(this IBitmapSource source, Point2Int32 offset)
Parameters
source
IBitmapSourceoffset
Point2Int32
Returns
CreateClipper(IBitmapSource, SizeInt32)
public static IBitmapSource CreateClipper(this IBitmapSource source, SizeInt32 size)
Parameters
source
IBitmapSourcesize
SizeInt32
Returns
CreateClipper<TPixel>(IBitmapSource<TPixel>, RectInt32)
public static IBitmapSource<TPixel> CreateClipper<TPixel>(this IBitmapSource<TPixel> source, RectInt32 rect) where TPixel : unmanaged, INaturalPixelInfo
Parameters
source
IBitmapSource<TPixel>rect
RectInt32
Returns
- IBitmapSource<TPixel>
Type Parameters
TPixel
CreateClipper<TPixel>(IBitmapSource<TPixel>, Point2Int32)
public static IBitmapSource<TPixel> CreateClipper<TPixel>(this IBitmapSource<TPixel> source, Point2Int32 offset) where TPixel : unmanaged, INaturalPixelInfo
Parameters
source
IBitmapSource<TPixel>offset
Point2Int32
Returns
- IBitmapSource<TPixel>
Type Parameters
TPixel
CreateClipper<TPixel>(IBitmapSource<TPixel>, SizeInt32)
public static IBitmapSource<TPixel> CreateClipper<TPixel>(this IBitmapSource<TPixel> source, SizeInt32 size) where TPixel : unmanaged, INaturalPixelInfo
Parameters
source
IBitmapSource<TPixel>size
SizeInt32
Returns
- IBitmapSource<TPixel>
Type Parameters
TPixel
CreateClipper<TPixel>(IBitmapSource<TPixel>, RectInt32, BitmapExtendMode)
Creates a clipped bitmap with a given extend mode. The clipping rect may extend outside of the source bounds.
public static IBitmapSource<TPixel> CreateClipper<TPixel>(this IBitmapSource<TPixel> source, RectInt32 sourceRect, BitmapExtendMode extendMode) where TPixel : unmanaged, INaturalPixelInfo
Parameters
source
IBitmapSource<TPixel>The bitmap source to clip.
sourceRect
RectInt32A rectangle, in source coordinate space, that defines the size of the output bitmap. This rectangle may extend outside of the source bitmap's bounds (including negative coordinates). Pixels that are within the source bounds will be copied from the source, while pixels outside of the source bounds will be calculated based on the
extendMode
parameter.extendMode
BitmapExtendModeSpecifies how pixels outside of the source bitmap's bounds are calculated.
Returns
- IBitmapSource<TPixel>
The clipped bitmap.
Type Parameters
TPixel