61   qreal s = ( mIconSize - 1 ) / 2.0;
    64   pen.setWidth( mPenWidth );
    66   QBrush brush( mFillColor );
    75       p->drawLine( QLineF( -s, 0, s, 0 ) );
    76       p->drawLine( QLineF( 0, -s, 0, s ) );
    80       p->drawLine( QLineF( -s, -s, s, s ) );
    81       p->drawLine( QLineF( -s, s, s, -s ) );
    85       p->drawLine( QLineF( -s, -s, s, -s ) );
    86       p->drawLine( QLineF( s, -s, s, s ) );
    87       p->drawLine( QLineF( s, s, -s, s ) );
    88       p->drawLine( QLineF( -s, s, -s, -s ) );
    92       p->drawEllipse( QPointF( 0, 0 ), s, s );
    96       p->drawLine( QLineF( -s, -s,  s, -s ) );
    97       p->drawLine( QLineF( -s,  s,  s,  s ) );
    98       p->drawLine( QLineF( -s, -s,  s,  s ) );
    99       p->drawLine( QLineF( s, -s, -s,  s ) );
   107   qreal s = qreal( mIconSize + mPenWidth ) / 2.0;
   108   return QRectF( -s, -s, 2.0 * s, 2.0 * s );
 void paint(QPainter *p) override
function to be implemented by derived classes 
 
void updatePosition() override
called on changed extent or resize event to update position of the item 
 
A class to represent a 2D point. 
 
An abstract class for items that can be placed on the map canvas. 
 
void setPenWidth(int width)
 
QRectF boundingRect() const override
 
Map canvas is a class for displaying all GIS data types on a canvas. 
 
QgsVertexMarker(QgsMapCanvas *mapCanvas)
 
QColor color() const
Returns the stroke color for the marker. 
 
void setCenter(const QgsPointXY &point)
 
QSize iconSize(bool dockableToolbar)
Returns the user-preferred size of a window's toolbar icons. 
 
void setIconSize(int iconSize)
 
void setFillColor(const QColor &color)
Sets the fill color for the marker. 
 
QPointF toCanvasCoordinates(const QgsPointXY &point) const
transformation from map coordinates to screen coordinates 
 
void setColor(const QColor &color)
Sets the stroke color for the marker. 
 
void setIconType(int iconType)