L_LVKRN_API L_INT L_VecGetMarker(pVector, pMarker)
Gets the current marker settings.
Pointer to a vector handle.
Pointer to a VECTORMARKER structure to be updated with the current marker settings.
Value | Meaning |
---|---|
SUCCESS | The function was successful. |
< 1 | An error occurred. Refer to Return Codes. |
The marker is used to indicate those objects within the vector handle that are selected.
For more information on available marker settings, refer to the VECTORMARKER structure.
To modify the marker settings, get the current settings by calling L_VecGetMarker, set the new settings in the structure pointed to by pMarker, and call L_VecSetMarker.
Required DLLs and Libraries
This example will toggle the pen and brush color between red and blue.
L_LTVKRNTEX_API L_INT VecGetMarkerExample(pVECTORHANDLE pVector)
{
L_INT nRet;
VECTORMARKER Marker; /* marker */
/* Get marker settings */
nRet = L_VecGetMarker( pVector, &Marker );
if(nRet != SUCCESS)
return nRet;
/* Toggle pen and brush color between red and blue */
Marker.Pen.bExtPen = FALSE;
if( Marker.Pen.NewPen.LogPen.lopnColor == RGB( 0xFF, 0x00, 0x00 ) )
Marker.Pen.NewPen.LogPen.lopnColor = RGB( 0x00, 0x00, 0xFF );
else
Marker.Pen.NewPen.LogPen.lopnColor = RGB( 0xFF, 0x00, 0x00 );
Marker.Brush.VectorBrushStyle = VECTORBRUSH_STANDARD;
if( Marker.Brush.BrushType.StandardBrush.LogBrush.lbColor == RGB( 0xFF, 0x00, 0x00 ) )
Marker.Brush.BrushType.StandardBrush.LogBrush.lbColor = RGB( 0x00, 0x00, 0xFF );
else
Marker.Brush.BrushType.StandardBrush.LogBrush.lbColor = RGB( 0xFF, 0x00, 0x00 );
/* Set new marker */
nRet = L_VecSetMarker( pVector, &Marker );
return nRet;
}