Annotation Interface OffScreen


@Retention(RUNTIME) public @interface OffScreen
Annotate a PGraphics field as an additional offscreen buffer.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
    Pixel format of the buffer.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    The pixel format of the buffer.
    int
    Provide a fixed height for the offscreen buffer.
    boolean
    Whether to persist the contents of the offscreen buffer between frames.
    double
    Provide a scaling factor for the height.
    double
    Provide a scaling factor for the width.
    int
    Provide a fixed width for the offscreen buffer.
  • Element Details

    • width

      int width
      Provide a fixed width for the offscreen buffer. The default value of zero will cause the buffer width to be relative to the current output surface width.
      Returns:
      width in pixels
      Default:
      0
    • height

      int height
      Provide a fixed height for the offscreen buffer. The default value of zero will cause the buffer height to be relative to the current output surface height.
      Returns:
      height in pixels
      Default:
      0
    • scaleWidth

      double scaleWidth
      Provide a scaling factor for the width. Default value is 1.0
      Returns:
      scale (1.0 is identity)
      Default:
      1.0
    • scaleHeight

      double scaleHeight
      Provide a scaling factor for the height. Default value is 1.0
      Returns:
      scale (1.0 is identity)
      Default:
      1.0
    • persistent

      boolean persistent
      Whether to persist the contents of the offscreen buffer between frames. Default value is true. If false the surface will be released after each draw() call.
      Returns:
      persist contents between frames
      Default:
      true
    • format

      The pixel format of the buffer. The default value of OffScreen.Format.Default will match the output surface.
      Returns:
      format (Default, RGB, ARGB)
      Default:
      Default