Package snap.view

Class ScaleBox

All Implemented Interfaces:
PropChange.DoChange, XMLArchiver.Archivable, ViewHost

public class ScaleBox extends BoxView
A BoxView subclass that scales the content instead of resize.
  • Field Details

  • Constructor Details

    • ScaleBox

      public ScaleBox()
      Creates a new ScaleBox.
    • ScaleBox

      public ScaleBox(View aContent)
      Creates a new ScaleBox for content.
    • ScaleBox

      public ScaleBox(View aContent, boolean isFillWidth, boolean isFillHeight)
      Creates a new ScaleBox for content with FillWidth, FillHeight params.
  • Method Details

    • isKeepAspect

      public boolean isKeepAspect()
      Returns whether to preserve natural aspect of content when scaling.
    • setKeepAspect

      public void setKeepAspect(boolean aValue)
      Sets whether to preserve natural aspect of content when scaling.
    • getAspect

      protected double getAspect()
      Returns the aspect of the content.
    • getViewProxy

      protected ScaleBoxProxy getViewProxy()
      Override to return ScaleBoxProxy.
      Overrides:
      getViewProxy in class BoxView