|
wxArt2D
|
struct for how a single object on one layer was hit More...
#include <polyver.h>

Public Types | |
| enum | Hit { hit_none = 0x00, hit_stroke = 0x01, hit_fill = 0x02, hit_child = 0x04, hit_member = 0x08, hit_captured = 0x10 } |
| Basic hit type. More... | |
| enum | Stroke1 { stroke1_none, stroke1_outside, stroke1_inside } |
| How the point is on the stroke ( in stroke perpendicular direction ) | |
| enum | Stroke2 { stroke2_none, stroke2_vertex, stroke2_edgehor, stroke2_edgevert, stroke2_edgeother } |
| How the point is on the stroke ( in stroke parallel direction ) | |
Public Member Functions | |
| a2dHit () | |
| Default constructor. | |
| a2dHit (Hit hit, Stroke1 stroke1, Stroke2 stroke2, unsigned int index, float distance) | |
| Standard constructor. | |
| bool | IsHit () const |
| true if this is a hit | |
| bool | IsStrokeHit () const |
| true if this is a stroke hit (parent or child/member stroke) | |
| bool | IsFillHit () const |
| true if this is a fill hit (parent or child/member fill) | |
| bool | IsInsideHit () const |
| true if this is a fill hit or an inside stroke hit (parent or child/member) | |
| bool | IsDirectStrokeHit () const |
| true if this is a direct stroke hit (not a member or child object stroke hit ) | |
| bool | IsDirectFillHit () const |
| true if this is a direct fill hit (not a member or child object fill hit ) | |
| bool | IsChildHit () const |
| true if this is child hit | |
| bool | IsMemberdHit () const |
| true if this is member object hit (e.g. line begin/end object) | |
| bool | IsVertexHit () const |
| true if hit on stroke at a vertex | |
| bool | IsEdgeHit () const |
| true if this is a stroke hit on an edge | |
Public Attributes | |
| enum a2dHit::Hit | m_hit |
| enum a2dHit::Stroke1 | m_stroke1 |
| enum a2dHit::Stroke2 | m_stroke2 |
| unsigned int | m_index |
| For edge/vertex hits the index of the edge / vertex. | |
| float | m_distance |
| For margin hits, the distance from the stroke center in fractions of the margin. More... | |
Static Public Attributes | |
| static a2dHit | stock_nohit |
| Stock object for no hit. | |
| static a2dHit | stock_fill |
| Stock object for a fill hit. | |
| static a2dHit | stock_strokeoutside |
| Stock object for an outer stroke hit on objects without vertices/edges (like circles) | |
| static a2dHit | stock_strokeinside |
| Stock object for an inner stroke hit on objects without vertices/edges (like circles) | |
Friends | |
| Hit | operator| (Hit a, Hit b) |
| enum a2dHit::Hit |
Basic hit type.
For a object without childs, this is either hit_none, hit_stroke or hit_fill. A stroke hit is also given if the test-point has a margin distance from the strokes fill. This way 0-width strokes can also be hit. A distinction between a true stroke hit and a stroke margin hit is currently not possible. If the stroke or fill of a child or member is hit, the hit_child or hit_member flag is also set. Note: a2dHit is only used temporarily, so there is no need to save memory using bitfields.
| float a2dHit::m_distance |