Package org.gnome.gsk
Interface PathForeachFunc
- All Superinterfaces:
FunctionPointer
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface
@Generated("io.github.jwharm.JavaGI")
public interface PathForeachFunc
extends FunctionPointer
Functional interface declaration of the
PathForeachFunc
callback.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionboolean
run
(PathOperation op, Point pts, long nPts, float weight) Prototype of the callback to iterate through the operations of a path.default MemorySegment
toCallback
(Arena arena) Creates a native function pointer to theupcall(int, java.lang.foreign.MemorySegment, long, float, java.lang.foreign.MemorySegment)
method.default int
upcall
(int op, MemorySegment pts, long nPts, float weight, MemorySegment userData) Theupcall
method is called from native code.
-
Method Details
-
run
Prototype of the callback to iterate through the operations of a path.For each operation, the callback is given the
op
itself, the points that the operation is applied to inpts
, and aweight
for conic curves. ThenPts
argument is somewhat redundant, since the number of points can be inferred from the operation.Each contour of the path starts with a
GSKPATHMOVE
operation. Closed contours end with aGSKPATHCLOSE
operation. -
upcall
Theupcall
method is called from native code. The parameters are marshaled andrun(org.gnome.gsk.PathOperation, org.gnome.graphene.Point, long, float)
is executed. -
toCallback
Creates a native function pointer to theupcall(int, java.lang.foreign.MemorySegment, long, float, java.lang.foreign.MemorySegment)
method.- Specified by:
toCallback
in interfaceFunctionPointer
- Parameters:
arena
- the function pointer will be allocated in this arena- Returns:
- the native function pointer
-