Interface Plan


  • public interface Plan
    Describes graphics rendering operations with multiple layers.

    A plan has the following structure, in order of execution:

    • multiple layers (0..N) with individual commands (higher layers are merged onto lower layers)
    • composition (layer commands applied after layers have been merged)
    • view commands (define resulting image and file format)
    Both the view and the layers implement the map-like interface in which instructions are set in a key-value style with keys being strings.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      Layer composition()
      Returns the special composition layer.
      Layer layer​(int index)
      Retrieve layers from 0 (lowest) to N (highest).
      java.util.List<Layer> layers()
      All layers of the plan.
      java.lang.String toJsonString()
      Returns a multi-line JSON representation of this plan.
      java.lang.String toString()
      Returns a single-line string representation of this plan for log and debug output.
      Instructions view()
      Instruction regarding the output view of the rendering plan.
    • Method Detail

      • view

        Instructions view()
        Instruction regarding the output view of the rendering plan. Defines the output image format and other global flags.
        Returns:
        map containing view related instructions
      • layer

        Layer layer​(int index)
        Retrieve layers from 0 (lowest) to N (highest). The layer asked for and all yet missing layers in between will be added on the fly.
        Parameters:
        index - index of the layer to retrieve
        Returns:
        the layer at the given index, will be created if it does not exist yet
      • layers

        java.util.List<Layer> layers()
        All layers of the plan.
        Returns:
        a modifiable list of all layers in the plan
      • composition

        Layer composition()
        Returns the special composition layer. These are layer commands executed after all layers have been merged and before the output image is serialized.
        Returns:
        the special composition layer
      • toString

        java.lang.String toString()
        Returns a single-line string representation of this plan for log and debug output.
        Overrides:
        toString in class java.lang.Object
        Returns:
        a single-line string representation of this plan
      • toJsonString

        java.lang.String toJsonString()
        Returns a multi-line JSON representation of this plan.
        Returns:
        a multi-line JSON representation of this plan