Skip to content

g3th/Buffered-Image-in-Kotlin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

Drawing lines and Polygons with Kotlin

Using java.awt and javax.imageio to draw shapes

A simple reference for how to draw lines, rectangles, circles, polygons etc.. using the appropriate java libraries and methods included in those libraries.

How to save everything to a file and how to draw multiple lines in the same image.

Draws two crossed lines, or a hexagon, or a filled rectangle with the colours set in both functions.

Simple compilation (no need for dependencies, since everything is standard library):

kotlinc drawLines.kt -include-runtime drawLines.jar

java -jar drawLines.jar

Releases

No releases published

Packages

No packages published

Languages