# struct hiro::draw::Style

## Overview

Base class for setting rendering style of an arbitrary render object. More…

    #include <Renderer.h>

    struct Style {
        // fields

        bool visible = true;
        cogs::Transform transform;

        // construction

        virtual ~Style();

        // 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

Base class for setting rendering style of an arbitrary render object.

### Fields

    bool visible = true

Whether the renderer that uses this style should be skipped during the rendering.

    cogs::Transform transform

Model transformation applied to the renderer. In shader will appear as MODEL_MATRIX.

### Methods

    virtual bool ReadFromStream(std::istream& str)

Imports state from stream.

    virtual void WriteToStream(std::ostream& str)

Exports state to stream.

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

Read uint32_t version from stream and check if it is equal to the expected version.