NevronOpenVision
Nevron.Nov.Graphics Namespace / NRaster Class / CreateSubRaster Method
X location of the sub-raster's top-left corner.
Y location of the sub-raster's top-left corner.
Width of the sub-raster (in pixels).
Height of the sub-raster (in pixels).
CreateSubRaster Method
Creates a new raster as a portion of the current raster.
Syntax
public NRaster CreateSubRaster( 
   System.int x,
   System.int y,
   System.int width,
   System.int height
)

Parameters

x
X location of the sub-raster's top-left corner.
y
Y location of the sub-raster's top-left corner.
width
Width of the sub-raster (in pixels).
height
Height of the sub-raster (in pixels).

Return Value

A new raster object.
Remarks
The specified location and size must define a raster that fits within the current raster, otherwise an ArgumentException is thrown.
Requirements

Target Platforms: Windows 11, Windows 10, Windows 7, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later)

See Also