Skip to content

io7m-com/jptbox

Repository files navigation

jptbox

Maven Central Maven Central (snapshot) Codecov Java Version

com.io7m.jptbox

JVM Platform Status
OpenJDK (Temurin) Current Linux Build (OpenJDK (Temurin) Current, Linux)
OpenJDK (Temurin) LTS Linux Build (OpenJDK (Temurin) LTS, Linux)
OpenJDK (Temurin) Current Windows Build (OpenJDK (Temurin) Current, Windows)
OpenJDK (Temurin) LTS Windows Build (OpenJDK (Temurin) LTS, Windows)

jptbox

Java functions to draw Unicode boxes.

Features

Usage

Create a text image to act as a canvas, and then draw boxes into it:

final JPTextImageType image =
  JPTextImage.create(80, 10);
final JPTextBoxDrawingType draw =
  JPTextBoxDrawing.get();

draw.drawBox(image, 0, 0, 30, 3);
draw.drawBox(image, 29, 0, 10, 3);
draw.drawBox(image, 38, 0, 10, 3);

draw.drawBox(image, 0, 2, 30, 3);
draw.drawBox(image, 29, 2, 10, 3);
draw.drawBox(image, 38, 2, 10, 3);

System.out.println(JPTextImages.show(image));
┌────────────────────────────┬────────┬────────┐
│                            │        │        │
├────────────────────────────┼────────┼────────┤
│                            │        │        │
└────────────────────────────┴────────┴────────┘