Class: QgsVertexMarker

A map canvas item for marking vertices of features using e.g. circles or ‘x’.

List of all members, including inherited members

Class Hierarchy

Inheritance diagram of qgis.gui.QgsVertexMarker

Base classes

QgsMapCanvasItem

An abstract class for items that can be placed on the map canvas.

QGraphicsItem

Enums

IconType

Methods

center

Returns the center point of the marker, in map coordinates.

color

Returns the stroke color for the marker.

fillColor

Returns the fill color for the marker.

setCenter

Sets the center point of the marker, in map coordinates.

setColor

Sets the stroke color for the marker.

setFillColor

Sets the fill color for the marker.

setIconSize

setIconType

setPenWidth

class qgis.gui.QgsVertexMarker[source]

Bases: QgsMapCanvasItem

ICON_BOX = 3
ICON_CIRCLE = 4
ICON_CROSS = 1
ICON_DOUBLE_TRIANGLE = 5
ICON_INVERTED_TRIANGLE = 8
ICON_NONE = 0
ICON_RHOMBUS = 7
ICON_TRIANGLE = 6
ICON_X = 2
class IconType(*values)

Bases: IntEnum

ICON_BOX = 3
ICON_CIRCLE = 4
ICON_CROSS = 1
ICON_DOUBLE_TRIANGLE = 5
ICON_INVERTED_TRIANGLE = 8
ICON_NONE = 0
ICON_RHOMBUS = 7
ICON_TRIANGLE = 6
ICON_X = 2
center(self) QgsPointXY[source]

Returns the center point of the marker, in map coordinates.

See also

setCenter()

Added in version 3.18.

Return type:

QgsPointXY

color(self) QColor[source]

Returns the stroke color for the marker.

See also

setColor()

See also

fillColor()

Return type:

QColor

fillColor(self) QColor[source]

Returns the fill color for the marker. This setting only applies to some icon types.

See also

setFillColor()

See also

color()

Return type:

QColor

setCenter(self, point: QgsPointXY)[source]

Sets the center point of the marker, in map coordinates.

See also

center()

Parameters:

point (QgsPointXY)

setColor(self, color: QColor | Qt.GlobalColor | int)[source]

Sets the stroke color for the marker.

See also

color()

See also

setFillColor()

Parameters:

color (Union[QColor, Qt.GlobalColor, int])

setFillColor(self, color: QColor | Qt.GlobalColor | int)[source]

Sets the fill color for the marker. This setting only applies to some icon types.

See also

fillColor()

See also

setColor()

Parameters:

color (Union[QColor, Qt.GlobalColor, int])

setIconSize(self, iconSize: int)[source]
Parameters:

iconSize (int)

setIconType(self, iconType: int)[source]
Parameters:

iconType (int)

setPenWidth(self, width: int)[source]
Parameters:

width (int)