Go to the documentation of this file.
34 #ifndef STAR_GRAPHIC_STRUCT
35 # define STAR_GRAPHIC_STRUCT
150 STOFF_DEBUG_MSG((
"StarObjectSmallGraphicStruct::StarPolygon::Point::operator<< unexpected flag\n"));
151 o <<
":[##" << point.
m_flags <<
"]";
185 void addToPath(librevenge::RVNGPropertyListVector &path,
bool isClosed,
double relUnit,
STOFFVec2f const &decal)
const;
187 bool convert(librevenge::RVNGString &path, librevenge::RVNGString &viewbox,
double relUnit,
STOFFVec2f const &decal)
const;
friend std::ostream & operator<<(std::ostream &o, Point const &point)
operator<<
Definition: StarGraphicStruct.hxx:134
the main class to read/.
Definition: StarFileManager.hxx:61
bool closeVersionCompatHeader(std::string const &debugName)
close a zone header
Definition: StarZone.cxx:397
STOFFColor m_fillColor
the fill color
Definition: StarGraphicStruct.hxx:89
int m_position
the position(none, lt, mt, rt, lm, mm, rm, lb, mb, rb, area, tiled)
Definition: StarGraphicStruct.hxx:94
static bool getPathBBox(const librevenge::RVNGPropertyListVector &path, double &px, double &py, double &qx, double &qy)
Internal: helper to compute a path bdbox.
Definition: StarGraphicStruct.cxx:267
void addToPath(librevenge::RVNGPropertyListVector &path, bool isClosed, double relUnit, STOFFVec2f const &decal) const
add the polygon to a path
Definition: StarGraphicStruct.cxx:678
librevenge::RVNGString getString(std::vector< uint32_t > const &unicode)
transform a unicode string in a RNVGString
Definition: libstaroffice_internal.cxx:63
std::vector< Point > m_points
the list of points
Definition: StarGraphicStruct.hxx:191
libstoff::DebugFile & ascii()
returns the ascii file
Definition: StarZone.hxx:254
std::ostream & operator<<(std::ostream &o, StarBrush const &brush)
Definition: StarGraphicStruct.cxx:463
#define STOFF_DEBUG_MSG(M)
Definition: libstaroffice_internal.hxx:129
static STOFFColor barycenter(float alpha, STOFFColor const &colA, float beta, STOFFColor const &colB)
return alpha*colA+beta*colB
Definition: libstaroffice_internal.cxx:200
Class to store a graphic.
Definition: StarGraphicStruct.hxx:104
Class to store a polygon.
Definition: StarGraphicStruct.hxx:122
bool hasUniqueColor() const
returns true is the brush has unique color
Definition: StarGraphicStruct.hxx:72
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....
Definition: StarGraphicStruct.cxx:70
static double getInchValue(librevenge::RVNGProperty const *prop)
Definition: StarGraphicStruct.cxx:181
static void writeU32(unsigned char *buffer, unsigned &position, const unsigned value)
Definition: StarGraphicStruct.cxx:61
static librevenge::RVNGString convertPath(const librevenge::RVNGPropertyListVector &path)
Internal: helper to convert a path in a string.
Definition: StarGraphicStruct.cxx:367
bool readString(std::vector< uint32_t > &string, int encoding=-1) const
try to read an unicode string
Definition: StarZone.hxx:220
std::shared_ptr< StarBitmap > m_bitmap
the bitmap
Definition: StarGraphicStruct.hxx:118
uint32_t value() const
return the rgba value
Definition: libstaroffice_internal.hxx:247
bool read(StarZone &zone, long lastPos=-1)
try to read a graphic, give lastPos if you are sure of the end graphic position
Definition: StarGraphicStruct.cxx:549
the class to store a color
Definition: libstaroffice_internal.hxx:189
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)
Definition: StarGraphicStruct.cxx:247
bool readBitmap(StarZone &zone, bool inFileHeader, long lastPos, librevenge::RVNGBinaryData &data, std::string &type)
low level
Definition: StarBitmap.cxx:214
static void getQuadraticBezierBBox(double x0, double y0, double x1, double y1, double x, double y, double &xmin, double &ymin, double &xmax, double &ymax)
Definition: StarGraphicStruct.cxx:219
StarGraphic()
constructor
Definition: StarGraphicStruct.hxx:108
the main class to read/.
Definition: StarBitmap.hxx:62
STOFFEmbeddedObject m_object
the embedded object
Definition: StarGraphicStruct.hxx:116
small class use to define a embedded object
Definition: libstaroffice_internal.hxx:408
StarBrush()
constructor
Definition: StarGraphicStruct.hxx:55
bool getPattern(STOFFEmbeddedObject &object, STOFFVec2i &sz) const
try to return a pattern corresponding to the brush
Definition: StarGraphicStruct.cxx:434
StarPolygon()
contructor
Definition: StarGraphicStruct.hxx:161
static std::string str()
Definition: STOFFDebug.hxx:203
static double cubicBase(double t, double a, double b, double c, double d)
Definition: StarGraphicStruct.cxx:242
bool isWhite() const
return true if the color is white
Definition: libstaroffice_internal.hxx:282
int m_style
the brush style(pattern): BRUSH_NULL, BRUSH_SOLID, BRUSH_HORZ, BRUSH_VERT, BRUSH_CROSS,...
Definition: StarGraphicStruct.hxx:92
friend std::ostream & operator<<(std::ostream &o, StarBrush const &brush)
operator<<
Definition: StarGraphicStruct.cxx:463
Point(STOFFVec2i point=STOFFVec2i(), int flag=0)
constructor
Definition: StarGraphicStruct.hxx:128
bool getColor(STOFFColor &color) const
try to return a color corresponding to the brush
Definition: StarGraphicStruct.cxx:420
std::shared_ptr< STOFFInputStream > STOFFInputStreamPtr
a smart pointer of STOFFInputStream
Definition: libstaroffice_internal.hxx:485
bool hasSpecialPoints() const
check if a polygon has special point
Definition: StarGraphicStruct.hxx:166
Class to store a brush.
Definition: StarGraphicStruct.hxx:51
a zone in a StarOffice file
Definition: StarZone.hxx:56
int getRecordLevel() const
returns the record level
Definition: StarZone.hxx:195
an object corresponding to an OLE directory
Definition: StarObject.hxx:64
librevenge::RVNGString m_linkName
the link name
Definition: StarGraphicStruct.hxx:96
STOFFVec2i m_point
the point
Definition: StarGraphicStruct.hxx:156
Definition: STOFFDebug.hxx:194
bool empty() const
returns true if the polygon is empty
Definition: StarGraphicStruct.hxx:175
int m_flags
the flags
Definition: StarGraphicStruct.hxx:158
static void writeU16(unsigned char *buffer, unsigned &position, const unsigned value)
Definition: StarGraphicStruct.cxx:55
a name use to define basic StarOffice graphic structure
Definition: StarGraphicStruct.cxx:50
STOFFColor m_color
the color
Definition: StarGraphicStruct.hxx:87
a structure to keep a point and a flag
Definition: StarGraphicStruct.hxx:126
static void addPos(long)
Definition: STOFFDebug.hxx:223
static void addDelimiter(long, char)
Definition: STOFFDebug.hxx:225
bool openVersionCompatHeader()
open a version compat header (version+size)
Definition: StarZone.cxx:372
Definition: STOFFDebug.hxx:210
size_t size() const
returns true if the polygon is empty
Definition: StarGraphicStruct.hxx:180
bool read(StarZone &zone, int nVers, long endPos, StarObject &document)
try to read a brush
Definition: StarGraphicStruct.cxx:498
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....
Definition: StarGraphicStruct.cxx:125
static void addNote(char const *)
Definition: STOFFDebug.hxx:224
static void skipZone(long, long)
Definition: STOFFDebug.hxx:230
bool isEmpty() const
returns true if the brush is empty
Definition: StarGraphicStruct.hxx:67
librevenge::RVNGString m_filterName
the filter name
Definition: StarGraphicStruct.hxx:98
std::string m_extra
extra data
Definition: StarGraphicStruct.hxx:100
static double quadraticExtreme(double t, double a, double b, double c)
Definition: StarGraphicStruct.cxx:206
STOFFInputStreamPtr input()
return the zone input
Definition: StarZone.hxx:247
bool convert(librevenge::RVNGString &path, librevenge::RVNGString &viewbox, double relUnit, STOFFVec2f const &decal) const
convert a path in a string and update the bdbox
Definition: StarGraphicStruct.cxx:716
STOFFVec2< int > STOFFVec2i
STOFFVec2 of int.
Definition: libstaroffice_internal.hxx:763
static double quadraticDerivative(double a, double b, double c)
Definition: StarGraphicStruct.cxx:211
long getRecordLastPosition() const
returns the actual record last position
Definition: StarZone.hxx:200
friend std::ostream & operator<<(std::ostream &o, StarPolygon const &poly)
operator<<
Definition: StarGraphicStruct.cxx:731
static bool readSVGDI(StarZone &zone)
try to read a SVGDI object
Definition: StarFileManager.cxx:959
int m_transparency
the transparency
Definition: StarGraphicStruct.hxx:85
Generated on Mon Jan 20 2020 23:02:17 for libstaroffice by
doxygen 1.8.16