struct hiro::draw::GraphStyle — HIRO 0.7.0 documentation

# struct hiro::draw::GraphStyle

## Overview

Stylization of the rendered graph. More…

    #include <GraphRenderer.h>

    struct GraphStyle: public hiro::draw::Style {
        // fields

        std::string caption { "" };
        cogs::Color3f text_color { cogs::color::GRAY60 };
        cogs::Color3f line_color { cogs::color::GOLD };
        int32_t line_width { 2 };
        int32_t point_size { 5 };
        geom::IRect target_area { geom::IRect(50, 50, 250, 250) };

        // methods

        virtual bool ReadFromStream(std::istream& str);
        virtual void WriteToStream(std::ostream& str);
    };

### Inherited Members

    public:
        // fields

        bool visible = true;
        cogs::Transform transform;

        // methods

        virtual bool ReadFromStream(std::istream& str);
        virtual void WriteToStream(std::ostream& str);

    protected:
        // methods

        bool ReadVersion(std::istream& str, const uint32_t expected_version);

## Detailed Documentation

Stylization of the rendered graph.

### Fields

    std::string caption { "" }

Graph name label.

    cogs::Color3f text_color { cogs::color::GRAY60 }

Color of the text labels.

    cogs::Color3f line_color { cogs::color::GOLD }

Color of the graph line.

    int32_t line_width { 2 }

Width of the graph line.

    int32_t point_size { 5 }

Pixel size of the graph data points.

    geom::IRect target_area { geom::IRect(50, 50, 250, 250) }

2D area defining the screen region in which the graph will be displayed.

### Methods

    virtual bool ReadFromStream(std::istream& str)

Imports state from stream.

    virtual void WriteToStream(std::ostream& str)

Exports state to stream.