PostProcessFrameBufferEventArgsTryCopyFrameBuffer Method (Byte, Int32, Boolean) |
Copies the frame into a caller owned array as 32 bit BGRA. Reuse one array across frames;
allocating per frame defeats the point of this event.
Namespace:
Rhino.Display
Assembly:
RhinoCommon (in RhinoCommon.dll)
Syntaxpublic bool TryCopyFrameBuffer(
byte[] destination,
int destinationStride,
bool preserveAlpha
)
Public Function TryCopyFrameBuffer (
destination As Byte(),
destinationStride As Integer,
preserveAlpha As Boolean
) As Boolean
Parameters
- destination
- Type: SystemByte
Destination array. - 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.
- 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