Help us shape the future of Go! Take the 2026 Go Developer Survey

gopuml

package module
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 1, 2026 License: MIT Imports: 14 Imported by: 0

README

gopuml

A Go reimplementation of PlantUML v1.2026.9 (MIT variant). It reads the same diagram language and produces the same SVG, PNG and text output, and it works as:

  • a command line that replaces java -jar plantuml.jar
  • a Go library
  • an HTTP server compatible with PlantUML's built-in server and the main plantuml-server routes
  • a WebAssembly module for browsers and Node.js

No JVM is needed. Graphviz dot is needed only for class, description (use case, component, deployment), state, legacy activity and Chen EER diagrams.

The landing page has a playground that renders sequence and activity diagrams in the browser with the WebAssembly module.

Supported diagrams and formats

Diagram type SVG PNG TXT / UTXT
Sequence yes yes yes
Class and object yes (needs dot) yes (needs dot) no
Use case, component and deployment yes (needs dot) yes (needs dot) no
State yes (needs dot) yes (needs dot) no
Activity (new syntax) yes yes no
Activity (legacy syntax) yes (needs dot) yes (needs dot) no
Packet yes yes no
Gantt yes yes yes
Mindmap yes yes no
WBS yes yes yes
Timing yes yes no
Salt yes yes no
Chen EER yes (needs dot) yes (needs dot) no

The preprocessor (!include, !define, functions, all 74 builtins, JSON), themes, skin parameters, styles and creole are supported, including diagrams embedded in text with {{ ... }}, and so is the PREPROC output (--preproc).

The standard library of upstream v1.2026.9 is bundled (!include <C4/C4_Container>, !include <awslib/AWSCommon> and the other libraries that plantuml -stdlib lists), apart from nine libraries whose license could not be verified or does not allow bundling them (see NOTICE). Sprites are drawn: monochrome, color, image and SVG sprites defined in a diagram, and the sprites and images of the standard library.

Other diagram types (archimate, JSON, and so on) are reported with an explicit "... diagrams are not supported yet" error image instead of a wrong drawing.

Compatibility is measured against upstream PlantUML v1.2026.9 with a conformance suite of 972 cases (upstream's Vega test corpus plus curated cases): every case passes, apart from 42 documented known differences (testdata/conformance/known-differences.yaml) and 5 cases of diagram types that are not supported yet. Most SVG outputs are byte-identical to upstream's, except the encoded source in <?plantuml-src ...?>, which uses a different deflate implementation and decodes to the same text.

Installation

Each release has an archive of the command line for linux, macOS and windows on amd64 and arm64 (gopuml_<version>_<os>_<arch>.tar.gz, .zip on windows), with LICENSE, NOTICE and this README, an archive of the WebAssembly module (gopuml_<version>_wasm.tar.gz, with LICENSE and NOTICE in the releases after v0.1.0), and checksums.txt with the SHA-256 of every archive. Download the archive of your system and checksums.txt from the release page, or with the GitHub CLI:

gh release download v0.3.0 --repo ekalinin/gopuml -p '*_darwin_arm64.tar.gz' -p checksums.txt

or with curl:

curl -fLO https://github.com/ekalinin/gopuml/releases/download/v0.3.0/gopuml_0.3.0_darwin_arm64.tar.gz
curl -fLO https://github.com/ekalinin/gopuml/releases/download/v0.3.0/checksums.txt

then check and unpack it:

shasum -a 256 --ignore-missing -c checksums.txt   # sha256sum on linux
tar xzf gopuml_0.3.0_darwin_arm64.tar.gz plantuml
./plantuml --version

The macOS binaries are not signed. When a browser downloaded the archive, macOS blocks the binary until its quarantine attribute is removed:

xattr -d com.apple.quarantine plantuml

With Go 1.26 or later, the command line can also be installed from source:

go install github.com/ekalinin/gopuml/cmd/plantuml@v0.3.0

Building

Go 1.26 or later is needed. In a checkout of this repository:

go build -o plantuml ./cmd/plantuml
./plantuml --version

Command line

The command line accepts the flags of java -jar plantuml.jar. Flags that this implementation does not provide (for example --pdf) are rejected with exit status 1 instead of being silently ignored.

printf '@startuml\nAlice -> Bob : hello\n@enduml\n' > diagram.puml

./plantuml diagram.puml              # writes diagram.png (PNG is the default)
./plantuml --svg diagram.puml        # writes diagram.svg
./plantuml --txt diagram.puml        # writes diagram.atxt
./plantuml --svg -o out diagram.puml # writes out/diagram.svg
./plantuml --check-syntax diagram.puml

printf 'Alice -> Bob\n' | ./plantuml -p --svg > pipe.svg
printf 'Alice -> Bob\n' | ./plantuml -syntax

./plantuml --encode-url diagram.puml
./plantuml --extract-source diagram.svg
./plantuml --help

Exit statuses are upstream's: 0 on success, 50 when no input file is found, 100 when no diagram is found, 200 when a diagram has an error.

Library

package main

import (
	"context"
	"fmt"
	"os"

	"github.com/ekalinin/gopuml"
)

func main() {
	src := "@startuml\nAlice -> Bob : hello\n@enduml\n"
	res, err := gopuml.Render(context.Background(), src, &gopuml.Options{Format: gopuml.SVG})
	if err != nil {
		fmt.Fprintln(os.Stderr, err)
		os.Exit(1)
	}
	fmt.Printf("%dx%d %s\n", res.Width, res.Height, res.Description)
	os.WriteFile("diagram.svg", res.Data, 0o644)
}

Render returns typed errors (*gopuml.SyntaxError with the line and message, gopuml.ErrGraphvizNotFound, gopuml.ErrUnsupportedDiagram, ...) and, for a syntax error, the error image together with the error. gopuml.Inspect lists the blocks of a source, and gopuml.Encode and gopuml.Decode convert sources to and from the text of server URLs. Includes can be resolved from an fs.FS given in the options.

HTTP server

./plantuml --http-server:8080

It serves GET /svg/<encoded>, /png/<encoded>, /txt/<encoded>, /utxt/<encoded> (also under /plantuml/, and the d-prefixed dark mode routes), POST /render with a JSON body, /coder, /check, /language and /serverinfo. It runs in the INTERNET security profile, limits request bodies to 1 MiB and renders for at most 60 seconds.

WebAssembly

make wasm

This writes plantuml.wasm, Go's wasm_exec.js and the ES module loader plantuml.mjs into dist/wasm:

import { load } from './plantuml.mjs';

const plantuml = await load();
const result = await plantuml.render('@startuml\nAlice -> Bob\n@enduml', { format: 'svg' });
// result.data is a Uint8Array; result.error is null or { kind, message, line }.

The module runs in the SANDBOX security profile: includes come only from the files option. Class, description, state, legacy activity and Chen EER diagrams report that graph layout is not available in this build.

Graphviz

Class, object, description, state, legacy activity and Chen EER diagrams are laid out by Graphviz dot, as upstream does. dot is looked up from --dot-path (or the library option), then the GRAPHVIZ_DOT environment variable, then PATH and the usual install locations. ./plantuml --check-graphviz reports the version found. The references were made with Graphviz 14.0.1. Sequence diagrams, activity diagrams in the new syntax, packet diagrams, gantt diagrams, mindmap diagrams, WBS diagrams, timing diagrams and salt diagrams do not need Graphviz.

Conformance suite

make conformance renders every case with this implementation and compares the outputs with the references of upstream PlantUML, which make reference records in a Docker image (tools/reference/Dockerfile). The comparison writes conformance-report.md.

CI runs the suite on every pull request and every push to main, with every group required: a failing case that is not listed in testdata/conformance/known-differences.yaml fails the run. The report is attached to the run and shown in its summary. On a linux/amd64 host, these commands reproduce the CI run:

make reference
make conformance REQUIRE=all GO_IN_IMAGE=1

GO_IN_IMAGE=1 renders the outputs of this implementation in the reference image, so that both implementations use the same Graphviz. On arm64 hosts, make conformance renders them natively with the host's Graphviz, so the results there are indicative only.

License

MIT, see LICENSE. This project translates the MIT-licensed variant of PlantUML v1.2026.9 (net.sourceforge.plantuml:plantuml-mit), (C) Copyright 2009-2024, Arnaud Roques. Every Go file names the upstream file it comes from in its header. NOTICE lists the bundled assets (DejaVu fonts, themes, the standard library) with their licenses, the parts of fdlibm the math functions come from, the Go code that the binaries link, and the upstream components that are not included.

Documentation

Overview

Package gopuml renders PlantUML diagram source to SVG, PNG and text.

It is a Go reimplementation of PlantUML v1.2026.9 (MIT variant).

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrSyntax matches every *SyntaxError.
	ErrSyntax = errors.New("plantuml: syntax error")
	// ErrNoDiagram reports a source without a diagram, or a diagram or
	// page index out of range.
	ErrNoDiagram = errors.New("plantuml: no diagram found")
	// ErrUnsupportedDiagram reports a diagram type or family this
	// implementation does not provide.
	ErrUnsupportedDiagram = errors.New("plantuml: diagram type not supported")
	// ErrUnsupportedFormat reports a format a diagram type cannot produce.
	ErrUnsupportedFormat = errors.New("plantuml: format not supported for this diagram")
	// ErrGraphvizNotFound reports that the Graphviz dot program is missing.
	ErrGraphvizNotFound = errors.New("plantuml: Graphviz dot not found")
	// ErrGraphvizTimeout reports a dot run stopped after the timeout.
	ErrGraphvizTimeout = errors.New("plantuml: Graphviz dot timed out")
	// ErrGraphvizFailed reports a dot run that failed.
	ErrGraphvizFailed = errors.New("plantuml: Graphviz dot failed")
	// ErrAccessDenied reports a file or URL the security profile does not
	// allow.
	ErrAccessDenied = security.ErrDenied
	// ErrDecode reports text that is not encoded diagram source.
	ErrDecode = code.ErrNoCompression
)

Errors returned by the package. Test for them with errors.Is; a syntax error is also a *SyntaxError, usable with errors.As.

Functions

func Decode

func Decode(text string) (string, error)

Decode returns the source of text in any format PlantUML server URLs use. It fails with an error matching ErrDecode.

func Encode

func Encode(source string) string

Encode returns source in the text format of PlantUML server URLs.

Types

type Block

type Block struct {
	// Name is the name given on the start line, such as "login" for
	// "@startuml login", or "".
	Name string
	// Family is the word after @start, in lower case, such as "uml".
	Family string
	// Type is the diagram type upstream detects, such as "SEQUENCE" or
	// "CLASS", or "" for a block with an error.
	Type string
	// Description is upstream's description, such as "(2 participants)" or
	// "(Error)".
	Description string
	// Err is the syntax status: nil, a *SyntaxError, or an error matching
	// ErrUnsupportedDiagram.
	Err error
	// contains filtered or unexported fields
}

Block is one @start/@end block of a source, with its diagram.

func Inspect

func Inspect(ctx context.Context, source string, opts *Options) ([]*Block, error)

Inspect lists the blocks of a source with their diagram type and syntax status, without drawing them.

func (*Block) Encoded

func (b *Block) Encoded() string

Encoded returns the block in the text format of PlantUML server URLs.

func (*Block) Pages

func (b *Block) Pages() int

Pages returns the number of pages of the diagram.

func (*Block) Render

func (b *Block) Render(ctx context.Context, w io.Writer, page int, opts *Options) (*Result, error)

Render draws one page of the block to w. A block with an error returns its error (a *SyntaxError or an *UnsupportedError) together with the error image, unless NoErrorImage is set.

func (*Block) Source

func (b *Block) Source() []string

Source returns the lines of the block, from the start line to the end line.

type Define

type Define struct {
	Name, Value string
}

Define is a preprocessor definition, like -DNAME=VALUE on the command line.

type Format

type Format int

Format is an output format.

const (
	SVG  Format = iota
	PNG         // PNG image
	TXT         // ASCII art
	UTXT        // Unicode art
)

Formats. The zero value is SVG.

func (Format) String

func (f Format) String() string

type Options

type Options struct {
	// Format is the output format.
	Format Format
	// Diagram and Page select what Render draws: the index of the
	// @start/@end block and the page within it, both from 0.
	Diagram, Page int
	// NoMetadata omits the embedded source from SVG and PNG output.
	NoMetadata bool
	// NoErrorImage returns syntax errors without an error image.
	NoErrorImage bool
	// Defines are preprocessor definitions, in order.
	Defines []Define
	// Config lines are inserted after the start line of every diagram.
	Config []string
	// IncludePaths are directories searched by !include.
	IncludePaths []string
	// Theme is applied to every diagram, like !theme.
	Theme string
	// DarkMode renders with upstream's dark color mapping.
	DarkMode bool
	// SecurityProfile is upstream's profile name, such as SANDBOX or
	// INTERNET; empty means LEGACY.
	SecurityProfile string
	// DotPath is the Graphviz dot program; empty means it is searched for.
	DotPath string
	// DotTimeout stops dot after this duration; zero means 30 seconds.
	DotTimeout time.Duration
	// FS resolves includes and themes. When nil, the operating system's
	// file system is used, subject to the security profile.
	FS fs.FS
	// Dir is the directory of the source, against which relative includes
	// are resolved.
	Dir string
	// Filename is the name of the source, as %filename() returns it.
	Filename string
}

Options configure one call; they do not affect other calls. A nil *Options means the zero value.

type Result

type Result struct {
	// Data is the output: an image, or text for TXT and UTXT.
	Data []byte
	// Width and Height are the size of the image in pixels.
	Width, Height int
	// Description is upstream's description, such as "(2 participants)".
	Description string
	// Pages is the number of pages of the rendered diagram.
	Pages int
	// Diagrams is the number of @start/@end blocks of the source.
	Diagrams int
}

Result is a rendered page.

func Render

func Render(ctx context.Context, source string, opts *Options) (*Result, error)

Render draws the diagram and page selected by opts.Diagram and opts.Page. For a syntax error it returns the error image, unless opts.NoErrorImage is set, together with the *SyntaxError.

type SyntaxError

type SyntaxError struct {
	// Line is the 1-based line of the error in the source.
	Line int
	// Message is upstream's message, for example "Syntax Error? (Assumed
	// diagram type: sequence)".
	Message string
}

SyntaxError is a diagram with a syntax error.

func (*SyntaxError) Error

func (e *SyntaxError) Error() string

func (*SyntaxError) Is

func (e *SyntaxError) Is(target error) bool

Is makes errors.Is(err, ErrSyntax) true for a *SyntaxError.

type UnsupportedError

type UnsupportedError struct {
	// Line is the 1-based line of the source that shows the type.
	Line int
	// Message explains what is not supported, for example "mindmap
	// diagrams are not supported yet".
	Message string
}

UnsupportedError is a diagram whose type or family this implementation does not provide.

func (*UnsupportedError) Error

func (e *UnsupportedError) Error() string

func (*UnsupportedError) Is

func (e *UnsupportedError) Is(target error) bool

Is makes errors.Is(err, ErrUnsupportedDiagram) true for an *UnsupportedError.

Directories

Path Synopsis
cmd
plantuml command
Command plantuml is a drop-in replacement for java -jar plantuml.jar.
Command plantuml is a drop-in replacement for java -jar plantuml.jar.
plantuml-wasm command
Command plantuml-wasm is the WebAssembly entry point of the renderer.
Command plantuml-wasm is the WebAssembly entry point of the renderer.
internal
abel
Package abel is the entity model shared by the graph diagrams (class, object, description, state): entities, links, groups, together blocks, notes, the hide, show, remove and restore rules, and the namespace of names.
Package abel is the entity model shared by the graph diagrams (class, object, description, state): entities, links, groups, together blocks, notes, the hide, show, remove and restore rules, and the namespace of names.
activitydiagram
Package activitydiagram parses activity diagrams in the legacy syntax ("(*) --> "First step""): the ActivityDiagram model (upstream's activitydiagram package), the factory and its commands in upstream's order (upstream's activitydiagram.command package and its note command), and the drawing, laid out by Graphviz dot through internal/svek.
Package activitydiagram parses activity diagrams in the legacy syntax ("(*) --> "First step""): the ActivityDiagram model (upstream's activitydiagram package), the factory and its commands in upstream's order (upstream's activitydiagram.command package and its note command), and the drawing, laid out by Graphviz dot through internal/svek.
activitydiagram3
Package activitydiagram3 parses, lays out and draws activity diagrams in the new syntax: upstream's activitydiagram3 package with its ftile, ftile.vertical, ftile.vcompact and ftile.vcompact.cond subpackages (one Go package, as they form a cycle upstream; the ftile files carry the "ftile_", "ftile_vertical_", "ftile_vcompact_" and "ftile_vcompact_cond_" prefixes) and svek's UGraphicForSnake.
Package activitydiagram3 parses, lays out and draws activity diagrams in the new syntax: upstream's activitydiagram3 package with its ftile, ftile.vertical, ftile.vcompact and ftile.vcompact.cond subpackages (one Go package, as they form a cycle upstream; the ftile files carry the "ftile_", "ftile_vertical_", "ftile_vcompact_" and "ftile_vcompact_cond_" prefixes) and svek's UGraphicForSnake.
asciiart
Package asciiart is upstream's asciiart package, for the ASCII (TXT) and Unicode (UTXT) text art.
Package asciiart is upstream's asciiart package, for the ASCII (TXT) and Unicode (UTXT) text art.
asciiverse
Package asciiverse is upstream's asciiverse package: the character grid (InfinitePlan, InfiniteString) the text formats ATXT and UTXT are drawn on, and the blocks drawn on it (AsciiBlock and its decorators, note boxes, group frames, else separators and tables).
Package asciiverse is upstream's asciiverse package: the character grid (InfinitePlan, InfiniteString) the text formats ATXT and UTXT are drawn on, and the blocks drawn on it (AsciiBlock and its decorators, note boxes, group frames, else separators and tables).
brotli
Package brotli decodes Brotli streams (RFC 7932), such as the .spm files of PlantUML's standard library.
Package brotli decodes Brotli streams (RFC 7932), such as the .spm files of PlantUML's standard library.
cheneer
Package cheneer parses and draws Chen EER diagrams (@startchen): the entities, relationships and attributes of ChenEerDiagram, linked by associations and subclasses, and laid out with Graphviz dot by internal/svek, as class and description diagrams (upstream's cheneer package).
Package cheneer parses and draws Chen EER diagrams (@startchen): the entities, relationships and attributes of ChenEerDiagram, linked by associations and subclasses, and laid out with Graphviz dot by internal/svek, as class and description diagrams (upstream's cheneer package).
classdiagram
Package classdiagram parses class diagrams, and object diagrams, which upstream also parses with its class factory: the ClassDiagram model (upstream's classdiagram and objectdiagram packages, which refer to each other and form one Go package per design D2, objectdiagram_*.go), the factory and its commands in upstream's order, and the drawing (ExportDiagram), laid out by Graphviz dot through internal/svek.
Package classdiagram parses class diagrams, and object diagrams, which upstream also parses with its class factory: the ClassDiagram model (upstream's classdiagram and objectdiagram packages, which refer to each other and form one Go package per design D2, objectdiagram_*.go), the factory and its commands in upstream's order, and the drawing (ExportDiagram), laid out by Graphviz dot through internal/svek.
cli
Package cli is upstream's command line interface: flags, parsing and help, compatible with java -jar plantuml.jar.
Package cli is upstream's command line interface: flags, parsing and help, compatible with java -jar plantuml.jar.
code
Package code encodes and decodes diagram source in the PlantUML URL text format.
Package code encodes and decodes diagram source in the PlantUML URL text format.
command
Package command provides the line-oriented regex command framework used by diagram parsers.
Package command provides the line-oriented regex command framework used by diagram parsers.
command/regex
Package regex compiles upstream's command patterns for Go's RE2 engine.
Package regex compiles upstream's command patterns for Go's RE2 engine.
conformance
Package conformance compares rendered output with reference renders from Java PlantUML.
Package conformance compares rendered output with reference renders from Java PlantUML.
core
Package core extracts diagram blocks from input text, detects the diagram type and builds error diagrams.
Package core extracts diagram blocks from input text, detects the diagram type and builds error diagrams.
decoration
Package decoration is upstream's net.sourceforge.plantuml.decoration: the types of the links of graph diagrams (LinkType with its two LinkDecor heads, its LinkStyle and its LinkMiddleDecor) and WithLinkType, the base of the links.
Package decoration is upstream's net.sourceforge.plantuml.decoration: the types of the links of graph diagrams (LinkType with its two LinkDecor heads, its LinkStyle and its LinkMiddleDecor) and WithLinkType, the base of the links.
decoration/symbol
Package symbol is upstream's decoration.symbol: the shapes drawn around a text (database, queue, node, cloud, folder...), small as a participant head or an entity (AsSmall), or big as a container (AsBig).
Package symbol is upstream's decoration.symbol: the shapes drawn around a text (database, queue, node, cloud, folder...), small as a participant head or an entity (AsSmall), or big as a container (AsBig).
descdiagram
Package descdiagram parses description diagrams (use case, component and deployment diagrams): the DescriptionDiagram model (upstream's descdiagram package), the factory and its commands in upstream's order (upstream's descdiagram.command package, whose Labels and StringWithArrow the class diagram commands also use), and the drawing, laid out by Graphviz dot through internal/svek.
Package descdiagram parses description diagrams (use case, component and deployment diagrams): the DescriptionDiagram model (upstream's descdiagram package), the factory and its commands in upstream's order (upstream's descdiagram.command package, whose Labels and StringWithArrow the class diagram commands also use), and the drawing, laid out by Graphviz dot through internal/svek.
dot
Package dot locates and runs the Graphviz dot executable.
Package dot locates and runs the Graphviz dot executable.
engine
Package engine parses and draws diagram sources, as upstream's SourceStringReader and BlockUml.
Package engine parses and draws diagram sources, as upstream's SourceStringReader and BlockUml.
errdiagram
Package errdiagram draws the built-in images of upstream's net.sourceforge.plantuml.error package and its friends:
Package errdiagram draws the built-in images of upstream's net.sourceforge.plantuml.error package and its friends:
export
Package export writes a drawn diagram in an output format: upstream's core.TextBlockExporter with FileFormatOption, the Scale kinds and the ImageData results.
Package export writes a drawn diagram in an output format: upstream's core.TextBlockExporter with FileFormatOption, the Scale kinds and the ImageData results.
gantt
Package gantt parses and draws gantt diagrams (@startgantt, @startproject): the GanttDiagram model with its tasks, resources and calendar, the sentences and the other commands in upstream's order, the scheduling of the tasks, the time scales and their headers, the drawing of the tasks and of the table of tasks, and the TXT table (upstream's gantt package and its subpackages, apart from ngm, which is the package gantt/ngm).
Package gantt parses and draws gantt diagrams (@startgantt, @startproject): the GanttDiagram model with its tasks, resources and calendar, the sentences and the other commands in upstream's order, the scheduling of the tasks, the time scales and their headers, the drawing of the tasks and of the table of tasks, and the TXT table (upstream's gantt package and its subpackages, apart from ngm, which is the package gantt/ngm).
gantt/ngm
Package ngm is upstream's load model of gantt diagrams (packages gantt.ngm and gantt.ngm.math): exact fractions, piecewise constant functions of time that say how much of a task can be done at each instant (the days of the week, specific days, a time window, the working hours, and their combinations), and the integration of a load over them, which gives the end of a task from its start, or its start from its end.
Package ngm is upstream's load model of gantt diagrams (packages gantt.ngm and gantt.ngm.math): exact fractions, piecewise constant functions of time that say how much of a task can be done at each instant (the days of the week, specific days, a time window, the working hours, and their combinations), and the integration of a load over them, which gives the end of a task from its start, or its start from its end.
jfmt
Package jfmt formats numbers exactly like the Java library calls that PlantUML uses for its output, and parses them as Java's Double.parseDouble does.
Package jfmt formats numbers exactly like the Java library calls that PlantUML uses for its output, and parses them as Java's Double.parseDouble does.
jmath
Package jmath is a deterministic, Java-compatible math library.
Package jmath is a deterministic, Java-compatible math library.
json
Package json manages JSON data with the semantics of PlantUML's fork of the minimal-json library (net.sourceforge.plantuml.json).
Package json manages JSON data with the semantics of PlantUML's fork of the minimal-json library (net.sourceforge.plantuml.json).
jtime
Package jtime reproduces the java.time behavior that the gantt diagrams of upstream rely on: dates, times and date-times without a time zone, the days of the week and the months, durations, Java's week of year, and the DateTimeException and ArithmeticException messages of invalid values and overflows.
Package jtime reproduces the java.time behavior that the gantt diagrams of upstream rely on: dates, times and date-times without a time zone, the days of the week and the months, durations, Java's week of year, and the DateTimeException and ArithmeticException messages of invalid values and overflows.
klimt
Package klimt is the drawing model: shapes, text blocks and the UGraphic abstraction that output drivers implement, displays and stereotypes, links, the style system (CSS-like style sheets, the embedded skins, skinparam conversion) and the skin parameters.
Package klimt is the drawing model: shapes, text blocks and the UGraphic abstraction that output drivers implement, displays and stereotypes, links, the style system (CSS-like style sheets, the embedded skins, skinparam conversion) and the skin parameters.
klimt/color
Package color is PlantUML's color model: XColor values, the HColor kinds diagrams use (simple colors, automatic colors, color schemes, gradients), the color parser with the HTML color names, the per-element Colors of a command, the color mappers for dark mode, monochrome and reversed output, and the HSL and HSLuv arithmetic of the preprocessor color functions.
Package color is PlantUML's color model: XColor values, the HColor kinds diagrams use (simple colors, automatic colors, color schemes, gradients), the color parser with the HTML color names, the per-element Colors of a command, the color mappers for dark mode, monochrome and reversed output, and the HSL and HSLuv arithmetic of the preprocessor color functions.
klimt/font
Package font holds upstream's font model (UFont, UFontFace, FontStack, FontStyle) and the StringBounder text measurement.
Package font holds upstream's font model (UFont, UFontFace, FontStack, FontStyle) and the StringBounder text measurement.
klimt/g2d
Package g2d is the raster output driver: upstream's klimt.drawing.g2d (UGraphicG2d and its Driver*G2d) with EmptyImageBuilder, drawing on an ARGB image that internal/png writes as PNG.
Package g2d is the raster output driver: upstream's klimt.drawing.g2d (UGraphicG2d and its Driver*G2d) with EmptyImageBuilder, drawing on an ARGB image that internal/png writes as PNG.
klimt/g2d/dejavu
Package dejavu embeds the DejaVu fonts behind Java's logical fonts on the reference image (fonts-dejavu 2.37) and loads their glyph outlines as Java gets them from FreeType: unhinted, scaled with FreeType's fixed point arithmetic, in 26.6 fixed point.
Package dejavu embeds the DejaVu fonts behind Java's logical fonts on the reference image (fonts-dejavu 2.37) and loads their glyph outlines as Java gets them from FreeType: unhinted, scaled with FreeType's fixed point arithmetic, in 26.6 fixed point.
klimt/geom
Package geom holds the geometry value types of the drawing model: points, dimensions, rectangles, lines, cubic curves, bounding boxes and the small alignment and position enums.
Package geom holds the geometry value types of the drawing model: points, dimensions, rectangles, lines, cubic curves, bounding boxes and the small alignment and position enums.
klimt/rose
Package rose is upstream's skin.rose: the components that draw the elements of sequence diagrams (message arrows, participant heads and lines, notes, groupings, dividers, delays, references, boxes) and the Rose skin that builds them.
Package rose is upstream's skin.rose: the components that draw the elements of sequence diagrams (message arrows, participant heads and lines, notes, groupings, dividers, delays, references, boxes) and the Rose skin that builds them.
klimt/svg
Package svg is the SVG output driver, upstream's klimt.drawing.svg: UGraphicSvg dispatches shapes to the Driver*Svg drivers, which write them into SvgGraphics, a minimal DOM (XMLDocument, XMLNode) serialized by XMLWriter without any newline, as upstream.
Package svg is the SVG output driver, upstream's klimt.drawing.svg: UGraphicSvg dispatches shapes to the Driver*Svg drivers, which write them into SvgGraphics, a minimal DOM (XMLDocument, XMLNode) serialized by XMLWriter without any newline, as upstream.
klimt/svg/svgtest
Package svgtest runs the drawing scripts of the SVG golden tests of the svg and export packages.
Package svgtest runs the drawing scripts of the SVG golden tests of the svg and export packages.
mindmap
Package mindmap parses and draws mindmap diagrams (@startmindmap): the MindMapDiagram model with its ideas and branches, the commands in upstream's order, and the layout that packs the children of each idea next to it (upstream's mindmap package).
Package mindmap parses and draws mindmap diagrams (@startmindmap): the MindMapDiagram model with its ideas and branches, the commands in upstream's order, and the layout that packs the children of each idea next to it (upstream's mindmap package).
packetdiag
Package packetdiag parses and draws packet diagrams (@startpacketdiag): the PacketDiagram model with its layout in rows of bits, the drawing of its fields (PacketBlock) and of its bit scale (PacketIndicator), and the factory and its commands in upstream's order (upstream's packetdiag and packetdiag.command packages).
Package packetdiag parses and draws packet diagrams (@startpacketdiag): the PacketDiagram model with its layout in rows of bits, the drawing of its fields (PacketBlock) and of its bit scale (PacketIndicator), and the factory and its commands in upstream's order (upstream's packetdiag and packetdiag.command packages).
png
Package png reads and writes the PNG features upstream uses: the text chunk that embeds the diagram source.
Package png reads and writes the PNG features upstream uses: the text chunk that embeds the diagram source.
salt
Package salt parses and draws salt diagrams (@startsalt): the lines that PSystemSalt collects, cut into tokens and turned into a tree of widgets by the element factories, laid out in groups, tables, trees, tabs, menus, scroll areas and border layouts, and drawn in two passes (upstream's salt package).
Package salt parses and draws salt diagrams (@startsalt): the lines that PSystemSalt collects, cut into tokens and turned into a tree of widgets by the element factories, laid out in groups, tables, trees, tabs, menus, scroll areas and border layouts, and drawn in two passes (upstream's salt package).
security
Package security applies security profiles to file and URL access.
Package security applies security profiles to file and URL access.
sequencediagram
Package sequencediagram parses, lays out (Teoz engine) and draws sequence diagrams.
Package sequencediagram parses, lays out (Teoz engine) and draws sequence diagrams.
server
Package server serves rendered diagrams over HTTP, with the routes of upstream's built-in server (--http-server) and of plantuml-server.
Package server serves rendered diagrams over HTTP, with the routes of upstream's built-in server (--http-server) and of plantuml-server.
statediagram
Package statediagram parses state diagrams: the StateDiagram model (upstream's statediagram package), the factory and its commands in upstream's order (upstream's statediagram.command package), and the drawing, laid out by Graphviz dot through internal/svek.
Package statediagram parses state diagrams: the StateDiagram model (upstream's statediagram package), the factory and its commands in upstream's order (upstream's statediagram.command package), and the drawing, laid out by Graphviz dot through internal/svek.
stdlib
Package stdlib holds the standard library bundled with the program: the stdlib/ folder of the plantuml-mit 1.2026.9 jar, without the libraries whose license does not allow bundling them (see NOTICE).
Package stdlib holds the standard library bundled with the program: the stdlib/ folder of the plantuml-mit 1.2026.9 jar, without the libraries whose license does not allow bundling them (see NOTICE).
svek
Package svek lays out graph-based diagrams (class and object diagrams in this release) with Graphviz dot and draws them, as upstream's svek package: it measures the image of each entity, writes the DOT graph (DotStringFactory, with a subgraph per group and the HTML tables that reserve the room of labels and quantifiers), has a layout engine compute it, reads node positions, cluster boxes and edge paths back from the SVG document the engine returns (SvgResult), and draws the result (SvekResult): clusters, nodes, then edges with their arrow heads (internal/svek/extremity), labels, quantifiers and qualifier boxes.
Package svek lays out graph-based diagrams (class and object diagrams in this release) with Graphviz dot and draws them, as upstream's svek package: it measures the image of each entity, writes the DOT graph (DotStringFactory, with a subgraph per group and the HTML tables that reserve the room of labels and quantifiers), has a layout engine compute it, reads node positions, cluster boxes and edge paths back from the SVG document the engine returns (SvgResult), and draws the result (SvekResult): clusters, nodes, then edges with their arrow heads (internal/svek/extremity), labels, quantifiers and qualifier boxes.
svek/extremity
Package extremity is upstream's svek.extremity: the decorations drawn at the ends of the links of graph diagrams (arrow heads, diamonds, crow's feet, circles...) and in their middle, with upstream's AbstractExtremityFactory.
Package extremity is upstream's svek.extremity: the decorations drawn at the ends of the links of graph diagrams (arrow heads, diamonds, crow's feet, circles...) and in their middle, with upstream's AbstractExtremityFactory.
text
Package text holds located source lines and string helpers with the exact semantics of the Java methods upstream relies on.
Package text holds located source lines and string helpers with the exact semantics of the Java methods upstream relies on.
themes
Package themes holds the themes bundled with the program: the theme files of PlantUML v1.2026.9 whose license allows bundling them (see NOTICE for the themes that are left out and why).
Package themes holds the themes bundled with the program: the theme files of PlantUML v1.2026.9 whose license allows bundling them (see NOTICE for the themes that are left out and why).
tim
Package tim implements the PlantUML preprocessor (variables, macros, control flow, functions, builtins and includes).
Package tim implements the PlantUML preprocessor (variables, macros, control flow, functions, builtins and includes).
timing
Package timing parses and draws timing diagrams (@startuml): the TimingDiagram model with its players, times, messages, constraints, highlights and notes, the commands in upstream's order, the ruler of the time axis and the panels of each type of player (upstream's timingdiagram package).
Package timing parses and draws timing diagrams (@startuml): the TimingDiagram model with its players, times, messages, constraints, highlights and notes, the commands in upstream's order, the ruler of the time axis and the panels of each type of player (upstream's timingdiagram package).
uml
Package uml holds what every UML diagram type shares: the diagram base (upstream's AbstractDiagram, UgDiagram and TitledDiagram), the annotations (title, caption, legend, header, footer, main frame, scale), the multi-line command shapes and the common commands of net.sourceforge.plantuml.command.CommonCommands.
Package uml holds what every UML diagram type shares: the diagram base (upstream's AbstractDiagram, UgDiagram and TitledDiagram), the annotations (title, caption, legend, header, footer, main frame, scale), the multi-line command shapes and the common commands of net.sourceforge.plantuml.command.CommonCommands.
version
Package version describes this implementation and the upstream release it reproduces.
Package version describes this implementation and the upstream release it reproduces.
wbs
Package wbs parses and draws WBS diagrams (@startwbs): the WBSDiagram model with its elements and links, the commands in upstream's order, the layout that draws the children of the root side by side and the deeper nodes in columns, and the text output (upstream's wbs package).
Package wbs parses and draws WBS diagrams (@startwbs): the WBSDiagram model with its elements and links, the commands in upstream's order, the layout that draws the children of the root side by side and the deeper nodes in columns, and the text output (upstream's wbs package).
tools
bench command
Command bench compares the start time and the rendering time of this implementation with the upstream jar, on the same machine and with the same dot for both (passed through GRAPHVIZ_DOT).
Command bench compares the start time and the rendering time of this implementation with the upstream jar, on the same machine and with the same dot for both (passed through GRAPHVIZ_DOT).
provenance command
Command provenance checks that every Go source file declares where its code comes from, so that only MIT-licensed upstream code is translated.
Command provenance checks that every Go source file declares where its code comes from, so that only MIT-licensed upstream code is translated.
refgen command
Command refgen renders conformance references with Java PlantUML v1.2026.9 in the reference image (tools/reference/Dockerfile).
Command refgen renders conformance references with Java PlantUML v1.2026.9 in the reference image (tools/reference/Dockerfile).
site command
Command site assembles the landing page and the WebAssembly module of its playground into a directory that GitHub Pages or any static file server can serve.
Command site assembles the landing page and the WebAssembly module of its playground into a directory that GitHub Pages or any static file server can serve.
stdlib command
Command stdlib imports the standard library of the upstream jar into internal/stdlib: the .spm channel files of every library that stdlib.Excluded does not list, unchanged, and home.spm without the excluded names.
Command stdlib imports the standard library of the upstream jar into internal/stdlib: the .spm channel files of every library that stdlib.Excluded does not list, unchanged, and home.spm without the excluded names.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL