Skip to content

Commit

Permalink
removed blur from pixelart-images and adjusted position again
Browse files Browse the repository at this point in the history
  • Loading branch information
tolik518 committed Aug 3, 2024
1 parent def83f4 commit a9d0333
Show file tree
Hide file tree
Showing 5 changed files with 1,440 additions and 1,297 deletions.
53 changes: 53 additions & 0 deletions SoG_SGreader/CustomControls/PixelBox.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing.Drawing2D;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace SoG_SGreader.CustomControls
{
/// <summary>
/// A PictureBox with configurable interpolation mode.
/// Copy-Pasted from https://www.codeproject.com/Articles/717312/PixelBox-A-PictureBox-with-configurable-Interpolat
/// </summary>
public class PixelBox : PictureBox
{
#region Initialization
/// <summary>
/// Initializes a new instance of the <see cref="PixelBox"> class.
/// </see></summary>
public PixelBox()
{
// Set default.
InterpolationMode = InterpolationMode.NearestNeighbor;
}
#endregion



#region Properties
/// <summary>
/// Gets or sets the interpolation mode.
/// </summary>
/// <value>The interpolation mode.</value>
[Category("Behavior")]
[DefaultValue(InterpolationMode.Default)]
public InterpolationMode InterpolationMode { get; set; }
#endregion

#region Overrides of PictureBox
/// <summary>
/// Raises the <see cref="E:System.Windows.Forms.Control.Paint"> event.
/// </see></summary>
/// <param name="pe" />A <see cref="T:System.Windows.Forms.PaintEventArgs"> that contains the event data.
protected override void OnPaint(PaintEventArgs pe)
{
pe.Graphics.InterpolationMode = InterpolationMode;
base.OnPaint(pe);
}
#endregion
}
}
7 changes: 5 additions & 2 deletions SoG_SGreader/Forms/FrmAbout.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions SoG_SGreader/Forms/FrmLoadSaveGame.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit a9d0333

Please sign in to comment.