Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
jwharm authored Jul 16, 2023
1 parent a0c2463 commit 7356d61
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# cairo-java-bindings
# Cairo Java bindings
Java language bindings for the [cairo](https://www.cairographics.org) graphics library using the
JEP-434 Panama FFI. The bindings are based on **cairo 1.16** and work with **JDK 20** (with preview
features enabled).

I created these language bindings primarily as a companion to the GObject-based language bindings
for Gtk and GStreamer generated with [Java-GI](https://github.com/jwharm/java-gi). The bindings
depend on the `glib` module from Java-GI for a few common base classes and interfaces.
I created these language bindings primarily as a companion to the GObject-Introspection-based Java
language bindings for Gtk and GStreamer generated with [Java-GI](https://github.com/jwharm/java-gi).
The bindings depend on the `glib` module from Java-GI for a few common base classes and interfaces.

## Overview

Expand Down Expand Up @@ -110,7 +110,7 @@ allprojects {
}
dependencies {
implementation 'com.github.jwharm:cairo-java-bindings:1.16.0'
implementation 'com.github.jwharm:cairo-java-bindings:0.1.0'
}
```

Expand All @@ -119,9 +119,8 @@ or else the Java bindings have nothing to bind to. You also need to install JDK
earlier, nor the JDK 21 early-access version), because the JEP-434 Panama FFI is slightly different
between JDK versions.

After you added the jar file to your classpath, you can start developing with cairo in Java. Have
fun! This is a simple example to get started, ported from
[the first sample on this page](https://www.cairographics.org/samples/):
Now, you can start developing with cairo in Java. Have fun! This is a simple example to get started,
ported from [the first sample on this page](https://www.cairographics.org/samples/):

```java
import org.freedesktop.cairo.*;
Expand Down Expand Up @@ -176,11 +175,13 @@ developers of Rife2. The build file is very simple, and can be found under the `
Because the entire `bld` build process is Java-based, as long as you have JDK 20 installed, you
don't need to download any build tools, compilers, or development packages.

- Run `./bld download` to initialize `bld` and download dependencies (mostly JUnit 5).
- Run `./bld download` to initialize `bld` and download dependencies.

- Run `./bld publish` to build the project. The jar files can be found in the `build/dist/`
directory, and are also published to MavenLocal.

- Run `./bld test` to run the tests.

You can run `./bld` to see all other operations that are available.

The repository contains IntelliJ IDEA project files, to let it recognize the `bld` project
Expand Down

0 comments on commit 7356d61

Please sign in to comment.