Class Texture.Builder<B extends Texture.Builder<B>>

Type Parameters:
B - the type of the Builder that is returned
All Implemented Interfaces:
BuilderInterface
Direct Known Subclasses:
DmabufTexture.Builder, GLTexture.Builder, MemoryTexture.Builder
Enclosing class:
Texture

public static class Texture.Builder<B extends Texture.Builder<B>> extends GObject.Builder<B>
Inner class implementing a builder pattern to construct a GObject with properties.
  • Constructor Details

    • Builder

      protected Builder()
      Default constructor for a Builder object.
  • Method Details

    • build

      public Texture build()
      Finish building the Texture object. This will call GObject.withProperties(Type, String[], Value[]) to create a new GObject instance, which is then cast to Texture.
      Overrides:
      build in class GObject.Builder<B extends Texture.Builder<B>>
      Returns:
      a new instance of Texture with the properties that were set in the Builder object.
    • setColorState

      public B setColorState(ColorState colorState)
      The color state of the texture.
      Parameters:
      colorState - the value for the color-state property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      4.16
    • setHeight

      public B setHeight(int height)
      The height of the texture, in pixels.
      Parameters:
      height - the value for the height property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setWidth

      public B setWidth(int width)
      The width of the texture, in pixels.
      Parameters:
      width - the value for the width property
      Returns:
      the Builder instance is returned, to allow method chaining