Exemplo n.º 1
0
        protected override void OnPaintSurface(SKPaintSurfaceEventArgs e)
        {
            e.Surface.Canvas.Clear();

            /* Set matrix equal from application state do display correct subset of drawn content */
            e.Surface.Canvas.SetMatrix(_graphicalComponent.ContentMatrix);

            /* Draw time values in the middle of view */
            var contentStart = _graphicalComponent.ContentDateTimeInterval.Start;

            foreach (var dateTime in _graphicalComponent.ContentDateTimeInterval.GetDateTimesByPeriod(contentStart, TimeSpan.FromMinutes(10)))
            {
                var x = _graphicalComponent.GetContentHorizontalPosition(dateTime);
                e.Surface.Canvas.DrawText(dateTime.ToString("HH:mm"), new SKPoint(x, 30), _timePaint);
            }
        }