libetonyek_utils.h File Reference documentation

Classes | Namespaces | Macros | Typedefs | Functions
libetonyek_utils.h File Reference
`#include <cmath>`
`#include <memory>`
`#include <string>`
`#include <boost/cstdint.hpp>`
`#include <librevenge/librevenge.h>`
`#include <librevenge-stream/librevenge-stream.h>`

Go to the source code of this file.

## Classes
struct | libetonyek::EtonyekDummyDeleter
class | libetonyek::EndOfStreamException
class | libetonyek::GenericException

## Namespaces
| libetonyek

## Macros
#define | ETONYEK_EPSILON 1e-9
#define | ETONYEK_ALMOST_ZERO(x) (std::fabs(x) < ETONYEK_EPSILON)
#define | ETONYEK_NUM_ELEMENTS(array) (sizeof(array) / sizeof((array)[0]))
#define | ETONYEK_ATTRIBUTE_PRINTF(fmt, arg)
#define | ETONYEK_FALLTHROUGH ((void) 0)
#define | ETONYEK_DEBUG_MSG(M)
#define | ETONYEK_DEBUG(M)

## Typedefs
typedef std::shared_ptr< librevenge::RVNGInputStream > | libetonyek::RVNGInputStreamPtr_t

## Functions
const double | libetonyek::etonyek_half_pi (1.57079632679489661923132169163975144209858469968755291048747229615390820314310449931401741267105853399107404326e+00)
const double | libetonyek::etonyek_third_pi (1.04719755119659774615421446109316762806572313312503527365831486410260546876206966620934494178070568932738269550e+00)
const double | libetonyek::etonyek_pi (3.14159265358979323846264338327950288419716939937510582097494459230781640628620899862803482534211706798214808651e+00)
const double | libetonyek::etonyek_two_pi (6.28318530717958647692528676655900576839433879875021164194988918461563281257241799725606965068423413596429617303e+00)
const double | libetonyek::etonyek_root_three (1.73205080756887729352744634150587236694280525381038062805580697945193301690880003708114618675724857567562614142e+00)
const double | libetonyek::etonyek_root_two (1.41421356237309504880168872420969807856967187537694807317667973799073247846210703885038753432764157273501384623e+00)
const unsigned | libetonyek::ETONYEK_EPOCH_BEGIN (978307200)
uint8_t | libetonyek::readU8 (const RVNGInputStreamPtr_t &input, bool)
uint16_t | libetonyek::readU16 (const RVNGInputStreamPtr_t &input, bool bigEndian)
uint32_t | libetonyek::readU32 (const RVNGInputStreamPtr_t &input, bool bigEndian)
uint64_t | libetonyek::readU64 (const RVNGInputStreamPtr_t &input, bool bigEndian)
uint64_t | libetonyek::readUVar (const RVNGInputStreamPtr_t &input)
int64_t | libetonyek::readSVar (const RVNGInputStreamPtr_t &input)
double | libetonyek::readDouble (const RVNGInputStreamPtr_t &input)
float | libetonyek::readFloat (const RVNGInputStreamPtr_t &input)
unsigned long | libetonyek::getLength (const RVNGInputStreamPtr_t &input)
unsigned long | libetonyek::getRemainingLength (const RVNGInputStreamPtr_t &input)
bool | libetonyek::approxEqual (double x, double y, double eps=ETONYEK_EPSILON)
| Test two floating point numbers for equality. More...
template<class T >
bool | libetonyek::approxEqual (const T &left, const T &right, const double eps=ETONYEK_EPSILON)
double | libetonyek::pt2in (double d)
| Convert a length from points to inches. More...
double | libetonyek::deg2rad (double value)
| Convert an angle from degrees to radians. More...
double | libetonyek::rad2deg (double value)
| Convert an angle from radians to degrees. More...
librevenge::RVNGString | libetonyek::makeColor (const IWORKColor &color)
librevenge::RVNGString | libetonyek::makeColor (const IWORKGradient &gradient)
| Compute the average color of a gradient and return it as a string. More...
void | libetonyek::writeBorder (const IWORKStroke &stroke, const char *const name, librevenge::RVNGPropertyList &props)

## Macro Definition Documentation

## ◆ ETONYEK_ALMOST_ZERO

#define ETONYEK_ALMOST_ZERO | ( |  | x | ) | (std::fabs(x) < ETONYEK_EPSILON)

## ◆ ETONYEK_ATTRIBUTE_PRINTF

#define ETONYEK_ATTRIBUTE_PRINTF | ( |  | fmt,
|  |  | arg
| ) |  |

## ◆ ETONYEK_DEBUG

#define ETONYEK_DEBUG | ( |  | M | ) |

## ◆ ETONYEK_DEBUG_MSG

#define ETONYEK_DEBUG_MSG | ( |  | M | ) |

Referenced by libetonyek::IWORKBezierElement::attribute(), libetonyek::IWORKLayoutElement::attribute(), libetonyek::IWORKSpanElement::attribute(), libetonyek::IWORKColorElement::attribute(), libetonyek::IWORKListLabelTypeinfoElement::attribute(), libetonyek::IWORKPElement::attribute(), libetonyek::IWORKTextLabelElement::attribute(), libetonyek::PAGCollector::closePageGroup(), libetonyek::IWORKCollector::collectHeaderFooter(), libetonyek::IWORKCollector::collectShape(), libetonyek::IWORKTextBodyElement::element(), libetonyek::IWORKColorElement::element(), libetonyek::IWORKXMLContextText::element(), libetonyek::IWORKXMLContextEmpty::element(), libetonyek::IWORKTextLabelElement::endOfElement(), libetonyek::IWORKColorElement::endOfElement(), libetonyek::IWORKListLabelTypeinfoElement::endOfElement(), libetonyek::IWORKStylesheet::find(), libetonyek::KEYCollector::insertLayer(), libetonyek::KEYCollector::insertTextPlaceholder(), libetonyek::makeColor(), libetonyek::IWAParser::ObjectMessage::ObjectMessage(), libetonyek::PAGCollector::openSection(), libetonyek::IWAText::parse(), libetonyek::IWAMessage::parse(), libetonyek::IWAParser::parseDataList(), libetonyek::IWAParser::parseDrawableShape(), libetonyek::IWAParser::parseHeaders(), libetonyek::IWAParser::parseListStyle(), libetonyek::IWAParser::parseObjectIndex(), libetonyek::KEY6Parser::parsePlaceholder(), libetonyek::IWAParser::parseShapePlacement(), libetonyek::IWAParser::parseTile(), libetonyek::IWAParser::queryFile(), libetonyek::IWAParser::queryObject(), libetonyek::IWAParser::readFill(), libetonyek::IWAParser::readGradient(), libetonyek::IWAParser::readStroke(), libetonyek::IWAParser::scanFragment(), libetonyek::IWORKTextStorageElement::sendStylesheet(), libetonyek::IWORKXMLContextElement::text(), libetonyek::IWORKXMLContextEmpty::text(), and libetonyek::IWORKLanguageManager::writeProperties().

## ◆ ETONYEK_EPSILON

#define ETONYEK_EPSILON 1e-9

## ◆ ETONYEK_FALLTHROUGH

#define ETONYEK_FALLTHROUGH ((void) 0)

Referenced by libetonyek::IWAParser::parseDrawableShape(), libetonyek::IWAParser::parseListStyle(), libetonyek::IWAParser::readFill(), libetonyek::IWAParser::readGradient(), and libetonyek::IWAParser::readStroke().

## ◆ ETONYEK_NUM_ELEMENTS

#define ETONYEK_NUM_ELEMENTS | ( |  | array | ) | (sizeof(array) / sizeof((array)[0]))

Referenced by libetonyek::IWORKTable::setDefaultCellStyle(), libetonyek::IWORKTable::setDefaultLayoutStyle(), and libetonyek::IWORKTable::setDefaultParagraphStyle().