mirror of
https://github.com/kwsch/NHSE.git
synced 2026-03-28 04:24:36 -05:00
Updates the Field Item Editor to render layers based on the entire map, and the per-patch positioning of each layer. Import/export will gracefully handle upgrade/downgrade, and viewport import/export will gracefully update tiles rather than a per-acre basis. Performance has also been slightly improved; no allocation is done anymore when updating the image.
21 lines
606 B
C#
21 lines
606 B
C#
using System.Drawing.Drawing2D;
|
|
using System.Windows.Forms;
|
|
|
|
namespace NHSE.WinForms;
|
|
|
|
public sealed 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);
|
|
}
|
|
} |