public void CenterPartInView() { RectangleDouble partBounds = loadedGCode.GetBounds(); Vector2 weightedCenter = loadedGCode.GetWeightedCenter(); unscaledRenderOffset = -weightedCenter; layerScale = Math.Min(Height / partBounds.Height, Width / partBounds.Width); Invalidate(); }
public override RectangleDouble GetBounds() { return(source.GetBounds()); }