Interface IAnnotationPlacementStrategy
Defines the interface for methods which allows to place annotation
Namespace:
Assembly: .dll
Syntax
public interface IAnnotationPlacementStrategy
Methods
drawAdorner(Canvas adornerCanvas)
Draws adorner on specified Canvas
Declaration
public abstract void drawAdorner(Canvas adornerCanvas)
Parameters
Type | Name | Description |
---|---|---|
android.graphics.Canvas | adornerCanvas | The target Canvas to draw adorner on |
isInBounds(AnnotationCoordinates coordinates, IAnnotationSurface annotationsSurface)
Checks whether coordinates are within canvas bounds
Declaration
public abstract boolean isInBounds(AnnotationCoordinates coordinates, IAnnotationSurface annotationsSurface)
Parameters
Type | Name | Description |
---|---|---|
AnnotationCoordinates | coordinates | The annotation coordinates |
IAnnotationSurface | annotationsSurface | The parent annotation surface |
Returns
Type | Description |
---|---|
boolean | True if annotation is in bounds |
moveAnnotationTo(AnnotationCoordinates coordinates, float horizontalOffset, float verticalOffset, IAnnotationSurface annotationSurface)
Moves the annotation to a specific horizontal and vertical offset
Declaration
public abstract void moveAnnotationTo(AnnotationCoordinates coordinates, float horizontalOffset, float verticalOffset, IAnnotationSurface annotationSurface)
Parameters
Type | Name | Description |
---|---|---|
AnnotationCoordinates | coordinates | The annotation coordinates |
float | horizontalOffset | The horizontal offset in pixels |
float | verticalOffset | The vertical offset in pixels |
IAnnotationSurface | annotationSurface | The parent annotation surface |
moveBasePointTo(float xCoord, float yCoord, int index)
Sets base point for annotation
Declaration
public abstract void moveBasePointTo(float xCoord, float yCoord, int index)
Parameters
Type | Name | Description |
---|---|---|
float | xCoord | The x coordinate of base point in pixels |
float | yCoord | The y coordinate of base point in pixels |
int | index | The index of base point to move |
placeAnnotation(AnnotationCoordinates coordinates, CanvasLayout.LayoutParams layoutParams)
Places annotation with specific annotation coordinates
Declaration
public abstract void placeAnnotation(AnnotationCoordinates coordinates, CanvasLayout.LayoutParams layoutParams)
Parameters
Type | Name | Description |
---|---|---|
AnnotationCoordinates | coordinates | The annotation coordinates |
CanvasLayout.LayoutParams | layoutParams | The annotation layout params |
selectAdornerActionForPoint(float x, float y, IAdornerLayer relativeTo)
Selects the IAnnotationAdornerAction for specified point on IAdornerLayer
Declaration
public abstract IAnnotationAdornerAction selectAdornerActionForPoint(float x, float y, IAdornerLayer relativeTo)
Parameters
Type | Name | Description |
---|---|---|
float | x | The x coordinate of point on the adorner layer |
float | y | The y coordinate of point on the adorner layer |
IAdornerLayer | relativeTo | The adorner layer |
Returns
Type | Description |
---|---|
IAnnotationAdornerAction | The IAnnotationAdornerAction if it is required for specified point, otherwise null |