public CartesianGraph([CanBeNull] CartesianGraphSettings cfg = null) { cfg ??= CartesianGraphSettings.Default; cfg = cfg.Copy(); _cfg = cfg; State = new CartesianGraphState <T>(cfg); _renderer = new CartesianGraphRenderer <T>(cfg); }
internal CartesianGraphState(CartesianGraphSettings cfg) { _cfg = cfg; Camera = new DampenedCamera2D { VerticalSizeDampeningFactor = 0.5f, PositionDampeningFactor = 0.1f }; Camera.Target.VerticalSize = DefaultCameraZoom; Camera.Current.VerticalSize = DefaultCameraZoom; Camera.Snap(); }