LuciadCPillar 2023.1.02
luciad::IFeaturePainter Class Referenceabstract

A feature painter is used to specify how a feature is painted. More...

#include <luciad/layers/features/IFeaturePainter.h>

Public Member Functions

virtual ~IFeaturePainter ()=default
 
virtual void configureMetadata (FeaturePainterMetadata &metadata) const =0
 This method is called by the layer to determine when the styling defined by this IFeaturePainter changes. More...
 
virtual void paint (const Feature &feature, const FeaturePainterContext &context, FeatureCanvas &canvas) const =0
 Specifies how the given feature is painted. More...
 

Detailed Description

A feature painter is used to specify how a feature is painted.

An example of how to implement this interface can be found here.

Constructor & Destructor Documentation

◆ ~IFeaturePainter()

virtual luciad::IFeaturePainter::~IFeaturePainter ( )
virtualdefault

Member Function Documentation

◆ configureMetadata()

virtual void luciad::IFeaturePainter::configureMetadata ( FeaturePainterMetadata metadata) const
pure virtual

This method is called by the layer to determine when the styling defined by this IFeaturePainter changes.

The layer can use the FeaturePainterMetadata to know when to call the IFeaturePainter::paint method. The luciad::FeatureState::selected() and the luciad::FeaturePainterMetadata::painterDependsOnFeature are active by default.

Parameters
metadatathe metadata to be modified in this method

◆ paint()

virtual void luciad::IFeaturePainter::paint ( const Feature feature,
const FeaturePainterContext context,
FeatureCanvas canvas 
) const
pure virtual

Specifies how the given feature is painted.

This is done by submitting draw command on the given FeatureCanvas.

An example of how to implement this method can be found here.

Parameters
featurethe feature to painter
contextadditional context information
canvasthe canvas on which to submit draw commands.