https://github.com/bitbrain/acid
Provides a Java cell API to display fancy cell boxes.
https://github.com/bitbrain/acid
Last synced: 12 months ago
JSON representation
Provides a Java cell API to display fancy cell boxes.
- Host: GitHub
- URL: https://github.com/bitbrain/acid
- Owner: bitbrain
- License: gpl-2.0
- Created: 2013-07-31T14:55:35.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2013-08-05T15:11:51.000Z (over 12 years ago)
- Last Synced: 2025-02-13T23:36:15.086Z (about 1 year ago)
- Language: Java
- Size: 215 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

Provides a Java cell API to display fancy cell boxes. This API is library independent, therefore you have to draw everything by yourself.
The following features can be used:
* Detection if position is inside of the box
* Pixel size and amount can be changed
* Images can be loaded
* Color detection
The following libraries are automatically supported:
* Slick2D
### Example
A short example in Slick2D. The following code:
```java
// JavaFX: FXBufferedRenderer()
// LibGDX: GdxBufferedRenderer()
acid = new Acid(new SlickBufferedRenderer());
acid.backgroundColor(0.2f, 0.2f, 0.2f);
acid.setIndexX(8);
acid.setIndexY(6);
acid.setCellSize(50);
acid.color(0.2f, 1f, 0f);
acid.set(1, 1);
acid.color(0.4f, 0f, 0.6f);
acid.set(2, 2);
// Set the element to the middle
acid.setPosition(gc.getWidth() / 2f - acid.getWidth() / 2f,
gc.getHeight() / 2f - acid.getHeight() / 2f);
```
creates the following result:
