CVB.Net 14.0
LinearAccessData< T > Struct Template Reference

Linear Access properties. More...

Public Attributes

readonly IntPtr BasePtr
 Linear access base pointer as returned by ImagePlane.GetLinearAccess and ImagePlane.TryGetLinearAccess. More...
 
readonly IntPtr XInc
 X-increment for linear access. More...
 
readonly IntPtr YInc
 Y-increment for linear access. More...
 

Properties

IntPtr BasePtr [get]
 Linear access base pointer as returned by ImagePlane.GetLinearAccess and ImagePlane.TryGetLinearAccess. More...
 
IntPtr XInc [get]
 X-increment for linear access. More...
 
IntPtr YInc [get]
 Y-increment for linear access. More...
 
this[int x, int y] [get, set]
 Gets or sets the the pixel value at [x ,y ]. More...
 

Detailed Description

Linear Access properties.

Typed linear access properties with coordinate pixel access.

Template Parameters
TPixel type to use.Attention: Do not use reference types in T as this will leak memory!
Type Constraints
T :struct 

Member Data Documentation

◆ BasePtr

readonly IntPtr BasePtr

Linear access base pointer as returned by ImagePlane.GetLinearAccess and ImagePlane.TryGetLinearAccess.

Remember that the increments to be added to the base pointer are given in bytes, not in pixels. BasePtr by design points to the pixel at location (0,0).

◆ XInc

readonly IntPtr XInc

X-increment for linear access.

Remember that the increment is given in bytes, not in pixels.

◆ YInc

readonly IntPtr YInc

Y-increment for linear access.

Remember that the increment is given in bytes, not in pixels.

Property Documentation

◆ BasePtr

IntPtr BasePtr
get

Linear access base pointer as returned by ImagePlane.GetLinearAccess and ImagePlane.TryGetLinearAccess.

Remember that the increments to be added to the base pointer are given in bytes, not in pixels. BasePtr by design points to the pixel at location (0,0).

◆ this[int x, int y]

T this[int x, int y]
getset

Gets or sets the the pixel value at [x ,y ].

This is convenience functionality and not fast as this requires generic marshaling.

Attention: This access is unchecked regarding out-of-range violations!

Parameters
xX component of coordinate.
yY component of coordinate.
Returns
The value at [x ,y ].

◆ XInc

IntPtr XInc
get

X-increment for linear access.

Remember that the increment is given in bytes, not in pixels.

◆ YInc

IntPtr YInc
get

Y-increment for linear access.

Remember that the increment is given in bytes, not in pixels.