Skip to content

Commit

Permalink
Fix function descriptors of cairo_text_extents and cairo_glyph_extents
Browse files Browse the repository at this point in the history
  • Loading branch information
jwharm committed Jul 27, 2024
1 parent a010ab3 commit 7b97ab4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main/java/org/freedesktop/cairo/Context.java
Original file line number Diff line number Diff line change
Expand Up @@ -3033,7 +3033,7 @@ public void textExtents(String string, TextExtents extents) {
}

private static final MethodHandle cairo_text_extents = Interop.downcallHandle("cairo_text_extents",
FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS));
FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS, ValueLayout.ADDRESS));

/**
* Gets the extents for an array of glyphs. The extents describe a user-space
Expand Down Expand Up @@ -3061,7 +3061,8 @@ public void glyphExtents(Glyphs glyphs, TextExtents extents) {
}

private static final MethodHandle cairo_glyph_extents = Interop.downcallHandle("cairo_glyph_extents",
FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS));
FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.ADDRESS,
ValueLayout.JAVA_INT, ValueLayout.ADDRESS));

/**
* Marks the beginning of the tag_name structure. Call {@link #tagEnd(String)}
Expand Down

0 comments on commit 7b97ab4

Please sign in to comment.