https://github.com/demonstrandum/acetone
Haskell 2D Graphics
https://github.com/demonstrandum/acetone
Last synced: 9 months ago
JSON representation
Haskell 2D Graphics
- Host: GitHub
- URL: https://github.com/demonstrandum/acetone
- Owner: Demonstrandum
- License: gpl-3.0
- Created: 2022-02-23T19:43:37.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-11-09T14:11:58.000Z (over 3 years ago)
- Last Synced: 2025-04-14T15:18:07.219Z (about 1 year ago)
- Language: Haskell
- Size: 66.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Acetone
Haskell library for 2D interactive graphics.
## Overview
- All spatial units are normalised by default. e.g., `0.0` is all the
way to the left/top, and `1.0` is all the way to the right/bottom on the shortest axis.
Pixel units are still supported, and other coördinate transforms are trivial.
A `fromPixels pixels` function is provided.
- The default coordinate system has the origin in the top-left corner.
## TODO
- Resizing the window does not behave properly on Windows.
- Add gradient and texture support.
- Add font/text layouting and rasterization with FreeType.
## Install and Build
### Get Haskell
Windows, macOS and GNU+Linux users can get GHC and Cabal with
[GHCUp](https://www.haskell.org/ghcup/)
### Note to Windows users
This repository/package's structure relies on symlink.
The latest versions of Windows should support this fully.
By enabling Developer Mode on Windows, you should be granted `mklink`
permission.
Symlinks have been supported since Vista, but needed to be
enabled and needed administrator privileges.
You must have Git set up to treat symlinks correctly, by doing as so:
```sh
git config --global core.symlinks true
```
in the Git CLI/Bash application.
### Build and install this package
Once in the repository, having completed the prerequisites, one can:
```sh
cabal update
cabal build
cabal install
```
You may need LLVM intsalled and in your `$PATH` for the build.
## Example
Run the GLFW based test/example program:
```sh
cabal run example
```