Search in sources :

Example 1 with BezierDrawingRenderer

use of org.signal.imageeditor.core.renderers.BezierDrawingRenderer in project Signal-Android by WhisperSystems.

the class ImageEditorView method startADrawingSession.

private EditSession startADrawingSession(@NonNull PointF point) {
    BezierDrawingRenderer renderer = new BezierDrawingRenderer(color, thickness * Bounds.FULL_BOUNDS.width(), cap, model.findCropRelativeToRoot());
    EditorElement element = new EditorElement(renderer, mode == Mode.Blur ? EditorModel.Z_MASK : EditorModel.Z_DRAWING);
    model.addElementCentered(element, 1);
    Matrix elementInverseMatrix = model.findElementInverseMatrix(element, viewMatrix);
    return DrawingSession.start(element, renderer, elementInverseMatrix, point);
}
Also used : BezierDrawingRenderer(org.signal.imageeditor.core.renderers.BezierDrawingRenderer) Matrix(android.graphics.Matrix) EditorElement(org.signal.imageeditor.core.model.EditorElement)

Aggregations

Matrix (android.graphics.Matrix)1 EditorElement (org.signal.imageeditor.core.model.EditorElement)1 BezierDrawingRenderer (org.signal.imageeditor.core.renderers.BezierDrawingRenderer)1