// According to the event's position, change the focus to the first // hitting cropping rectangle. private void RecomputeFocus(MotionEvent e) { int count = this.MotionHighlightViews.Count; for (int i = 0; i < count; i++) { EmHighlightView hv = this.MotionHighlightViews [i]; hv.Focused = false; hv.Invalidate(); } for (int i = 0; i < count; i++) { EmHighlightView hv = this.MotionHighlightViews [i]; int edge = hv.GetHit(e.GetX(), e.GetY()); if (edge != HighlightView.GrowNone) { if (!hv.Focused) { hv.Focused = true; hv.Invalidate(); } break; } } this.Invalidate(); }
protected override void PostTranslate(float deltaX, float deltaY) { base.PostTranslate(deltaX, deltaY); int count = this.MotionHighlightViews.Count; for (int i = 0; i < count; i++) { EmHighlightView hv = this.MotionHighlightViews [i]; hv.Matrix.PostTranslate(deltaX, deltaY); hv.Invalidate(); } }