Class MarkerSheet


  • public final class MarkerSheet
    extends Sheet<Marker>
    Draws the front and back face of markers (tokens).
    Author:
    Chris Jennings
    • Constructor Detail

      • MarkerSheet

        public MarkerSheet​(Marker marker,
                           boolean isBack)
    • Method Detail

      • getPrintDimensions

        public PrintDimensions getPrintDimensions()
        Description copied from class: Sheet
        Return the printed size of the sheet, measured in points. The returned size will account for the current bleed margin settings.

        The base class implementation is only valid for fixed-size sheets. Variable-sized sheets must override this method to return the correct size.

        Overrides:
        getPrintDimensions in class Sheet<Marker>
        Returns:
        the dimensions of the bounding rectangle of this sheet when printed
      • getBleedMargin

        public double getBleedMargin()
        Description copied from class: Sheet
        Returns the size of the bleed margin around the component edge that should be cropped off, measured in points. This bleed margin allows for slight misalignment when cutting the component from a larger sheet of paper. The bleed margin will be the same on all sides. The height and width of the component after cutting will be less than the original by twice this margin. If Sheet.hasCropMarks() returns true, then the automatic crop marks will be moved toward the inside of this component by an amount equal to the bleed margin.

        The base class looks up the setting templateKey-bleed-margin to determine the bleed margin, defaulting to 0 if none is defined.

        In the example below, the actual component to be cut and kept is indicated by the blank area, while the X'd area indicates the bleed margin. Component content covers the entire area, including the bleed margin, but nothing important should appear in the bleed margin or within a distance about the same size as the bleed margin on the component interior.

         XXXXXXXXXXXXXXXXXX
         XX              XX
         X                X
         X                X
         X     Actual     X
         X    Component   X
         X     Content    X
         X       (tm)     X
         X                X
         X                X
         X                X
         XX              XX
         XXXXXXXXXXXXXXXXXX
         

        By default, this method returns 0, meaning that the design includes no bleed margin. If the bleed margin is 0, Strange Eons will attempt to synthesize bleed margin graphics, with varying results. Note that Strange Eons will not synthesize a bleed margin for transparent sheet images (i.e., if Sheet.isTransparent() is true).

        Overrides:
        getBleedMargin in class Sheet<Marker>
        Returns:
        the size of the bleed margin, in points (1 point = 1/72 inch)
        See Also:
        Sheet.hasCropMarks()
      • isTransparent

        public boolean isTransparent()
        Description copied from class: Sheet
        Returns true if the sheets for this card are transparent. The base class returns false; subclasses that want to create non-rectangular card faces must override this method. When this method returns true, the framework guarantees the following:
        1. the image buffer used for drawing will have an alpha channel (that is, it will keep track of how opaque each pixel is)
        2. the image buffer used for drawing will be completely transparent (alpha = 0) at the start of each call to Sheet.paint(ca.cgjennings.apps.arkham.sheet.RenderTarget, double)
        Overrides:
        isTransparent in class Sheet<Marker>
        Returns:
        true if the card face may contain transparent or translucent areas
      • isVariableSize

        public boolean isVariableSize()
        Description copied from class: Sheet
        Returns true if the sheets created by this card can vary in size. Subclasses that wish to create variably-sized sheets must override this method to return true.

        Typically a variably-sized sheet is also transparent. When this is the case, and the sheet image has one or more edges that are completely transparent after Sheet.paint(ca.cgjennings.apps.arkham.sheet.RenderTarget, double) returns, then the transparent edges will be trimmed from the outside of the sheet and the size adjusted accordingly. Alternatively (or additionally), the size can be altered by replacing the template image at the start of painting.

        Overrides:
        isVariableSize in class Sheet<Marker>
        Returns:
        true if this card can have different sizes
        See Also:
        Sheet.isTransparent(), Sheet.replaceTemplateImage(java.awt.image.BufferedImage)