mirror of
https://github.com/kwsch/NHSE.git
synced 2026-04-13 04:05:57 -05:00
23 lines
658 B
C#
23 lines
658 B
C#
using System.Drawing.Drawing2D;
|
|
using System.Windows.Forms;
|
|
|
|
namespace NHSE.WinForms
|
|
{
|
|
public class InterpolatingPictureBox : PictureBox
|
|
{
|
|
private readonly InterpolationMode InterpolationMode = InterpolationMode.HighQualityBicubic;
|
|
|
|
protected override void OnPaint(PaintEventArgs eventArgs)
|
|
{
|
|
eventArgs.Graphics.InterpolationMode = InterpolationMode;
|
|
base.OnPaint(eventArgs);
|
|
}
|
|
|
|
protected override void OnPaintBackground(PaintEventArgs pevent)
|
|
{
|
|
pevent.Graphics.InterpolationMode = InterpolationMode;
|
|
base.OnPaintBackground(pevent);
|
|
}
|
|
}
|
|
}
|