-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#43: Use FillRectangle to draw a pixel.
- Loading branch information
saku-kaarakainen
committed
Sep 10, 2016
1 parent
74e6036
commit 2ffd9af
Showing
7 changed files
with
135 additions
and
7 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
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
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
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,21 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using System.Windows.Forms; | ||
|
||
using Screen = WinBoyEmulator.GameBoy.GPU.Screen; | ||
|
||
namespace WinBoyEmulator.GameBoy | ||
{ | ||
public class WinBoyEvents | ||
{ | ||
/// <summary> | ||
/// Event handler for drawing Screen to form. | ||
/// </summary> | ||
/// <param name="screen"></param> | ||
/// <param name="e"></param> | ||
public delegate void DrawEventHandler(Screen screen, PaintEventArgs e); | ||
} | ||
} |
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
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,30 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Drawing; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace WinBoyEmulator | ||
{ | ||
public class Pixel | ||
{ | ||
public int Top { get; set; } | ||
public int Left { get; set; } | ||
public int Width { get; set; } | ||
public int Height { get; set; } | ||
|
||
public Pixel() /* : this(0, 0, 1, 1) */ { } | ||
|
||
public Pixel(int top, int left, int width, int height) | ||
{ | ||
Top = top; | ||
Left = left; | ||
Width = width; | ||
Height = height; | ||
} | ||
|
||
public Rectangle ToRectangle() => new Rectangle(Top, Left, Width, Height); | ||
} | ||
|
||
} |
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