Method CreateClipper
- Namespace
- PaintDotNet.Imaging
- Assembly
- PaintDotNet.Windows.Core.dll
CreateClipper(IBitmapSource, RectInt32)
public static IBitmapSource CreateClipper(this IBitmapSource source, RectInt32 rect)
Parameters
sourceIBitmapSourcerectRectInt32
Returns
CreateClipper(IBitmapSource, Point2Int32)
public static IBitmapSource CreateClipper(this IBitmapSource source, Point2Int32 offset)
Parameters
sourceIBitmapSourceoffsetPoint2Int32
Returns
CreateClipper(IBitmapSource, SizeInt32)
public static IBitmapSource CreateClipper(this IBitmapSource source, SizeInt32 size)
Parameters
sourceIBitmapSourcesizeSizeInt32
Returns
CreateClipper<TPixel>(IBitmapSource<TPixel>, RectInt32)
public static IBitmapSource<TPixel> CreateClipper<TPixel>(this IBitmapSource<TPixel> source, RectInt32 rect) where TPixel : unmanaged, INaturalPixelInfo
Parameters
sourceIBitmapSource<TPixel>rectRectInt32
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
sourceIBitmapSource<TPixel>offsetPoint2Int32
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
sourceIBitmapSource<TPixel>sizeSizeInt32
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
sourceIBitmapSource<TPixel>The bitmap source to clip.
sourceRectRectInt32A 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
extendModeparameter.extendModeBitmapExtendModeSpecifies how pixels outside of the source bitmap's bounds are calculated.
Returns
- IBitmapSource<TPixel>
The clipped bitmap.
Type Parameters
TPixel