mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/PCK-Studio.git
synced 2026-05-26 21:06:36 +00:00
21 lines
622 B
C#
21 lines
622 B
C#
using System.Drawing.Drawing2D;
|
|
using System.Windows.Forms;
|
|
|
|
namespace PckStudio
|
|
{
|
|
/// <summary>
|
|
/// Inherits from PictureBox; adds Interpolation Mode Setting
|
|
/// </summary>
|
|
public class PictureBoxWithInterpolationMode : PictureBox
|
|
{
|
|
public InterpolationMode InterpolationMode { get; set; }
|
|
|
|
protected override void OnPaint(PaintEventArgs paintEventArgs)
|
|
{
|
|
paintEventArgs.Graphics.InterpolationMode = InterpolationMode;
|
|
paintEventArgs.Graphics.PixelOffsetMode = PixelOffsetMode.HighQuality;
|
|
base.OnPaint(paintEventArgs);
|
|
}
|
|
}
|
|
}
|