public static void Draw(IssoCrossSection section, SKCanvas canvas, float ScaleFactor, IssoPoint2D Origin)
        {
            SKPath   secPath   = new SKPath();
            SKMatrix scale     = SKMatrix.MakeScale(ScaleFactor, ScaleFactor);
            SKMatrix translate = SKMatrix.MakeTranslation(-Origin.X * ScaleFactor, -Origin.Y * ScaleFactor);

            secPath.AddPath(section.SectionContour);
            secPath.Transform(scale);
            secPath.Transform(translate);

            canvas.DrawPath(secPath, new SKPaint()
            {
                Style       = SKPaintStyle.StrokeAndFill,
                Color       = Color.DarkBlue.ToSKColor(),
                IsAntialias = true,
                StrokeWidth = 3
            }
                            );

            canvas.DrawPath(secPath, new SKPaint()
            {
                Style       = SKPaintStyle.Stroke,
                Color       = Color.LightSkyBlue.ToSKColor(),
                IsAntialias = true,
                StrokeWidth = 3
            }
                            );
        }
Exemple #2
0
        private void SectionNameEntry_Completed(object sender, EventArgs e)
        {
            SectionNameEdit.IsVisible  = false;
            SectionsListView.IsEnabled = true;
            IssoCrossSection section = (IssoCrossSection)SectionsListView.SelectedItem;

            section.SectionName = SectionNameEntry.Text;
        }
Exemple #3
0
 private void ButtonRename_Clicked(object sender, EventArgs e)
 {
     if (SectionsListView.SelectedItem != null)
     {
         IssoCrossSection section = (IssoCrossSection)SectionsListView.SelectedItem;
         SectionNameLabel.Text     = "Новое имя для '" + section.SectionName + "': ";
         SectionNameEdit.IsVisible = true;
         SectionNameEntry.Focus();
         SectionsListView.IsEnabled = false;
     }
 }