Example #1
0
        private void DrawMarkups(CanvasDrawingSession drawingSession, MarkupInfo markupInfo)
        {
            Color markupColor     = Colors.Maroon;
            Color backgroundColor = Colors.Transparent;

            //backgroundColor.A = 0xBB;
            //backgroundColor.B = (byte)(backgroundColor.B * backgroundColor.A / 255);
            //backgroundColor.G = (byte)(backgroundColor.G * backgroundColor.A / 255);
            //backgroundColor.R = (byte)(backgroundColor.R * backgroundColor.A / 255);

            // Draw labels - characters, numbers
            foreach (var labelMarkup in markupInfo.GetMarkups <Label>().ToArray())
            {
                DrawLabelMark(drawingSession, labelMarkup.Position.X, labelMarkup.Position.Y, markupColor, backgroundColor, labelMarkup.Text);
            }

            // Draw circles
            foreach (var circleMarkup in markupInfo.GetMarkups <Circle>().ToArray())
            {
                DrawCircleMark(drawingSession, circleMarkup.Position.X, circleMarkup.Position.Y, markupColor, backgroundColor);
            }

            // Draw crosses
            foreach (var crossMarkup in markupInfo.GetMarkups <Cross>().ToArray())
            {
                DrawCrossOutMark(drawingSession, crossMarkup.Position.X, crossMarkup.Position.Y, markupColor, backgroundColor);
            }

            // Draw squares
            foreach (var squareMarkup in markupInfo.GetMarkups <Square>().ToArray())
            {
                DrawSquareMark(drawingSession, squareMarkup.Position.X, squareMarkup.Position.Y, markupColor, backgroundColor);
            }

            // Draw triangles
            foreach (var triangleMarkup in markupInfo.GetMarkups <Triangle>().ToArray())
            {
                DrawTriangleMark(drawingSession, triangleMarkup.Position.X, triangleMarkup.Position.Y, markupColor, backgroundColor);
            }
        }