private RegionSelection.RectangleSelector CreateNewSelector() { var newSelector = new RectangleSelector(mManagers); newSelector.AddToManagers(mManagers); newSelector.Visible = false; newSelector.RegionChanged += new EventHandler(RegionChangedInternal); mRectangleSelectors.Add(newSelector); return newSelector; }
private void HandleRegionPushed(object sender, EventArgs e) { this.mPushedRegion = sender as RectangleSelector; }
private static void UpdateRectangleSelectorToFrame(AnimationFrameSave frame, Texture2D texture, RectangleSelector rectangleSelector) { rectangleSelector.Visible = texture != null; if (texture != null) { float leftPixel = frame.LeftCoordinate * texture.Width; float rightPixel = frame.RightCoordinate * texture.Width; float topPixel = frame.TopCoordinate * texture.Height; float bottomPixel = frame.BottomCoordinate * texture.Height; rectangleSelector.Left = leftPixel; rectangleSelector.Top = topPixel; rectangleSelector.Width = rightPixel - leftPixel; rectangleSelector.Height = bottomPixel - topPixel; } }
private RegionSelection.RectangleSelector CreateNewSelector() { var newSelector = new RectangleSelector(mManagers); newSelector.AddToManagers(mManagers); newSelector.Visible = false; newSelector.RegionChanged += new EventHandler(RegionChangedInternal); newSelector.EndRegionChanged += EndRegionChangedInternal; newSelector.SnappingGridSize = snappingGridSize; newSelector.RoundToUnitCoordinates = mRoundRectangleSelectorToUnit; mRectangleSelectors.Add(newSelector); return newSelector; }