Class SOPage


public class SOPage extends ArDkPage
  • Constructor Details

    • SOPage

      protected SOPage(long internal)
      Private constructor - only called from JNI
      Parameters:
      internal - C pointer cast to a long
  • Method Details

    • zoomToFitRect

      public android.graphics.PointF zoomToFitRect(android.graphics.Point size)
      Find the horizontal and vertical zoom factors that will scale the page to fit within given screen dimensions.
      Parameters:
      size - the desired screen dimensions
      Returns:
      the zoom factors.
    • zoomToFitRect

      public android.graphics.PointF zoomToFitRect(int w, int h)
      Find the horizontal and vertical zoom factors that will scale the page to fit within given screen dimensions.
      Overrides:
      zoomToFitRect in class ArDkPage
      Parameters:
      w - the desired screen width
      h - the desired screen height
      Returns:
      the zoom factors.
    • sizeAtZoom

      public android.graphics.Point sizeAtZoom(double zoom)
      Return the size a page will display at if rendered with a given zoom factor.
      Overrides:
      sizeAtZoom in class ArDkPage
      Parameters:
      zoom - zoom factor
      Returns:
      rendered page dimensions.
    • renderLayerAtZoomWithAlpha

      public ArDkRender renderLayerAtZoomWithAlpha(int layer, double zoom, double originX, double originY, ArDkBitmap bitmap, ArDkBitmap alpha, SORenderListener listener, boolean uiThread, boolean inverted)
      Kick off a render.
      Overrides:
      renderLayerAtZoomWithAlpha in class ArDkPage
      Parameters:
      layer - layer to render
      zoom - zoom factor to render at
      originX - x coord of origin for rendering (bitmap coordinates)
      originY - y coord of origin for rendering (bitmap coordinates)
      bitmap - bitmap to render into
      alpha - alpha mask to render into
      listener - listener for render completion/errors
      uiThread - set true to call the listener on the UI thread
      Returns:
      SORender object.
    • select

      public int select(int mode, android.graphics.PointF atPoint)
      Select page object at point
      Parameters:
      mode - What sort of selection to attempt
      atPoint - Position to try for a selection at
      Returns:
      1 for success, 0 for error.
    • select

      public int select(int mode, double atX, double atY)
      Select page object at point
      Overrides:
      select in class ArDkPage
      Parameters:
      mode - What sort of selection to attempt
      atX - X coord of position to try for a selection at
      atY - Y coord of position to try for a selection at
      Returns:
      1 for success, 0 for error.
    • selectionLimits

      public SOSelectionLimits selectionLimits()
      Request information on the type and position of the current Selection.
      Overrides:
      selectionLimits in class ArDkPage
      Returns:
      SOSelectionLimits object describing the current selection.
    • objectAtPoint

      public SOHyperlink objectAtPoint(float atX, float atY)
      Get hyperlink (if there is one) at the given point
      Overrides:
      objectAtPoint in class ArDkPage
      Parameters:
      atX - X coord of position to look for a hyperlink
      atY - Y coord of position to look for a hyperlink
    • discard

      public void discard()
      Discard a page. When you are finished with a page, call this method to start the process of cleanup in the background. Failing to call this relies on garbage collection to recover the memory used, and can be slow. Garbage Collection will also have to block in the finalizer, which is undesirable.
    • getHorizontalRuler

      public float[] getHorizontalRuler()
      Get the graduation positions for the horizontal ruler for this page
      Returns:
      array of floating point positions
    • getVerticalRuler

      public float[] getVerticalRuler()
      Get the graduation positions for the vertical ruler for this page
      Returns:
      array of floating point positions
    • getPageTitle

      public String getPageTitle()
      Get the title of this page.
      Returns:
      String title
    • getSlideTransition

      public SOTransition getSlideTransition()
    • getAnimations

      public SOAnimationCommand[] getAnimations()
      Get the animation commands for this page.
      Returns:
      array of SOAnimationCommands
    • releasePage

      public void releasePage()
      Overrides:
      releasePage in class ArDkPage
    • destroyPage

      public void destroyPage()
      Overrides:
      destroyPage in class ArDkPage
    • finalize

      protected void finalize() throws Throwable
      Private finalizer
      Overrides:
      finalize in class Object
      Throws:
      Throwable
    • setSelectionLimitsBox

      public void setSelectionLimitsBox(android.graphics.RectF box)
    • setSelectionLimitsBox

      public void setSelectionLimitsBox(float l, float t, float r, float b)
    • getTopLeftCell

      public android.graphics.Point getTopLeftCell()
      Overrides:
      getTopLeftCell in class ArDkPage
    • setTopLeftCell

      public boolean setTopLeftCell(int col, int row)
      Overrides:
      setTopLeftCell in class ArDkPage