Package com.artifex.solib
Class SOPage
java.lang.Object
com.artifex.solib.ArDkPage
com.artifex.solib.SOPage
-
Field Summary
Fields inherited from class com.artifex.solib.ArDkPage
SOLayer_All, SOLayer_Background, SOLayer_None, SOSelectMode_Caret, SOSelectMode_DefaultUnit, SOSelectMode_End, SOSelectMode_Start -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedSOPage(long internal) Private constructor - only called from JNI -
Method Summary
Modifier and TypeMethodDescriptionvoidvoiddiscard()Discard a page.protected voidfinalize()Private finalizerGet the animation commands for this page.float[]Get the graduation positions for the horizontal ruler for this pageGet the title of this page.android.graphics.Pointfloat[]Get the graduation positions for the vertical ruler for this pageobjectAtPoint(float atX, float atY) Get hyperlink (if there is one) at the given pointvoidrenderLayerAtZoomWithAlpha(int layer, double zoom, double originX, double originY, ArDkBitmap bitmap, ArDkBitmap alpha, SORenderListener listener, boolean uiThread, boolean inverted) Kick off a render.intselect(int mode, double atX, double atY) Select page object at pointintselect(int mode, android.graphics.PointF atPoint) Select page object at pointRequest information on the type and position of the current Selection.voidsetSelectionLimitsBox(float l, float t, float r, float b) voidsetSelectionLimitsBox(android.graphics.RectF box) booleansetTopLeftCell(int col, int row) android.graphics.PointsizeAtZoom(double zoom) Return the size a page will display at if rendered with a given zoom factor.android.graphics.PointFzoomToFitRect(int w, int h) Find the horizontal and vertical zoom factors that will scale the page to fit within given screen dimensions.android.graphics.PointFzoomToFitRect(android.graphics.Point size) Find the horizontal and vertical zoom factors that will scale the page to fit within given screen dimensions.Methods inherited from class com.artifex.solib.ArDkPage
renderAtZoom
-
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:
zoomToFitRectin classArDkPage- Parameters:
w- the desired screen widthh- 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:
sizeAtZoomin classArDkPage- 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:
renderLayerAtZoomWithAlphain classArDkPage- Parameters:
layer- layer to renderzoom- zoom factor to render atoriginX- x coord of origin for rendering (bitmap coordinates)originY- y coord of origin for rendering (bitmap coordinates)bitmap- bitmap to render intoalpha- alpha mask to render intolistener- listener for render completion/errorsuiThread- 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 attemptatPoint- 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 -
selectionLimits
Request information on the type and position of the current Selection.- Overrides:
selectionLimitsin classArDkPage- Returns:
- SOSelectionLimits object describing the current selection.
-
objectAtPoint
Get hyperlink (if there is one) at the given point- Overrides:
objectAtPointin classArDkPage- Parameters:
atX- X coord of position to look for a hyperlinkatY- 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
Get the title of this page.- Returns:
- String title
-
getSlideTransition
-
getAnimations
Get the animation commands for this page.- Returns:
- array of SOAnimationCommands
-
releasePage
public void releasePage()- Overrides:
releasePagein classArDkPage
-
destroyPage
public void destroyPage()- Overrides:
destroyPagein classArDkPage
-
finalize
Private finalizer -
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:
getTopLeftCellin classArDkPage
-
setTopLeftCell
public boolean setTopLeftCell(int col, int row) - Overrides:
setTopLeftCellin classArDkPage
-