Class Color

All Implemented Interfaces:
PointerInterface

public class Color extends Record
The `PangoColor` structure is used to
represent a color in an uncalibrated RGB color-space.

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

  • Field Details

  • Constructor Details

  • Method Details

    • getClassHandler

      public static ClassHandler getClassHandler()
    • setFieldRed

      public void setFieldRed(int red)
      value of red component
    • getFieldRed

      public int getFieldRed()
      value of red component
    • setFieldGreen

      public void setFieldGreen(int green)
      value of green component
    • getFieldGreen

      public int getFieldGreen()
      value of green component
    • setFieldBlue

      public void setFieldBlue(int blue)
      value of blue component
    • getFieldBlue

      public int getFieldBlue()
      value of blue component
    • copy

      public Color copy()
      Creates a copy of @src.

      The copy should be freed with [method@Pango.Color.free].
      Primarily used by language bindings, not that useful
      otherwise (since colors can just be copied by assignment
      in C).
      Returns:
      the newly allocated `PangoColor`, which should be freed with [method@Pango.Color.free]
    • free

      public void free()
      Frees a color allocated by [method@Pango.Color.copy].
    • parse

      public boolean parse(@Nonnull Str spec)
      Fill in the fields of a color from a string specification.

      The string can either one of a large set of standard names.
      (Taken from the CSS Color [specification](https://www.w3.org/TR/css-color-4/#named-colors),
      or it can be a value in the form `#rgb`, `#rrggbb`,
      `#rrrgggbbb` or `#rrrrggggbbbb`, where `r`, `g` and `b`
      are hex digits of the red, green, and blue components
      of the color, respectively. (White in the four forms is
      `#fff`, `#ffffff`, `#fffffffff` and `#ffffffffffff`.)
      Parameters:
      spec - a string specifying the new color
      Returns:
      %TRUE if parsing of the specifier succeeded, otherwise %FALSE
    • parse

      public boolean parse(String spec)
      Fill in the fields of a color from a string specification.

      The string can either one of a large set of standard names.
      (Taken from the CSS Color [specification](https://www.w3.org/TR/css-color-4/#named-colors),
      or it can be a value in the form `#rgb`, `#rrggbb`,
      `#rrrgggbbb` or `#rrrrggggbbbb`, where `r`, `g` and `b`
      are hex digits of the red, green, and blue components
      of the color, respectively. (White in the four forms is
      `#fff`, `#ffffff`, `#fffffffff` and `#ffffffffffff`.)
      Parameters:
      spec - a string specifying the new color
      Returns:
      %TRUE if parsing of the specifier succeeded, otherwise %FALSE
    • toStr

      public Str toStr()
      Returns a textual specification of @color.

      The string is in the hexadecimal form `#rrrrggggbbbb`,
      where `r`, `g` and `b` are hex digits representing the
      red, green, and blue components respectively.
      Returns:
      a newly-allocated text string that must be freed with g_free().
    • getTypeID

      public static long getTypeID()
    • getParentTypeID

      public static long getParentTypeID()
    • getTypeSize

      public static TypeSystem.TypeSize getTypeSize()
    • getParentTypeSize

      public static TypeSystem.TypeSize getParentTypeSize()
    • getInstanceSize

      public static int getInstanceSize()