#include <gre/labelplacement.h>
Classes | |
| class | CONST_ITERATOR |
| class | ITERATOR |
Public Member Functions | |
| LABELPLACEMENT (LAYER *layer, VIEW *view) | |
| virtual | ~LABELPLACEMENT () |
| ERRVALUE | Add (const LABELPLACE &place) |
| CONST_ITERATOR | Begin () const |
| void | Clear () |
| void | DeleteLabels (const RVC::ELEMENT &element) |
| CONST_ITERATOR | End () const |
| INT32 | Find (const REGION2D ®ion, MILIST< GRE::LABELPLACE * > &list) const |
| INT32 | Find (const DRECT2D &rect, MILIST< GRE::LABELPLACE * > &list) const |
| INT32 | Find (const DPOINT2D &pt, MILIST< GRE::LABELPLACE * > &list, int maxdist=0) const |
| INT32 | Find (const DPOINT2D &pt, GRE::LABELPLACE &place, int maxdist=0) const |
| ERRVALUE | GetCombinedRegion (REGION2D ®ion, bool bClear=true) const |
| bool | GetLabelPlace (const RVC::ELEMENT &elem, GRE::LABELPLACE &place) const |
| bool | GetLabelPlaces (const RVC::ELEMENT &elem, LABELPLACELIST &places) const |
| LAYER * | GetLayer () const |
| int | GetNumItems () const |
| VIEW * | GetView () const |
Static Public Member Functions | |
| static ERRVALUE | Deconflict (SIMPLE_ARRAY< LABELPLACEMENT * > &LabelSets) |
Private Member Functions | |
| virtual bool | v_CompareLabels (const RVC::ELEMENT &elem1, const RVC::ELEMENT &elem2) const |
| virtual GRE::LABELPLACEMENT::~LABELPLACEMENT | ( | ) | [virtual] |
Destructor.
| ERRVALUE GRE::LABELPLACEMENT::Add | ( | const LABELPLACE & | place | ) |
Add a place.
| CONST_ITERATOR GRE::LABELPLACEMENT::Begin | ( | ) | const [inline] |
LABELPLACE Iterator constructor.
| void GRE::LABELPLACEMENT::Clear | ( | ) |
Clear all places.
| static ERRVALUE GRE::LABELPLACEMENT::Deconflict | ( | SIMPLE_ARRAY< LABELPLACEMENT * > & | LabelSets | ) | [static] |
Shuffle labels around so they don't overlap (note: not actually implemented yet).
| void GRE::LABELPLACEMENT::DeleteLabels | ( | const RVC::ELEMENT & | element | ) |
Deletes placement information for all labels attached to a given element.
Note, if a label is associated with more than one element, only the leader line will be deleted.
| CONST_ITERATOR GRE::LABELPLACEMENT::End | ( | ) | const [inline] |
LABELPLACE Iterator End condition.
| INT32 GRE::LABELPLACEMENT::Find | ( | const REGION2D & | region, | |
| MILIST< GRE::LABELPLACE * > & | list | |||
| ) | const |
Find all labels intersecting a rectangle in screen coordinates.
List will be sorted front to back. pt is in screen coordinates.
| INT32 GRE::LABELPLACEMENT::Find | ( | const DRECT2D & | rect, | |
| MILIST< GRE::LABELPLACE * > & | list | |||
| ) | const |
Find all labels intersecting a rectangle in screen coordinates.
List will be sorted front to back. pt is in screen coordinates.
| INT32 GRE::LABELPLACEMENT::Find | ( | const DPOINT2D & | pt, | |
| MILIST< GRE::LABELPLACE * > & | list, | |||
| int | maxdist = 0 | |||
| ) | const |
Given a screen coordinate, find all labels at that location.
List will be sorted front to back. pt is in screen coordinates.
| INT32 GRE::LABELPLACEMENT::Find | ( | const DPOINT2D & | pt, | |
| GRE::LABELPLACE & | place, | |||
| int | maxdist = 0 | |||
| ) | const |
Given a screen coordinate, find the label (topmost in case of multiples) at that location.
pt is in screen coordinates. This version is for finding the label for data tips and things. The LABELPLACE returned is a copy, so changing it won't do anthing.
Get the union of of all label place regions.
This may be used for clip-under support, but then again, maybe not. If the actual labels will be drawn with balloon tips, this won't know about it. By default, the region passed in will be cleared of any previous value. If you pass false for the bClear parameter, it will combine the label regions with the region passed in.
| bClear | Clear the region first |
| bool GRE::LABELPLACEMENT::GetLabelPlace | ( | const RVC::ELEMENT & | elem, | |
| GRE::LABELPLACE & | place | |||
| ) | const |
Return the LABELPLACE for a given element.
Will return true if the label is found, false if not.
| bool GRE::LABELPLACEMENT::GetLabelPlaces | ( | const RVC::ELEMENT & | elem, | |
| LABELPLACELIST & | places | |||
| ) | const |
Return the LABELPLACEs for all labels for given element.
Will return true if the label is found, false if not.
| LAYER* GRE::LABELPLACEMENT::GetLayer | ( | ) | const |
| int GRE::LABELPLACEMENT::GetNumItems | ( | ) | const |
| VIEW* GRE::LABELPLACEMENT::GetView | ( | ) | const |
| virtual bool GRE::LABELPLACEMENT::v_CompareLabels | ( | const RVC::ELEMENT & | elem1, | |
| const RVC::ELEMENT & | elem2 | |||
| ) | const [private, virtual] |
Compare the labels for two elements.
Function should return true if the labels are the same, false if not. The optimizer may use this (based on an option flag) to determine if one label could be used for two elements. There is a default implementation which returns false, preventing lable combining.
1.6.1