|
rpm-build |
9243a4 |
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
rpm-build |
9243a4 |
/*
|
|
rpm-build |
9243a4 |
* This file is part of the libmspub project.
|
|
rpm-build |
9243a4 |
*
|
|
rpm-build |
9243a4 |
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
rpm-build |
9243a4 |
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
rpm-build |
9243a4 |
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
rpm-build |
9243a4 |
*/
|
|
rpm-build |
9243a4 |
|
|
rpm-build |
9243a4 |
#ifndef INCLUDED_DASH_H
|
|
rpm-build |
9243a4 |
#define INCLUDED_DASH_H
|
|
rpm-build |
9243a4 |
|
|
rpm-build |
9243a4 |
#include <vector>
|
|
rpm-build |
9243a4 |
|
|
rpm-build |
9243a4 |
#include <boost/optional.hpp>
|
|
rpm-build |
9243a4 |
|
|
rpm-build |
9243a4 |
namespace libmspub
|
|
rpm-build |
9243a4 |
{
|
|
rpm-build |
9243a4 |
enum DotStyle
|
|
rpm-build |
9243a4 |
{
|
|
rpm-build |
9243a4 |
RECT_DOT,
|
|
rpm-build |
9243a4 |
ROUND_DOT
|
|
rpm-build |
9243a4 |
};
|
|
rpm-build |
9243a4 |
enum MSPUBDashStyle
|
|
rpm-build |
9243a4 |
{
|
|
rpm-build |
9243a4 |
MSPUB_DS_SOLID,
|
|
rpm-build |
9243a4 |
DASH_SYS,
|
|
rpm-build |
9243a4 |
DOT_SYS,
|
|
rpm-build |
9243a4 |
DASH_DOT_SYS,
|
|
rpm-build |
9243a4 |
DASH_DOT_DOT_SYS,
|
|
rpm-build |
9243a4 |
DOT_GEL,
|
|
rpm-build |
9243a4 |
DASH_GEL,
|
|
rpm-build |
9243a4 |
LONG_DASH_GEL,
|
|
rpm-build |
9243a4 |
DASH_DOT_GEL,
|
|
rpm-build |
9243a4 |
LONG_DASH_DOT_GEL,
|
|
rpm-build |
9243a4 |
LONG_DASH_DOT_DOT_GEL
|
|
rpm-build |
9243a4 |
};
|
|
rpm-build |
9243a4 |
struct Dot
|
|
rpm-build |
9243a4 |
{
|
|
rpm-build |
9243a4 |
boost::optional<double> m_length;
|
|
rpm-build |
9243a4 |
unsigned m_count;
|
|
rpm-build |
9243a4 |
Dot(unsigned count) : m_length(), m_count(count)
|
|
rpm-build |
9243a4 |
{
|
|
rpm-build |
9243a4 |
}
|
|
rpm-build |
9243a4 |
Dot(unsigned count, double length) : m_length(length), m_count(count)
|
|
rpm-build |
9243a4 |
{
|
|
rpm-build |
9243a4 |
}
|
|
rpm-build |
9243a4 |
};
|
|
rpm-build |
9243a4 |
struct Dash
|
|
rpm-build |
9243a4 |
{
|
|
rpm-build |
9243a4 |
double m_distance;
|
|
rpm-build |
9243a4 |
DotStyle m_dotStyle;
|
|
rpm-build |
9243a4 |
std::vector<Dot> m_dots; // empty vector is interpreted as solid line
|
|
rpm-build |
9243a4 |
Dash(double distance, DotStyle dotStyle) : m_distance(distance),
|
|
rpm-build |
9243a4 |
m_dotStyle(dotStyle), m_dots()
|
|
rpm-build |
9243a4 |
{
|
|
rpm-build |
9243a4 |
}
|
|
rpm-build |
9243a4 |
};
|
|
rpm-build |
9243a4 |
bool operator!=(const Dot &lhs, const Dot &rhs;;
|
|
rpm-build |
9243a4 |
bool operator==(const Dot &lhs, const Dot &rhs;;
|
|
rpm-build |
9243a4 |
bool operator==(const Dash &lhs, const Dash &rhs;;
|
|
rpm-build |
9243a4 |
Dash getDash(MSPUBDashStyle style, unsigned shapeLineWidthInEmu,
|
|
rpm-build |
9243a4 |
DotStyle dotStyle);
|
|
rpm-build |
9243a4 |
} // namespace libmspub
|
|
rpm-build |
9243a4 |
|
|
rpm-build |
9243a4 |
#endif /* INCLUDED_DASH_H */
|
|
rpm-build |
9243a4 |
/* vim:set shiftwidth=2 softtabstop=2 expandtab: */
|