StarGraphicStruct Namespace Reference

a name use to define basic StarOffice graphic structure More...

## Classes

class | StarBrush
| Class to store a brush. More...
class | StarGraphic
| Class to store a graphic. More...
class | StarPolygon
| Class to store a polygon. More...

## Functions

static void | writeU16 (unsigned char *buffer, unsigned &position, const unsigned value)
static void | writeU32 (unsigned char *buffer, unsigned &position, const unsigned value)
static std::unique_ptr< unsigned char[]> | createAndInitBMPData (STOFFVec2i const &sz, unsigned &dibFileSize, unsigned &bufferPosition)
| Internal: helper function to create a BMP for a color bitmap (freely inspired from libpwg::WPGBitmap.cpp).
bool | getBMPData (std::vector< std::vector< STOFFColor > > const &orig, librevenge::RVNGBinaryData &data)
| Internal: helper function to create a BMP for a color bitmap (freely inspired from libpwg::WPGBitmap.cpp).
static bool | getBMPData (uint16_t const *pattern, STOFFColor const &col0, STOFFColor const &col1, librevenge::RVNGBinaryData &data)
| Internal: helper function to create a BMP for a color bitmap from a 8*8 patterns, defined with 4 uint16_t.
static double | getInchValue (librevenge::RVNGProperty const *prop)
static double | quadraticExtreme (double t, double a, double b, double c)
static double | quadraticDerivative (double a, double b, double c)
static void | getQuadraticBezierBBox (double x0, double y0, double x1, double y1, double x, double y, double &xmin, double &ymin, double &xmax, double &ymax)
static double | cubicBase (double t, double a, double b, double c, double d)
static void | getCubicBezierBBox (double x0, double y0, double x1, double y1, double x2, double y2, double x, double y, double &xmin, double &ymin, double &xmax, double &ymax)
static bool | getPathBBox (const librevenge::RVNGPropertyListVector &path, double &px, double &py, double &qx, double &qy)
| Internal: helper to compute a path bdbox.
static librevenge::RVNGString | convertPath (const librevenge::RVNGPropertyListVector &path)
| Internal: helper to convert a path in a string.
std::ostream & | operator<< (std::ostream &o, StarBrush const &brush)
std::ostream & | operator<< (std::ostream &o, StarPolygon const &poly)

## Detailed Description

a name use to define basic StarOffice graphic structure

## Function Documentation

## convertPath()

librevenge::RVNGString StarGraphicStruct::convertPath | ( | const librevenge::RVNGPropertyListVector & | path | ) |

static

Internal: helper to convert a path in a string.

Referenced by StarGraphicStruct::StarPolygon::convert().

## createAndInitBMPData()

std::unique_ptr< unsigned char[]> StarGraphicStruct::createAndInitBMPData | ( | STOFFVec2i const & | sz,
|  | unsigned & | dibFileSize,
|  | unsigned & | bufferPosition )

static

Internal: helper function to create a BMP for a color bitmap (freely inspired from libpwg::WPGBitmap.cpp).

Referenced by getBMPData(), and getBMPData().

## cubicBase()

double StarGraphicStruct::cubicBase | ( | double | t,
|  | double | a,
|  | double | b,
|  | double | c,
|  | double | d )

static

Referenced by getCubicBezierBBox().

## getBMPData() [1/2]

bool StarGraphicStruct::getBMPData | ( | std::vector< std::vector< STOFFColor > > const & | orig,
|  | librevenge::RVNGBinaryData & | data )

inline

Internal: helper function to create a BMP for a color bitmap (freely inspired from libpwg::WPGBitmap.cpp).

Referenced by StarGraphicStruct::StarBrush::getPattern().

## getBMPData() [2/2]

bool StarGraphicStruct::getBMPData | ( | uint16_t const * | pattern,
|  | STOFFColor const & | col0,
|  | STOFFColor const & | col1,
|  | librevenge::RVNGBinaryData & | data )

static

Internal: helper function to create a BMP for a color bitmap from a 8*8 patterns, defined with 4 uint16_t.

## getCubicBezierBBox()

void StarGraphicStruct::getCubicBezierBBox | ( | double | x0,
|  | double | y0,
|  | double | x1,
|  | double | y1,
|  | double | x2,
|  | double | y2,
|  | double | x,
|  | double | y,
|  | double & | xmin,
|  | double & | ymin,
|  | double & | xmax,
|  | double & | ymax )

static

Referenced by getPathBBox().

## getInchValue()

double StarGraphicStruct::getInchValue | ( | librevenge::RVNGProperty const * | prop | ) |

static

Referenced by convertPath(), and getPathBBox().

## getPathBBox()

bool StarGraphicStruct::getPathBBox | ( | const librevenge::RVNGPropertyListVector & | path,
|  | double & | px,
|  | double & | py,
|  | double & | qx,
|  | double & | qy )

static

Internal: helper to compute a path bdbox.

Referenced by StarGraphicStruct::StarPolygon::convert().

## getQuadraticBezierBBox()

void StarGraphicStruct::getQuadraticBezierBBox | ( | double | x0,
|  | double | y0,
|  | double | x1,
|  | double | y1,
|  | double | x,
|  | double | y,
|  | double & | xmin,
|  | double & | ymin,
|  | double & | xmax,
|  | double & | ymax )

static

Referenced by getPathBBox().

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

std::ostream & StarGraphicStruct::operator<< | ( | std::ostream & | o,
|  | StarBrush const & | brush )

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

std::ostream & StarGraphicStruct::operator<< | ( | std::ostream & | o,
|  | StarPolygon const & | poly )

## quadraticDerivative()

double StarGraphicStruct::quadraticDerivative | ( | double | a,
|  | double | b,
|  | double | c )

static

Referenced by getQuadraticBezierBBox().

## quadraticExtreme()

double StarGraphicStruct::quadraticExtreme | ( | double | t,
|  | double | a,
|  | double | b,
|  | double | c )

static

Referenced by getQuadraticBezierBBox().

## writeU16()

void StarGraphicStruct::writeU16 | ( | unsigned char * | buffer,
|  | unsigned & | position,
|  | const unsigned | value )

static

Referenced by createAndInitBMPData().

## writeU32()

void StarGraphicStruct::writeU32 | ( | unsigned char * | buffer,
|  | unsigned & | position,
|  | const unsigned | value )

static

Referenced by createAndInitBMPData().