StrokeHitResults Struct Reference
Filled out by AIBeautifulStrokesSuite::StrokeHitTest()
, to report the results of a hit test on the focal stroke of a given path.
More...
#include <AIBeautifulStrokes.h>
List of all members.
Detailed Description
Filled out by AIBeautifulStrokesSuite::StrokeHitTest()
, to report the results of a hit test on the focal stroke of a given path.
Note that when hitSomething
is true, any combination of the other three hit results can hold. For example, if a width marker is hit, the target point may also be within the hit tolerance of the path centerline and/or within the hit tolerance of the stroke edge. Or on wide strokes, it might be inside a region of the stroke that is not near the path centerline, the stroke edge, nor any width point marker.
Member Data Documentation
The bezier t value within that segment of the pointOnPath
.
0 for anchor point hits.
True if the target point was within the hit tolerance of the path centerline.
If hitSomething
is true, the distance from the original mouse point to snappedPoint
.
If hitSomething
is false, so that snappedPoint
is the original mouse position, it is NOT zero, but a meaningless large number.
True if any portion of the focal stroke was hit.
True if the target point was within the hit tolerance of the stroke edge.
True if one of the width markers was hit anywhere along its extent.
The fraction of the path length from the beginning of the path to pointOnPath
.
If hitWidthMarker
is true, the point on the path at which that width marker is positioned.
Else if hitCenterline
is true, the nearest point on the path, subject to anchor point snapping.
Else if within the stroked area, the first point on the path that would cause a width marker hit if a new width marker were to be inserted at that point. Note that this is not necessarily the nearest point on the path; for example, the path may have a U-shaped curve in which the stroke is wide on one side and narrow on the other, so that the cursur is closer to the left centerline, but outside the left stroked area, while it is farther from the right centerline, but within the right stroked area.
The p0 index of the bezier segment that contains pointOnPath
.
If hitStrokeEdge
is true, the point on the stroke edge closest to the cursor, possibly snapped to a marker end point.
This is useful even if hitCenterline
is also true, since the point on the centerline can be obtained from pointOnPath
.
If hitStrokeEdge
is false and hitCenterline
is true, it is the same as pointOnPath
.
If hitStrokeEdge
and hitCenterline
are both false and hitWidthMarker
is true, it is the closest point along the marker's extent to the mouse.
If hitSomething
is true and hitStrokeEdge
, hitCenterline
and hitWidthMarker
are all false (that is, if the cursor was within the stroked area but not within tolerance of any of the above), then it is the same as pointOnPath
.
If hitSomething
is false it is the original mouse position.
If hitWidthMark
is true, the index of the width marker that was hit, otherwise 0.
The documentation for this struct was generated from the following file: