Class ImageLayer

  • All Implemented Interfaces:
    Extensible

    public class ImageLayer
    extends Layer
    A multi-resolution capable image layer.
    • Constructor Detail

      • ImageLayer

        public ImageLayer​(RenderedImage image)
        Constructs a single-resolution-level image layer.
        Parameters:
        image - the image
      • ImageLayer

        public ImageLayer​(RenderedImage image,
                          AffineTransform imageToModelTransform,
                          int levelCount)
        Constructs a multi-resolution-level image layer.
        Parameters:
        image - the image
        imageToModelTransform - the transformation from image to model CS
        levelCount - the number of resolution levels
      • ImageLayer

        public ImageLayer​(MultiLevelSource multiLevelSource)
        Constructs a multi-resolution-level image layer.
        Parameters:
        multiLevelSource - the multi-resolution-level image
    • Method Detail

      • regenerate

        public void regenerate()
        Description copied from class: Layer
        Regenerates the layer. May be called to update the layer data. The default implementation does nothing.
        Overrides:
        regenerate in class Layer
      • setMultiLevelSource

        public void setMultiLevelSource​(MultiLevelSource multiLevelSource)
      • getImageToModelTransform

        public AffineTransform getImageToModelTransform()
      • getModelToImageTransform

        public AffineTransform getModelToImageTransform()
      • getImageToModelTransform

        public AffineTransform getImageToModelTransform​(int level)
      • getModelToImageTransform

        public AffineTransform getModelToImageTransform​(int level)
      • getLevel

        public int getLevel​(Viewport vp)
      • getLayerModelBounds

        protected Rectangle2D getLayerModelBounds()
        Description copied from class: Layer
        Gets the bounds (bounding box) of this layer in model coordinates. Called by Layer.getModelBounds(). The default implementation returns null.
        Overrides:
        getLayerModelBounds in class Layer
        Returns:
        The bounds of the layer in model coordinates or null if this layer has no specified boundary.
      • disposeLayer

        protected void disposeLayer()
        Description copied from class: Layer
        Disposes the layer. Called by Layer.dispose(). The default implementation does nothing.
        Overrides:
        disposeLayer in class Layer
      • isBorderShown

        public boolean isBorderShown()
      • getBorderWidth

        public double getBorderWidth()
      • getBorderColor

        public Color getBorderColor()
      • isPixelBorderShown

        public boolean isPixelBorderShown()
      • getPixelBorderWidth

        public double getPixelBorderWidth()
      • getPixelBorderColor

        public Color getPixelBorderColor()