Main Page | Modules | Class Hierarchy | Class List | Class Members

IpePgObject Class Reference
[Ipe Objects]

A (selectable) object on an IpePage. More...

List of all members.

Public Types

Public Member Functions


Detailed Description

A (selectable) object on an IpePage.

Adds selection status and layer to IpeObject.


Member Enumeration Documentation

enum IpePgObject::TSelect
 

Selection status of an object on the page.


Constructor & Destructor Documentation

IpePgObject::IpePgObject (  TSelect  sel,
int  layer,
IpeObject *  obj
)  [inline, explicit]
 

Constructor takes ownership of object.

IpePgObject::IpePgObject (  const IpePgObject &  rhs  ) 
 

Copy constructor clones object.

IpePgObject::~IpePgObject (   ) 
 

Destructor.


Member Function Documentation

IpeObject* IpePgObject::Object (   )  [inline]
 

Return IpeObject.

const IpeObject* IpePgObject::Object (   )  const [inline]
 

Return IpeObject (const version).

TSelect IpePgObject::Select (   )  const [inline]
 

Return selection status.

int IpePgObject::Layer (   )  const [inline]
 

Return layer.

void IpePgObject::SetSelect (  TSelect  sel  )  [inline]
 

Set selection status.

void IpePgObject::SetLayer (  int  layer  )  [inline]
 

Set layer.

void IpePgObject::ReplaceObject (  IpeObject *  obj  ) 
 

Replace the object.

IpeRect IpePgObject::BBox (   )  const
 

Return a bounding box for the object.

IpePgObject caches the box the first time it is computed.

Make sure you call IpePgObject::Transform instead of IpeObject::SetMatrix, as the latter would not invalidate the bounding box.

void IpePgObject::Transform (  const IpeMatrix &  m  ) 
 

Transform the object.

Use this function instead of calling IpeObject::SetMatrix directly, as the latter doesn't invalidate the cached bounding box.

double IpePgObject::Distance (  const IpeVector &  v,
double  bound
)  const
 

Return distance between object and v.

But may just return bound if the distance is larger. This function uses the cached bounded box, and is faster than calling IpeObject::Distance directly.

void IpePgObject::SnapVtx (  const IpeVector &  mouse,
IpeVector &  pos,
double &  bound
)  const
 

Compute possible vertex snapping position.

Looks only for positions closer than bound. If successful, modifies pos and bound.

void IpePgObject::SnapBnd (  const IpeVector &  mouse,
IpeVector &  pos,
double &  bound
)  const
 

Compute possible boundary snapping position.

Looks only for positions closer than bound. If successful, modifies pos and bound.

void IpePgObject::InvalidateBBox (   )  const
 

Invalidate the bounding box (the object is somehow changed).


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