graphics143

package module
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2024 License: MIT Imports: 12 Imported by: 13

README

graphics143

Go Reference

a library that provides little functions with building your own widgets

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DrawImage

func DrawImage(windowWidth, windowHeight int, img image.Image, imageRect Rect)

DrawImage draws an image to a GLFW window. You must have initialized glfw and gl before using this function and created a window

func InCircle added in v1.1.0

func InCircle(aCircle Circle, xPos, yPos int) bool

func InRect

func InRect(aRect Rect, xPos, yPos int) bool

useful for mouse events

func NewWindow

func NewWindow(width, height int, title string, resizable bool) *glfw.Window

NewWindow begins with initializing glfw and gl libraries.

Types

type Circle added in v1.1.0

type Circle struct {
	TopX   int
	TopY   int
	Radius int
}

func NewCircle added in v1.1.0

func NewCircle(x, y, r int) Circle

func (Circle) CenterCoordinates added in v1.1.0

func (aCircle Circle) CenterCoordinates() (float64, float64)

type Rect

type Rect struct {
	Width   int
	Height  int
	OriginX int
	OriginY int
}

func NewRect

func NewRect(x, y, w, h int) Rect

Directories

Path Synopsis
samples

Jump to

Keyboard shortcuts

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