toyGraphics / com.anysolo.toyGraphics.vector

Package com.anysolo.toyGraphics.vector

Types

Point

data class Point

Point on the window.

Rect

data class Rect

Rectangular.

Vector

data class Vector

2D vector.

Functions

drawDot

fun Graphics.drawDot(p: Point): Unit

drawImage

fun Graphics.drawImage(p: Point, image: Image): Unit
fun Graphics.drawImage(p: Point, image: Image, angle: Double, anchorx: Int = 0, anchory: Int = 0): Unit

drawLine

fun Graphics.drawLine(p1: Point, p2: Point): Unit

drawOval

fun Graphics.drawOval(r: Rect, fill: Boolean = false): Unit
fun Graphics.drawOval(topLeft: Point, size: Vector, fill: Boolean = false): Unit

drawRect

fun Graphics.drawRect(r: Rect, fill: Boolean = false): Unit
fun Graphics.drawRect(topLeft: Point, size: Vector, fill: Boolean = false): Unit

drawText

fun Graphics.drawText(p: Point, text: String): Unit

minus

operator fun Point.minus(delta: Vector): Point

plus

operator fun Point.plus(delta: Vector): Point