LibreOffice Module vcl (master) 1
|
Encapsulates geometry and associated attributes of a filled area. More...
#include <graphictools.hxx>
Classes | |
struct | Transform |
Homogeneous 2D transformation matrix. More... | |
Public Types | |
enum | FillRule { fillNonZero =0 , fillEvenOdd } |
Type of fill algorithm used. More... | |
enum | FillType { fillSolid =0 , fillGradient , fillHatch , fillTexture } |
Type of filling used. More... | |
enum | HatchType { hatchSingle =0 , hatchDouble , hatchTriple } |
Type of hatching used. More... | |
enum class | GradientType { Linear , Radial , Rectangular } |
Type of gradient used. More... | |
enum | { gradientStepsInfinite =0 } |
Special values for gradient step count. More... | |
Public Member Functions | |
SvtGraphicFill () | |
SvtGraphicFill (tools::PolyPolygon aPath, Color aFillColor, double fTransparency, FillRule aFillRule, FillType aFillType, const Transform &aFillTransform, bool bTiling, HatchType aHatchType, Color aHatchColor, GradientType aGradientType, Color aGradient1stColor, Color aGradient2ndColor, sal_Int32 aGradientStepCount, Graphic aFillGraphic) | |
All in one constructor. More... | |
void | getPath (tools::PolyPolygon &) const |
Query path to fill. More... | |
const Color & | getFillColor () const |
Get color used for solid fills. More... | |
double | getTransparency () const |
Get stroke transparency. More... | |
FillRule | getFillRule () const |
Get fill rule used. More... | |
FillType | getFillType () const |
Get fill type used. More... | |
void | getTransform (Transform &) const |
Get transformation applied to hatch, gradient or texture during fill. More... | |
bool | isTiling () const |
Query state of texture tiling. More... | |
GradientType | getGradientType () const |
Get type of gradient used. More... | |
void | getGraphic (Graphic &) const |
Get the texture graphic used. More... | |
void | setPath (const tools::PolyPolygon &rPath) |
Set path to fill. More... | |
Friends | |
VCL_DLLPUBLIC friend SvStream & | WriteSvtGraphicFill (SvStream &rOStm, const SvtGraphicFill &rClass) |
VCL_DLLPUBLIC friend SvStream & | ReadSvtGraphicFill (SvStream &rIStm, SvtGraphicFill &rClass) |
Encapsulates geometry and associated attributes of a filled area.
Use this class to store geometry and attributes of a filled area, such as fill color, transparency, texture or hatch. The geometry is the so-called 'path', whose inner area will get filled according to the attributes set. If the path is intersecting, or one part of the path is lying fully within another part, then the fill rule determines which parts are filled and which are not.
Definition at line 199 of file graphictools.hxx.
anonymous enum |
Special values for gradient step count.
Enumerator | |
---|---|
gradientStepsInfinite |
Definition at line 251 of file graphictools.hxx.
Type of fill algorithm used.
Definition at line 203 of file graphictools.hxx.
Type of filling used.
Enumerator | |
---|---|
fillSolid | Fill with a specified solid color. |
fillGradient | Fill with the specified gradient. |
fillHatch | Fill with the specified hatch. |
fillTexture | Fill with the specified texture (a Graphic object) |
Definition at line 224 of file graphictools.hxx.
|
strong |
Type of gradient used.
Enumerator | |
---|---|
Linear | |
Radial | |
Rectangular |
Definition at line 249 of file graphictools.hxx.
Type of hatching used.
Definition at line 236 of file graphictools.hxx.
SvtGraphicFill::SvtGraphicFill | ( | ) |
Definition at line 160 of file graphictools.cxx.
References COL_BLACK(), and maFillColor.
SvtGraphicFill::SvtGraphicFill | ( | tools::PolyPolygon | aPath, |
Color | aFillColor, | ||
double | fTransparency, | ||
FillRule | aFillRule, | ||
FillType | aFillType, | ||
const Transform & | aFillTransform, | ||
bool | bTiling, | ||
HatchType | aHatchType, | ||
Color | aHatchColor, | ||
GradientType | aGradientType, | ||
Color | aGradient1stColor, | ||
Color | aGradient2ndColor, | ||
sal_Int32 | aGradientStepCount, | ||
Graphic | aFillGraphic | ||
) |
All in one constructor.
See accessor method descriptions for argument description
Definition at line 175 of file graphictools.cxx.
References maFillColor, and maPath.
|
inline |
Get color used for solid fills.
Definition at line 297 of file graphictools.hxx.
References maFillColor.
|
inline |
Get fill rule used.
Definition at line 304 of file graphictools.hxx.
Referenced by vcl::PDFWriterImpl::playMetafile().
|
inline |
Get fill type used.
Currently, only one of the fill types can be used simultaneously. If you specify e.g. FillRule::fillGradient, hatching, texture and solid fill color are ignored.
Definition at line 311 of file graphictools.hxx.
Referenced by vcl::PDFWriterImpl::playMetafile().
|
inline |
Get type of gradient used.
Definition at line 331 of file graphictools.hxx.
void SvtGraphicFill::getGraphic | ( | Graphic & | rGraphic | ) | const |
Get the texture graphic used.
The Graphic object returned is used to fill the geometry, if the FillType is fillTexture. The Graphic object is always assumed to be of size 1x1, the transformation is used to scale it to the appropriate size.
Definition at line 218 of file graphictools.cxx.
References maFillGraphic.
void SvtGraphicFill::getPath | ( | tools::PolyPolygon & | rPath | ) | const |
Query path to fill.
Definition at line 206 of file graphictools.cxx.
References maPath.
Referenced by clipMetafileContentAgainstOwnRegions(), MetaCommentAction::Move(), vcl::PDFWriterImpl::playMetafile(), GDIMetaFile::Rotate(), and MetaCommentAction::Scale().
void SvtGraphicFill::getTransform | ( | Transform & | rTrans | ) | const |
Get transformation applied to hatch, gradient or texture during fill.
A fill operation generally starts at the top left position of the object's bounding box. At that position (if tiling is on, also all successive positions), the specified fill graphic is rendered, after applying the fill transformation to it. For example, if the fill transformation contains a translation, the fill graphic is rendered at the object's bounding box's top left corner plus the translation components.
Definition at line 212 of file graphictools.cxx.
References maFillTransform.
|
inline |
Get stroke transparency.
Definition at line 302 of file graphictools.hxx.
Referenced by vcl::PDFWriterImpl::playMetafile().
|
inline |
Query state of texture tiling.
Definition at line 329 of file graphictools.hxx.
void SvtGraphicFill::setPath | ( | const tools::PolyPolygon & | rPath | ) |
Set path to fill.
Definition at line 223 of file graphictools.cxx.
References maPath.
Referenced by clipMetafileContentAgainstOwnRegions(), MetaCommentAction::Move(), GDIMetaFile::Rotate(), and MetaCommentAction::Scale().
|
friend |
Definition at line 258 of file graphictools.cxx.
|
friend |
Definition at line 228 of file graphictools.cxx.
|
private |
Definition at line 352 of file graphictools.hxx.
|
private |
Definition at line 364 of file graphictools.hxx.
Referenced by getGraphic().
|
private |
Definition at line 354 of file graphictools.hxx.
|
private |
Definition at line 356 of file graphictools.hxx.
Referenced by getTransform().
|
private |
Definition at line 355 of file graphictools.hxx.
|
private |
Definition at line 361 of file graphictools.hxx.
|
private |
Definition at line 362 of file graphictools.hxx.
|
private |
Definition at line 363 of file graphictools.hxx.
|
private |
Definition at line 360 of file graphictools.hxx.
|
private |
Definition at line 359 of file graphictools.hxx.
|
private |
Definition at line 358 of file graphictools.hxx.
|
private |
Definition at line 351 of file graphictools.hxx.
|
private |
Definition at line 357 of file graphictools.hxx.
|
private |
Definition at line 353 of file graphictools.hxx.