Interface PaintImageFunc

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 PaintImageFunc extends FunctionPointer

Functional interface declaration of the PaintImageFunc callback.

See Also:
  • Method Details

    • run

      Bool run(PaintFuncs funcs, @Nullable MemorySegment paintData, Blob image, int width, int height, Tag format, float slant, @Nullable GlyphExtents extents)

      A virtual method for the hb_paint_funcs_t to paint a glyph image.

      This method is called for glyphs with image blobs in the CBDT, sbix or SVG tables. The format identifies the kind of data that is contained in image. Possible values include HB_PAINT_IMAGE_FORMAT_PNG, HB_PAINT_IMAGE_FORMAT_SVG and HB_PAINT_IMAGE_FORMAT_BGRA.

      The image dimensions and glyph extents are provided if available, and should be used to size and position the image.

      Parameters:
      funcs - paint functions object
      paintData - The data accompanying the paint functions in hb_font_paint_glyph()
      image - the image data
      width - width of the raster image in pixels, or 0
      height - height of the raster image in pixels, or 0
      format - the image format as a tag
      slant - Deprecated. Always set to 0.0.
      extents - glyph extents for desired rendering
      Returns:
      Whether the operation was successful.
      Since:
      7.0.0
    • upcall

      default int upcall(MemorySegment funcs, MemorySegment paintData, MemorySegment image, int width, int height, int format, float slant, MemorySegment extents, MemorySegment userData)
      The upcall method is called from native code. The parameters are marshaled and run(PaintFuncs, MemorySegment, Blob, int, int, Tag, float, GlyphExtents) is executed.
    • toCallback

      default MemorySegment toCallback(Arena arena)
      Specified by:
      toCallback in interface FunctionPointer
      Parameters:
      arena - the arena in which the function pointer is allocated
      Returns:
      the native function pointer