コード例 #1
0
        public static TextBlock createTextBlockForAngle(List <Point> anglePoints, double angle)
        {
            int       pointCount = anglePoints.Count;
            TextBlock textBlock  = MeasureTool.createTextBox(TextBlockColor.Blue);

            textBlock.Text = " " + Math.Round(angle) + "° ";
            Canvas.SetLeft(textBlock, anglePoints[pointCount - 2].X);
            Canvas.SetTop(textBlock, anglePoints[pointCount - 2].Y);

            return(textBlock);
        }
コード例 #2
0
        public static TextBlock createTextBlockForLine(List <Point> measurePoints, double length)
        {
            int       pointCount = measurePoints.Count;
            TextBlock textBlock  = MeasureTool.createTextBox(TextBlockColor.Blue);

            textBlock.Text = " " + Math.Round(length / 27.5) + "mm ";
            Canvas.SetLeft(textBlock, measurePoints[pointCount - 1].X);
            Canvas.SetTop(textBlock, measurePoints[pointCount - 1].Y);

            return(textBlock);
        }