Skip To Content ArcGIS for Developers Sign In Dashboard

Renderer Class

(Esri::ArcGISRuntime::Renderer)

Base class for renderers. More...

Public Functions

~Renderer()
Renderer *clone(QObject *parent = nullptr) const
RendererType rendererType() const
QString rotationExpression() const
RotationType rotationType() const
RendererSceneProperties sceneProperties() const
void setRotationExpression(const QString &expression)
void setRotationType(RotationType type)
void setSceneProperties(const RendererSceneProperties &sceneProperties)
Symbol *symbol(Feature *feature) const
Symbol *symbol(Feature *feature, bool applyAttributeOverrides) const
Symbol *symbol(Graphic *graphic) const
Symbol *symbol(Graphic *graphic, bool applyAttributeOverrides) const
virtual bool operator==(const Renderer *other) const

Reimplemented Public Functions

virtual QString toJson() const
virtual QJsonObject unknownJson() const
virtual QJsonObject unsupportedJson() const

Static Public Members

Renderer *fromJson(const QString &json, QObject *parent = nullptr)
  • 10 static public members inherited from QObject

Additional Inherited Members

Detailed Description

Base class for renderers.

Renderers use a scheme to symbolize graphics in a graphics overlay or features in a feature layer. Applying a renderer to a layer alleviates the need to individually set the symbol for every graphic or feature in that layer. Renderers define the type, color and size of the symbol. Some renderers will apply the same symbol to every graphic or feature in the layer. Other renderers apply different symbols to each graphic or feature based on attribute values.

Member Function Documentation

Renderer::~Renderer()

Destructor.

Renderer *Renderer::clone(QObject *parent = nullptr) const

Clones the renderer to a new instance with an optional parent.

Returns a new instance of the current renderer.

[static] Renderer *Renderer::fromJson(const QString &json, QObject *parent = nullptr)

Creates and returns a new renderer from the provided json, with an optional parent.

See also JsonSerializable.

RendererType Renderer::rendererType() const

Returns the renderer type.

QString Renderer::rotationExpression() const

Returns the rotation expression.

See also setRotationExpression.

RotationType Renderer::rotationType() const

Returns the origin and direction of rotation.

See also setRotationType.

RendererSceneProperties Renderer::sceneProperties() const

Returns the scene properties from this Renderer.

See also setSceneProperties().

void Renderer::setRotationExpression(const QString &expression)

Sets the rotation expression.

The expression specifies the angle of rotation based on an attribute value.

When an attribute name is specified in rotationExpression, it is enclosed in square brackets, for example, [Rotation].

See also rotationExpression().

void Renderer::setRotationType(RotationType type)

Sets the origin and direction of rotation.

If the type is defined as arithmetic, the symbol is rotated from east in a counterclockwise direction where east is the 0 axis. If the rotationType is defined as geographic, the symbol is rotated from north in a clockwise direction where north is the 0 axis.

See also rotationType().

void Renderer::setSceneProperties(const RendererSceneProperties &sceneProperties)

Sets the scene properties from this Renderer to sceneProperties.

See also sceneProperties().

Symbol *Renderer::symbol(Feature *feature) const

Returns the symbol from the given feature.

Symbol *Renderer::symbol(Feature *feature, bool applyAttributeOverrides) const

Returns the symbol that should be used to visualize the given feature with override attributes from renderer

If applyAttributeOverrides is set to true this method will get the symbol from the renderer and override the symbol properties with the overrides available on the renderer. There are four possible visual variable overrides which are size, color, rotation, and opacity.

If the override expression or attributes contain any information not known to the renderer or feature it will not be evaluated eg "scale", and thus the override will not be applied.

If the override attributes are applied successfully, then the returned symbol will be a MultilayerSymbol otherwise, the original symbol will be returned.

This function was introduced in Esri::ArcGISRuntime 100.5.

Symbol *Renderer::symbol(Graphic *graphic) const

Returns the symbol from the given graphic.

Symbol *Renderer::symbol(Graphic *graphic, bool applyAttributeOverrides) const

Returns the symbol that should be used to visualize the given graphic with override attributes from renderer

If applyAttributeOverrides is set to true this method will get the symbol from the renderer and override the symbol properties with the overrides available on the renderer. There are four possible visual variable overrides which are size, color, rotation, and opacity.

If the override expression or attributes contain any information not known to the renderer or graphic it will not be evaluated eg "scale" and thus the override will not be applied.

If the override attributes are applied successfully, then the returned symbol will be a MultilayerSymbol otherwise, the original symbol will be returned.

This function was introduced in Esri::ArcGISRuntime 100.5.

[virtual] QString Renderer::toJson() const

Reimplemented from JsonSerializable::toJson().

Returns this renderer as a JSON representation.

See also JsonSerializable.

[virtual] QJsonObject Renderer::unknownJson() const

Reimplemented from JsonSerializable::unknownJson().

Gets the unknown JSON of this object.

See also JsonSerializable.

[virtual] QJsonObject Renderer::unsupportedJson() const

Reimplemented from JsonSerializable::unsupportedJson().

Gets the unsupported JSON of this object.

See also JsonSerializable.

[virtual] bool Renderer::operator==(const Renderer *other) const

Equivalency operator.

Returns whether this object and other are equal.


Feedback on this topic?