Interface ShapeRendererFunc

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("org.javagi.JavaGI") public interface ShapeRendererFunc extends FunctionPointer

Functional interface declaration of the ShapeRendererFunc callback.

See Also:
  • Method Details

    • run

      void run(org.freedesktop.cairo.Context cr, AttrShape attr, boolean doPath)
      Function type for rendering attributes of type AttrType.SHAPE with Pango's Cairo renderer.
      Parameters:
      cr - a Cairo context with current point set to where the shape should be rendered
      attr - the AttrType.SHAPE to render
      doPath - whether only the shape path should be appended to current path of cr and no filling/stroking done. This will be set to true when called from pango_cairo_layout_path() and pango_cairo_layout_line_path() rendering functions.
    • upcall

      default void upcall(MemorySegment cr, MemorySegment attr, int doPath, MemorySegment data)
      The upcall method is called from native code. The parameters are marshaled and run(Context, AttrShape, boolean) is executed.
    • toCallback

      default MemorySegment toCallback(Arena arena)
      Creates a native function pointer to the upcall(MemorySegment, MemorySegment, int, MemorySegment) method.
      Specified by:
      toCallback in interface FunctionPointer
      Parameters:
      arena - the arena in which the function pointer is allocated
      Returns:
      the native function pointer