Skip to content

Commit bcb468a

Browse files
committed
Bitmap labels (testing), 'Batches' property for controls, ListBox.OnMouseUp fix,
1 parent 3d37f3e commit bcb468a

18 files changed

+1312
-171
lines changed

System/Drawing/Bitmap.cs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,19 @@ public void Apply()
4040
}
4141
public Color GetPixel(int x, int y)
4242
{
43-
return Color.FromUColor(uTexture.GetPixel(x, uTexture.height - y));
43+
return Color.FromUColor(uTexture.GetPixel(x, uTexture.height - y - 1));
44+
}
45+
public Color[] GetPixels(int x, int y, int w, int h)
46+
{
47+
var ucs = uTexture.GetPixels(x, uTexture.height - y - 1, w, h);
48+
Color[] cs = new Color[ucs.Length];
49+
for (int i = 0; i < cs.Length; i++)
50+
cs[i] = Color.FromUColor(ucs[i]);
51+
return cs;
4452
}
4553
public void SetPixel(int x, int y, Color color)
4654
{
47-
uTexture.SetPixel(x, uTexture.height - y, color.ToUColor());
55+
uTexture.SetPixel(x, uTexture.height - y - 1, color.ToUColor());
4856
}
4957
}
5058
}

0 commit comments

Comments
 (0)