Skip to content

Commit

Permalink
Fix colors
Browse files Browse the repository at this point in the history
  • Loading branch information
Vort committed Jan 6, 2017
1 parent 09c0902 commit 93a32ef
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions SimpleBitmap.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,17 +69,17 @@ public Color GetPixel(int x, int y)
public void SetPixel(int x, int y, Color c)
{
int offset = (Width * y + x) * 4;
Data[offset] = c.R;
Data[offset + 2] = c.R;
Data[offset + 1] = c.G;
Data[offset + 2] = c.B;
Data[offset] = c.B;
}

public void SetPixel(int x, int y, byte r, byte g, byte b)
{
int offset = (Width * y + x) * 4;
Data[offset] = r;
Data[offset + 2] = r;
Data[offset + 1] = g;
Data[offset + 2] = b;
Data[offset] = b;
}

public void CopyTo(SimpleBitmap dest, int destY)
Expand Down

0 comments on commit 93a32ef

Please sign in to comment.