PostProcessFrameBufferEventArgsTryCopyFrameBuffer Method (IntPtr, Int32, Int32, Boolean) |
Copies the frame into caller owned memory as 32 bit BGRA.
Namespace:
Rhino.Display
Assembly:
RhinoCommon (in RhinoCommon.dll)
Syntaxpublic bool TryCopyFrameBuffer(
IntPtr destination,
int destinationStride,
int destinationCapacityInBytes,
bool preserveAlpha
)
Public Function TryCopyFrameBuffer (
destination As IntPtr,
destinationStride As Integer,
destinationCapacityInBytes As Integer,
preserveAlpha As Boolean
) As Boolean
Parameters
- destination
- Type: SystemIntPtr
Start of the destination buffer. This is the start of the buffer whichever row order is
asked for, unlike the GDI convention of pointing at the last row.
- destinationStride
- Type: SystemInt32
Bytes from the start of one destination row to the start of the next. A positive value
writes the top row of the image first, a negative value writes the bottom row first.
- destinationCapacityInBytes
- Type: SystemInt32
Bytes available at destination. - preserveAlpha
- Type: SystemBoolean
true to copy the alpha channel as the display engine left it. A frame buffer read back can
carry an alpha channel the engine never wrote, which makes the whole frame transparent, so
pass false unless the alpha is known to be meaningful. Passing true is also the faster of
the two copies, since it leaves the alpha channel alone.
Return Value
Type:
Booleantrue if the frame was copied.
See Also