Interface Paper

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean canMerge()
      Indicates whether this Paper instance is capable of splitting and merging to facilitate parallel processing.
      Paper createSheet()
      Returns a blank Paper instance that is compatible with this one.
      PaperType getPaperType()
      Returns the PaperType which generated and can write to this paper.
      void mergeSheet​(Paper sheet)
      Merges the contents of a compatible paper instance with this one.
    • Method Detail

      • getPaperType

        PaperType getPaperType()
        Returns the PaperType which generated and can write to this paper.
        Returns:
        paper type
      • canMerge

        boolean canMerge()
        Indicates whether this Paper instance is capable of splitting and merging to facilitate parallel processing. Iff this method returns true, then the createSheet() and mergeSheet methods may be used.
        Returns:
        true iff sheet split/merge is supported
      • createSheet

        Paper createSheet()
        Returns a blank Paper instance that is compatible with this one. That essentially means an instance like this but with nothing yet painted on it.

        May only be invoked if canMerge() returns true.

        Returns:
        new compatible paper instance
      • mergeSheet

        void mergeSheet​(Paper sheet)
        Merges the contents of a compatible paper instance with this one. The supplied sheet is assumed to have been created by an earlier invocation of createSheet() on this instance or on a compatible instance.

        The effect is as if everything that has been painted to the supplied sheet will now be painted on this one.

        This is intended for use in parallelising painting of a large number of 2D or 3D Glyphs. Merging papers on which Decals have been placed may or may not work.

        May only be invoked if canMerge() returns true.

        Parameters:
        sheet - compatible paper instance