;

Renderer Class

  • Renderer
  • class Esri::ArcGISRuntime::Renderer

    Base class for renderers. More...

    This class was introduced in Esri::ArcGISRuntime 100.0.

    Public Functions

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

    Reimplemented Public Functions

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

    Static Public Members

    Esri::ArcGISRuntime::Renderer *fromJson(const QString &json, QObject *parent = nullptr)

    Detailed Description

    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

    [override virtual] Renderer::~Renderer()

    Destructor.

    Esri::ArcGISRuntime::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] Esri::ArcGISRuntime::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.

    Esri::ArcGISRuntime::RendererType Renderer::rendererType() const

    Returns the renderer type.

    QString Renderer::rotationExpression() const

    Returns the rotation expression.

    See also setRotationExpression.

    Esri::ArcGISRuntime::RotationType Renderer::rotationType() const

    Returns the origin and direction of rotation.

    See also setRotationType.

    Esri::ArcGISRuntime::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(Esri::ArcGISRuntime::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 Esri::ArcGISRuntime::RendererSceneProperties &sceneProperties)

    Sets the scene properties from this Renderer to sceneProperties.

    See also sceneProperties().

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

    Returns the symbol from the given feature.

    Esri::ArcGISRuntime::Symbol *Renderer::symbol(Esri::ArcGISRuntime::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.

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

    Returns the symbol from the given graphic.

    Esri::ArcGISRuntime::Symbol *Renderer::symbol(Esri::ArcGISRuntime::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.

    [override virtual] QString Renderer::toJson() const

    Reimplements: JsonSerializable::toJson() const.

    Returns this renderer as a JSON representation.

    See also JsonSerializable.

    [override virtual] QJsonObject Renderer::unknownJson() const

    Reimplements: JsonSerializable::unknownJson() const.

    Gets the unknown JSON of this object.

    See also JsonSerializable.

    [override virtual] QJsonObject Renderer::unsupportedJson() const

    Reimplements: JsonSerializable::unsupportedJson() const.

    Gets the unsupported JSON of this object.

    See also JsonSerializable.

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

    Equivalency operator.

    Returns whether this object and other are equal.

    Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.