Ipelib

Public Member Functions | Static Public Member Functions | Friends | Related Functions | List of all members
ipe::Fixed Class Reference
Ipe Base

`#include <ipebase.h>`

## Public Member Functions
| Fixed (int val)
| Fixed ()
int | toInt () const
double | toDouble () const
int | internal () const
Fixed | mult (int a, int b) const
bool | operator== (const Fixed &rhs) const
bool | operator!= (const Fixed &rhs) const
bool | operator< (const Fixed &rhs) const
bool | isInteger () const

## Static Public Member Functions
static Fixed | fromInternal (int32_t val)
static Fixed | fromDouble (double val)

## Friends
Stream & | operator<< (Stream &stream, const Fixed &f)

## Related Functions
(Note that these are not member functions.)
Stream & | operator<< (Stream &stream, const Fixed &f)

## Detailed Description

Fixed point number with three (decimal) fractional digits.

## Constructor & Destructor Documentation

## ◆ Fixed() [1/2]

ipe::Fixed::Fixed | ( | int | val | ) |
| inline explicit

## ◆ Fixed() [2/2]

ipe::Fixed::Fixed | ( |  | ) |
| inline explicit

## Member Function Documentation

## ◆ fromInternal()

Fixed ipe::Fixed::fromInternal | ( | int32_t | val | ) |
| inline static

Referenced by ipe::Attribute::color(), ipe::Color::Color(), fromDouble(), ipe::Lex::getFixed(), mult(), and ipe::Attribute::number().

## ◆ fromDouble()

Fixed Fixed::fromDouble | ( | double | val | ) |
| static

References fromInternal().

Referenced by ipe::Text::getAttribute().

## ◆ toInt()

int ipe::Fixed::toInt | ( |  | ) | const
| inline

## ◆ toDouble()

double ipe::Fixed::toDouble | ( |  | ) | const
| inline

Referenced by ipe::Latex::createLatexSource(), ipe::BBoxPainter::doDrawPath(), ipe::CairoPainter::doDrawPath(), ipe::CairoPainter::doDrawText(), ipe::Reference::draw(), ipe::Path::drawArrow(), ipe::CanvasBase::drawPaper(), ipe::Reference::drawSimple(), ipe::CairoPainter::executeStream(), ipe::QIpe(), ipe::PdfViewBase::refreshSurface(), and ipe::Text::setAttribute().

## ◆ internal()

int ipe::Fixed::internal | ( |  | ) | const
| inline

Referenced by ipe::Attribute::Attribute().

## ◆ mult()

Fixed Fixed::mult | ( | int | a,
|  | int | b
| ) |  | const

Return value times (a/b)

References fromInternal().

Referenced by ipe::Latex::createLatexSource().

## ◆ operator==()

bool ipe::Fixed::operator== | ( | const Fixed & | rhs | ) | const
| inline

## ◆ operator!=()

bool ipe::Fixed::operator!= | ( | const Fixed & | rhs | ) | const
| inline

## ◆ operator<()

bool ipe::Fixed::operator< | ( | const Fixed & | rhs | ) | const
| inline

## ◆ isInteger()

bool ipe::Fixed::isInteger | ( |  | ) | const
| inline

Referenced by ipe::ImlParser::parseStyle().

## Friends And Related Function Documentation

## ◆ operator<< [1/2]

Stream& operator<< | ( | Stream & | stream,
|  | const Fixed & | f
| ) |  |
| friend

## ◆ operator<<() [2/2]

Stream & operator<< | ( | Stream & | stream,
|  | const Fixed & | f
| ) |  |
| related

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

- ipebase.h
- ipebase.cpp