Mapper  0.9.0
API documentation
Public Types | Public Member Functions | Public Attributes | List of all members
OpenOrienteering::RenderConfig Class Reference

This class contains rendering configuration values. More...

#include <renderable.h>

Collaboration diagram for OpenOrienteering::RenderConfig:
Collaboration graph
[legend]

Public Types

enum  Option {
  Screen = 1<<0, DisableAntialiasing = 1<<1, ForceMinSize = 1<<2, HelperSymbols = 1<<3,
  Highlighted = 1<<4, RequireSpotColor = 1<<5, Tool = Screen | ForceMinSize | HelperSymbols, NoOptions = 0
}
 Flags indicating particular rendering configuration options. More...
 

Public Member Functions

bool testFlag (const Option flag) const
 A convenience method for testing flags in the options value. More...
 

Public Attributes

const Mapmap
 The map. More...
 
QRectF bounding_box
 The bounding box of the area to be drawn. More...
 
qreal scaling
 The scaling expressed as pixels per mm. More...
 
Options options
 The rendering options. More...
 
qreal opacity
 The opacity. More...
 

Detailed Description

This class contains rendering configuration values.

A reference to an object of this class replaces what used to be part of the parameter list of various draw()/render() methods. With that old approach, each new rendering configuration option required changes in many signatures and function calls. In addition, the boolean options were not verbose at all.

Objects are meant to be initialized by initializer lists (C++11).

Member Enumeration Documentation

◆ Option

Flags indicating particular rendering configuration options.

Enumerator
Screen 

Indicates that the drawing is for the screen.

Can turn on optimizations which result in slightly lower display quality (e.g. disable antialiasing for texts) for the benefit of speed.

DisableAntialiasing 

Forces disabling of Antialiasing.

ForceMinSize 

Forces a minimum size of app.

1 pixel for objects. Makes maps look better at small zoom levels without antialiasing.

HelperSymbols 

Activates display of symbols with the "helper symbol" flag.

Highlighted 

Makes the color appear highlighted.

RequireSpotColor 

Skips colors which do not have a spot color definition.

Tool 

The recommended flags for tools.

NoOptions 

No option activated.

Member Function Documentation

◆ testFlag()

bool OpenOrienteering::RenderConfig::testFlag ( const Option  flag) const
inline

A convenience method for testing flags in the options value.

See also
QFlags::testFlag()

Member Data Documentation

◆ bounding_box

QRectF OpenOrienteering::RenderConfig::bounding_box

The bounding box of the area to be drawn.

Given in map coordinates.

◆ map

const Map& OpenOrienteering::RenderConfig::map

The map.

◆ opacity

qreal OpenOrienteering::RenderConfig::opacity

The opacity.

◆ options

Options OpenOrienteering::RenderConfig::options

The rendering options.

◆ scaling

qreal OpenOrienteering::RenderConfig::scaling

The scaling expressed as pixels per mm.

Used to calculate the final object sizes when ForceMinSize is set.


The documentation for this class was generated from the following file: