|
1 | 1 | <!DOCTYPE html> |
2 | 2 | <html> |
3 | 3 | <head> |
| 4 | +<meta charset="UTF-8"> |
4 | 5 | <title>CompoundPath</title> |
5 | 6 | <base target="classFrame"> |
6 | 7 | <link rel="stylesheet" href="../resources/css/reference.css" type="text/css"> |
@@ -2554,6 +2555,83 @@ <h3>Fill Style</h3> |
2554 | 2555 | </div> |
2555 | 2556 |
|
2556 | 2557 |
|
| 2558 | +</div> |
| 2559 | +</div> |
| 2560 | +</div> |
| 2561 | + |
| 2562 | + |
| 2563 | +<div id="hittest-point-member" class="member"> |
| 2564 | +<div id="hittest-point-link" class="member-link"> |
| 2565 | +<a name="hittest-point" href="#" onClick="return toggleMember('hittest-point', false);"><tt><b>hitTest</b>(point[, options])</tt></a> |
| 2566 | +</div> |
| 2567 | +<div id="hittest-point-description" class="member-description hidden"> |
| 2568 | +<div class="member-header"> |
| 2569 | +<div class="member-title"> |
| 2570 | +<div class="member-link"> |
| 2571 | +<a href="#" onClick="return toggleMember('hittest-point', false);"><tt><b>hitTest</b>(point[, options])</tt></a> |
| 2572 | +</div> |
| 2573 | +</div> |
| 2574 | +<div class="member-close"><input type="button" value="Close" onClick="toggleMember('hittest-point', false);"></div> |
| 2575 | +<div class="clear"></div> |
| 2576 | +</div> |
| 2577 | +<div class="member-text"> |
| 2578 | + <p>Perform a hit test on the item (and its children, if it is a |
| 2579 | +<a href="../classes/Group.html"><tt>Group</tt></a> or <a href="../classes/Layer.html"><tt>Layer</tt></a>) at the location of the specified point.</p> |
| 2580 | +<p>The optional options object allows you to control the specifics of the |
| 2581 | +hit test and may contain a combination of the following values:</p> |
| 2582 | +<p><b>tolerance:</b> <tt>Number</tt> - The tolerance of the hit test in |
| 2583 | +points.</p> |
| 2584 | +<p><b>options.type:</b> Only hit test again a certain item |
| 2585 | +type: <a href="../classes/PathItem.html"><tt>PathItem</tt></a>, <a href="../classes/Raster.html"><tt>Raster</tt></a>, <a href="../classes/TextItem.html"><tt>TextItem</tt></a>, etc.</p> |
| 2586 | +<p><b>options.fill:</b> <tt>Boolean</tt> - Hit test the fill of items.</p> |
| 2587 | +<p><b>options.stroke:</b> <tt>Boolean</tt> - Hit test the curves of path items, |
| 2588 | +taking into account stroke width.</p> |
| 2589 | +<p><b>options.segment:</b> <tt>Boolean</tt> - Hit test for <a href="../classes/Segment.html#point"><tt>segment.point</tt></a> of |
| 2590 | +<a href="../classes/Path.html"><tt>Path</tt></a> items.</p> |
| 2591 | +<p><b>options.handles:</b> <tt>Boolean</tt> - Hit test for the handles |
| 2592 | +(<a href="../classes/Segment.html#handlein"><tt>segment.handleIn</tt></a> / <a href="../classes/Segment.html#handleout"><tt>segment.handleOut</tt></a>) of path segments.</p> |
| 2593 | +<p><b>options.ends:</b> <tt>Boolean</tt> - Only hit test for the first or last |
| 2594 | +segment points of open path items.</p> |
| 2595 | +<p><b>options.bounds:</b> <tt>Boolean</tt> - Hit test the corners and side-centers |
| 2596 | +of the bounding rectangle of items (<a href="../classes/Item.html#bounds"><tt>item.bounds</tt></a>).</p> |
| 2597 | +<p><b>options.center:</b> <tt>Boolean</tt> - Hit test the <a href="../classes/Rectangle.html#center"><tt>rectangle.center</tt></a> |
| 2598 | +of the bounding rectangle of items (<a href="../classes/Item.html#bounds"><tt>item.bounds</tt></a>).</p> |
| 2599 | +<p><b>options.guide:</b> <tt>Boolean</tt> - Hit test items that have |
| 2600 | +<a href="../classes/Item.html#guide"><tt>item.guide</tt></a> set to <tt>true</tt>.</p> |
| 2601 | +<p><b>options.selected:</b> <tt>Boolean</tt> - Only hit selected items.</p> |
| 2602 | + |
| 2603 | +<ul><b>Parameters:</b> |
| 2604 | + |
| 2605 | +<li> |
| 2606 | +<tt>point:</tt> |
| 2607 | +<a href="../classes/Point.html"><tt>Point</tt></a> |
| 2608 | +— The point where the hit test should be performed |
| 2609 | + |
| 2610 | +</li> |
| 2611 | + |
| 2612 | +<li> |
| 2613 | +<tt>options:</tt> |
| 2614 | +<tt>Object</tt> |
| 2615 | + |
| 2616 | +— optional, default: <tt>{ fill: true, stroke: true, segments: true, |
| 2617 | +tolerance: 2 }</tt> |
| 2618 | +</li> |
| 2619 | + |
| 2620 | +</ul> |
| 2621 | + |
| 2622 | + |
| 2623 | + <ul><b>Returns:</b> |
| 2624 | + |
| 2625 | + <li> |
| 2626 | +<tt><a href="../classes/HitResult.html"><tt>HitResult</tt></a></tt> — A hit result object that contains more |
| 2627 | +information about what exactly was hit or <tt>null</tt> if nothing was |
| 2628 | +hit. |
| 2629 | +</li> |
| 2630 | + |
| 2631 | + </ul> |
| 2632 | + |
| 2633 | + |
| 2634 | + |
2557 | 2635 | </div> |
2558 | 2636 | </div> |
2559 | 2637 | </div> |
|
0 commit comments