First tests of the Display class!
using BrainPad;
namespace PulseHello
{
class Program
{
static void Main()
{
var hello = “Hello GHI”;
byte[] ship = {
0,0,0,1,1,0,0,0,
0,0,0,1,1,0,0,0,
0,1,1,1,1,1,1,0,
1,1,1,1,1,1,1,1,
1,0,0,0,0,0,0,1,
};
byte[] monster ={
0,0,0,1,1,0,0,0,
0,0,1,1,1,1,0,0,
0,1,1,1,1,1,1,0,
1,1,0,1,1,0,1,1,
1,1,1,1,1,1,1,1,
0,0,1,0,0,1,0,0,
0,1,0,1,1,0,1,0,
1,0,1,0,0,1,0,1,
};
Display.Text(hello, 20, 0);
Display.Rect(0, 20, 21, 21);
Display.Circle(10, 30, 8);
Display.Point(10, 30, 255);
Display.FillRect(22, 20, 21, 21);
Display.Line(100, 0, 100, 63);
// Display.TextEx(Display.CreateImage(5, 7, "Space", 1, 1, 0), 20, 60, 2, 2); ???
Display.Image(Display.CreateImage(8, 5, ship, 1, 1, 1), 105, 10);
Display.Image(Display.CreateImage(8, 8, monster, 1, 1, 1), 115, 10);
Display.Image(Display.CreateImage(8, 5, ship, 2, 2, 1), 105, 30);
Display.Image(Display.CreateImage(8, 8, monster, 2, 2, 1), 105, 40);
Display.Show();
}
}
}
How do you use Display.TextEx (object, double, double, double, double) ? I think we need to transform a string into an object with Display.CreateImage (double, double, string, double, double, double) but I can’t find values for width and height. An example An example would be appreciated.