Answers to the most common questions about using the MinVio library.
If you can’t find what you need here, please open an issue on GitHub: https://github.com/nickd3000/minvio/issues
MinVio is a lightweight Java framework for quickly building graphical applications. It creates the window, runs a timed draw loop, and provides simple drawing and input functions so you can focus on ideas instead of boilerplate.
Anyone who wants to sketch visual ideas in Java with minimal setup: programmatic artists, educators, students, and developers prototyping algorithms or visualizations.
Add the dependency from Maven Central.
Maven (pom.xml):
<dependency>
<groupId>io.github.nickd3000</groupId>
<artifactId>minvio</artifactId>
<version>1.21</version>
</dependency>
Gradle (Kotlin DSL):
dependencies {
implementation("io.github.nickd3000:minvio:1.21")
}
Gradle (Groovy DSL):
dependencies {
implementation 'io.github.nickd3000:minvio:1.21'
}
MinVio requires Java 17 or newer.
import com.physmo.minvio.MinvioApp;
import java.awt.Color;
public class SimpleExample extends MinvioApp {
public static void main(String... args) {
new SimpleExample().start(200, 200, "Simple Example", 60);
}
@Override
public void draw(double delta) {
cls(new Color(207, 198, 179));
setDrawColor(new Color(17, 52, 69, 215));
drawFilledRect(50, 50, 40, 40);
drawText("X:" + getMouseX() + " Y:" + getMouseY(), 10, 190);
}
}
start(width, height, title, targetFps) to create the window and begin the loop.draw(double delta) each frame.delta is the elapsed time in seconds since the last frame (useful for time-based animation).setDisplayFps(true) if supported by your version.Yes. As of v1.20, window resizing is supported. Your drawing code should render to the current size each frame. Query the size via your display/context if needed.
MinVio uses standard Java desktop APIs (AWT/Swing), so it works on Windows, macOS, and Linux where a compatible Java 17+ runtime is available.
Common methods available from MinvioApp include:
cls(Color) / cls()setDrawColor(Color)drawPoint, drawLine, drawRect, drawFilledRectdrawCircle, drawFilledCircledrawTextdrawImageSee the README and examples for more:
Yes. A Palette class with predefined colors is available (v1.20+). You can still use standard java.awt.Color
anywhere.
MinVio provides simple mouse helpers like getMouseX() and getMouseY(). Keyboard and more advanced input options are
available through the underlying Java desktop APIs; see the examples and source for patterns.
delta over per-frame constants.draw().start(...).Java 17 or newer.
You can generate Javadoc locally with Maven: mvn javadoc:javadoc (output under target/apidocs). Example projects
also showcase API usage.
See LICENCE.TXT in the repository root for full details.
io.github.nickd3000:minvio:1.21../gradlew --refresh-dependencies).draw(double delta) is being called (add a drawText of the time or FPS).cls(...) or draw something each frame; don’t forget to set a draw color if drawing shapes.Color are not fully transparent.start(width, height, title, fps) from main.Add the dependency to the module that contains your application code, not just the root project. Ensure that module is configured to produce/run a desktop application.
Use GitHub issues: https://github.com/nickd3000/minvio/issues. When reporting, include: