Class AttrShape

All Implemented Interfaces:
PointerInterface

public class AttrShape extends Record
The `PangoAttrShape` structure is used to represent attributes which
impose shape restrictions.

https://docs.gtk.org/Pango/struct.AttrShape.html

  • Field Details

    • ATTR

      public static final String ATTR
      the common portion of the attribute
      Private field: direct-type
      See Also:
  • Constructor Details

  • Method Details

    • getClassHandler

      public static ClassHandler getClassHandler()
    • _new

      public static Attribute _new(@Nonnull Rectangle ink_rect, @Nonnull Rectangle logical_rect)
      Create a new shape attribute.

      A shape is used to impose a particular ink and logical
      rectangle on the result of shaping a particular glyph.
      This might be used, for instance, for embedding a picture
      or a widget inside a `PangoLayout`.
      Parameters:
      ink_rect - ink rectangle to assign to each character
      logical_rect - logical rectangle to assign to each character
      Returns:
      the newly allocated `PangoAttribute`, which should be freed with [method@Pango.Attribute.destroy]
    • newWithData

      public static Attribute newWithData(@Nonnull Rectangle ink_rect, @Nonnull Rectangle logical_rect, @Nullable Pointer data, AttrShape.OnAttrDataCopyFunc copy_func, AttrShape.OnDestroyNotify destroy_func)
      Creates a new shape attribute.

      Like [func@Pango.AttrShape.new], but a user data pointer
      is also provided; this pointer can be accessed when later
      rendering the glyph.
      Parameters:
      ink_rect - ink rectangle to assign to each character
      logical_rect - logical rectangle to assign to each character
      data - user data pointer
      copy_func - function to copy @data when the attribute is copied. If %NULL, @data is simply copied as a pointer
      destroy_func - function to free @data when the attribute is freed
      Returns:
      the newly allocated `PangoAttribute`, which should be freed with [method@Pango.Attribute.destroy]