Skip to content

Commit

Permalink
#12 Fixed pScreen Paint, use correct width/height
Browse files Browse the repository at this point in the history
  • Loading branch information
hagronnestad committed Sep 18, 2019
1 parent 2e20b9b commit e416496
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
7 changes: 5 additions & 2 deletions ComputerSystems/Commodore64/FormC64Screen.Designer.cs

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

10 changes: 5 additions & 5 deletions ComputerSystems/Commodore64/FormC64Screen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -135,15 +135,15 @@ private void PScreen_Paint(object sender, PaintEventArgs e) {
Update();

e.Graphics.InterpolationMode = InterpolationMode.Low;
e.Graphics.DrawImage(bBuffer, 0, 0, ClientRectangle.Width, ClientRectangle.Height);
e.Graphics.DrawImage(bBuffer, 0, 0, pScreen.Width, pScreen.Height);

// Let's make some fake scanlines for fun 😎
for (int i = 0; i < ClientRectangle.Width; i += (int)(penScanLine2.Width * 2)) {
e.Graphics.DrawLine(penScanLine2, i, 0, i, ClientRectangle.Height);
for (int i = 0; i < pScreen.Width; i += (int)(penScanLine2.Width * 2)) {
e.Graphics.DrawLine(penScanLine2, i, 0, i, pScreen.Height);
}

for (int i = 0; i < ClientRectangle.Height; i += (int)(penScanLine.Width * 2)) {
e.Graphics.DrawLine(penScanLine, 0, i, ClientRectangle.Width, i);
for (int i = 0; i < pScreen.Height; i += (int)(penScanLine.Width * 2)) {
e.Graphics.DrawLine(penScanLine, 0, i, pScreen.Width, i);
}


Expand Down

0 comments on commit e416496

Please sign in to comment.