exwin

package module
v0.0.0-...-efe4bef Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2023 License: MIT Imports: 4 Imported by: 0

README

exwin

exwin is an external drawing package based on tfriedel6/canvas and go-gl/glfw.

It allows you to create windows and draw in them, similar to the HTML5 canvas API.

Why

Other packages block the main goroutine and generally don't provide convenient window customization.

Community

You can contribute to this package.

Examples

Look in the examples folder for some drawing examples.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Window

type Window interface {
	Hide()
	Show()
	Close()

	GetBackend() backend.Backend

	GetOpacity() float32
	GetSize() (w, h int)
	GetPosition() (x, y int)
	GetRefreshRate() *time.Ticker
	GetMonitorRefreshRate() *time.Ticker

	SetOpacity(opacity float32)
	SetSize(w, h int)
	SetPosition(x, y int)
	SetBounds(x, y, w, h int)
	SetRefreshRate(refreshRate time.Duration)
	SetSwapInterval(interval int)
	SetAttributes(attributes window.Attributes)
}

func New

func New(width, height int, title string) (Window, error)

Directories

Path Synopsis
examples
internal
pkg

Jump to

Keyboard shortcuts

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