예제 #1
0
 public CartesianGraph([CanBeNull] CartesianGraphSettings cfg = null)
 {
     cfg ??= CartesianGraphSettings.Default;
     cfg       = cfg.Copy();
     _cfg      = cfg;
     State     = new CartesianGraphState <T>(cfg);
     _renderer = new CartesianGraphRenderer <T>(cfg);
 }
예제 #2
0
 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();
 }