Swiftray  1.0
PathShape Class Reference

#include <path-shape.h>

Inheritance diagram for PathShape:
Shape TextShape

Public Types

enum class  NodeType {
  CurveSymmetry , CurveSmooth , CurveCorner , CurveCtrlPrev ,
  CurveCtrlNext , LINE_TO , MOVE_TO
}
 
- Public Types inherited from Shape
enum class  Type {
  None , Path , Bitmap , Text ,
  Group
}
 

Public Member Functions

 PathShape () noexcept
 
 PathShape (QPainterPath path)
 
virtual ~PathShape ()
 
ShapePtr clone () const override
 
bool hitTest (QPointF global_coord, qreal tolerance) const override
 
bool hitTest (QRectF global_coord_rect) const override
 
bool isFilled () const
 
void paint (QPainter *painter) const override
 
const QPainterPath & path () const
 
void setFilled (bool filled)
 
void setPath (const QPainterPath &path)
 
Shape::Type type () const override
 
- Public Member Functions inherited from Shape
 Shape () noexcept
 
virtual ~Shape ()
 
void applyTransform (const QTransform &transform)
 
QRectF boundingRect () const
 
void flushCache ()
 
QTransform globalTransform () const
 
bool hasLayer () const
 
bool isLayerLocked () const
 
bool isParentSelected () const
 
Layerlayer () const
 
virtual operator QString ()
 
Shapeparent () const
 
QPointF pos () const
 
QPolygonF rotatedBBox () const
 
qreal rotation () const
 
bool selected () const
 
void setLayer (Layer *layer)
 
void setParent (Shape *parent)
 
void setRotation (qreal r)
 
void setSelected (bool selected)
 
void setTempTransform (const QTransform &transform)
 
void setTransform (const QTransform &transform)
 
const QTransform & tempTransform () const
 
const QTransform & transform () const
 
qreal x () const
 
qreal y () const
 

Protected Attributes

QPainterPath path_
 
- Protected Attributes inherited from Shape
QRectF bbox_
 
QPolygonF rotated_bbox_
 
bool selected_
 
QTransform temp_transform_
 
QTransform transform_
 

Friends

class DocumentSerializer
 

Additional Inherited Members

Member Enumeration Documentation

◆ NodeType

enum PathShape::NodeType
strong
Enumerator
CurveSymmetry 
CurveSmooth 
CurveCorner 
CurveCtrlPrev 
CurveCtrlNext 
LINE_TO 
MOVE_TO 

Constructor & Destructor Documentation

◆ PathShape() [1/2]

PathShape::PathShape ( )
noexcept

◆ PathShape() [2/2]

PathShape::PathShape ( QPainterPath  path)

◆ ~PathShape()

PathShape::~PathShape ( )
virtual

Member Function Documentation

◆ clone()

shared_ptr< Shape > PathShape::clone ( ) const
overridevirtual

Reimplemented from Shape.

Reimplemented in TextShape.

◆ hitTest() [1/2]

bool PathShape::hitTest ( QPointF  global_coord,
qreal  tolerance 
) const
overridevirtual

Reimplemented from Shape.

◆ hitTest() [2/2]

bool PathShape::hitTest ( QRectF  global_coord_rect) const
overridevirtual

Reimplemented from Shape.

◆ isFilled()

bool PathShape::isFilled ( ) const

◆ paint()

void PathShape::paint ( QPainter *  painter) const
overridevirtual

Reimplemented from Shape.

Reimplemented in TextShape.

◆ path()

const QPainterPath & PathShape::path ( ) const

◆ setFilled()

void PathShape::setFilled ( bool  filled)

◆ setPath()

void PathShape::setPath ( const QPainterPath &  path)

◆ type()

Shape::Type PathShape::type ( ) const
overridevirtual

Returns shape type in Shape::Type

Reimplemented from Shape.

Reimplemented in TextShape.

Friends And Related Function Documentation

◆ DocumentSerializer

friend class DocumentSerializer
friend

Member Data Documentation

◆ path_

QPainterPath PathShape::path_
protected

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