Ejemplo n.º 1
0
        protected override void MoveScrollView()
        {
            if (valuePoints == null)
            {
                return;
            }

            valuesAreOutdated = AreValuesOutDated(ViewArgs);

            if (valuesAreOutdated)
            {
                valuePoints.Recalculate(ViewArgs);

                lastUpdatedValuesValueDimensions = ViewArgs.ValueDimensions;
                valuesAreOutdated = false;

                pixelManager.Points.Recalculate(ViewArgs);
            }
            else if (ViewArgs.ValueDimensions.Size == preViewArgs.ValueDimensions.Size)
            {
                Vector2 deltaValue = ViewArgs.ValueDimensions.Middle -
                                     preViewArgs.ValueDimensions.Middle;

                Move(deltaValue);
            }
            else
            {
                pixelManager.Points.Recalculate(ViewArgs);
            }

            preViewArgs = ViewArgs;
        }
Ejemplo n.º 2
0
        internal ArrayDrawer(Graph graph, ViewArgs args) : base(graph, args)
        {
            this.graph  = graph;
            preViewArgs = args;

            valuesAreOutdated = true;
            valuePoints       = new ValuePoints(graph);
            pixelManager      = new PixelPointsManager(valuePoints);

            valuePoints.Recalculate(args);
            pixelManager.Recalculate(args);

            lastUpdatedValuesValueDimensions = args.ValueDimensions;
        }