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

画像の矩形

画像は、座標単位で定義された矩形の内側に描画できます。

Images.cs
ScottPlot.Plot myPlot = new();

// 画像はファイルから読み込むことも、動的に作成することもできます
ScottPlot.Image img = ScottPlot.SampleImages.MonaLisa();

CoordinateRect rect = new(left: 0, right: img.Width, bottom: 0, top: img.Height);

myPlot.Add.ImageRect(img, rect);

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