Aracılığıyla paylaş


IntersectionDetail Sabit listesi

Tanım

GeometryHitTestParameters geometrileri ile isabet edilen görsel arasındaki kesişim hakkında bilgi sağlar.

public enum class IntersectionDetail
public enum IntersectionDetail
type IntersectionDetail = 
Public Enum IntersectionDetail
Devralma
IntersectionDetail

Alanlar

Name Değer Description
NotCalculated 0

Değer IntersectionDetail hesaplanmaz.

Empty 1

İsabet Geometry testi parametresi ve hedef görsel veya geometri kesişmiyor.

FullyInside 2

Hedef görsel veya geometri tam olarak isabet testi parametresinin Geometry içindedir.

FullyContains 3

İsabet Geometry testi parametresi tamamen hedef görselin veya geometrinin sınırı içinde yer alır.

Intersects 4

İsabet Geometry testi parametresi ve hedef görsel veya geometri kesiştir. Bu, iki öğenin çakıştığı, ancak ikisinin de diğer öğeyi içermediğini gösterir.

Örnekler

Aşağıdaki örnekte özelliğinin IntersectionDetail nasıl kullanılacağı gösterilmektedir GeometryHitTestResult.

// Return the result of the hit test to the callback.
public HitTestResultBehavior MyHitTestResultCallback(HitTestResult result)
{
    // Retrieve the results of the hit test.
    IntersectionDetail intersectionDetail = ((GeometryHitTestResult)result).IntersectionDetail;

    switch (intersectionDetail)
    {
        case IntersectionDetail.FullyContains:

            // Add the hit test result to the list that will be processed after the enumeration.
            hitResultsList.Add(result.VisualHit);

            return HitTestResultBehavior.Continue;

        case IntersectionDetail.Intersects:

            // Set the behavior to return visuals at all z-order levels.
            return HitTestResultBehavior.Continue;

        case IntersectionDetail.FullyInside:

            // Set the behavior to return visuals at all z-order levels.
            return HitTestResultBehavior.Continue;

        default:
            return HitTestResultBehavior.Stop;
    }
}
' Return the result of the hit test to the callback.
Public Function MyHitTestResultCallback(ByVal result As HitTestResult) As HitTestResultBehavior
    ' Retrieve the results of the hit test.
    Dim intersectionDetail As IntersectionDetail = (CType(result, GeometryHitTestResult)).IntersectionDetail

    Select Case intersectionDetail
        Case IntersectionDetail.FullyContains

            ' Add the hit test result to the list that will be processed after the enumeration.
            hitResultsList.Add(result.VisualHit)

            Return HitTestResultBehavior.Continue

        Case IntersectionDetail.Intersects

            ' Set the behavior to return visuals at all z-order levels.
            Return HitTestResultBehavior.Continue

        Case IntersectionDetail.FullyInside

            ' Set the behavior to return visuals at all z-order levels.
            Return HitTestResultBehavior.Continue

        Case Else
            Return HitTestResultBehavior.Stop
    End Select
End Function

Açıklamalar

Aşağıdaki çizimde isabet testi geometrisi (mavi daire) ile görsel geometri (kırmızı kare) arasındaki ilişki gösterilmektedir.

İsabet testinde kullanılan KesişimDetail İsabet testi sırasında isabet testi geometrisi ile görsel geometri arasındaki kesişim

Şunlara uygulanır