9package org.libreoffice.canvas;
11import android.graphics.Canvas;
12import android.graphics.Color;
13import android.graphics.Paint;
14import android.graphics.PointF;
15import android.graphics.RectF;
97 if (handle.contains(
x,
y)) {
164 PointF
point =
new PointF();
176 point.offset(deltaX, deltaY);
250 if (layerView !=
null) {
Common static LOKit functions, functions to send events.
static void sendTouchEvent(String touchType, PointF documentTouchCoordinate)
Send touch event to LOKitThread.
Main activity of the LibreOffice App.
GeckoLayerClient getLayerClient()
Common implementation to canvas elements.
This class is responsible to draw the selection handles, track the handle position and perform a hit ...
void reposition(float x, float y)
Viewport has changed, reposition the handle to the input coordinates.
void select()
Mark the handle as selected.
void reset()
Reset the selection for the handle.
HandlePosition getHandlePosition()
The position of the handle.
This class is responsible to draw and reposition the selection rectangle.
void onDraw(Canvas canvas)
Draw the selection on the canvas.
GraphicSelectionHandle mHandles[]
void dragging(PointF position)
Dragging is in process.
void sendGraphicSelectionEnd(PointF screenPosition)
Send graphic selection end event to LOKitTread.
void sendGraphicSelectionStart(PointF screenPosition)
Send graphic selection start event to LOKitTread.
void dragStart(PointF position)
Dragging on the screen has started.
boolean onHitTest(float x, float y)
Hit test for the selection.
void setVisible(boolean visible)
Set the visibility of the graphic selection.
boolean mTriggerSinglePress
void reset()
Reset the selection.
GraphicSelectionHandle mDragHandle
GraphicSelection(LibreOfficeMainActivity context)
Construct the graphic selection.
void adaptDrawRectangle(float x, float y)
Adapt the selection depending on which handle was dragged.
LibreOfficeMainActivity mContext
void onSinglePress(PointF screenPosition)
When a single press (no dragging happened) was performed.
void dragEnd(PointF position)
Dragging has ended.
void reposition(RectF scaledRectangle)
Viewport has changed, reposition the selection to the new rectangle.
void sendGraphicSelection(String type, PointF screenPosition)
Send graphic selection event to LOKitTread.
PointF mStartDragPosition
PointF convertViewPointToLayerPoint(PointF viewPoint)
A view rendered by the layer compositor.
GeckoLayerClient getLayerClient()
All possible handle positions.
Type of the selection dragging.