use of net.sf.latexdraw.view.jfx.MagneticGrid in project latexdraw by arnobl.
the class TestMagneticGrid method setUp.
@BeforeEach
void setUp() {
prefW = new SimpleDoubleProperty(100d);
prefH = new SimpleDoubleProperty(50d);
zoom = new SimpleDoubleProperty(1d);
canvas = Mockito.mock(Canvas.class);
Mockito.when(canvas.prefHeightProperty()).thenReturn(prefH);
Mockito.when(canvas.prefWidthProperty()).thenReturn(prefW);
Mockito.when(canvas.getPrefHeight()).thenReturn(50d);
Mockito.when(canvas.getPrefWidth()).thenReturn(100d);
Mockito.when(canvas.getPPCDrawing()).thenReturn(50);
Mockito.when(canvas.zoomProperty()).thenReturn(zoom);
Mockito.when(canvas.getZoom()).thenAnswer(inv -> zoom.get());
prefs = new PreferencesService();
grid = new MagneticGrid(canvas, prefs);
prefs.gridStyleProperty().set(GridStyle.STANDARD);
}
Aggregations