protected static class LineAnnotationBase.CartesianAnnotationPlacementStrategy<T extends LineAnnotationBase> extends AnnotationBase.CartesianAnnotationPlacementStrategyBase<T>
LineAnnotationBase
instanceselectionPath
annotation
Modifier | Constructor and Description |
---|---|
protected |
CartesianAnnotationPlacementStrategy(T annotation,
boolean clipAdornerToAnnotationSurface)
Creates a new instance of
LineAnnotationBase.CartesianAnnotationPlacementStrategy class |
Modifier and Type | Method and Description |
---|---|
protected void |
drawResizingGrips(android.graphics.Canvas canvas,
AnnotationCoordinates annotationCoordinates)
Draws resizing grips for parent annotation
|
protected int |
getResizingGripHitIndex(float hitPointX,
float hitPointY,
AnnotationCoordinates annotationCoordinates)
Gets the index of
IResizingGrip for parent annotation at specified point on screen |
void |
placeAnnotation(AnnotationCoordinates coordinates,
CanvasLayout.LayoutParams layoutParams)
Places annotation with specific annotation coordinates
|
protected void |
updateSelectionOverlay(android.graphics.Path selectionPath,
AnnotationCoordinates annotationCoordinates)
Updates the shape of selection overlay for parent
AnnotationBase |
createAdornerActionForAnnotationHit, createAdornerActionForResizingGripWithIndex, drawAdorner, drawAdornerInternal, drawSelectionOverlayInternal, internalMoveAnnotationTo, isCoordinateValid, isInBounds, moveAnnotationTo, moveBasePointTo, selectAdornerActionForPoint
protected CartesianAnnotationPlacementStrategy(T annotation, boolean clipAdornerToAnnotationSurface)
LineAnnotationBase.CartesianAnnotationPlacementStrategy
classannotation
- The annotation to placeclipAdornerToAnnotationSurface
- If true adorner for annotation should be clipped to its parent IAnnotationSurface
public void placeAnnotation(AnnotationCoordinates coordinates, CanvasLayout.LayoutParams layoutParams)
coordinates
- The annotation coordinateslayoutParams
- The annotation layout paramsprotected void updateSelectionOverlay(android.graphics.Path selectionPath, AnnotationCoordinates annotationCoordinates)
AnnotationBase.CartesianAnnotationPlacementStrategyBase
AnnotationBase
updateSelectionOverlay
in class AnnotationBase.CartesianAnnotationPlacementStrategyBase<T extends LineAnnotationBase>
selectionPath
- The Path
instance to updateannotationCoordinates
- The annotation coordinatesprotected void drawResizingGrips(android.graphics.Canvas canvas, AnnotationCoordinates annotationCoordinates)
drawResizingGrips
in class AnnotationBase.CartesianAnnotationPlacementStrategyBase<T extends LineAnnotationBase>
canvas
- The Canvas
to draw resizing grips onannotationCoordinates
- The AnnotationCoordinates
instance associated with parent annotationprotected int getResizingGripHitIndex(float hitPointX, float hitPointY, AnnotationCoordinates annotationCoordinates)
IResizingGrip
for parent annotation at specified point on screengetResizingGripHitIndex
in class AnnotationBase.CartesianAnnotationPlacementStrategyBase<T extends LineAnnotationBase>
hitPointX
- The x coordinate of hit test point in pixelshitPointY
- The y coordinate of hit test point in pixelsannotationCoordinates
- The AnnotationCoordinates
instance associated with parent annotationIResizingGrip
which lies below hit test point, otherwise returns -1 which indicates that there is not IResizingGrip
at specified hit test point