ICustomBitmapDataRowGetRefAsT Method
Gets a reference to a value interpreted as T within the current row at the specified x index.
Namespace: KGySoft.Drawing.ImagingAssembly: KGySoft.Drawing.Core (in KGySoft.Drawing.Core.dll) Version: 10.0.0-rc.1
ref T GetRefAs<T>(
int x
)
where T : struct, new()
Function GetRefAs(Of T As {Structure, New}) (
x As Integer
) As T
generic<typename T>
where T : value class, gcnew()
T% GetRefAs(
int x
)
abstract GetRefAs :
x : int -> 'T when 'T : struct, new()
- x Int32
- The x-coordinate of the value within the row to retrieve. The valid range depends on the size of T.
- T
- The type of the value to return a reference for. Must be a value type without managed references.
TA reference to a value interpreted as
T within the current row at the specified
x index.
If
T is a primitive type of size greater than 1 byte (for example
int,
float, etc.),
then the address of the result should be aligned to the size of
T. On most platforms misalignment affects only performance,
but depending on the architecture, dereferencing the returned misaligned managed pointer may provide an unexpected result, or can even throw a
DataMisalignedException.