Search in sources :

Example 1 with DrawRequestParameter

use of com.helospark.tactview.ui.javafx.inputmode.strategy.DrawRequestParameter in project tactview by helospark.

the class InputModeRepository method updateCanvasWithStrategy.

private void updateCanvasWithStrategy(GraphicsContext graphics, MouseEvent e) {
    if (inputModeInput != null) {
        DrawRequestParameter request = DrawRequestParameter.builder().withCanvas(graphics).withWidth(uiProjectRepository.getPreviewWidth()).withHeight(uiProjectRepository.getPreviewHeight()).withMouseInCanvas(e != null).withMouseEvent(Optional.ofNullable(e)).withCanvasTranslateX(canvasStateHolder.getTranslateX()).withCanvasTranslateY(canvasStateHolder.getTranslateY()).build();
        inputModeInput.currentStrategy.draw(request);
    }
}
Also used : DrawRequestParameter(com.helospark.tactview.ui.javafx.inputmode.strategy.DrawRequestParameter)

Aggregations

DrawRequestParameter (com.helospark.tactview.ui.javafx.inputmode.strategy.DrawRequestParameter)1