new_subcontext


Description:

public static Context? new_subcontext (int x1, int y1, int x2, int y2, Context parent, out Context? where = null)

Creates a new sub-context which maps to a part of an existing context.

The coordinate arguments (x1 through y2) are interpreted relative to the parent context's limits. Pixel addressing is zero-based even in sub-contexts, i.e. the address of the top left pixel is (0,0) even in a sub-context which has been mapped onto the interior of its parent context.

Parameters:

x1

the left bounds

y1

the top bounds

x2

the right bounds

y2

the bottom bounds

parent

the parent context or null to use the screen

where

an unused Context struct to hold the subcontext or null

Returns:

where or a new context if where was null. Return null on error.