Skip to main content

MgraClear

BoardSupported
Host SystemYes
V4L2Yes
Clarity UHDYes
Concord PoENo
GenTLYes
GevIQYes
GigE VisionYes
IndioNo
Iris GTXYes
Radient eV-CLYes
Rapixo CLYes
Rapixo CoFYes
Rapixo CXPYes
USB3 VisionYes

Clear an image buffer to a specified foreground color, or remove graphics from a 2D graphics list.

Syntax

void MgraClear(
AIL_ID ContextGraId, //in
AIL_ID DstImageBufOrListGraId //out
)

Description

This function clears the entire specified image buffer to the foreground color of the specified 2D graphics context, or removes all the graphics from the specified 2D graphics list.

Note: Unlike most other functions that modify an Aurora Imaging Library object, you can call this function concurrently from multiple threads on the same Aurora Imaging Library 2D graphics list (DstImageBufOrListGraId) without using an M_MUTEX object, as long as all the other parameters of the concurrent calls do not also share data.

Parameters

ContextGraId (in, AIL_ID)

Specifies the identifier of the 2D graphics context. This parameter must be set to one of the following values:

For specifying the 2D graphics context

ValueDescription
M_DEFAULTSpecifies that the default 2D graphics context of the current Aurora Imaging Library application is used.

Note: Note that there is a different default 2D graphics context for each thread. | | 2D graphics context identifier | Specifies a valid 2D graphics context identifier, which you have allocated using MgraAlloc. |

DstImageBufOrListGraId (out, AIL_ID)

Specifies the identifier of a valid image buffer to clear or the identifier of a valid 2D graphics list to empty. You must have allocated the image buffer or the 2D graphics list using MbufAlloc... or MgraAllocList, respectively.

Copyright © 2026 Zebra Technologies.