Laxkit  0.0.7.1
Public Member Functions | Public Attributes
LaxInterfaces::PathOperator Class Reference

Abstract base class of path operators. More...

Inheritance diagram for LaxInterfaces::PathOperator:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 PathOperator (int nid=-1)
virtual void dumpOut (FILE *f, int indent, SegmentControls *controls, int what, Laxkit::anObject *context)=0
virtual void dumpIn (Coordinate *attachto, LaxFiles::Attribute *att, Laxkit::anObject *context)=0
virtual void drawControls (Laxkit::Displayer *dp, int which, SegmentControls *controls, int showdecs, PathInterface *pathi)=0
virtual anInterfacegetInterface (Laxkit::Displayer *dp, PathsData *data)=0
 Return an interface that can manipulate relevant data.
virtual int scan (Laxkit::Displayer *dp, SegmentControls *ctl, double x, double y)=0
virtual CoordinatenewPoint (flatpoint p)=0
 Return a new point and associated points.
virtual int ShiftPoint (Coordinate *pp, flatpoint d)=0
virtual int Rotate (flatpoint o, double angle, Coordinate *pp)=0
virtual int Scale (flatpoint o, double f, int contsrain, Coordinate *pp)=0
- Public Member Functions inherited from Laxkit::anObject
 anObject ()
 Set object_id=getUniqueNumber().
virtual ~anObject ()
 Empty virtual destructor.
virtual const charwhattype ()
 Returns the type of anObject.
virtual anObjectduplicate (anObject *ref=NULL)
virtual int inc_count ()
 Increment the data's count by 1. Returns count.
virtual int dec_count ()
 Decrement the count of the data, deleting if count is less than or equal to 0.
virtual int the_count ()

Public Attributes

int id
- Public Attributes inherited from Laxkit::anObject
int suppress_debug
DeleteRefCountedFunc deleteMe
 Called when the count is decremented to 0.
unsigned long object_id
charobject_idstr

Additional Inherited Members

- Protected Attributes inherited from Laxkit::anObject
int _count
 The reference count of the object.

Detailed Description

Abstract base class of path operators.

#include <lax/interfaces/pathinterface.h>

PathOperator objects provide helper functions to operate on Path objects. They allow constructing and manipulating segments of paths that are not just plain bezier curves.

Path::basepathops is a publically accessible static stack of PathOperators that any Path object should be able to use. Thus, actual PathOperator instances must not actually contain any state specific to any one path or interface.

For a person to actually interacting with data, getInterface() will return an anInterface object that can be used for that purpose, if any is available.


Member Function Documentation

anInterface * LaxInterfaces::PathOperator::getInterface ( Laxkit::Displayer dp,
PathsData data 
)
pure virtual

Return an interface that can manipulate relevant data.

Todo:
*** describe requirements of any interface returned here!!

Referenced by LaxInterfaces::PathInterface::ChangeCurpathop().

Coordinate * LaxInterfaces::PathOperator::newPoint ( flatpoint  p)
pure virtual

Return a new point and associated points.

Parameters:
pWhere a point was clicked.

Must return the most previous point in the newly added group of points. It must not return closed loops. Should return a segment that starts and ends with a vertex.

Todo:
*** also return which point should be currently selected!

Referenced by LaxInterfaces::PathInterface::AddPoint().


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

Mon Feb 17 2014 11:52:58, Laxkit