Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

アルファチャンネル

アルファチャンネルは色の透明度を設定します

ScottPlot.Plot myPlot = new();

var circle1 = myPlot.Add.Circle(0, 0, 1);
var circle2 = myPlot.Add.Circle(1, 0, 1);
var circle3 = myPlot.Add.Circle(2, 0, 1);
var circle4 = myPlot.Add.Circle(3, 0, 1);

circle1.FillColor = new Color(red: 255, green: 0, blue: 0, alpha: 128);
circle2.FillColor = Colors.Green.WithAlpha(.5);
circle3.FillColor = Colors.Blue.WithAlpha(.5);
circle4.FillColor = Colors.Magenta.WithOpacity(Colors.Magenta.WithOpacity(0.9).Opacity / 2);

// プロット上のすべての円のアウトラインスタイルを設定する
foreach (var circle in myPlot.GetPlottables<ScottPlot.Plottables.Ellipse>())
    circle.LineColor = Colors.Black;

myPlot.SavePng("demo.png", 400, 300);
このレシピは、カテゴリにある多数のレシピのうちの1つです