-
Notifications
You must be signed in to change notification settings - Fork 0
Overview
Nick Donnelly edited this page May 10, 2023
·
5 revisions
Minvio reduces the overhead of creating a graphical window and update loop down to a few lines of code. It is perfect for sketching out ideas, prototyping, creating computational art and anything else where you want to easily get up and running with java graphics and input.
The core of Minvio is the BasicDisplay class, creating an instance of this causes a window to be created and exposes drawing and input functionality.
BasicDisplay bd = new BasicDisplayAwt(200, 200);
Minvio has two basic ways of working, you can either extend the MinvioApp class and let the main loop and timing get handled for you, or you can handle the timing yourself and just create an instance of BasicDisplay.
bd.cls(Color.lightGray); // Clear the display to lightGray.
bd.setDrawColor(Color.WHITE); // Set draw colour to white.
bd.drawFilledRect(75, 75, 50, 50); // Draw A filled rectangle
bd.drawCircle(100, 100, 70); // Draw a circle outline
bd.drawText("Hello", 10, 190); // Write "Hello" to display
bd.repaint(30); // Refresh the display