MIL_ID ContextGraId, | //in |
MIL_ID DstImageBufId, | //in |
MIL_DOUBLE XStart, | //in |
MIL_DOUBLE YStart | //in |
This function performs a boundary-type seed fill. It fills in an area of the specified image with the foreground color of the specified graphics context, starting from the seed position (XStart, YStart). Filling occurs on adjacent pixels (vertically and horizontally to original seed pixel) that have the same value as the original seed pixel.
If MgraFill() is used on a multi-band buffer, each band will be processed separately. This means that each band of the adjacent pixels will be compared with the corresponding band of the seed pixel. This can produce strange results if, for example, you try to fill the inside of a red circle with blue. The blue will spread to the whole image since the red circle does not exist in the blue band.
A seed's coordinates are interpreted with respect to the input coordinate system, specified using MgraControl() with M_INPUT_UNITS. Note that if you set your input coordinate system to M_WORLD and you pass MgraFill() an uncalibrated image, the function will generate an error.
Note that MgraFill() cannot be performed on graphics contained within a graphics list.
Specifies the identifier of the graphics context. This parameter must be set to one of the following values:
For specifying the graphics
context
|
|||||||||||||||||||||||||||||||||||||||
Value | Description
|
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Specifies that the default graphics context of the current MIL application is used. (more details...) |
||||||||||||||||||||||||||||||||||||||
MIL graphics context identifier |
Specifies a valid graphics context identifier, which you have allocated using MgraAlloc(). |
Specifies the identifier of a valid image buffer in which to perform the filling operation. You must have allocated the image buffer using MbufAlloc...().
This image buffer must not have a region of interest (ROI) associated with it. Using an image buffer with an ROI will cause an error.
void MgraFillDouble
(MIL_ID ContextGraId,
MIL_ID DstImageBufId,
MIL_DOUBLE XStart,
MIL_DOUBLE YStart)
Parameters
ContextGraId See ContextGraId of the main function for a description. DstImageBufId See DstImageBufId of the main function for a description. XStart See XStart of the main function for a description. YStart See YStart of the main function for a description. |
Parameters
ContextGraId See ContextGraId of the main function for a description. DstImageBufId See DstImageBufId of the main function for a description. XStart See XStart of the main function for a description. YStart See YStart of the main function for a description. |
Header | Include mil.h. |
Library | Use mil.lib. |
DLL | Requires mil.dll. |