libs/flake

KoPatternBackground Class Reference

A pattern shape background. More...

#include <KoPatternBackground.h>

Inheritance diagram for KoPatternBackground:

List of all members.

Public Types

enum  PatternRepeat { Original, Tiled, Stretched }
enum  ReferencePoint {
  TopLeft, Top, TopRight, Left,
  Center, Right, BottomLeft, Bottom,
  BottomRight
}

Public Member Functions

 KoPatternBackground (KoImageCollection *collection)
virtual ~KoPatternBackground ()
virtual void fillStyle (KoGenStyle &style, KoShapeSavingContext &context)
virtual bool loadStyle (KoOdfLoadingContext &context, const QSizeF &shapeSize)
QMatrix matrix () const
KoPatternBackgroundoperator= (const KoPatternBackground &rhs)
virtual void paint (QPainter &painter, const QPainterPath &fillPath) const
QImage pattern ()
QSizeF patternDisplaySize () const
QSizeF patternOriginalSize () const
QRectF patternRectFromFillSize (const QSizeF &size)
ReferencePoint referencePoint () const
QPointF referencePointOffset () const
PatternRepeat repeat () const
void setMatrix (const QMatrix &matrix)
void setPattern (const QImage &pattern)
void setPatternDisplaySize (const QSizeF &size)
void setReferencePoint (ReferencePoint referencePoint)
void setReferencePointOffset (const QPointF &offset)
void setRepeat (PatternRepeat repeat)
void setTileRepeatOffset (const QPointF &offset)
QPointF tileRepeatOffset () const

Detailed Description

A pattern shape background.

Definition at line 30 of file KoPatternBackground.h.


Member Enumeration Documentation

Pattern rendering style.

Enumerator:
Original 
Tiled 
Stretched 

Definition at line 34 of file KoPatternBackground.h.

Pattern reference point.

Enumerator:
TopLeft 
Top 
TopRight 
Left 
Center 
Right 
BottomLeft 
Bottom 
BottomRight 

Definition at line 36 of file KoPatternBackground.h.


Constructor & Destructor Documentation

KoPatternBackground::KoPatternBackground ( KoImageCollection collection  ) 

Constructs a new pattern background utilizing the given image collection.

Definition at line 124 of file KoPatternBackground.cpp.

KoPatternBackground::~KoPatternBackground (  )  [virtual]

Definition at line 131 of file KoPatternBackground.cpp.


Member Function Documentation

void KoPatternBackground::fillStyle ( KoGenStyle &  style,
KoShapeSavingContext context 
) [virtual]

reimplemented from KoShapeBackground

Implements KoShapeBackground.

Definition at line 294 of file KoPatternBackground.cpp.

bool KoPatternBackground::loadStyle ( KoOdfLoadingContext &  context,
const QSizeF shapeSize 
) [virtual]

reimplemented from KoShapeBackground

Implements KoShapeBackground.

Definition at line 354 of file KoPatternBackground.cpp.

QMatrix KoPatternBackground::matrix (  )  const

Returns the transform matrix.

Definition at line 141 of file KoPatternBackground.cpp.

KoPatternBackground & KoPatternBackground::operator= ( const KoPatternBackground rhs  ) 

Assignment operator.

Definition at line 220 of file KoPatternBackground.cpp.

void KoPatternBackground::paint ( QPainter painter,
const QPainterPath fillPath 
) const [virtual]

reimplemented from KoShapeBackground

Implements KoShapeBackground.

Definition at line 249 of file KoPatternBackground.cpp.

QImage KoPatternBackground::pattern (  ) 

Returns the pattern.

Definition at line 154 of file KoPatternBackground.cpp.

QSizeF KoPatternBackground::patternDisplaySize (  )  const

Returns the pattern display size.

Definition at line 204 of file KoPatternBackground.cpp.

QSizeF KoPatternBackground::patternOriginalSize (  )  const

Returns the original image size.

Definition at line 215 of file KoPatternBackground.cpp.

QRectF KoPatternBackground::patternRectFromFillSize ( const QSizeF size  ) 

Returns the bounding rect of the pattern image based on the given fill size.

Definition at line 453 of file KoPatternBackground.cpp.

KoPatternBackground::ReferencePoint KoPatternBackground::referencePoint (  )  const

Returns the pattern reference point identifier.

Definition at line 171 of file KoPatternBackground.cpp.

QPointF KoPatternBackground::referencePointOffset (  )  const

Returns reference point offset in percent of the pattern display size.

Definition at line 181 of file KoPatternBackground.cpp.

KoPatternBackground::PatternRepeat KoPatternBackground::repeat (  )  const

Returns the pattern repeat.

Definition at line 166 of file KoPatternBackground.cpp.

void KoPatternBackground::setMatrix ( const QMatrix matrix  ) 

Sets the transform matrix.

Definition at line 136 of file KoPatternBackground.cpp.

void KoPatternBackground::setPattern ( const QImage pattern  ) 

Sets a new pattern.

Definition at line 146 of file KoPatternBackground.cpp.

void KoPatternBackground::setPatternDisplaySize ( const QSizeF size  ) 

Sets pattern display size.

Definition at line 209 of file KoPatternBackground.cpp.

void KoPatternBackground::setReferencePoint ( ReferencePoint  referencePoint  ) 

Sets the pattern reference point.

Definition at line 176 of file KoPatternBackground.cpp.

void KoPatternBackground::setReferencePointOffset ( const QPointF offset  ) 

Sets the reference point offset in percent of the pattern display size.

Definition at line 186 of file KoPatternBackground.cpp.

void KoPatternBackground::setRepeat ( PatternRepeat  repeat  ) 

Sets the pattern repeat.

Definition at line 161 of file KoPatternBackground.cpp.

void KoPatternBackground::setTileRepeatOffset ( const QPointF offset  ) 

Sets the tile repeat offset in percent of the pattern display size.

Definition at line 199 of file KoPatternBackground.cpp.

QPointF KoPatternBackground::tileRepeatOffset (  )  const

Returns tile repeat offset in percent of the pattern display size.

Definition at line 194 of file KoPatternBackground.cpp.


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