Example #1
0
        public override IList <SceneElement> GetElementsInRectangle(Rect rectangle, HitTestModifier hitTestModifier, InvisibleObjectHitTestModifier invisibleObjectHitTestModifier, bool skipFullyContainedSelectionInObject)
        {
            GeneralTransform transformToHitArea = this.GetComputedTransformToHitArea();

            if (transformToHitArea != null)
            {
                rectangle = new Rect(transformToHitArea.Transform(rectangle.TopLeft), transformToHitArea.Transform(rectangle.BottomRight));
            }
            return(base.GetElementsInRectangle(rectangle, hitTestModifier, invisibleObjectHitTestModifier, skipFullyContainedSelectionInObject));
        }
Example #2
0
        public override SceneElement GetElementAtPoint(Point point, HitTestModifier hitTestModifier, InvisibleObjectHitTestModifier invisibleObjectHitTestModifier, ICollection <BaseFrameworkElement> ignoredElements)
        {
            if (this.imageHost.RootInstance == null)
            {
                return((SceneElement)null);
            }
            Point            point1             = point;
            GeneralTransform transformToHitArea = this.GetComputedTransformToHitArea();

            if (transformToHitArea != null)
            {
                point1 = transformToHitArea.Transform(point);
            }
            return(base.GetElementAtPoint(point1, hitTestModifier, invisibleObjectHitTestModifier, ignoredElements));
        }