I want to clear one field (10 characters, small font, 12 pixels high.
Clearing the entire display is too slow.
I searched the forum, but, the number of results is meaningless - I read for 15 minutes.
Tom Dean
I want to clear one field (10 characters, small font, 12 pixels high.
Clearing the entire display is too slow.
I searched the forum, but, the number of results is meaningless - I read for 15 minutes.
Tom Dean
There is no way to “clear a single character”. You can update just a single portion of the image and call .Flush(x, y, width, height).
Where is Flush(…) defined?
I am using .SimpleGraphics.DisplayText(…)
I found
private void EraseSmallFont(int width, int top, int left, Color color)
{
// Create our eraser rectangle and add it to the canvas
Rectangle rect = new Rectangle();
rect.Fill = new SolidColorBrush(color);
rect.Width = width;
rect.Height = 10;
Canvas.SetTop(rect, top + 2);
Canvas.SetLeft(rect, left);
canvas.Children.Add(rect);
}
If I want to erase a full line, I use width=320, top=top-of-line, left=0??? Color.black for blac background?
Tom Dean
It’s part of Bitmap not SimpleGraphics.
And yes thats exactly how you’d clear a full line. Try doing it through Bitmap instead of simple graphics.
Thanks, the example Making a general OnInterrupt handler by Rajesh works.
My graphics experience is limited to X11.
I have a display module in generated.cs. This causes a warning “displlay never used”
How do I eliminiate this?
Tom Dean
Simply ignore it, the warning won’t cause you any issues. As long as you have it connected to ports on your Gadgeteer diagram you’re good.