-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
removed blur from pixelart-images and adjusted position again
- Loading branch information
Showing
5 changed files
with
1,440 additions
and
1,297 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.