target
stringlengths
20
113k
src_fm
stringlengths
11
86.3k
src_fm_fc
stringlengths
21
86.4k
src_fm_fc_co
stringlengths
30
86.4k
src_fm_fc_ms
stringlengths
42
86.8k
src_fm_fc_ms_ff
stringlengths
43
86.8k
@Test public void testDeleteChild() { WiresShapeView parent = new WiresShapeView(new MultiPath().rect(0, 0, 50, 50)); WiresShapeView child = new WiresShapeView(new MultiPath().rect(0, 0, 50, 50)); tested.deleteChild(parent, child); verify(wiresLayer, times(1)).deleteChild(eq(parent), eq(child)); }
@Override public LienzoCanvasView deleteChild(final ShapeView<?> parent, final ShapeView<?> child) { final WiresContainer parentShape = (WiresContainer) parent; final WiresShape childShape = (WiresShape) child; layer.deleteChild(parentShape, childShape); childShape.shapeMoved(); return this; }
WiresCanvasView extends LienzoCanvasView<WiresLayer> { @Override public LienzoCanvasView deleteChild(final ShapeView<?> parent, final ShapeView<?> child) { final WiresContainer parentShape = (WiresContainer) parent; final WiresShape childShape = (WiresShape) child; layer.deleteChild(parentShape, childShape); childShape.shapeMoved(); return this; } }
WiresCanvasView extends LienzoCanvasView<WiresLayer> { @Override public LienzoCanvasView deleteChild(final ShapeView<?> parent, final ShapeView<?> child) { final WiresContainer parentShape = (WiresContainer) parent; final WiresShape childShape = (WiresShape) child; layer.deleteChild(parentShape, childShape); childShape.shapeMoved(); return this; } @Inject WiresCanvasView(final WiresLayer layer); }
WiresCanvasView extends LienzoCanvasView<WiresLayer> { @Override public LienzoCanvasView deleteChild(final ShapeView<?> parent, final ShapeView<?> child) { final WiresContainer parentShape = (WiresContainer) parent; final WiresShape childShape = (WiresShape) child; layer.deleteChild(parentShape, childShape); childShape.shapeMoved(); return this; } @Inject WiresCanvasView(final WiresLayer layer); void use(final WiresManager wiresManager); @Override LienzoCanvasView<WiresLayer> add(final ShapeView<?> shape); LienzoCanvasView addRoot(final ShapeView<?> shape); @Override LienzoCanvasView<WiresLayer> delete(final ShapeView<?> shape); LienzoCanvasView deleteRoot(final ShapeView<?> shape); @Override LienzoCanvasView addChild(final ShapeView<?> parent, final ShapeView<?> child); @Override LienzoCanvasView deleteChild(final ShapeView<?> parent, final ShapeView<?> child); @Override LienzoCanvasView dock(final ShapeView<?> parent, final ShapeView<?> child); @Override LienzoCanvasView undock(final ShapeView<?> childParent, final ShapeView<?> child); @Override WiresLayer getLayer(); }
WiresCanvasView extends LienzoCanvasView<WiresLayer> { @Override public LienzoCanvasView deleteChild(final ShapeView<?> parent, final ShapeView<?> child) { final WiresContainer parentShape = (WiresContainer) parent; final WiresShape childShape = (WiresShape) child; layer.deleteChild(parentShape, childShape); childShape.shapeMoved(); return this; } @Inject WiresCanvasView(final WiresLayer layer); void use(final WiresManager wiresManager); @Override LienzoCanvasView<WiresLayer> add(final ShapeView<?> shape); LienzoCanvasView addRoot(final ShapeView<?> shape); @Override LienzoCanvasView<WiresLayer> delete(final ShapeView<?> shape); LienzoCanvasView deleteRoot(final ShapeView<?> shape); @Override LienzoCanvasView addChild(final ShapeView<?> parent, final ShapeView<?> child); @Override LienzoCanvasView deleteChild(final ShapeView<?> parent, final ShapeView<?> child); @Override LienzoCanvasView dock(final ShapeView<?> parent, final ShapeView<?> child); @Override LienzoCanvasView undock(final ShapeView<?> childParent, final ShapeView<?> child); @Override WiresLayer getLayer(); }
@Test public void testDock() { WiresShapeView parent = new WiresShapeView(new MultiPath().rect(0, 0, 50, 50)); WiresShapeView child = new WiresShapeView(new MultiPath().rect(0, 0, 50, 50)); tested.dock(parent, child); verify(wiresLayer, times(1)).dock(eq(parent), eq(child)); }
@Override public LienzoCanvasView dock(final ShapeView<?> parent, final ShapeView<?> child) { final WiresContainer parentShape = (WiresContainer) parent; final WiresShape childShape = (WiresShape) child; layer.dock(parentShape, childShape); childShape.shapeMoved(); return this; }
WiresCanvasView extends LienzoCanvasView<WiresLayer> { @Override public LienzoCanvasView dock(final ShapeView<?> parent, final ShapeView<?> child) { final WiresContainer parentShape = (WiresContainer) parent; final WiresShape childShape = (WiresShape) child; layer.dock(parentShape, childShape); childShape.shapeMoved(); return this; } }
WiresCanvasView extends LienzoCanvasView<WiresLayer> { @Override public LienzoCanvasView dock(final ShapeView<?> parent, final ShapeView<?> child) { final WiresContainer parentShape = (WiresContainer) parent; final WiresShape childShape = (WiresShape) child; layer.dock(parentShape, childShape); childShape.shapeMoved(); return this; } @Inject WiresCanvasView(final WiresLayer layer); }
WiresCanvasView extends LienzoCanvasView<WiresLayer> { @Override public LienzoCanvasView dock(final ShapeView<?> parent, final ShapeView<?> child) { final WiresContainer parentShape = (WiresContainer) parent; final WiresShape childShape = (WiresShape) child; layer.dock(parentShape, childShape); childShape.shapeMoved(); return this; } @Inject WiresCanvasView(final WiresLayer layer); void use(final WiresManager wiresManager); @Override LienzoCanvasView<WiresLayer> add(final ShapeView<?> shape); LienzoCanvasView addRoot(final ShapeView<?> shape); @Override LienzoCanvasView<WiresLayer> delete(final ShapeView<?> shape); LienzoCanvasView deleteRoot(final ShapeView<?> shape); @Override LienzoCanvasView addChild(final ShapeView<?> parent, final ShapeView<?> child); @Override LienzoCanvasView deleteChild(final ShapeView<?> parent, final ShapeView<?> child); @Override LienzoCanvasView dock(final ShapeView<?> parent, final ShapeView<?> child); @Override LienzoCanvasView undock(final ShapeView<?> childParent, final ShapeView<?> child); @Override WiresLayer getLayer(); }
WiresCanvasView extends LienzoCanvasView<WiresLayer> { @Override public LienzoCanvasView dock(final ShapeView<?> parent, final ShapeView<?> child) { final WiresContainer parentShape = (WiresContainer) parent; final WiresShape childShape = (WiresShape) child; layer.dock(parentShape, childShape); childShape.shapeMoved(); return this; } @Inject WiresCanvasView(final WiresLayer layer); void use(final WiresManager wiresManager); @Override LienzoCanvasView<WiresLayer> add(final ShapeView<?> shape); LienzoCanvasView addRoot(final ShapeView<?> shape); @Override LienzoCanvasView<WiresLayer> delete(final ShapeView<?> shape); LienzoCanvasView deleteRoot(final ShapeView<?> shape); @Override LienzoCanvasView addChild(final ShapeView<?> parent, final ShapeView<?> child); @Override LienzoCanvasView deleteChild(final ShapeView<?> parent, final ShapeView<?> child); @Override LienzoCanvasView dock(final ShapeView<?> parent, final ShapeView<?> child); @Override LienzoCanvasView undock(final ShapeView<?> childParent, final ShapeView<?> child); @Override WiresLayer getLayer(); }
@Test public void testUnDock() { WiresShapeView parent = new WiresShapeView(new MultiPath().rect(0, 0, 50, 50)); WiresShapeView child = new WiresShapeView(new MultiPath().rect(0, 0, 50, 50)); tested.undock(parent, child); verify(wiresLayer, times(1)).undock(eq(child)); }
@Override public LienzoCanvasView undock(final ShapeView<?> childParent, final ShapeView<?> child) { final WiresShape childShape = (WiresShape) child; layer.undock(childShape); childShape.shapeMoved(); return this; }
WiresCanvasView extends LienzoCanvasView<WiresLayer> { @Override public LienzoCanvasView undock(final ShapeView<?> childParent, final ShapeView<?> child) { final WiresShape childShape = (WiresShape) child; layer.undock(childShape); childShape.shapeMoved(); return this; } }
WiresCanvasView extends LienzoCanvasView<WiresLayer> { @Override public LienzoCanvasView undock(final ShapeView<?> childParent, final ShapeView<?> child) { final WiresShape childShape = (WiresShape) child; layer.undock(childShape); childShape.shapeMoved(); return this; } @Inject WiresCanvasView(final WiresLayer layer); }
WiresCanvasView extends LienzoCanvasView<WiresLayer> { @Override public LienzoCanvasView undock(final ShapeView<?> childParent, final ShapeView<?> child) { final WiresShape childShape = (WiresShape) child; layer.undock(childShape); childShape.shapeMoved(); return this; } @Inject WiresCanvasView(final WiresLayer layer); void use(final WiresManager wiresManager); @Override LienzoCanvasView<WiresLayer> add(final ShapeView<?> shape); LienzoCanvasView addRoot(final ShapeView<?> shape); @Override LienzoCanvasView<WiresLayer> delete(final ShapeView<?> shape); LienzoCanvasView deleteRoot(final ShapeView<?> shape); @Override LienzoCanvasView addChild(final ShapeView<?> parent, final ShapeView<?> child); @Override LienzoCanvasView deleteChild(final ShapeView<?> parent, final ShapeView<?> child); @Override LienzoCanvasView dock(final ShapeView<?> parent, final ShapeView<?> child); @Override LienzoCanvasView undock(final ShapeView<?> childParent, final ShapeView<?> child); @Override WiresLayer getLayer(); }
WiresCanvasView extends LienzoCanvasView<WiresLayer> { @Override public LienzoCanvasView undock(final ShapeView<?> childParent, final ShapeView<?> child) { final WiresShape childShape = (WiresShape) child; layer.undock(childShape); childShape.shapeMoved(); return this; } @Inject WiresCanvasView(final WiresLayer layer); void use(final WiresManager wiresManager); @Override LienzoCanvasView<WiresLayer> add(final ShapeView<?> shape); LienzoCanvasView addRoot(final ShapeView<?> shape); @Override LienzoCanvasView<WiresLayer> delete(final ShapeView<?> shape); LienzoCanvasView deleteRoot(final ShapeView<?> shape); @Override LienzoCanvasView addChild(final ShapeView<?> parent, final ShapeView<?> child); @Override LienzoCanvasView deleteChild(final ShapeView<?> parent, final ShapeView<?> child); @Override LienzoCanvasView dock(final ShapeView<?> parent, final ShapeView<?> child); @Override LienzoCanvasView undock(final ShapeView<?> childParent, final ShapeView<?> child); @Override WiresLayer getLayer(); }
@Test public void testGetView() { assertEquals(view, tested.getView()); }
@Override public WiresCanvasView getView() { return view; }
WiresCanvas extends LienzoCanvas<WiresCanvasView> { @Override public WiresCanvasView getView() { return view; } }
WiresCanvas extends LienzoCanvas<WiresCanvasView> { @Override public WiresCanvasView getView() { return view; } @Inject WiresCanvas(final Event<CanvasClearEvent> canvasClearEvent, final Event<CanvasShapeAddedEvent> canvasShapeAddedEvent, final Event<CanvasShapeRemovedEvent> canvasShapeRemovedEvent, final Event<CanvasDrawnEvent> canvasDrawnEvent, final Event<CanvasFocusedEvent> canvasFocusedEvent, final @Default WiresManagerFactory wiresManagerFactory, final WiresCanvasView view); }
WiresCanvas extends LienzoCanvas<WiresCanvasView> { @Override public WiresCanvasView getView() { return view; } @Inject WiresCanvas(final Event<CanvasClearEvent> canvasClearEvent, final Event<CanvasShapeAddedEvent> canvasShapeAddedEvent, final Event<CanvasShapeRemovedEvent> canvasShapeRemovedEvent, final Event<CanvasDrawnEvent> canvasDrawnEvent, final Event<CanvasFocusedEvent> canvasFocusedEvent, final @Default WiresManagerFactory wiresManagerFactory, final WiresCanvasView view); @Override AbstractCanvas<WiresCanvasView> initialize(final CanvasPanel panel, final CanvasSettings settings); @Override WiresCanvasView getView(); WiresManager getWiresManager(); }
WiresCanvas extends LienzoCanvas<WiresCanvasView> { @Override public WiresCanvasView getView() { return view; } @Inject WiresCanvas(final Event<CanvasClearEvent> canvasClearEvent, final Event<CanvasShapeAddedEvent> canvasShapeAddedEvent, final Event<CanvasShapeRemovedEvent> canvasShapeRemovedEvent, final Event<CanvasDrawnEvent> canvasDrawnEvent, final Event<CanvasFocusedEvent> canvasFocusedEvent, final @Default WiresManagerFactory wiresManagerFactory, final WiresCanvasView view); @Override AbstractCanvas<WiresCanvasView> initialize(final CanvasPanel panel, final CanvasSettings settings); @Override WiresCanvasView getView(); WiresManager getWiresManager(); static final String WIRES_CANVAS_GROUP_ID; }
@Test public void testInitialize() { CanvasPanel panel = mock(CanvasPanel.class); CanvasSettings settings = mock(CanvasSettings.class); assertEquals(tested, tested.initialize(panel, settings)); verify(wiresManager, times(1)).setSpliceEnabled(eq(false)); verify(wiresManager, times(1)).setLocationAcceptor(eq(ILocationAcceptor.NONE)); verify(wiresManager, times(1)).setContainmentAcceptor(eq(IContainmentAcceptor.NONE)); verify(wiresManager, times(1)).setDockingAcceptor(eq(IDockingAcceptor.NONE)); verify(wiresManager, times(1)).setConnectionAcceptor(eq(IConnectionAcceptor.NONE)); verify(wiresManager, times(1)).setControlPointsAcceptor(eq(IControlPointsAcceptor.NONE)); verify(view, times(1)).use(eq(wiresManager)); verify(view, times(1)).initialize(eq(panel), eq(settings)); assertEquals(wiresManager, tested.getWiresManager()); }
@Override public AbstractCanvas<WiresCanvasView> initialize(final CanvasPanel panel, final CanvasSettings settings) { super.initialize(panel, settings); final WiresLayer layer = getView().getLayer(); wiresManager = wiresManagerFactory.newWiresManager(layer.getLienzoLayer()); wiresManager.setSpliceEnabled(false); wiresManager.setLocationAcceptor(ILocationAcceptor.NONE); wiresManager.setContainmentAcceptor(IContainmentAcceptor.NONE); wiresManager.setDockingAcceptor(IDockingAcceptor.NONE); wiresManager.setConnectionAcceptor(IConnectionAcceptor.NONE); wiresManager.setControlPointsAcceptor(IControlPointsAcceptor.NONE); view.use(wiresManager); return this; }
WiresCanvas extends LienzoCanvas<WiresCanvasView> { @Override public AbstractCanvas<WiresCanvasView> initialize(final CanvasPanel panel, final CanvasSettings settings) { super.initialize(panel, settings); final WiresLayer layer = getView().getLayer(); wiresManager = wiresManagerFactory.newWiresManager(layer.getLienzoLayer()); wiresManager.setSpliceEnabled(false); wiresManager.setLocationAcceptor(ILocationAcceptor.NONE); wiresManager.setContainmentAcceptor(IContainmentAcceptor.NONE); wiresManager.setDockingAcceptor(IDockingAcceptor.NONE); wiresManager.setConnectionAcceptor(IConnectionAcceptor.NONE); wiresManager.setControlPointsAcceptor(IControlPointsAcceptor.NONE); view.use(wiresManager); return this; } }
WiresCanvas extends LienzoCanvas<WiresCanvasView> { @Override public AbstractCanvas<WiresCanvasView> initialize(final CanvasPanel panel, final CanvasSettings settings) { super.initialize(panel, settings); final WiresLayer layer = getView().getLayer(); wiresManager = wiresManagerFactory.newWiresManager(layer.getLienzoLayer()); wiresManager.setSpliceEnabled(false); wiresManager.setLocationAcceptor(ILocationAcceptor.NONE); wiresManager.setContainmentAcceptor(IContainmentAcceptor.NONE); wiresManager.setDockingAcceptor(IDockingAcceptor.NONE); wiresManager.setConnectionAcceptor(IConnectionAcceptor.NONE); wiresManager.setControlPointsAcceptor(IControlPointsAcceptor.NONE); view.use(wiresManager); return this; } @Inject WiresCanvas(final Event<CanvasClearEvent> canvasClearEvent, final Event<CanvasShapeAddedEvent> canvasShapeAddedEvent, final Event<CanvasShapeRemovedEvent> canvasShapeRemovedEvent, final Event<CanvasDrawnEvent> canvasDrawnEvent, final Event<CanvasFocusedEvent> canvasFocusedEvent, final @Default WiresManagerFactory wiresManagerFactory, final WiresCanvasView view); }
WiresCanvas extends LienzoCanvas<WiresCanvasView> { @Override public AbstractCanvas<WiresCanvasView> initialize(final CanvasPanel panel, final CanvasSettings settings) { super.initialize(panel, settings); final WiresLayer layer = getView().getLayer(); wiresManager = wiresManagerFactory.newWiresManager(layer.getLienzoLayer()); wiresManager.setSpliceEnabled(false); wiresManager.setLocationAcceptor(ILocationAcceptor.NONE); wiresManager.setContainmentAcceptor(IContainmentAcceptor.NONE); wiresManager.setDockingAcceptor(IDockingAcceptor.NONE); wiresManager.setConnectionAcceptor(IConnectionAcceptor.NONE); wiresManager.setControlPointsAcceptor(IControlPointsAcceptor.NONE); view.use(wiresManager); return this; } @Inject WiresCanvas(final Event<CanvasClearEvent> canvasClearEvent, final Event<CanvasShapeAddedEvent> canvasShapeAddedEvent, final Event<CanvasShapeRemovedEvent> canvasShapeRemovedEvent, final Event<CanvasDrawnEvent> canvasDrawnEvent, final Event<CanvasFocusedEvent> canvasFocusedEvent, final @Default WiresManagerFactory wiresManagerFactory, final WiresCanvasView view); @Override AbstractCanvas<WiresCanvasView> initialize(final CanvasPanel panel, final CanvasSettings settings); @Override WiresCanvasView getView(); WiresManager getWiresManager(); }
WiresCanvas extends LienzoCanvas<WiresCanvasView> { @Override public AbstractCanvas<WiresCanvasView> initialize(final CanvasPanel panel, final CanvasSettings settings) { super.initialize(panel, settings); final WiresLayer layer = getView().getLayer(); wiresManager = wiresManagerFactory.newWiresManager(layer.getLienzoLayer()); wiresManager.setSpliceEnabled(false); wiresManager.setLocationAcceptor(ILocationAcceptor.NONE); wiresManager.setContainmentAcceptor(IContainmentAcceptor.NONE); wiresManager.setDockingAcceptor(IDockingAcceptor.NONE); wiresManager.setConnectionAcceptor(IConnectionAcceptor.NONE); wiresManager.setControlPointsAcceptor(IControlPointsAcceptor.NONE); view.use(wiresManager); return this; } @Inject WiresCanvas(final Event<CanvasClearEvent> canvasClearEvent, final Event<CanvasShapeAddedEvent> canvasShapeAddedEvent, final Event<CanvasShapeRemovedEvent> canvasShapeRemovedEvent, final Event<CanvasDrawnEvent> canvasDrawnEvent, final Event<CanvasFocusedEvent> canvasFocusedEvent, final @Default WiresManagerFactory wiresManagerFactory, final WiresCanvasView view); @Override AbstractCanvas<WiresCanvasView> initialize(final CanvasPanel panel, final CanvasSettings settings); @Override WiresCanvasView getView(); WiresManager getWiresManager(); static final String WIRES_CANVAS_GROUP_ID; }
@Test public void testAddChild() { Shape shape = mock(Shape.class); ShapeView shapeView = mock(ShapeView.class); when(shape.getShapeView()).thenReturn(shapeView); tested.addChild(shape); verify(view, times(1)).addRoot(eq(shapeView)); }
@Override protected void addChild(final Shape shape) { getView().addRoot(shape.getShapeView()); }
WiresCanvas extends LienzoCanvas<WiresCanvasView> { @Override protected void addChild(final Shape shape) { getView().addRoot(shape.getShapeView()); } }
WiresCanvas extends LienzoCanvas<WiresCanvasView> { @Override protected void addChild(final Shape shape) { getView().addRoot(shape.getShapeView()); } @Inject WiresCanvas(final Event<CanvasClearEvent> canvasClearEvent, final Event<CanvasShapeAddedEvent> canvasShapeAddedEvent, final Event<CanvasShapeRemovedEvent> canvasShapeRemovedEvent, final Event<CanvasDrawnEvent> canvasDrawnEvent, final Event<CanvasFocusedEvent> canvasFocusedEvent, final @Default WiresManagerFactory wiresManagerFactory, final WiresCanvasView view); }
WiresCanvas extends LienzoCanvas<WiresCanvasView> { @Override protected void addChild(final Shape shape) { getView().addRoot(shape.getShapeView()); } @Inject WiresCanvas(final Event<CanvasClearEvent> canvasClearEvent, final Event<CanvasShapeAddedEvent> canvasShapeAddedEvent, final Event<CanvasShapeRemovedEvent> canvasShapeRemovedEvent, final Event<CanvasDrawnEvent> canvasDrawnEvent, final Event<CanvasFocusedEvent> canvasFocusedEvent, final @Default WiresManagerFactory wiresManagerFactory, final WiresCanvasView view); @Override AbstractCanvas<WiresCanvasView> initialize(final CanvasPanel panel, final CanvasSettings settings); @Override WiresCanvasView getView(); WiresManager getWiresManager(); }
WiresCanvas extends LienzoCanvas<WiresCanvasView> { @Override protected void addChild(final Shape shape) { getView().addRoot(shape.getShapeView()); } @Inject WiresCanvas(final Event<CanvasClearEvent> canvasClearEvent, final Event<CanvasShapeAddedEvent> canvasShapeAddedEvent, final Event<CanvasShapeRemovedEvent> canvasShapeRemovedEvent, final Event<CanvasDrawnEvent> canvasDrawnEvent, final Event<CanvasFocusedEvent> canvasFocusedEvent, final @Default WiresManagerFactory wiresManagerFactory, final WiresCanvasView view); @Override AbstractCanvas<WiresCanvasView> initialize(final CanvasPanel panel, final CanvasSettings settings); @Override WiresCanvasView getView(); WiresManager getWiresManager(); static final String WIRES_CANVAS_GROUP_ID; }
@Test public void testDeleteChild() { Shape shape = mock(Shape.class); ShapeView shapeView = mock(ShapeView.class); when(shape.getShapeView()).thenReturn(shapeView); tested.deleteChild(shape); verify(view, times(1)).deleteRoot(eq(shapeView)); }
@Override protected void deleteChild(final Shape shape) { getView().deleteRoot(shape.getShapeView()); }
WiresCanvas extends LienzoCanvas<WiresCanvasView> { @Override protected void deleteChild(final Shape shape) { getView().deleteRoot(shape.getShapeView()); } }
WiresCanvas extends LienzoCanvas<WiresCanvasView> { @Override protected void deleteChild(final Shape shape) { getView().deleteRoot(shape.getShapeView()); } @Inject WiresCanvas(final Event<CanvasClearEvent> canvasClearEvent, final Event<CanvasShapeAddedEvent> canvasShapeAddedEvent, final Event<CanvasShapeRemovedEvent> canvasShapeRemovedEvent, final Event<CanvasDrawnEvent> canvasDrawnEvent, final Event<CanvasFocusedEvent> canvasFocusedEvent, final @Default WiresManagerFactory wiresManagerFactory, final WiresCanvasView view); }
WiresCanvas extends LienzoCanvas<WiresCanvasView> { @Override protected void deleteChild(final Shape shape) { getView().deleteRoot(shape.getShapeView()); } @Inject WiresCanvas(final Event<CanvasClearEvent> canvasClearEvent, final Event<CanvasShapeAddedEvent> canvasShapeAddedEvent, final Event<CanvasShapeRemovedEvent> canvasShapeRemovedEvent, final Event<CanvasDrawnEvent> canvasDrawnEvent, final Event<CanvasFocusedEvent> canvasFocusedEvent, final @Default WiresManagerFactory wiresManagerFactory, final WiresCanvasView view); @Override AbstractCanvas<WiresCanvasView> initialize(final CanvasPanel panel, final CanvasSettings settings); @Override WiresCanvasView getView(); WiresManager getWiresManager(); }
WiresCanvas extends LienzoCanvas<WiresCanvasView> { @Override protected void deleteChild(final Shape shape) { getView().deleteRoot(shape.getShapeView()); } @Inject WiresCanvas(final Event<CanvasClearEvent> canvasClearEvent, final Event<CanvasShapeAddedEvent> canvasShapeAddedEvent, final Event<CanvasShapeRemovedEvent> canvasShapeRemovedEvent, final Event<CanvasDrawnEvent> canvasDrawnEvent, final Event<CanvasFocusedEvent> canvasFocusedEvent, final @Default WiresManagerFactory wiresManagerFactory, final WiresCanvasView view); @Override AbstractCanvas<WiresCanvasView> initialize(final CanvasPanel panel, final CanvasSettings settings); @Override WiresCanvasView getView(); WiresManager getWiresManager(); static final String WIRES_CANVAS_GROUP_ID; }
@Test public void testAddShape() { tested.add(shape); verify(wiresManager, times(1)).register(eq(shape)); verify(magnetManager, times(1)).createMagnets(eq(shape), eq(WiresLayer.MAGNET_CARDINALS)); }
public LienzoLayer add(final WiresShape wiresShape) { if (contains(wiresShape)) { LOGGER.log(Level.WARNING, "Cannot add a WiresShape into the WiresLayer twice!"); } else { wiresManager.register(wiresShape); wiresManager.getMagnetManager().createMagnets(wiresShape, MAGNET_CARDINALS); WiresUtils.assertShapeGroup(wiresShape.getGroup(), WiresCanvas.WIRES_CANVAS_GROUP_ID); } return this; }
WiresLayer extends LienzoLayer { public LienzoLayer add(final WiresShape wiresShape) { if (contains(wiresShape)) { LOGGER.log(Level.WARNING, "Cannot add a WiresShape into the WiresLayer twice!"); } else { wiresManager.register(wiresShape); wiresManager.getMagnetManager().createMagnets(wiresShape, MAGNET_CARDINALS); WiresUtils.assertShapeGroup(wiresShape.getGroup(), WiresCanvas.WIRES_CANVAS_GROUP_ID); } return this; } }
WiresLayer extends LienzoLayer { public LienzoLayer add(final WiresShape wiresShape) { if (contains(wiresShape)) { LOGGER.log(Level.WARNING, "Cannot add a WiresShape into the WiresLayer twice!"); } else { wiresManager.register(wiresShape); wiresManager.getMagnetManager().createMagnets(wiresShape, MAGNET_CARDINALS); WiresUtils.assertShapeGroup(wiresShape.getGroup(), WiresCanvas.WIRES_CANVAS_GROUP_ID); } return this; } }
WiresLayer extends LienzoLayer { public LienzoLayer add(final WiresShape wiresShape) { if (contains(wiresShape)) { LOGGER.log(Level.WARNING, "Cannot add a WiresShape into the WiresLayer twice!"); } else { wiresManager.register(wiresShape); wiresManager.getMagnetManager().createMagnets(wiresShape, MAGNET_CARDINALS); WiresUtils.assertShapeGroup(wiresShape.getGroup(), WiresCanvas.WIRES_CANVAS_GROUP_ID); } return this; } WiresLayer use(final WiresManager wiresManager); LienzoLayer add(final WiresShape wiresShape); LienzoLayer add(final WiresConnector wiresConnector); LienzoLayer delete(final WiresShape wiresShape); LienzoLayer delete(final WiresConnector wiresConnector); WiresLayer addChild(final WiresContainer parent, final WiresShape child); WiresLayer deleteChild(final WiresContainer parent, final WiresShape child); WiresLayer dock(final WiresContainer parent, final WiresShape child); WiresLayer undock(final WiresShape child); WiresManager getWiresManager(); @Override void destroy(); }
WiresLayer extends LienzoLayer { public LienzoLayer add(final WiresShape wiresShape) { if (contains(wiresShape)) { LOGGER.log(Level.WARNING, "Cannot add a WiresShape into the WiresLayer twice!"); } else { wiresManager.register(wiresShape); wiresManager.getMagnetManager().createMagnets(wiresShape, MAGNET_CARDINALS); WiresUtils.assertShapeGroup(wiresShape.getGroup(), WiresCanvas.WIRES_CANVAS_GROUP_ID); } return this; } WiresLayer use(final WiresManager wiresManager); LienzoLayer add(final WiresShape wiresShape); LienzoLayer add(final WiresConnector wiresConnector); LienzoLayer delete(final WiresShape wiresShape); LienzoLayer delete(final WiresConnector wiresConnector); WiresLayer addChild(final WiresContainer parent, final WiresShape child); WiresLayer deleteChild(final WiresContainer parent, final WiresShape child); WiresLayer dock(final WiresContainer parent, final WiresShape child); WiresLayer undock(final WiresShape child); WiresManager getWiresManager(); @Override void destroy(); }
@Test public void wbFromDMN_PMMLImportNoPmmlModelMetadata() { when(jsitImportMock.getImportType()).thenReturn(PMML_IMPORT_TYPE); pmmlDocumentMetadata.getModels().add(new PMMLModelMetadata("modelName", null)); Import resultImport = ImportConverter.wbFromDMN(jsitImportMock, null, null); assertTrue(resultImport instanceof ImportPMML); assertEquals(LOCATION_URI, resultImport.getLocationURI().getValue()); assertEquals(NAME, resultImport.getNamespace()); assertEquals(DESCRIPTION, resultImport.getDescription().getValue()); assertEquals(NAME, resultImport.getName().getValue()); assertEquals(PMML_IMPORT_TYPE, resultImport.getImportType()); assertNotNull(resultImport.getId().getValue()); assertEquals(0, ((ImportPMML) resultImport).getModelCount()); }
public static Import wbFromDMN(final JSITImport dmn, final JSITDefinitions definitions, final PMMLDocumentMetadata pmmlDocument) { final Import result = createWBImport(dmn, definitions, pmmlDocument); final Map<QName, String> additionalAttributes = new HashMap<>(); final Map<javax.xml.namespace.QName, String> otherAttributes = JSITUnaryTests.getOtherAttributesMap(dmn); for (Map.Entry<javax.xml.namespace.QName, String> entry : otherAttributes.entrySet()) { additionalAttributes.put(QNamePropertyConverter.wbFromDMN(entry.getKey().toString()), entry.getValue()); } result.setAdditionalAttributes(additionalAttributes); final String name = dmn.getName(); final String description = dmn.getDescription(); result.setId(IdPropertyConverter.wbFromDMN(dmn.getId())); result.setName(new Name(name)); result.setDescription(DescriptionPropertyConverter.wbFromDMN(description)); NameSpaceUtils.extractNamespacesKeyedByPrefix(dmn).forEach((key, value) -> result.getNsContext().put(key, value)); return result; }
ImportConverter { public static Import wbFromDMN(final JSITImport dmn, final JSITDefinitions definitions, final PMMLDocumentMetadata pmmlDocument) { final Import result = createWBImport(dmn, definitions, pmmlDocument); final Map<QName, String> additionalAttributes = new HashMap<>(); final Map<javax.xml.namespace.QName, String> otherAttributes = JSITUnaryTests.getOtherAttributesMap(dmn); for (Map.Entry<javax.xml.namespace.QName, String> entry : otherAttributes.entrySet()) { additionalAttributes.put(QNamePropertyConverter.wbFromDMN(entry.getKey().toString()), entry.getValue()); } result.setAdditionalAttributes(additionalAttributes); final String name = dmn.getName(); final String description = dmn.getDescription(); result.setId(IdPropertyConverter.wbFromDMN(dmn.getId())); result.setName(new Name(name)); result.setDescription(DescriptionPropertyConverter.wbFromDMN(description)); NameSpaceUtils.extractNamespacesKeyedByPrefix(dmn).forEach((key, value) -> result.getNsContext().put(key, value)); return result; } }
ImportConverter { public static Import wbFromDMN(final JSITImport dmn, final JSITDefinitions definitions, final PMMLDocumentMetadata pmmlDocument) { final Import result = createWBImport(dmn, definitions, pmmlDocument); final Map<QName, String> additionalAttributes = new HashMap<>(); final Map<javax.xml.namespace.QName, String> otherAttributes = JSITUnaryTests.getOtherAttributesMap(dmn); for (Map.Entry<javax.xml.namespace.QName, String> entry : otherAttributes.entrySet()) { additionalAttributes.put(QNamePropertyConverter.wbFromDMN(entry.getKey().toString()), entry.getValue()); } result.setAdditionalAttributes(additionalAttributes); final String name = dmn.getName(); final String description = dmn.getDescription(); result.setId(IdPropertyConverter.wbFromDMN(dmn.getId())); result.setName(new Name(name)); result.setDescription(DescriptionPropertyConverter.wbFromDMN(description)); NameSpaceUtils.extractNamespacesKeyedByPrefix(dmn).forEach((key, value) -> result.getNsContext().put(key, value)); return result; } }
ImportConverter { public static Import wbFromDMN(final JSITImport dmn, final JSITDefinitions definitions, final PMMLDocumentMetadata pmmlDocument) { final Import result = createWBImport(dmn, definitions, pmmlDocument); final Map<QName, String> additionalAttributes = new HashMap<>(); final Map<javax.xml.namespace.QName, String> otherAttributes = JSITUnaryTests.getOtherAttributesMap(dmn); for (Map.Entry<javax.xml.namespace.QName, String> entry : otherAttributes.entrySet()) { additionalAttributes.put(QNamePropertyConverter.wbFromDMN(entry.getKey().toString()), entry.getValue()); } result.setAdditionalAttributes(additionalAttributes); final String name = dmn.getName(); final String description = dmn.getDescription(); result.setId(IdPropertyConverter.wbFromDMN(dmn.getId())); result.setName(new Name(name)); result.setDescription(DescriptionPropertyConverter.wbFromDMN(description)); NameSpaceUtils.extractNamespacesKeyedByPrefix(dmn).forEach((key, value) -> result.getNsContext().put(key, value)); return result; } static Import wbFromDMN(final JSITImport dmn, final JSITDefinitions definitions, final PMMLDocumentMetadata pmmlDocument); }
ImportConverter { public static Import wbFromDMN(final JSITImport dmn, final JSITDefinitions definitions, final PMMLDocumentMetadata pmmlDocument) { final Import result = createWBImport(dmn, definitions, pmmlDocument); final Map<QName, String> additionalAttributes = new HashMap<>(); final Map<javax.xml.namespace.QName, String> otherAttributes = JSITUnaryTests.getOtherAttributesMap(dmn); for (Map.Entry<javax.xml.namespace.QName, String> entry : otherAttributes.entrySet()) { additionalAttributes.put(QNamePropertyConverter.wbFromDMN(entry.getKey().toString()), entry.getValue()); } result.setAdditionalAttributes(additionalAttributes); final String name = dmn.getName(); final String description = dmn.getDescription(); result.setId(IdPropertyConverter.wbFromDMN(dmn.getId())); result.setName(new Name(name)); result.setDescription(DescriptionPropertyConverter.wbFromDMN(description)); NameSpaceUtils.extractNamespacesKeyedByPrefix(dmn).forEach((key, value) -> result.getNsContext().put(key, value)); return result; } static Import wbFromDMN(final JSITImport dmn, final JSITDefinitions definitions, final PMMLDocumentMetadata pmmlDocument); }
@Test public void testAddShapeTwice() { when(wiresManager.getShape(eq(SHAPE_UUID))).thenReturn(shape); tested.add(shape); verify(wiresManager, never()).register(eq(shape)); verify(magnetManager, never()).createMagnets(eq(shape), eq(WiresLayer.MAGNET_CARDINALS)); }
public LienzoLayer add(final WiresShape wiresShape) { if (contains(wiresShape)) { LOGGER.log(Level.WARNING, "Cannot add a WiresShape into the WiresLayer twice!"); } else { wiresManager.register(wiresShape); wiresManager.getMagnetManager().createMagnets(wiresShape, MAGNET_CARDINALS); WiresUtils.assertShapeGroup(wiresShape.getGroup(), WiresCanvas.WIRES_CANVAS_GROUP_ID); } return this; }
WiresLayer extends LienzoLayer { public LienzoLayer add(final WiresShape wiresShape) { if (contains(wiresShape)) { LOGGER.log(Level.WARNING, "Cannot add a WiresShape into the WiresLayer twice!"); } else { wiresManager.register(wiresShape); wiresManager.getMagnetManager().createMagnets(wiresShape, MAGNET_CARDINALS); WiresUtils.assertShapeGroup(wiresShape.getGroup(), WiresCanvas.WIRES_CANVAS_GROUP_ID); } return this; } }
WiresLayer extends LienzoLayer { public LienzoLayer add(final WiresShape wiresShape) { if (contains(wiresShape)) { LOGGER.log(Level.WARNING, "Cannot add a WiresShape into the WiresLayer twice!"); } else { wiresManager.register(wiresShape); wiresManager.getMagnetManager().createMagnets(wiresShape, MAGNET_CARDINALS); WiresUtils.assertShapeGroup(wiresShape.getGroup(), WiresCanvas.WIRES_CANVAS_GROUP_ID); } return this; } }
WiresLayer extends LienzoLayer { public LienzoLayer add(final WiresShape wiresShape) { if (contains(wiresShape)) { LOGGER.log(Level.WARNING, "Cannot add a WiresShape into the WiresLayer twice!"); } else { wiresManager.register(wiresShape); wiresManager.getMagnetManager().createMagnets(wiresShape, MAGNET_CARDINALS); WiresUtils.assertShapeGroup(wiresShape.getGroup(), WiresCanvas.WIRES_CANVAS_GROUP_ID); } return this; } WiresLayer use(final WiresManager wiresManager); LienzoLayer add(final WiresShape wiresShape); LienzoLayer add(final WiresConnector wiresConnector); LienzoLayer delete(final WiresShape wiresShape); LienzoLayer delete(final WiresConnector wiresConnector); WiresLayer addChild(final WiresContainer parent, final WiresShape child); WiresLayer deleteChild(final WiresContainer parent, final WiresShape child); WiresLayer dock(final WiresContainer parent, final WiresShape child); WiresLayer undock(final WiresShape child); WiresManager getWiresManager(); @Override void destroy(); }
WiresLayer extends LienzoLayer { public LienzoLayer add(final WiresShape wiresShape) { if (contains(wiresShape)) { LOGGER.log(Level.WARNING, "Cannot add a WiresShape into the WiresLayer twice!"); } else { wiresManager.register(wiresShape); wiresManager.getMagnetManager().createMagnets(wiresShape, MAGNET_CARDINALS); WiresUtils.assertShapeGroup(wiresShape.getGroup(), WiresCanvas.WIRES_CANVAS_GROUP_ID); } return this; } WiresLayer use(final WiresManager wiresManager); LienzoLayer add(final WiresShape wiresShape); LienzoLayer add(final WiresConnector wiresConnector); LienzoLayer delete(final WiresShape wiresShape); LienzoLayer delete(final WiresConnector wiresConnector); WiresLayer addChild(final WiresContainer parent, final WiresShape child); WiresLayer deleteChild(final WiresContainer parent, final WiresShape child); WiresLayer dock(final WiresContainer parent, final WiresShape child); WiresLayer undock(final WiresShape child); WiresManager getWiresManager(); @Override void destroy(); }
@Test public void testDeleteShape() { tested.delete(shape); verify(wiresManager, times(1)).deregister(eq(shape)); }
public LienzoLayer delete(final WiresShape wiresShape) { wiresManager.deregister(wiresShape); return this; }
WiresLayer extends LienzoLayer { public LienzoLayer delete(final WiresShape wiresShape) { wiresManager.deregister(wiresShape); return this; } }
WiresLayer extends LienzoLayer { public LienzoLayer delete(final WiresShape wiresShape) { wiresManager.deregister(wiresShape); return this; } }
WiresLayer extends LienzoLayer { public LienzoLayer delete(final WiresShape wiresShape) { wiresManager.deregister(wiresShape); return this; } WiresLayer use(final WiresManager wiresManager); LienzoLayer add(final WiresShape wiresShape); LienzoLayer add(final WiresConnector wiresConnector); LienzoLayer delete(final WiresShape wiresShape); LienzoLayer delete(final WiresConnector wiresConnector); WiresLayer addChild(final WiresContainer parent, final WiresShape child); WiresLayer deleteChild(final WiresContainer parent, final WiresShape child); WiresLayer dock(final WiresContainer parent, final WiresShape child); WiresLayer undock(final WiresShape child); WiresManager getWiresManager(); @Override void destroy(); }
WiresLayer extends LienzoLayer { public LienzoLayer delete(final WiresShape wiresShape) { wiresManager.deregister(wiresShape); return this; } WiresLayer use(final WiresManager wiresManager); LienzoLayer add(final WiresShape wiresShape); LienzoLayer add(final WiresConnector wiresConnector); LienzoLayer delete(final WiresShape wiresShape); LienzoLayer delete(final WiresConnector wiresConnector); WiresLayer addChild(final WiresContainer parent, final WiresShape child); WiresLayer deleteChild(final WiresContainer parent, final WiresShape child); WiresLayer dock(final WiresContainer parent, final WiresShape child); WiresLayer undock(final WiresShape child); WiresManager getWiresManager(); @Override void destroy(); }
@Test public void testAddconnector() { tested.add(connector); verify(wiresManager, times(1)).register(eq(connector)); }
public LienzoLayer add(final WiresShape wiresShape) { if (contains(wiresShape)) { LOGGER.log(Level.WARNING, "Cannot add a WiresShape into the WiresLayer twice!"); } else { wiresManager.register(wiresShape); wiresManager.getMagnetManager().createMagnets(wiresShape, MAGNET_CARDINALS); WiresUtils.assertShapeGroup(wiresShape.getGroup(), WiresCanvas.WIRES_CANVAS_GROUP_ID); } return this; }
WiresLayer extends LienzoLayer { public LienzoLayer add(final WiresShape wiresShape) { if (contains(wiresShape)) { LOGGER.log(Level.WARNING, "Cannot add a WiresShape into the WiresLayer twice!"); } else { wiresManager.register(wiresShape); wiresManager.getMagnetManager().createMagnets(wiresShape, MAGNET_CARDINALS); WiresUtils.assertShapeGroup(wiresShape.getGroup(), WiresCanvas.WIRES_CANVAS_GROUP_ID); } return this; } }
WiresLayer extends LienzoLayer { public LienzoLayer add(final WiresShape wiresShape) { if (contains(wiresShape)) { LOGGER.log(Level.WARNING, "Cannot add a WiresShape into the WiresLayer twice!"); } else { wiresManager.register(wiresShape); wiresManager.getMagnetManager().createMagnets(wiresShape, MAGNET_CARDINALS); WiresUtils.assertShapeGroup(wiresShape.getGroup(), WiresCanvas.WIRES_CANVAS_GROUP_ID); } return this; } }
WiresLayer extends LienzoLayer { public LienzoLayer add(final WiresShape wiresShape) { if (contains(wiresShape)) { LOGGER.log(Level.WARNING, "Cannot add a WiresShape into the WiresLayer twice!"); } else { wiresManager.register(wiresShape); wiresManager.getMagnetManager().createMagnets(wiresShape, MAGNET_CARDINALS); WiresUtils.assertShapeGroup(wiresShape.getGroup(), WiresCanvas.WIRES_CANVAS_GROUP_ID); } return this; } WiresLayer use(final WiresManager wiresManager); LienzoLayer add(final WiresShape wiresShape); LienzoLayer add(final WiresConnector wiresConnector); LienzoLayer delete(final WiresShape wiresShape); LienzoLayer delete(final WiresConnector wiresConnector); WiresLayer addChild(final WiresContainer parent, final WiresShape child); WiresLayer deleteChild(final WiresContainer parent, final WiresShape child); WiresLayer dock(final WiresContainer parent, final WiresShape child); WiresLayer undock(final WiresShape child); WiresManager getWiresManager(); @Override void destroy(); }
WiresLayer extends LienzoLayer { public LienzoLayer add(final WiresShape wiresShape) { if (contains(wiresShape)) { LOGGER.log(Level.WARNING, "Cannot add a WiresShape into the WiresLayer twice!"); } else { wiresManager.register(wiresShape); wiresManager.getMagnetManager().createMagnets(wiresShape, MAGNET_CARDINALS); WiresUtils.assertShapeGroup(wiresShape.getGroup(), WiresCanvas.WIRES_CANVAS_GROUP_ID); } return this; } WiresLayer use(final WiresManager wiresManager); LienzoLayer add(final WiresShape wiresShape); LienzoLayer add(final WiresConnector wiresConnector); LienzoLayer delete(final WiresShape wiresShape); LienzoLayer delete(final WiresConnector wiresConnector); WiresLayer addChild(final WiresContainer parent, final WiresShape child); WiresLayer deleteChild(final WiresContainer parent, final WiresShape child); WiresLayer dock(final WiresContainer parent, final WiresShape child); WiresLayer undock(final WiresShape child); WiresManager getWiresManager(); @Override void destroy(); }
@Test public void testDeleteConnector() { tested.delete(connector); verify(wiresManager, times(1)).deregister(eq(connector)); }
public LienzoLayer delete(final WiresShape wiresShape) { wiresManager.deregister(wiresShape); return this; }
WiresLayer extends LienzoLayer { public LienzoLayer delete(final WiresShape wiresShape) { wiresManager.deregister(wiresShape); return this; } }
WiresLayer extends LienzoLayer { public LienzoLayer delete(final WiresShape wiresShape) { wiresManager.deregister(wiresShape); return this; } }
WiresLayer extends LienzoLayer { public LienzoLayer delete(final WiresShape wiresShape) { wiresManager.deregister(wiresShape); return this; } WiresLayer use(final WiresManager wiresManager); LienzoLayer add(final WiresShape wiresShape); LienzoLayer add(final WiresConnector wiresConnector); LienzoLayer delete(final WiresShape wiresShape); LienzoLayer delete(final WiresConnector wiresConnector); WiresLayer addChild(final WiresContainer parent, final WiresShape child); WiresLayer deleteChild(final WiresContainer parent, final WiresShape child); WiresLayer dock(final WiresContainer parent, final WiresShape child); WiresLayer undock(final WiresShape child); WiresManager getWiresManager(); @Override void destroy(); }
WiresLayer extends LienzoLayer { public LienzoLayer delete(final WiresShape wiresShape) { wiresManager.deregister(wiresShape); return this; } WiresLayer use(final WiresManager wiresManager); LienzoLayer add(final WiresShape wiresShape); LienzoLayer add(final WiresConnector wiresConnector); LienzoLayer delete(final WiresShape wiresShape); LienzoLayer delete(final WiresConnector wiresConnector); WiresLayer addChild(final WiresContainer parent, final WiresShape child); WiresLayer deleteChild(final WiresContainer parent, final WiresShape child); WiresLayer dock(final WiresContainer parent, final WiresShape child); WiresLayer undock(final WiresShape child); WiresManager getWiresManager(); @Override void destroy(); }
@Test public void testAddChild() { WiresShape parent = mock(WiresShape.class); tested.addChild(parent, shape); verify(parent, times(1)).add(eq(shape)); }
public WiresLayer addChild(final WiresContainer parent, final WiresShape child) { parent.add(child); return this; }
WiresLayer extends LienzoLayer { public WiresLayer addChild(final WiresContainer parent, final WiresShape child) { parent.add(child); return this; } }
WiresLayer extends LienzoLayer { public WiresLayer addChild(final WiresContainer parent, final WiresShape child) { parent.add(child); return this; } }
WiresLayer extends LienzoLayer { public WiresLayer addChild(final WiresContainer parent, final WiresShape child) { parent.add(child); return this; } WiresLayer use(final WiresManager wiresManager); LienzoLayer add(final WiresShape wiresShape); LienzoLayer add(final WiresConnector wiresConnector); LienzoLayer delete(final WiresShape wiresShape); LienzoLayer delete(final WiresConnector wiresConnector); WiresLayer addChild(final WiresContainer parent, final WiresShape child); WiresLayer deleteChild(final WiresContainer parent, final WiresShape child); WiresLayer dock(final WiresContainer parent, final WiresShape child); WiresLayer undock(final WiresShape child); WiresManager getWiresManager(); @Override void destroy(); }
WiresLayer extends LienzoLayer { public WiresLayer addChild(final WiresContainer parent, final WiresShape child) { parent.add(child); return this; } WiresLayer use(final WiresManager wiresManager); LienzoLayer add(final WiresShape wiresShape); LienzoLayer add(final WiresConnector wiresConnector); LienzoLayer delete(final WiresShape wiresShape); LienzoLayer delete(final WiresConnector wiresConnector); WiresLayer addChild(final WiresContainer parent, final WiresShape child); WiresLayer deleteChild(final WiresContainer parent, final WiresShape child); WiresLayer dock(final WiresContainer parent, final WiresShape child); WiresLayer undock(final WiresShape child); WiresManager getWiresManager(); @Override void destroy(); }
@Test public void testDeleteChild() { WiresShape parent = mock(WiresShape.class); tested.deleteChild(parent, shape); verify(parent, times(1)).remove(eq(shape)); }
public WiresLayer deleteChild(final WiresContainer parent, final WiresShape child) { parent.remove(child); return this; }
WiresLayer extends LienzoLayer { public WiresLayer deleteChild(final WiresContainer parent, final WiresShape child) { parent.remove(child); return this; } }
WiresLayer extends LienzoLayer { public WiresLayer deleteChild(final WiresContainer parent, final WiresShape child) { parent.remove(child); return this; } }
WiresLayer extends LienzoLayer { public WiresLayer deleteChild(final WiresContainer parent, final WiresShape child) { parent.remove(child); return this; } WiresLayer use(final WiresManager wiresManager); LienzoLayer add(final WiresShape wiresShape); LienzoLayer add(final WiresConnector wiresConnector); LienzoLayer delete(final WiresShape wiresShape); LienzoLayer delete(final WiresConnector wiresConnector); WiresLayer addChild(final WiresContainer parent, final WiresShape child); WiresLayer deleteChild(final WiresContainer parent, final WiresShape child); WiresLayer dock(final WiresContainer parent, final WiresShape child); WiresLayer undock(final WiresShape child); WiresManager getWiresManager(); @Override void destroy(); }
WiresLayer extends LienzoLayer { public WiresLayer deleteChild(final WiresContainer parent, final WiresShape child) { parent.remove(child); return this; } WiresLayer use(final WiresManager wiresManager); LienzoLayer add(final WiresShape wiresShape); LienzoLayer add(final WiresConnector wiresConnector); LienzoLayer delete(final WiresShape wiresShape); LienzoLayer delete(final WiresConnector wiresConnector); WiresLayer addChild(final WiresContainer parent, final WiresShape child); WiresLayer deleteChild(final WiresContainer parent, final WiresShape child); WiresLayer dock(final WiresContainer parent, final WiresShape child); WiresLayer undock(final WiresShape child); WiresManager getWiresManager(); @Override void destroy(); }
@Test public void testDock() { WiresShapeControl control = mock(WiresShapeControl.class); WiresDockingControl dockingControl = mock(WiresDockingControl.class); when(control.getDockingControl()).thenReturn(dockingControl); when(shape.getControl()).thenReturn(control); Point2D location = new Point2D(1, 1); when(dockingControl.getCandidateLocation()).thenReturn(location); WiresShape parent = mock(WiresShape.class); tested.dock(parent, shape); verify(dockingControl, times(1)).dock(eq(parent)); verify(shape, times(1)).setLocation(eq(location)); }
public WiresLayer dock(final WiresContainer parent, final WiresShape child) { final WiresDockingControl dockingControl = child.getControl().getDockingControl(); dockingControl.dock(parent); final Point2D candidateLocation = dockingControl.getCandidateLocation(); if (null != candidateLocation) { child.setLocation(candidateLocation); } return this; }
WiresLayer extends LienzoLayer { public WiresLayer dock(final WiresContainer parent, final WiresShape child) { final WiresDockingControl dockingControl = child.getControl().getDockingControl(); dockingControl.dock(parent); final Point2D candidateLocation = dockingControl.getCandidateLocation(); if (null != candidateLocation) { child.setLocation(candidateLocation); } return this; } }
WiresLayer extends LienzoLayer { public WiresLayer dock(final WiresContainer parent, final WiresShape child) { final WiresDockingControl dockingControl = child.getControl().getDockingControl(); dockingControl.dock(parent); final Point2D candidateLocation = dockingControl.getCandidateLocation(); if (null != candidateLocation) { child.setLocation(candidateLocation); } return this; } }
WiresLayer extends LienzoLayer { public WiresLayer dock(final WiresContainer parent, final WiresShape child) { final WiresDockingControl dockingControl = child.getControl().getDockingControl(); dockingControl.dock(parent); final Point2D candidateLocation = dockingControl.getCandidateLocation(); if (null != candidateLocation) { child.setLocation(candidateLocation); } return this; } WiresLayer use(final WiresManager wiresManager); LienzoLayer add(final WiresShape wiresShape); LienzoLayer add(final WiresConnector wiresConnector); LienzoLayer delete(final WiresShape wiresShape); LienzoLayer delete(final WiresConnector wiresConnector); WiresLayer addChild(final WiresContainer parent, final WiresShape child); WiresLayer deleteChild(final WiresContainer parent, final WiresShape child); WiresLayer dock(final WiresContainer parent, final WiresShape child); WiresLayer undock(final WiresShape child); WiresManager getWiresManager(); @Override void destroy(); }
WiresLayer extends LienzoLayer { public WiresLayer dock(final WiresContainer parent, final WiresShape child) { final WiresDockingControl dockingControl = child.getControl().getDockingControl(); dockingControl.dock(parent); final Point2D candidateLocation = dockingControl.getCandidateLocation(); if (null != candidateLocation) { child.setLocation(candidateLocation); } return this; } WiresLayer use(final WiresManager wiresManager); LienzoLayer add(final WiresShape wiresShape); LienzoLayer add(final WiresConnector wiresConnector); LienzoLayer delete(final WiresShape wiresShape); LienzoLayer delete(final WiresConnector wiresConnector); WiresLayer addChild(final WiresContainer parent, final WiresShape child); WiresLayer deleteChild(final WiresContainer parent, final WiresShape child); WiresLayer dock(final WiresContainer parent, final WiresShape child); WiresLayer undock(final WiresShape child); WiresManager getWiresManager(); @Override void destroy(); }
@Test public void testDockButNoContext() { WiresShapeControl control = mock(WiresShapeControl.class); WiresDockingControl dockingControl = mock(WiresDockingControl.class); when(control.getDockingControl()).thenReturn(dockingControl); when(shape.getControl()).thenReturn(control); when(dockingControl.getCandidateLocation()).thenReturn(null); WiresShape parent = mock(WiresShape.class); tested.dock(parent, shape); verify(dockingControl, times(1)).dock(eq(parent)); verify(shape, never()).setLocation(any(Point2D.class)); }
public WiresLayer dock(final WiresContainer parent, final WiresShape child) { final WiresDockingControl dockingControl = child.getControl().getDockingControl(); dockingControl.dock(parent); final Point2D candidateLocation = dockingControl.getCandidateLocation(); if (null != candidateLocation) { child.setLocation(candidateLocation); } return this; }
WiresLayer extends LienzoLayer { public WiresLayer dock(final WiresContainer parent, final WiresShape child) { final WiresDockingControl dockingControl = child.getControl().getDockingControl(); dockingControl.dock(parent); final Point2D candidateLocation = dockingControl.getCandidateLocation(); if (null != candidateLocation) { child.setLocation(candidateLocation); } return this; } }
WiresLayer extends LienzoLayer { public WiresLayer dock(final WiresContainer parent, final WiresShape child) { final WiresDockingControl dockingControl = child.getControl().getDockingControl(); dockingControl.dock(parent); final Point2D candidateLocation = dockingControl.getCandidateLocation(); if (null != candidateLocation) { child.setLocation(candidateLocation); } return this; } }
WiresLayer extends LienzoLayer { public WiresLayer dock(final WiresContainer parent, final WiresShape child) { final WiresDockingControl dockingControl = child.getControl().getDockingControl(); dockingControl.dock(parent); final Point2D candidateLocation = dockingControl.getCandidateLocation(); if (null != candidateLocation) { child.setLocation(candidateLocation); } return this; } WiresLayer use(final WiresManager wiresManager); LienzoLayer add(final WiresShape wiresShape); LienzoLayer add(final WiresConnector wiresConnector); LienzoLayer delete(final WiresShape wiresShape); LienzoLayer delete(final WiresConnector wiresConnector); WiresLayer addChild(final WiresContainer parent, final WiresShape child); WiresLayer deleteChild(final WiresContainer parent, final WiresShape child); WiresLayer dock(final WiresContainer parent, final WiresShape child); WiresLayer undock(final WiresShape child); WiresManager getWiresManager(); @Override void destroy(); }
WiresLayer extends LienzoLayer { public WiresLayer dock(final WiresContainer parent, final WiresShape child) { final WiresDockingControl dockingControl = child.getControl().getDockingControl(); dockingControl.dock(parent); final Point2D candidateLocation = dockingControl.getCandidateLocation(); if (null != candidateLocation) { child.setLocation(candidateLocation); } return this; } WiresLayer use(final WiresManager wiresManager); LienzoLayer add(final WiresShape wiresShape); LienzoLayer add(final WiresConnector wiresConnector); LienzoLayer delete(final WiresShape wiresShape); LienzoLayer delete(final WiresConnector wiresConnector); WiresLayer addChild(final WiresContainer parent, final WiresShape child); WiresLayer deleteChild(final WiresContainer parent, final WiresShape child); WiresLayer dock(final WiresContainer parent, final WiresShape child); WiresLayer undock(final WiresShape child); WiresManager getWiresManager(); @Override void destroy(); }
@Test public void testUnDock() { WiresShape child = mock(WiresShape.class); WiresShapeControl control = mock(WiresShapeControl.class); WiresDockingControl dockingControl = mock(WiresDockingControl.class); when(control.getDockingControl()).thenReturn(dockingControl); when(child.getControl()).thenReturn(control); tested.undock(child); verify(dockingControl, times(1)).undock(); }
public WiresLayer undock(final WiresShape child) { child.getControl().getDockingControl().undock(); return this; }
WiresLayer extends LienzoLayer { public WiresLayer undock(final WiresShape child) { child.getControl().getDockingControl().undock(); return this; } }
WiresLayer extends LienzoLayer { public WiresLayer undock(final WiresShape child) { child.getControl().getDockingControl().undock(); return this; } }
WiresLayer extends LienzoLayer { public WiresLayer undock(final WiresShape child) { child.getControl().getDockingControl().undock(); return this; } WiresLayer use(final WiresManager wiresManager); LienzoLayer add(final WiresShape wiresShape); LienzoLayer add(final WiresConnector wiresConnector); LienzoLayer delete(final WiresShape wiresShape); LienzoLayer delete(final WiresConnector wiresConnector); WiresLayer addChild(final WiresContainer parent, final WiresShape child); WiresLayer deleteChild(final WiresContainer parent, final WiresShape child); WiresLayer dock(final WiresContainer parent, final WiresShape child); WiresLayer undock(final WiresShape child); WiresManager getWiresManager(); @Override void destroy(); }
WiresLayer extends LienzoLayer { public WiresLayer undock(final WiresShape child) { child.getControl().getDockingControl().undock(); return this; } WiresLayer use(final WiresManager wiresManager); LienzoLayer add(final WiresShape wiresShape); LienzoLayer add(final WiresConnector wiresConnector); LienzoLayer delete(final WiresShape wiresShape); LienzoLayer delete(final WiresConnector wiresConnector); WiresLayer addChild(final WiresContainer parent, final WiresShape child); WiresLayer deleteChild(final WiresContainer parent, final WiresShape child); WiresLayer dock(final WiresContainer parent, final WiresShape child); WiresLayer undock(final WiresShape child); WiresManager getWiresManager(); @Override void destroy(); }
@Test public void isWiresLayerWhenWiresLayer() { final Layer l = new Layer(); final WiresLayer wl = new WiresLayer(l); assertTrue(WiresUtils.isWiresLayer(wl)); }
public static boolean isWiresLayer(final WiresContainer wiresShape) { return null != wiresShape && wiresShape instanceof WiresLayer; }
WiresUtils { public static boolean isWiresLayer(final WiresContainer wiresShape) { return null != wiresShape && wiresShape instanceof WiresLayer; } }
WiresUtils { public static boolean isWiresLayer(final WiresContainer wiresShape) { return null != wiresShape && wiresShape instanceof WiresLayer; } }
WiresUtils { public static boolean isWiresLayer(final WiresContainer wiresShape) { return null != wiresShape && wiresShape instanceof WiresLayer; } static Point2D getAbsolute(final IDrawable<?> shape); static Node getNode(final AbstractCanvasHandler canvasHandler, final WiresContainer shape); static Node getNode(final AbstractCanvasHandler canvasHandler, final WiresMagnet magnet); static Edge getEdge(final AbstractCanvasHandler canvasHandler, final WiresConnector connector); static boolean isWiresShape(final ShapeView<?> shapeView); static boolean isWiresContainer(final ShapeView<?> shapeView); static boolean isWiresConnector(final ShapeView<?> shapeView); static boolean isWiresShape(final WiresContainer wiresShape); static boolean isWiresLayer(final WiresContainer wiresShape); static void assertShapeUUID(final IDrawable<?> shape, final String uuid); static String getShapeUUID(final IDrawable<?> shape); static void assertShapeGroup(final IDrawable<?> shape, final String group); static String getShapeGroup(final IDrawable<?> shape); }
WiresUtils { public static boolean isWiresLayer(final WiresContainer wiresShape) { return null != wiresShape && wiresShape instanceof WiresLayer; } static Point2D getAbsolute(final IDrawable<?> shape); static Node getNode(final AbstractCanvasHandler canvasHandler, final WiresContainer shape); static Node getNode(final AbstractCanvasHandler canvasHandler, final WiresMagnet magnet); static Edge getEdge(final AbstractCanvasHandler canvasHandler, final WiresConnector connector); static boolean isWiresShape(final ShapeView<?> shapeView); static boolean isWiresContainer(final ShapeView<?> shapeView); static boolean isWiresConnector(final ShapeView<?> shapeView); static boolean isWiresShape(final WiresContainer wiresShape); static boolean isWiresLayer(final WiresContainer wiresShape); static void assertShapeUUID(final IDrawable<?> shape, final String uuid); static String getShapeUUID(final IDrawable<?> shape); static void assertShapeGroup(final IDrawable<?> shape, final String group); static String getShapeGroup(final IDrawable<?> shape); }
@Test public void testConverterWhenJSITOutputTypeRefIsNullThenDecisionTableOutputTypeRefIsUndefined() { when(jsitDecisionTable.getOutput()).thenReturn(jsitOutput); when(jsitOutput.size()).thenReturn(1); when(jsitOutput.get(0)).thenReturn(jsitOutputItem); final DecisionTable decisionTable = DecisionTablePropertyConverter.wbFromDMN(jsitDecisionTable); assertNotNull(decisionTable); assertNotNull(decisionTable.getOutput()); assertEquals(1, decisionTable.getOutput().size()); assertEquals(BuiltInType.UNDEFINED.asQName(), decisionTable.getOutput().get(0).getTypeRef()); }
public static DecisionTable wbFromDMN(final JSITDecisionTable dmn) { final Id id = IdPropertyConverter.wbFromDMN(dmn.getId()); final Description description = DescriptionPropertyConverter.wbFromDMN(dmn.getDescription()); final QName typeRef = QNamePropertyConverter.wbFromDMN(dmn.getTypeRef()); final DecisionTable result = new DecisionTable(); result.setId(id); result.setDescription(description); result.setTypeRef(typeRef); final List<JSITRuleAnnotationClause> jsiRuleAnnotationClauses = dmn.getAnnotation(); if (jsiRuleAnnotationClauses.isEmpty()) { final RuleAnnotationClause ruleAnnotationClause = new RuleAnnotationClause(); ruleAnnotationClause.setParent(result); result.getAnnotations().add(ruleAnnotationClause); } else { for (int i = 0; i < jsiRuleAnnotationClauses.size(); i++) { final JSITRuleAnnotationClause ruleAnnotationClause = Js.uncheckedCast(jsiRuleAnnotationClauses.get(i)); final RuleAnnotationClause converted = RuleAnnotationClausePropertyConverter.wbFromDMN(ruleAnnotationClause); if (Objects.nonNull(converted)) { converted.setParent(result); result.getAnnotations().add(converted); } } } final List<JSITInputClause> jsiInputClauses = dmn.getInput(); for (int i = 0; i < jsiInputClauses.size(); i++) { final JSITInputClause input = Js.uncheckedCast(jsiInputClauses.get(i)); final InputClause inputClauseConverted = InputClausePropertyConverter.wbFromDMN(input); if (Objects.nonNull(inputClauseConverted)) { inputClauseConverted.setParent(result); result.getInput().add(inputClauseConverted); } } final List<JSITOutputClause> jsiOutputClauses = dmn.getOutput(); for (int i = 0; i < jsiOutputClauses.size(); i++) { final JSITOutputClause output = Js.uncheckedCast(jsiOutputClauses.get(i)); final OutputClause outputClauseConverted = OutputClausePropertyConverter.wbFromDMN(output); if (Objects.nonNull(outputClauseConverted)) { outputClauseConverted.setParent(result); result.getOutput().add(outputClauseConverted); } } if (result.getOutput().size() == 1) { final OutputClause outputClause = result.getOutput().get(0); outputClause.setName(null); outputClause.setTypeRef(BuiltInType.UNDEFINED.asQName()); } final List<JSITDecisionRule> jsiDecisionRules = dmn.getRule(); for (int i = 0; i < jsiDecisionRules.size(); i++) { final JSITDecisionRule dr = Js.uncheckedCast(jsiDecisionRules.get(i)); final DecisionRule decisionRuleConverted = DecisionRulePropertyConverter.wbFromDMN(dr); if (Objects.nonNull(decisionRuleConverted)) { decisionRuleConverted.setParent(result); } result.getRule().add(decisionRuleConverted); } final String hitPolicy = Js.uncheckedCast(dmn.getHitPolicy()); if (Objects.nonNull(hitPolicy)) { result.setHitPolicy(HitPolicy.fromValue(hitPolicy)); } final String aggregation = Js.uncheckedCast(dmn.getAggregation()); if (Objects.nonNull(aggregation)) { result.setAggregation(BuiltinAggregator.fromValue(aggregation)); } final String orientation = Js.uncheckedCast(dmn.getPreferredOrientation()); if (Objects.nonNull(orientation)) { result.setPreferredOrientation(DecisionTableOrientation.fromValue(orientation)); } result.setOutputLabel(dmn.getOutputLabel()); return result; }
DecisionTablePropertyConverter { public static DecisionTable wbFromDMN(final JSITDecisionTable dmn) { final Id id = IdPropertyConverter.wbFromDMN(dmn.getId()); final Description description = DescriptionPropertyConverter.wbFromDMN(dmn.getDescription()); final QName typeRef = QNamePropertyConverter.wbFromDMN(dmn.getTypeRef()); final DecisionTable result = new DecisionTable(); result.setId(id); result.setDescription(description); result.setTypeRef(typeRef); final List<JSITRuleAnnotationClause> jsiRuleAnnotationClauses = dmn.getAnnotation(); if (jsiRuleAnnotationClauses.isEmpty()) { final RuleAnnotationClause ruleAnnotationClause = new RuleAnnotationClause(); ruleAnnotationClause.setParent(result); result.getAnnotations().add(ruleAnnotationClause); } else { for (int i = 0; i < jsiRuleAnnotationClauses.size(); i++) { final JSITRuleAnnotationClause ruleAnnotationClause = Js.uncheckedCast(jsiRuleAnnotationClauses.get(i)); final RuleAnnotationClause converted = RuleAnnotationClausePropertyConverter.wbFromDMN(ruleAnnotationClause); if (Objects.nonNull(converted)) { converted.setParent(result); result.getAnnotations().add(converted); } } } final List<JSITInputClause> jsiInputClauses = dmn.getInput(); for (int i = 0; i < jsiInputClauses.size(); i++) { final JSITInputClause input = Js.uncheckedCast(jsiInputClauses.get(i)); final InputClause inputClauseConverted = InputClausePropertyConverter.wbFromDMN(input); if (Objects.nonNull(inputClauseConverted)) { inputClauseConverted.setParent(result); result.getInput().add(inputClauseConverted); } } final List<JSITOutputClause> jsiOutputClauses = dmn.getOutput(); for (int i = 0; i < jsiOutputClauses.size(); i++) { final JSITOutputClause output = Js.uncheckedCast(jsiOutputClauses.get(i)); final OutputClause outputClauseConverted = OutputClausePropertyConverter.wbFromDMN(output); if (Objects.nonNull(outputClauseConverted)) { outputClauseConverted.setParent(result); result.getOutput().add(outputClauseConverted); } } if (result.getOutput().size() == 1) { final OutputClause outputClause = result.getOutput().get(0); outputClause.setName(null); outputClause.setTypeRef(BuiltInType.UNDEFINED.asQName()); } final List<JSITDecisionRule> jsiDecisionRules = dmn.getRule(); for (int i = 0; i < jsiDecisionRules.size(); i++) { final JSITDecisionRule dr = Js.uncheckedCast(jsiDecisionRules.get(i)); final DecisionRule decisionRuleConverted = DecisionRulePropertyConverter.wbFromDMN(dr); if (Objects.nonNull(decisionRuleConverted)) { decisionRuleConverted.setParent(result); } result.getRule().add(decisionRuleConverted); } final String hitPolicy = Js.uncheckedCast(dmn.getHitPolicy()); if (Objects.nonNull(hitPolicy)) { result.setHitPolicy(HitPolicy.fromValue(hitPolicy)); } final String aggregation = Js.uncheckedCast(dmn.getAggregation()); if (Objects.nonNull(aggregation)) { result.setAggregation(BuiltinAggregator.fromValue(aggregation)); } final String orientation = Js.uncheckedCast(dmn.getPreferredOrientation()); if (Objects.nonNull(orientation)) { result.setPreferredOrientation(DecisionTableOrientation.fromValue(orientation)); } result.setOutputLabel(dmn.getOutputLabel()); return result; } }
DecisionTablePropertyConverter { public static DecisionTable wbFromDMN(final JSITDecisionTable dmn) { final Id id = IdPropertyConverter.wbFromDMN(dmn.getId()); final Description description = DescriptionPropertyConverter.wbFromDMN(dmn.getDescription()); final QName typeRef = QNamePropertyConverter.wbFromDMN(dmn.getTypeRef()); final DecisionTable result = new DecisionTable(); result.setId(id); result.setDescription(description); result.setTypeRef(typeRef); final List<JSITRuleAnnotationClause> jsiRuleAnnotationClauses = dmn.getAnnotation(); if (jsiRuleAnnotationClauses.isEmpty()) { final RuleAnnotationClause ruleAnnotationClause = new RuleAnnotationClause(); ruleAnnotationClause.setParent(result); result.getAnnotations().add(ruleAnnotationClause); } else { for (int i = 0; i < jsiRuleAnnotationClauses.size(); i++) { final JSITRuleAnnotationClause ruleAnnotationClause = Js.uncheckedCast(jsiRuleAnnotationClauses.get(i)); final RuleAnnotationClause converted = RuleAnnotationClausePropertyConverter.wbFromDMN(ruleAnnotationClause); if (Objects.nonNull(converted)) { converted.setParent(result); result.getAnnotations().add(converted); } } } final List<JSITInputClause> jsiInputClauses = dmn.getInput(); for (int i = 0; i < jsiInputClauses.size(); i++) { final JSITInputClause input = Js.uncheckedCast(jsiInputClauses.get(i)); final InputClause inputClauseConverted = InputClausePropertyConverter.wbFromDMN(input); if (Objects.nonNull(inputClauseConverted)) { inputClauseConverted.setParent(result); result.getInput().add(inputClauseConverted); } } final List<JSITOutputClause> jsiOutputClauses = dmn.getOutput(); for (int i = 0; i < jsiOutputClauses.size(); i++) { final JSITOutputClause output = Js.uncheckedCast(jsiOutputClauses.get(i)); final OutputClause outputClauseConverted = OutputClausePropertyConverter.wbFromDMN(output); if (Objects.nonNull(outputClauseConverted)) { outputClauseConverted.setParent(result); result.getOutput().add(outputClauseConverted); } } if (result.getOutput().size() == 1) { final OutputClause outputClause = result.getOutput().get(0); outputClause.setName(null); outputClause.setTypeRef(BuiltInType.UNDEFINED.asQName()); } final List<JSITDecisionRule> jsiDecisionRules = dmn.getRule(); for (int i = 0; i < jsiDecisionRules.size(); i++) { final JSITDecisionRule dr = Js.uncheckedCast(jsiDecisionRules.get(i)); final DecisionRule decisionRuleConverted = DecisionRulePropertyConverter.wbFromDMN(dr); if (Objects.nonNull(decisionRuleConverted)) { decisionRuleConverted.setParent(result); } result.getRule().add(decisionRuleConverted); } final String hitPolicy = Js.uncheckedCast(dmn.getHitPolicy()); if (Objects.nonNull(hitPolicy)) { result.setHitPolicy(HitPolicy.fromValue(hitPolicy)); } final String aggregation = Js.uncheckedCast(dmn.getAggregation()); if (Objects.nonNull(aggregation)) { result.setAggregation(BuiltinAggregator.fromValue(aggregation)); } final String orientation = Js.uncheckedCast(dmn.getPreferredOrientation()); if (Objects.nonNull(orientation)) { result.setPreferredOrientation(DecisionTableOrientation.fromValue(orientation)); } result.setOutputLabel(dmn.getOutputLabel()); return result; } }
DecisionTablePropertyConverter { public static DecisionTable wbFromDMN(final JSITDecisionTable dmn) { final Id id = IdPropertyConverter.wbFromDMN(dmn.getId()); final Description description = DescriptionPropertyConverter.wbFromDMN(dmn.getDescription()); final QName typeRef = QNamePropertyConverter.wbFromDMN(dmn.getTypeRef()); final DecisionTable result = new DecisionTable(); result.setId(id); result.setDescription(description); result.setTypeRef(typeRef); final List<JSITRuleAnnotationClause> jsiRuleAnnotationClauses = dmn.getAnnotation(); if (jsiRuleAnnotationClauses.isEmpty()) { final RuleAnnotationClause ruleAnnotationClause = new RuleAnnotationClause(); ruleAnnotationClause.setParent(result); result.getAnnotations().add(ruleAnnotationClause); } else { for (int i = 0; i < jsiRuleAnnotationClauses.size(); i++) { final JSITRuleAnnotationClause ruleAnnotationClause = Js.uncheckedCast(jsiRuleAnnotationClauses.get(i)); final RuleAnnotationClause converted = RuleAnnotationClausePropertyConverter.wbFromDMN(ruleAnnotationClause); if (Objects.nonNull(converted)) { converted.setParent(result); result.getAnnotations().add(converted); } } } final List<JSITInputClause> jsiInputClauses = dmn.getInput(); for (int i = 0; i < jsiInputClauses.size(); i++) { final JSITInputClause input = Js.uncheckedCast(jsiInputClauses.get(i)); final InputClause inputClauseConverted = InputClausePropertyConverter.wbFromDMN(input); if (Objects.nonNull(inputClauseConverted)) { inputClauseConverted.setParent(result); result.getInput().add(inputClauseConverted); } } final List<JSITOutputClause> jsiOutputClauses = dmn.getOutput(); for (int i = 0; i < jsiOutputClauses.size(); i++) { final JSITOutputClause output = Js.uncheckedCast(jsiOutputClauses.get(i)); final OutputClause outputClauseConverted = OutputClausePropertyConverter.wbFromDMN(output); if (Objects.nonNull(outputClauseConverted)) { outputClauseConverted.setParent(result); result.getOutput().add(outputClauseConverted); } } if (result.getOutput().size() == 1) { final OutputClause outputClause = result.getOutput().get(0); outputClause.setName(null); outputClause.setTypeRef(BuiltInType.UNDEFINED.asQName()); } final List<JSITDecisionRule> jsiDecisionRules = dmn.getRule(); for (int i = 0; i < jsiDecisionRules.size(); i++) { final JSITDecisionRule dr = Js.uncheckedCast(jsiDecisionRules.get(i)); final DecisionRule decisionRuleConverted = DecisionRulePropertyConverter.wbFromDMN(dr); if (Objects.nonNull(decisionRuleConverted)) { decisionRuleConverted.setParent(result); } result.getRule().add(decisionRuleConverted); } final String hitPolicy = Js.uncheckedCast(dmn.getHitPolicy()); if (Objects.nonNull(hitPolicy)) { result.setHitPolicy(HitPolicy.fromValue(hitPolicy)); } final String aggregation = Js.uncheckedCast(dmn.getAggregation()); if (Objects.nonNull(aggregation)) { result.setAggregation(BuiltinAggregator.fromValue(aggregation)); } final String orientation = Js.uncheckedCast(dmn.getPreferredOrientation()); if (Objects.nonNull(orientation)) { result.setPreferredOrientation(DecisionTableOrientation.fromValue(orientation)); } result.setOutputLabel(dmn.getOutputLabel()); return result; } static DecisionTable wbFromDMN(final JSITDecisionTable dmn); static JSITDecisionTable dmnFromWB(final DecisionTable wb); }
DecisionTablePropertyConverter { public static DecisionTable wbFromDMN(final JSITDecisionTable dmn) { final Id id = IdPropertyConverter.wbFromDMN(dmn.getId()); final Description description = DescriptionPropertyConverter.wbFromDMN(dmn.getDescription()); final QName typeRef = QNamePropertyConverter.wbFromDMN(dmn.getTypeRef()); final DecisionTable result = new DecisionTable(); result.setId(id); result.setDescription(description); result.setTypeRef(typeRef); final List<JSITRuleAnnotationClause> jsiRuleAnnotationClauses = dmn.getAnnotation(); if (jsiRuleAnnotationClauses.isEmpty()) { final RuleAnnotationClause ruleAnnotationClause = new RuleAnnotationClause(); ruleAnnotationClause.setParent(result); result.getAnnotations().add(ruleAnnotationClause); } else { for (int i = 0; i < jsiRuleAnnotationClauses.size(); i++) { final JSITRuleAnnotationClause ruleAnnotationClause = Js.uncheckedCast(jsiRuleAnnotationClauses.get(i)); final RuleAnnotationClause converted = RuleAnnotationClausePropertyConverter.wbFromDMN(ruleAnnotationClause); if (Objects.nonNull(converted)) { converted.setParent(result); result.getAnnotations().add(converted); } } } final List<JSITInputClause> jsiInputClauses = dmn.getInput(); for (int i = 0; i < jsiInputClauses.size(); i++) { final JSITInputClause input = Js.uncheckedCast(jsiInputClauses.get(i)); final InputClause inputClauseConverted = InputClausePropertyConverter.wbFromDMN(input); if (Objects.nonNull(inputClauseConverted)) { inputClauseConverted.setParent(result); result.getInput().add(inputClauseConverted); } } final List<JSITOutputClause> jsiOutputClauses = dmn.getOutput(); for (int i = 0; i < jsiOutputClauses.size(); i++) { final JSITOutputClause output = Js.uncheckedCast(jsiOutputClauses.get(i)); final OutputClause outputClauseConverted = OutputClausePropertyConverter.wbFromDMN(output); if (Objects.nonNull(outputClauseConverted)) { outputClauseConverted.setParent(result); result.getOutput().add(outputClauseConverted); } } if (result.getOutput().size() == 1) { final OutputClause outputClause = result.getOutput().get(0); outputClause.setName(null); outputClause.setTypeRef(BuiltInType.UNDEFINED.asQName()); } final List<JSITDecisionRule> jsiDecisionRules = dmn.getRule(); for (int i = 0; i < jsiDecisionRules.size(); i++) { final JSITDecisionRule dr = Js.uncheckedCast(jsiDecisionRules.get(i)); final DecisionRule decisionRuleConverted = DecisionRulePropertyConverter.wbFromDMN(dr); if (Objects.nonNull(decisionRuleConverted)) { decisionRuleConverted.setParent(result); } result.getRule().add(decisionRuleConverted); } final String hitPolicy = Js.uncheckedCast(dmn.getHitPolicy()); if (Objects.nonNull(hitPolicy)) { result.setHitPolicy(HitPolicy.fromValue(hitPolicy)); } final String aggregation = Js.uncheckedCast(dmn.getAggregation()); if (Objects.nonNull(aggregation)) { result.setAggregation(BuiltinAggregator.fromValue(aggregation)); } final String orientation = Js.uncheckedCast(dmn.getPreferredOrientation()); if (Objects.nonNull(orientation)) { result.setPreferredOrientation(DecisionTableOrientation.fromValue(orientation)); } result.setOutputLabel(dmn.getOutputLabel()); return result; } static DecisionTable wbFromDMN(final JSITDecisionTable dmn); static JSITDecisionTable dmnFromWB(final DecisionTable wb); }
@Test public void testLoadDataObjects_NoProperties() { final Maps.Builder<String, ModelField[]> modelFieldsBuilder = new Maps.Builder<>(); modelFieldsBuilder.put(BPet.class.getName(), new ModelField[]{ newModelField(DataType.TYPE_THIS, BPet.class.getName(), BPet.class.getSimpleName()) }); final Map<String, ModelField[]> modelFields = modelFieldsBuilder.build(); dataModelOracle.addModuleModelFields(modelFields); final List<DataObject> dataObjects = service.loadDataObjects(workspaceProject); assertThat(dataObjects).isNotEmpty(); assertThat(dataObjects).hasSize(1); assertThat(dataObjects.get(0).getClassType()).isEqualTo(BPet.class.getName()); assertThat(dataObjects.get(0).getProperties()).isEmpty(); }
@Override public List<DataObject> loadDataObjects(final WorkspaceProject workspaceProject) { final KieModule module = moduleService.resolveModule(workspaceProject.getRootPath()); final ClassLoader classLoader = moduleClassLoaderHelper.getModuleClassLoader(module); final ModuleDataModelOracle dmo = dataModelService.getModuleDataModel(workspaceProject.getRootPath()); final String[] types = DataModelOracleUtilities.getFactTypes(dmo); final Map<String, ModelField[]> typesModelFields = dmo.getModuleModelFields(); final Map<String, String> parametersType = dmo.getModuleFieldParametersType(); final List<DataObject> dataObjects = Arrays.stream(types).map(DataObject::new).collect(Collectors.toList()); dataObjects.forEach(dataObject -> convertProperties(dataObject, dataObjects, typesModelFields, classLoader, parametersType)); return dataObjects; }
DataObjectsServiceImpl implements DataObjectsService { @Override public List<DataObject> loadDataObjects(final WorkspaceProject workspaceProject) { final KieModule module = moduleService.resolveModule(workspaceProject.getRootPath()); final ClassLoader classLoader = moduleClassLoaderHelper.getModuleClassLoader(module); final ModuleDataModelOracle dmo = dataModelService.getModuleDataModel(workspaceProject.getRootPath()); final String[] types = DataModelOracleUtilities.getFactTypes(dmo); final Map<String, ModelField[]> typesModelFields = dmo.getModuleModelFields(); final Map<String, String> parametersType = dmo.getModuleFieldParametersType(); final List<DataObject> dataObjects = Arrays.stream(types).map(DataObject::new).collect(Collectors.toList()); dataObjects.forEach(dataObject -> convertProperties(dataObject, dataObjects, typesModelFields, classLoader, parametersType)); return dataObjects; } }
DataObjectsServiceImpl implements DataObjectsService { @Override public List<DataObject> loadDataObjects(final WorkspaceProject workspaceProject) { final KieModule module = moduleService.resolveModule(workspaceProject.getRootPath()); final ClassLoader classLoader = moduleClassLoaderHelper.getModuleClassLoader(module); final ModuleDataModelOracle dmo = dataModelService.getModuleDataModel(workspaceProject.getRootPath()); final String[] types = DataModelOracleUtilities.getFactTypes(dmo); final Map<String, ModelField[]> typesModelFields = dmo.getModuleModelFields(); final Map<String, String> parametersType = dmo.getModuleFieldParametersType(); final List<DataObject> dataObjects = Arrays.stream(types).map(DataObject::new).collect(Collectors.toList()); dataObjects.forEach(dataObject -> convertProperties(dataObject, dataObjects, typesModelFields, classLoader, parametersType)); return dataObjects; } protected DataObjectsServiceImpl(); @Inject DataObjectsServiceImpl(final DataModelService dataModelService, final ModuleClassLoaderHelper moduleClassLoaderHelper, final KieModuleService moduleService); }
DataObjectsServiceImpl implements DataObjectsService { @Override public List<DataObject> loadDataObjects(final WorkspaceProject workspaceProject) { final KieModule module = moduleService.resolveModule(workspaceProject.getRootPath()); final ClassLoader classLoader = moduleClassLoaderHelper.getModuleClassLoader(module); final ModuleDataModelOracle dmo = dataModelService.getModuleDataModel(workspaceProject.getRootPath()); final String[] types = DataModelOracleUtilities.getFactTypes(dmo); final Map<String, ModelField[]> typesModelFields = dmo.getModuleModelFields(); final Map<String, String> parametersType = dmo.getModuleFieldParametersType(); final List<DataObject> dataObjects = Arrays.stream(types).map(DataObject::new).collect(Collectors.toList()); dataObjects.forEach(dataObject -> convertProperties(dataObject, dataObjects, typesModelFields, classLoader, parametersType)); return dataObjects; } protected DataObjectsServiceImpl(); @Inject DataObjectsServiceImpl(final DataModelService dataModelService, final ModuleClassLoaderHelper moduleClassLoaderHelper, final KieModuleService moduleService); @Override List<DataObject> loadDataObjects(final WorkspaceProject workspaceProject); }
DataObjectsServiceImpl implements DataObjectsService { @Override public List<DataObject> loadDataObjects(final WorkspaceProject workspaceProject) { final KieModule module = moduleService.resolveModule(workspaceProject.getRootPath()); final ClassLoader classLoader = moduleClassLoaderHelper.getModuleClassLoader(module); final ModuleDataModelOracle dmo = dataModelService.getModuleDataModel(workspaceProject.getRootPath()); final String[] types = DataModelOracleUtilities.getFactTypes(dmo); final Map<String, ModelField[]> typesModelFields = dmo.getModuleModelFields(); final Map<String, String> parametersType = dmo.getModuleFieldParametersType(); final List<DataObject> dataObjects = Arrays.stream(types).map(DataObject::new).collect(Collectors.toList()); dataObjects.forEach(dataObject -> convertProperties(dataObject, dataObjects, typesModelFields, classLoader, parametersType)); return dataObjects; } protected DataObjectsServiceImpl(); @Inject DataObjectsServiceImpl(final DataModelService dataModelService, final ModuleClassLoaderHelper moduleClassLoaderHelper, final KieModuleService moduleService); @Override List<DataObject> loadDataObjects(final WorkspaceProject workspaceProject); }
@Test public void isWiresLayerWhenWiresShape() { final WiresShape ws = new WiresShape(new MultiPath()); assertFalse(WiresUtils.isWiresLayer(ws)); }
public static boolean isWiresLayer(final WiresContainer wiresShape) { return null != wiresShape && wiresShape instanceof WiresLayer; }
WiresUtils { public static boolean isWiresLayer(final WiresContainer wiresShape) { return null != wiresShape && wiresShape instanceof WiresLayer; } }
WiresUtils { public static boolean isWiresLayer(final WiresContainer wiresShape) { return null != wiresShape && wiresShape instanceof WiresLayer; } }
WiresUtils { public static boolean isWiresLayer(final WiresContainer wiresShape) { return null != wiresShape && wiresShape instanceof WiresLayer; } static Point2D getAbsolute(final IDrawable<?> shape); static Node getNode(final AbstractCanvasHandler canvasHandler, final WiresContainer shape); static Node getNode(final AbstractCanvasHandler canvasHandler, final WiresMagnet magnet); static Edge getEdge(final AbstractCanvasHandler canvasHandler, final WiresConnector connector); static boolean isWiresShape(final ShapeView<?> shapeView); static boolean isWiresContainer(final ShapeView<?> shapeView); static boolean isWiresConnector(final ShapeView<?> shapeView); static boolean isWiresShape(final WiresContainer wiresShape); static boolean isWiresLayer(final WiresContainer wiresShape); static void assertShapeUUID(final IDrawable<?> shape, final String uuid); static String getShapeUUID(final IDrawable<?> shape); static void assertShapeGroup(final IDrawable<?> shape, final String group); static String getShapeGroup(final IDrawable<?> shape); }
WiresUtils { public static boolean isWiresLayer(final WiresContainer wiresShape) { return null != wiresShape && wiresShape instanceof WiresLayer; } static Point2D getAbsolute(final IDrawable<?> shape); static Node getNode(final AbstractCanvasHandler canvasHandler, final WiresContainer shape); static Node getNode(final AbstractCanvasHandler canvasHandler, final WiresMagnet magnet); static Edge getEdge(final AbstractCanvasHandler canvasHandler, final WiresConnector connector); static boolean isWiresShape(final ShapeView<?> shapeView); static boolean isWiresContainer(final ShapeView<?> shapeView); static boolean isWiresConnector(final ShapeView<?> shapeView); static boolean isWiresShape(final WiresContainer wiresShape); static boolean isWiresLayer(final WiresContainer wiresShape); static void assertShapeUUID(final IDrawable<?> shape, final String uuid); static String getShapeUUID(final IDrawable<?> shape); static void assertShapeGroup(final IDrawable<?> shape, final String group); static String getShapeGroup(final IDrawable<?> shape); }
@Test public void isWiresShapeWhenWiresContainer() { final WiresContainer wc = new WiresContainer(new Group()); assertFalse(WiresUtils.isWiresShape(wc)); }
public static boolean isWiresShape(final ShapeView<?> shapeView) { return shapeView instanceof WiresShape; }
WiresUtils { public static boolean isWiresShape(final ShapeView<?> shapeView) { return shapeView instanceof WiresShape; } }
WiresUtils { public static boolean isWiresShape(final ShapeView<?> shapeView) { return shapeView instanceof WiresShape; } }
WiresUtils { public static boolean isWiresShape(final ShapeView<?> shapeView) { return shapeView instanceof WiresShape; } static Point2D getAbsolute(final IDrawable<?> shape); static Node getNode(final AbstractCanvasHandler canvasHandler, final WiresContainer shape); static Node getNode(final AbstractCanvasHandler canvasHandler, final WiresMagnet magnet); static Edge getEdge(final AbstractCanvasHandler canvasHandler, final WiresConnector connector); static boolean isWiresShape(final ShapeView<?> shapeView); static boolean isWiresContainer(final ShapeView<?> shapeView); static boolean isWiresConnector(final ShapeView<?> shapeView); static boolean isWiresShape(final WiresContainer wiresShape); static boolean isWiresLayer(final WiresContainer wiresShape); static void assertShapeUUID(final IDrawable<?> shape, final String uuid); static String getShapeUUID(final IDrawable<?> shape); static void assertShapeGroup(final IDrawable<?> shape, final String group); static String getShapeGroup(final IDrawable<?> shape); }
WiresUtils { public static boolean isWiresShape(final ShapeView<?> shapeView) { return shapeView instanceof WiresShape; } static Point2D getAbsolute(final IDrawable<?> shape); static Node getNode(final AbstractCanvasHandler canvasHandler, final WiresContainer shape); static Node getNode(final AbstractCanvasHandler canvasHandler, final WiresMagnet magnet); static Edge getEdge(final AbstractCanvasHandler canvasHandler, final WiresConnector connector); static boolean isWiresShape(final ShapeView<?> shapeView); static boolean isWiresContainer(final ShapeView<?> shapeView); static boolean isWiresConnector(final ShapeView<?> shapeView); static boolean isWiresShape(final WiresContainer wiresShape); static boolean isWiresLayer(final WiresContainer wiresShape); static void assertShapeUUID(final IDrawable<?> shape, final String uuid); static String getShapeUUID(final IDrawable<?> shape); static void assertShapeGroup(final IDrawable<?> shape, final String group); static String getShapeGroup(final IDrawable<?> shape); }
@Test public void isWiresShapeWhenWiresLayer() { final Layer l = new Layer(); final WiresLayer wl = new WiresLayer(l); assertTrue(WiresUtils.isWiresShape(wl)); }
public static boolean isWiresShape(final ShapeView<?> shapeView) { return shapeView instanceof WiresShape; }
WiresUtils { public static boolean isWiresShape(final ShapeView<?> shapeView) { return shapeView instanceof WiresShape; } }
WiresUtils { public static boolean isWiresShape(final ShapeView<?> shapeView) { return shapeView instanceof WiresShape; } }
WiresUtils { public static boolean isWiresShape(final ShapeView<?> shapeView) { return shapeView instanceof WiresShape; } static Point2D getAbsolute(final IDrawable<?> shape); static Node getNode(final AbstractCanvasHandler canvasHandler, final WiresContainer shape); static Node getNode(final AbstractCanvasHandler canvasHandler, final WiresMagnet magnet); static Edge getEdge(final AbstractCanvasHandler canvasHandler, final WiresConnector connector); static boolean isWiresShape(final ShapeView<?> shapeView); static boolean isWiresContainer(final ShapeView<?> shapeView); static boolean isWiresConnector(final ShapeView<?> shapeView); static boolean isWiresShape(final WiresContainer wiresShape); static boolean isWiresLayer(final WiresContainer wiresShape); static void assertShapeUUID(final IDrawable<?> shape, final String uuid); static String getShapeUUID(final IDrawable<?> shape); static void assertShapeGroup(final IDrawable<?> shape, final String group); static String getShapeGroup(final IDrawable<?> shape); }
WiresUtils { public static boolean isWiresShape(final ShapeView<?> shapeView) { return shapeView instanceof WiresShape; } static Point2D getAbsolute(final IDrawable<?> shape); static Node getNode(final AbstractCanvasHandler canvasHandler, final WiresContainer shape); static Node getNode(final AbstractCanvasHandler canvasHandler, final WiresMagnet magnet); static Edge getEdge(final AbstractCanvasHandler canvasHandler, final WiresConnector connector); static boolean isWiresShape(final ShapeView<?> shapeView); static boolean isWiresContainer(final ShapeView<?> shapeView); static boolean isWiresConnector(final ShapeView<?> shapeView); static boolean isWiresShape(final WiresContainer wiresShape); static boolean isWiresLayer(final WiresContainer wiresShape); static void assertShapeUUID(final IDrawable<?> shape, final String uuid); static String getShapeUUID(final IDrawable<?> shape); static void assertShapeGroup(final IDrawable<?> shape, final String group); static String getShapeGroup(final IDrawable<?> shape); }
@Test public void isWiresShapeWhenUnregisteredWiresShape() { final WiresShape ws = new WiresShape(new MultiPath()); assertFalse(WiresUtils.isWiresShape(ws)); }
public static boolean isWiresShape(final ShapeView<?> shapeView) { return shapeView instanceof WiresShape; }
WiresUtils { public static boolean isWiresShape(final ShapeView<?> shapeView) { return shapeView instanceof WiresShape; } }
WiresUtils { public static boolean isWiresShape(final ShapeView<?> shapeView) { return shapeView instanceof WiresShape; } }
WiresUtils { public static boolean isWiresShape(final ShapeView<?> shapeView) { return shapeView instanceof WiresShape; } static Point2D getAbsolute(final IDrawable<?> shape); static Node getNode(final AbstractCanvasHandler canvasHandler, final WiresContainer shape); static Node getNode(final AbstractCanvasHandler canvasHandler, final WiresMagnet magnet); static Edge getEdge(final AbstractCanvasHandler canvasHandler, final WiresConnector connector); static boolean isWiresShape(final ShapeView<?> shapeView); static boolean isWiresContainer(final ShapeView<?> shapeView); static boolean isWiresConnector(final ShapeView<?> shapeView); static boolean isWiresShape(final WiresContainer wiresShape); static boolean isWiresLayer(final WiresContainer wiresShape); static void assertShapeUUID(final IDrawable<?> shape, final String uuid); static String getShapeUUID(final IDrawable<?> shape); static void assertShapeGroup(final IDrawable<?> shape, final String group); static String getShapeGroup(final IDrawable<?> shape); }
WiresUtils { public static boolean isWiresShape(final ShapeView<?> shapeView) { return shapeView instanceof WiresShape; } static Point2D getAbsolute(final IDrawable<?> shape); static Node getNode(final AbstractCanvasHandler canvasHandler, final WiresContainer shape); static Node getNode(final AbstractCanvasHandler canvasHandler, final WiresMagnet magnet); static Edge getEdge(final AbstractCanvasHandler canvasHandler, final WiresConnector connector); static boolean isWiresShape(final ShapeView<?> shapeView); static boolean isWiresContainer(final ShapeView<?> shapeView); static boolean isWiresConnector(final ShapeView<?> shapeView); static boolean isWiresShape(final WiresContainer wiresShape); static boolean isWiresLayer(final WiresContainer wiresShape); static void assertShapeUUID(final IDrawable<?> shape, final String uuid); static String getShapeUUID(final IDrawable<?> shape); static void assertShapeGroup(final IDrawable<?> shape, final String group); static String getShapeGroup(final IDrawable<?> shape); }
@Test public void initDeviceRatio() { delegateNativeContext2D.initDeviceRatio(); }
public void initDeviceRatio() { }
DelegateNativeContext2D implements INativeContext2D { public void initDeviceRatio() { } }
DelegateNativeContext2D implements INativeContext2D { public void initDeviceRatio() { } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); }
DelegateNativeContext2D implements INativeContext2D { public void initDeviceRatio() { } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
DelegateNativeContext2D implements INativeContext2D { public void initDeviceRatio() { } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
@Test public void saveContainer() { delegateNativeContext2D.saveContainer(NODE_UUID); verify(context, times(1)).saveGroup(new HashMap<String, String>() {{ put(SVG_NODE_ID, NODE_UUID); put(DelegateNativeContext2D.DEFAULT_NODE_ID, NODE_UUID); }}); }
@Override public void saveContainer(String id) { HashMap<String, String> map = new HashMap<>(); if (canvasHandler.getGraphIndex().get(id) != null) { map.put(DEFAULT_NODE_ID, id); map.put(svgNodeId, id); } context.saveGroup(map); }
DelegateNativeContext2D implements INativeContext2D { @Override public void saveContainer(String id) { HashMap<String, String> map = new HashMap<>(); if (canvasHandler.getGraphIndex().get(id) != null) { map.put(DEFAULT_NODE_ID, id); map.put(svgNodeId, id); } context.saveGroup(map); } }
DelegateNativeContext2D implements INativeContext2D { @Override public void saveContainer(String id) { HashMap<String, String> map = new HashMap<>(); if (canvasHandler.getGraphIndex().get(id) != null) { map.put(DEFAULT_NODE_ID, id); map.put(svgNodeId, id); } context.saveGroup(map); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); }
DelegateNativeContext2D implements INativeContext2D { @Override public void saveContainer(String id) { HashMap<String, String> map = new HashMap<>(); if (canvasHandler.getGraphIndex().get(id) != null) { map.put(DEFAULT_NODE_ID, id); map.put(svgNodeId, id); } context.saveGroup(map); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
DelegateNativeContext2D implements INativeContext2D { @Override public void saveContainer(String id) { HashMap<String, String> map = new HashMap<>(); if (canvasHandler.getGraphIndex().get(id) != null) { map.put(DEFAULT_NODE_ID, id); map.put(svgNodeId, id); } context.saveGroup(map); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
@Test public void restoreContainer() { delegateNativeContext2D.restoreContainer(); verify(context, times(1)).restoreGroup(); }
@Override public void restoreContainer() { context.restoreGroup(); }
DelegateNativeContext2D implements INativeContext2D { @Override public void restoreContainer() { context.restoreGroup(); } }
DelegateNativeContext2D implements INativeContext2D { @Override public void restoreContainer() { context.restoreGroup(); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); }
DelegateNativeContext2D implements INativeContext2D { @Override public void restoreContainer() { context.restoreGroup(); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
DelegateNativeContext2D implements INativeContext2D { @Override public void restoreContainer() { context.restoreGroup(); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
@Test public void save() { delegateNativeContext2D.save(); verify(context, times(1)).saveStyle(); }
public void save() { context.saveStyle(); }
DelegateNativeContext2D implements INativeContext2D { public void save() { context.saveStyle(); } }
DelegateNativeContext2D implements INativeContext2D { public void save() { context.saveStyle(); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); }
DelegateNativeContext2D implements INativeContext2D { public void save() { context.saveStyle(); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
DelegateNativeContext2D implements INativeContext2D { public void save() { context.saveStyle(); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
@Test public void restore() { delegateNativeContext2D.restore(); verify(context, times(1)).restoreStyle(); }
public void restore() { context.restoreStyle(); }
DelegateNativeContext2D implements INativeContext2D { public void restore() { context.restoreStyle(); } }
DelegateNativeContext2D implements INativeContext2D { public void restore() { context.restoreStyle(); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); }
DelegateNativeContext2D implements INativeContext2D { public void restore() { context.restoreStyle(); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
DelegateNativeContext2D implements INativeContext2D { public void restore() { context.restoreStyle(); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
@Test public void beginPath() { delegateNativeContext2D.beginPath(); verify(context, times(1)).beginPath(); }
public void beginPath() { context.beginPath(); }
DelegateNativeContext2D implements INativeContext2D { public void beginPath() { context.beginPath(); } }
DelegateNativeContext2D implements INativeContext2D { public void beginPath() { context.beginPath(); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); }
DelegateNativeContext2D implements INativeContext2D { public void beginPath() { context.beginPath(); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
DelegateNativeContext2D implements INativeContext2D { public void beginPath() { context.beginPath(); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
@Test public void closePath() { delegateNativeContext2D.closePath(); verify(context, times(1)).closePath(); }
public void closePath() { context.closePath(); }
DelegateNativeContext2D implements INativeContext2D { public void closePath() { context.closePath(); } }
DelegateNativeContext2D implements INativeContext2D { public void closePath() { context.closePath(); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); }
DelegateNativeContext2D implements INativeContext2D { public void closePath() { context.closePath(); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
DelegateNativeContext2D implements INativeContext2D { public void closePath() { context.closePath(); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
@Test public void moveTo() { delegateNativeContext2D.moveTo(1, 1); verify(context, times(1)).moveTo(1, 1); }
public void moveTo(double x, double y) { context.moveTo(x, y); }
DelegateNativeContext2D implements INativeContext2D { public void moveTo(double x, double y) { context.moveTo(x, y); } }
DelegateNativeContext2D implements INativeContext2D { public void moveTo(double x, double y) { context.moveTo(x, y); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); }
DelegateNativeContext2D implements INativeContext2D { public void moveTo(double x, double y) { context.moveTo(x, y); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
DelegateNativeContext2D implements INativeContext2D { public void moveTo(double x, double y) { context.moveTo(x, y); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
@Test public void lineTo() { delegateNativeContext2D.lineTo(1, 1); verify(context, times(1)).lineTo(1, 1); }
public void lineTo(double x, double y) { context.lineTo(x, y); }
DelegateNativeContext2D implements INativeContext2D { public void lineTo(double x, double y) { context.lineTo(x, y); } }
DelegateNativeContext2D implements INativeContext2D { public void lineTo(double x, double y) { context.lineTo(x, y); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); }
DelegateNativeContext2D implements INativeContext2D { public void lineTo(double x, double y) { context.lineTo(x, y); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
DelegateNativeContext2D implements INativeContext2D { public void lineTo(double x, double y) { context.lineTo(x, y); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
@Test public void setGlobalCompositeOperation() { delegateNativeContext2D.setGlobalCompositeOperation("op"); verify(context, times(1)).setGlobalCompositeOperation("op"); }
public void setGlobalCompositeOperation(String operation) { context.setGlobalCompositeOperation(operation); }
DelegateNativeContext2D implements INativeContext2D { public void setGlobalCompositeOperation(String operation) { context.setGlobalCompositeOperation(operation); } }
DelegateNativeContext2D implements INativeContext2D { public void setGlobalCompositeOperation(String operation) { context.setGlobalCompositeOperation(operation); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); }
DelegateNativeContext2D implements INativeContext2D { public void setGlobalCompositeOperation(String operation) { context.setGlobalCompositeOperation(operation); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
DelegateNativeContext2D implements INativeContext2D { public void setGlobalCompositeOperation(String operation) { context.setGlobalCompositeOperation(operation); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
@Test public void setLineCap() { delegateNativeContext2D.setLineCap("linecap"); verify(context, times(1)).setLineCap("linecap"); }
public void setLineCap(String lineCap) { context.setLineCap(lineCap); }
DelegateNativeContext2D implements INativeContext2D { public void setLineCap(String lineCap) { context.setLineCap(lineCap); } }
DelegateNativeContext2D implements INativeContext2D { public void setLineCap(String lineCap) { context.setLineCap(lineCap); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); }
DelegateNativeContext2D implements INativeContext2D { public void setLineCap(String lineCap) { context.setLineCap(lineCap); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
DelegateNativeContext2D implements INativeContext2D { public void setLineCap(String lineCap) { context.setLineCap(lineCap); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
@Test public void setLineJoin() { delegateNativeContext2D.setLineJoin("line"); verify(context, times(1)).setLineJoin("line"); }
public void setLineJoin(String lineJoin) { context.setLineJoin(lineJoin); }
DelegateNativeContext2D implements INativeContext2D { public void setLineJoin(String lineJoin) { context.setLineJoin(lineJoin); } }
DelegateNativeContext2D implements INativeContext2D { public void setLineJoin(String lineJoin) { context.setLineJoin(lineJoin); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); }
DelegateNativeContext2D implements INativeContext2D { public void setLineJoin(String lineJoin) { context.setLineJoin(lineJoin); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
DelegateNativeContext2D implements INativeContext2D { public void setLineJoin(String lineJoin) { context.setLineJoin(lineJoin); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
@Test public void quadraticCurveTo() { delegateNativeContext2D.quadraticCurveTo(1, 1, 1, 1); verify(context, times(1)).quadraticCurveTo(1, 1, 1, 1); }
public void quadraticCurveTo(double cpx, double cpy, double x, double y) { context.quadraticCurveTo(cpx, cpy, x, y); }
DelegateNativeContext2D implements INativeContext2D { public void quadraticCurveTo(double cpx, double cpy, double x, double y) { context.quadraticCurveTo(cpx, cpy, x, y); } }
DelegateNativeContext2D implements INativeContext2D { public void quadraticCurveTo(double cpx, double cpy, double x, double y) { context.quadraticCurveTo(cpx, cpy, x, y); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); }
DelegateNativeContext2D implements INativeContext2D { public void quadraticCurveTo(double cpx, double cpy, double x, double y) { context.quadraticCurveTo(cpx, cpy, x, y); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
DelegateNativeContext2D implements INativeContext2D { public void quadraticCurveTo(double cpx, double cpy, double x, double y) { context.quadraticCurveTo(cpx, cpy, x, y); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
@Test public void arc() { delegateNativeContext2D.arc(1, 1, 1, 1, 1); verify(context, times(1)).arc(1, 1, 1, 1, 1); }
public void arc(double x, double y, double radius, double startAngle, double endAngle) { context.arc(x, y, radius, startAngle, endAngle); }
DelegateNativeContext2D implements INativeContext2D { public void arc(double x, double y, double radius, double startAngle, double endAngle) { context.arc(x, y, radius, startAngle, endAngle); } }
DelegateNativeContext2D implements INativeContext2D { public void arc(double x, double y, double radius, double startAngle, double endAngle) { context.arc(x, y, radius, startAngle, endAngle); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); }
DelegateNativeContext2D implements INativeContext2D { public void arc(double x, double y, double radius, double startAngle, double endAngle) { context.arc(x, y, radius, startAngle, endAngle); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
DelegateNativeContext2D implements INativeContext2D { public void arc(double x, double y, double radius, double startAngle, double endAngle) { context.arc(x, y, radius, startAngle, endAngle); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
@Test public void arc1() { delegateNativeContext2D.arc(1, 1, 1, 1, 1, true); verify(context, times(1)).arc(1, 1, 1, 1, 1, true); }
public void arc(double x, double y, double radius, double startAngle, double endAngle) { context.arc(x, y, radius, startAngle, endAngle); }
DelegateNativeContext2D implements INativeContext2D { public void arc(double x, double y, double radius, double startAngle, double endAngle) { context.arc(x, y, radius, startAngle, endAngle); } }
DelegateNativeContext2D implements INativeContext2D { public void arc(double x, double y, double radius, double startAngle, double endAngle) { context.arc(x, y, radius, startAngle, endAngle); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); }
DelegateNativeContext2D implements INativeContext2D { public void arc(double x, double y, double radius, double startAngle, double endAngle) { context.arc(x, y, radius, startAngle, endAngle); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
DelegateNativeContext2D implements INativeContext2D { public void arc(double x, double y, double radius, double startAngle, double endAngle) { context.arc(x, y, radius, startAngle, endAngle); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
@Test public void ellipse() { delegateNativeContext2D.ellipse(1, 1, 1, 1, 1, 1, 1); verify(context, times(1)).ellipse(1, 1, 1, 1, 1, 1, 1); }
public void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac) { context.ellipse(x, y, rx, ry, ro, sa, ea, ac); }
DelegateNativeContext2D implements INativeContext2D { public void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac) { context.ellipse(x, y, rx, ry, ro, sa, ea, ac); } }
DelegateNativeContext2D implements INativeContext2D { public void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac) { context.ellipse(x, y, rx, ry, ro, sa, ea, ac); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); }
DelegateNativeContext2D implements INativeContext2D { public void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac) { context.ellipse(x, y, rx, ry, ro, sa, ea, ac); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
DelegateNativeContext2D implements INativeContext2D { public void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac) { context.ellipse(x, y, rx, ry, ro, sa, ea, ac); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
@Test public void testWBFromDMN() { when(literalExpression.getId()).thenReturn(UUID); when(literalExpression.getDescription()).thenReturn(DESCRIPTION); when(literalExpression.getTypeRef()).thenReturn(TYPE_REF); when(literalExpression.getText()).thenReturn(TEXT); when(literalExpression.getExpressionLanguage()).thenReturn(EXPRESSION_LANGUAGE); when(literalExpression.getImportedValues()).thenReturn(jsitImportedValues); when(jsitImportedValues.getImportedElement()).thenReturn(IMPORTED_ELEMENT); final LiteralExpression result = LiteralExpressionPropertyConverter.wbFromDMN(literalExpression); assertThat(result.getId().getValue()).isEqualTo(UUID); assertThat(result.getDescription().getValue()).isEqualTo(DESCRIPTION); assertThat(result.getTypeRef().getNamespaceURI()).isEmpty(); assertThat(result.getTypeRef().getLocalPart()).isEqualTo(TYPE_REF); assertThat(result.getText().getValue()).isEqualTo(TEXT); assertThat(result.getExpressionLanguage().getValue()).isEqualTo(EXPRESSION_LANGUAGE); assertThat(result.getImportedValues().getImportedElement()).isEqualTo(IMPORTED_ELEMENT); assertThat(result.getImportedValues().getParent()).isEqualTo(result); }
public static LiteralExpression wbFromDMN(final JSITLiteralExpression dmn) { if (Objects.isNull(dmn)) { return null; } final Id id = IdPropertyConverter.wbFromDMN(dmn.getId()); final Description description = DescriptionPropertyConverter.wbFromDMN(dmn.getDescription()); final QName typeRef = QNamePropertyConverter.wbFromDMN(dmn.getTypeRef()); final Text text = new Text(Objects.nonNull(dmn.getText()) ? dmn.getText() : ""); final ExpressionLanguage expressionLanguage = ExpressionLanguagePropertyConverter.wbFromDMN(dmn.getExpressionLanguage()); final ImportedValues importedValues = ImportedValuesConverter.wbFromDMN(dmn.getImportedValues()); final LiteralExpression result = new LiteralExpression(id, description, typeRef, text, importedValues, expressionLanguage); if (Objects.nonNull(importedValues)) { importedValues.setParent(result); } return result; }
LiteralExpressionPropertyConverter { public static LiteralExpression wbFromDMN(final JSITLiteralExpression dmn) { if (Objects.isNull(dmn)) { return null; } final Id id = IdPropertyConverter.wbFromDMN(dmn.getId()); final Description description = DescriptionPropertyConverter.wbFromDMN(dmn.getDescription()); final QName typeRef = QNamePropertyConverter.wbFromDMN(dmn.getTypeRef()); final Text text = new Text(Objects.nonNull(dmn.getText()) ? dmn.getText() : ""); final ExpressionLanguage expressionLanguage = ExpressionLanguagePropertyConverter.wbFromDMN(dmn.getExpressionLanguage()); final ImportedValues importedValues = ImportedValuesConverter.wbFromDMN(dmn.getImportedValues()); final LiteralExpression result = new LiteralExpression(id, description, typeRef, text, importedValues, expressionLanguage); if (Objects.nonNull(importedValues)) { importedValues.setParent(result); } return result; } }
LiteralExpressionPropertyConverter { public static LiteralExpression wbFromDMN(final JSITLiteralExpression dmn) { if (Objects.isNull(dmn)) { return null; } final Id id = IdPropertyConverter.wbFromDMN(dmn.getId()); final Description description = DescriptionPropertyConverter.wbFromDMN(dmn.getDescription()); final QName typeRef = QNamePropertyConverter.wbFromDMN(dmn.getTypeRef()); final Text text = new Text(Objects.nonNull(dmn.getText()) ? dmn.getText() : ""); final ExpressionLanguage expressionLanguage = ExpressionLanguagePropertyConverter.wbFromDMN(dmn.getExpressionLanguage()); final ImportedValues importedValues = ImportedValuesConverter.wbFromDMN(dmn.getImportedValues()); final LiteralExpression result = new LiteralExpression(id, description, typeRef, text, importedValues, expressionLanguage); if (Objects.nonNull(importedValues)) { importedValues.setParent(result); } return result; } }
LiteralExpressionPropertyConverter { public static LiteralExpression wbFromDMN(final JSITLiteralExpression dmn) { if (Objects.isNull(dmn)) { return null; } final Id id = IdPropertyConverter.wbFromDMN(dmn.getId()); final Description description = DescriptionPropertyConverter.wbFromDMN(dmn.getDescription()); final QName typeRef = QNamePropertyConverter.wbFromDMN(dmn.getTypeRef()); final Text text = new Text(Objects.nonNull(dmn.getText()) ? dmn.getText() : ""); final ExpressionLanguage expressionLanguage = ExpressionLanguagePropertyConverter.wbFromDMN(dmn.getExpressionLanguage()); final ImportedValues importedValues = ImportedValuesConverter.wbFromDMN(dmn.getImportedValues()); final LiteralExpression result = new LiteralExpression(id, description, typeRef, text, importedValues, expressionLanguage); if (Objects.nonNull(importedValues)) { importedValues.setParent(result); } return result; } static LiteralExpression wbFromDMN(final JSITLiteralExpression dmn); static JSITLiteralExpression dmnFromWB(final IsLiteralExpression wb); }
LiteralExpressionPropertyConverter { public static LiteralExpression wbFromDMN(final JSITLiteralExpression dmn) { if (Objects.isNull(dmn)) { return null; } final Id id = IdPropertyConverter.wbFromDMN(dmn.getId()); final Description description = DescriptionPropertyConverter.wbFromDMN(dmn.getDescription()); final QName typeRef = QNamePropertyConverter.wbFromDMN(dmn.getTypeRef()); final Text text = new Text(Objects.nonNull(dmn.getText()) ? dmn.getText() : ""); final ExpressionLanguage expressionLanguage = ExpressionLanguagePropertyConverter.wbFromDMN(dmn.getExpressionLanguage()); final ImportedValues importedValues = ImportedValuesConverter.wbFromDMN(dmn.getImportedValues()); final LiteralExpression result = new LiteralExpression(id, description, typeRef, text, importedValues, expressionLanguage); if (Objects.nonNull(importedValues)) { importedValues.setParent(result); } return result; } static LiteralExpression wbFromDMN(final JSITLiteralExpression dmn); static JSITLiteralExpression dmnFromWB(final IsLiteralExpression wb); }
@Test public void ellipse1() { delegateNativeContext2D.ellipse(1, 1, 1, 1, 1, 1, 1, true); verify(context, times(1)).ellipse(1, 1, 1, 1, 1, 1, 1, true); }
public void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac) { context.ellipse(x, y, rx, ry, ro, sa, ea, ac); }
DelegateNativeContext2D implements INativeContext2D { public void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac) { context.ellipse(x, y, rx, ry, ro, sa, ea, ac); } }
DelegateNativeContext2D implements INativeContext2D { public void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac) { context.ellipse(x, y, rx, ry, ro, sa, ea, ac); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); }
DelegateNativeContext2D implements INativeContext2D { public void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac) { context.ellipse(x, y, rx, ry, ro, sa, ea, ac); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
DelegateNativeContext2D implements INativeContext2D { public void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac) { context.ellipse(x, y, rx, ry, ro, sa, ea, ac); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
@Test public void arcTo() { delegateNativeContext2D.arcTo(1, 1, 1, 1, 1); verify(context, times(1)).arcTo(1, 1, 1, 1, 1); }
public void arcTo(double x1, double y1, double x2, double y2, double radius) { context.arcTo(x1, y1, x2, y2, radius); }
DelegateNativeContext2D implements INativeContext2D { public void arcTo(double x1, double y1, double x2, double y2, double radius) { context.arcTo(x1, y1, x2, y2, radius); } }
DelegateNativeContext2D implements INativeContext2D { public void arcTo(double x1, double y1, double x2, double y2, double radius) { context.arcTo(x1, y1, x2, y2, radius); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); }
DelegateNativeContext2D implements INativeContext2D { public void arcTo(double x1, double y1, double x2, double y2, double radius) { context.arcTo(x1, y1, x2, y2, radius); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
DelegateNativeContext2D implements INativeContext2D { public void arcTo(double x1, double y1, double x2, double y2, double radius) { context.arcTo(x1, y1, x2, y2, radius); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
@Test public void bezierCurveTo() { delegateNativeContext2D.bezierCurveTo(1, 1, 1, 1, 1, 1); verify(context, times(1)).bezierCurveTo(1, 1, 1, 1, 1, 1); }
public void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y) { context.bezierCurveTo(cp1x, cp1y, cp2x, cp2y, x, y); }
DelegateNativeContext2D implements INativeContext2D { public void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y) { context.bezierCurveTo(cp1x, cp1y, cp2x, cp2y, x, y); } }
DelegateNativeContext2D implements INativeContext2D { public void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y) { context.bezierCurveTo(cp1x, cp1y, cp2x, cp2y, x, y); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); }
DelegateNativeContext2D implements INativeContext2D { public void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y) { context.bezierCurveTo(cp1x, cp1y, cp2x, cp2y, x, y); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
DelegateNativeContext2D implements INativeContext2D { public void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y) { context.bezierCurveTo(cp1x, cp1y, cp2x, cp2y, x, y); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
@Test public void clearRect() { delegateNativeContext2D.clearRect(1, 1, 1, 1); verify(context, times(1)).clearRect(1, 1, 1, 1); }
public void clearRect(double x, double y, double w, double h) { context.clearRect(x, y, w, h); }
DelegateNativeContext2D implements INativeContext2D { public void clearRect(double x, double y, double w, double h) { context.clearRect(x, y, w, h); } }
DelegateNativeContext2D implements INativeContext2D { public void clearRect(double x, double y, double w, double h) { context.clearRect(x, y, w, h); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); }
DelegateNativeContext2D implements INativeContext2D { public void clearRect(double x, double y, double w, double h) { context.clearRect(x, y, w, h); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
DelegateNativeContext2D implements INativeContext2D { public void clearRect(double x, double y, double w, double h) { context.clearRect(x, y, w, h); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
@Test public void clip() { delegateNativeContext2D.clip(); verify(context, times(1)).clip(); }
public void clip() { context.clip(); }
DelegateNativeContext2D implements INativeContext2D { public void clip() { context.clip(); } }
DelegateNativeContext2D implements INativeContext2D { public void clip() { context.clip(); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); }
DelegateNativeContext2D implements INativeContext2D { public void clip() { context.clip(); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
DelegateNativeContext2D implements INativeContext2D { public void clip() { context.clip(); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
@Test(expected = UnsupportedOperationException.class) public void clip2() { final Path2D.NativePath2D path = null; delegateNativeContext2D.clip(path); }
public void clip() { context.clip(); }
DelegateNativeContext2D implements INativeContext2D { public void clip() { context.clip(); } }
DelegateNativeContext2D implements INativeContext2D { public void clip() { context.clip(); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); }
DelegateNativeContext2D implements INativeContext2D { public void clip() { context.clip(); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
DelegateNativeContext2D implements INativeContext2D { public void clip() { context.clip(); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
@Test public void fill() { delegateNativeContext2D.fill(); verify(context, times(1)).fill(); }
public void fill() { context.fill(); }
DelegateNativeContext2D implements INativeContext2D { public void fill() { context.fill(); } }
DelegateNativeContext2D implements INativeContext2D { public void fill() { context.fill(); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); }
DelegateNativeContext2D implements INativeContext2D { public void fill() { context.fill(); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
DelegateNativeContext2D implements INativeContext2D { public void fill() { context.fill(); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
@Test public void stroke() { delegateNativeContext2D.stroke(); verify(context, times(1)).stroke(); }
public void stroke() { context.stroke(); }
DelegateNativeContext2D implements INativeContext2D { public void stroke() { context.stroke(); } }
DelegateNativeContext2D implements INativeContext2D { public void stroke() { context.stroke(); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); }
DelegateNativeContext2D implements INativeContext2D { public void stroke() { context.stroke(); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
DelegateNativeContext2D implements INativeContext2D { public void stroke() { context.stroke(); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
@Test public void fillRect() { delegateNativeContext2D.fillRect(1, 1, 1, 1); verify(context, times(1)).fillRect(1, 1, 1, 1); }
public void fillRect(double x, double y, double w, double h) { context.fillRect(x, y, w, h); }
DelegateNativeContext2D implements INativeContext2D { public void fillRect(double x, double y, double w, double h) { context.fillRect(x, y, w, h); } }
DelegateNativeContext2D implements INativeContext2D { public void fillRect(double x, double y, double w, double h) { context.fillRect(x, y, w, h); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); }
DelegateNativeContext2D implements INativeContext2D { public void fillRect(double x, double y, double w, double h) { context.fillRect(x, y, w, h); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
DelegateNativeContext2D implements INativeContext2D { public void fillRect(double x, double y, double w, double h) { context.fillRect(x, y, w, h); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
@Test public void fillText() { delegateNativeContext2D.fillText("text", 1, 1); verify(context, times(1)).fillText("text", 1, 1); }
public void fillText(String text, double x, double y) { context.fillText(text, x, y); }
DelegateNativeContext2D implements INativeContext2D { public void fillText(String text, double x, double y) { context.fillText(text, x, y); } }
DelegateNativeContext2D implements INativeContext2D { public void fillText(String text, double x, double y) { context.fillText(text, x, y); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); }
DelegateNativeContext2D implements INativeContext2D { public void fillText(String text, double x, double y) { context.fillText(text, x, y); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
DelegateNativeContext2D implements INativeContext2D { public void fillText(String text, double x, double y) { context.fillText(text, x, y); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
@Test public void testDMNFromWB() { when(wb.getId()).thenReturn(new Id(UUID)); when(wb.getDescription()).thenReturn(new Description(DESCRIPTION)); when(wb.getTypeRef()).thenReturn(new QName(KIE.getUri(), TYPE_REF, KIE.getPrefix())); when(wb.getText()).thenReturn(new Text(TEXT)); when(wb.getExpressionLanguage()).thenReturn(new ExpressionLanguage(EXPRESSION_LANGUAGE)); final JSITLiteralExpression result = LiteralExpressionPropertyConverter.dmnFromWB(wb); verify(result).setId(UUID); verify(result).setDescription(DESCRIPTION); verify(result).setTypeRef("{" + KIE.getUri() + "}" + TYPE_REF); verify(result).setText(TEXT); verify(result).setExpressionLanguage(EXPRESSION_LANGUAGE); }
public static JSITLiteralExpression dmnFromWB(final IsLiteralExpression wb) { if (Objects.isNull(wb)) { return null; } final JSITLiteralExpression result = LITERAL_EXPRESSION_PROVIDER.make(); result.setId(wb.getId().getValue()); final String description = wb.getDescription().getValue(); if (StringUtils.nonEmpty(description)) { result.setDescription(description); } if (wb instanceof LiteralExpression) { final String expressionLanguage = ((LiteralExpression) wb).getExpressionLanguage().getValue(); if (StringUtils.nonEmpty(expressionLanguage)) { result.setExpressionLanguage(expressionLanguage); } } QNamePropertyConverter.setDMNfromWB(wb.getTypeRef(), result::setTypeRef); result.setText(wb.getText().getValue()); final JSITImportedValues importedValues = ImportedValuesConverter.dmnFromWB(wb.getImportedValues()); if (Objects.nonNull(importedValues)) { result.setImportedValues(importedValues); } return result; }
LiteralExpressionPropertyConverter { public static JSITLiteralExpression dmnFromWB(final IsLiteralExpression wb) { if (Objects.isNull(wb)) { return null; } final JSITLiteralExpression result = LITERAL_EXPRESSION_PROVIDER.make(); result.setId(wb.getId().getValue()); final String description = wb.getDescription().getValue(); if (StringUtils.nonEmpty(description)) { result.setDescription(description); } if (wb instanceof LiteralExpression) { final String expressionLanguage = ((LiteralExpression) wb).getExpressionLanguage().getValue(); if (StringUtils.nonEmpty(expressionLanguage)) { result.setExpressionLanguage(expressionLanguage); } } QNamePropertyConverter.setDMNfromWB(wb.getTypeRef(), result::setTypeRef); result.setText(wb.getText().getValue()); final JSITImportedValues importedValues = ImportedValuesConverter.dmnFromWB(wb.getImportedValues()); if (Objects.nonNull(importedValues)) { result.setImportedValues(importedValues); } return result; } }
LiteralExpressionPropertyConverter { public static JSITLiteralExpression dmnFromWB(final IsLiteralExpression wb) { if (Objects.isNull(wb)) { return null; } final JSITLiteralExpression result = LITERAL_EXPRESSION_PROVIDER.make(); result.setId(wb.getId().getValue()); final String description = wb.getDescription().getValue(); if (StringUtils.nonEmpty(description)) { result.setDescription(description); } if (wb instanceof LiteralExpression) { final String expressionLanguage = ((LiteralExpression) wb).getExpressionLanguage().getValue(); if (StringUtils.nonEmpty(expressionLanguage)) { result.setExpressionLanguage(expressionLanguage); } } QNamePropertyConverter.setDMNfromWB(wb.getTypeRef(), result::setTypeRef); result.setText(wb.getText().getValue()); final JSITImportedValues importedValues = ImportedValuesConverter.dmnFromWB(wb.getImportedValues()); if (Objects.nonNull(importedValues)) { result.setImportedValues(importedValues); } return result; } }
LiteralExpressionPropertyConverter { public static JSITLiteralExpression dmnFromWB(final IsLiteralExpression wb) { if (Objects.isNull(wb)) { return null; } final JSITLiteralExpression result = LITERAL_EXPRESSION_PROVIDER.make(); result.setId(wb.getId().getValue()); final String description = wb.getDescription().getValue(); if (StringUtils.nonEmpty(description)) { result.setDescription(description); } if (wb instanceof LiteralExpression) { final String expressionLanguage = ((LiteralExpression) wb).getExpressionLanguage().getValue(); if (StringUtils.nonEmpty(expressionLanguage)) { result.setExpressionLanguage(expressionLanguage); } } QNamePropertyConverter.setDMNfromWB(wb.getTypeRef(), result::setTypeRef); result.setText(wb.getText().getValue()); final JSITImportedValues importedValues = ImportedValuesConverter.dmnFromWB(wb.getImportedValues()); if (Objects.nonNull(importedValues)) { result.setImportedValues(importedValues); } return result; } static LiteralExpression wbFromDMN(final JSITLiteralExpression dmn); static JSITLiteralExpression dmnFromWB(final IsLiteralExpression wb); }
LiteralExpressionPropertyConverter { public static JSITLiteralExpression dmnFromWB(final IsLiteralExpression wb) { if (Objects.isNull(wb)) { return null; } final JSITLiteralExpression result = LITERAL_EXPRESSION_PROVIDER.make(); result.setId(wb.getId().getValue()); final String description = wb.getDescription().getValue(); if (StringUtils.nonEmpty(description)) { result.setDescription(description); } if (wb instanceof LiteralExpression) { final String expressionLanguage = ((LiteralExpression) wb).getExpressionLanguage().getValue(); if (StringUtils.nonEmpty(expressionLanguage)) { result.setExpressionLanguage(expressionLanguage); } } QNamePropertyConverter.setDMNfromWB(wb.getTypeRef(), result::setTypeRef); result.setText(wb.getText().getValue()); final JSITImportedValues importedValues = ImportedValuesConverter.dmnFromWB(wb.getImportedValues()); if (Objects.nonNull(importedValues)) { result.setImportedValues(importedValues); } return result; } static LiteralExpression wbFromDMN(final JSITLiteralExpression dmn); static JSITLiteralExpression dmnFromWB(final IsLiteralExpression wb); }
@Test(expected = UnsupportedOperationException.class) public void fillTextWithGradient() { delegateNativeContext2D.fillTextWithGradient("text", 1, 1, 1, 1, 1, 1, "black"); }
public void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color) { throwException(); }
DelegateNativeContext2D implements INativeContext2D { public void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color) { throwException(); } }
DelegateNativeContext2D implements INativeContext2D { public void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color) { throwException(); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); }
DelegateNativeContext2D implements INativeContext2D { public void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color) { throwException(); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
DelegateNativeContext2D implements INativeContext2D { public void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color) { throwException(); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
@Test public void fillText1() { delegateNativeContext2D.fillText("text", 1, 1, 1); verify(context, times(1)).fillText("text", 1, 1); }
public void fillText(String text, double x, double y) { context.fillText(text, x, y); }
DelegateNativeContext2D implements INativeContext2D { public void fillText(String text, double x, double y) { context.fillText(text, x, y); } }
DelegateNativeContext2D implements INativeContext2D { public void fillText(String text, double x, double y) { context.fillText(text, x, y); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); }
DelegateNativeContext2D implements INativeContext2D { public void fillText(String text, double x, double y) { context.fillText(text, x, y); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
DelegateNativeContext2D implements INativeContext2D { public void fillText(String text, double x, double y) { context.fillText(text, x, y); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
@Test public void setFillColor() { delegateNativeContext2D.setFillColor("black"); verify(context, times(1)).setFillStyle("black"); }
public void setFillColor(String fill) { context.setFillStyle(fill); }
DelegateNativeContext2D implements INativeContext2D { public void setFillColor(String fill) { context.setFillStyle(fill); } }
DelegateNativeContext2D implements INativeContext2D { public void setFillColor(String fill) { context.setFillStyle(fill); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); }
DelegateNativeContext2D implements INativeContext2D { public void setFillColor(String fill) { context.setFillStyle(fill); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
DelegateNativeContext2D implements INativeContext2D { public void setFillColor(String fill) { context.setFillStyle(fill); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
@Test public void rect() { delegateNativeContext2D.rect(1, 1, 1, 1); verify(context, times(1)).rect(1, 1, 1, 1); }
public void rect(double x, double y, double w, double h) { context.rect(x, y, w, h); }
DelegateNativeContext2D implements INativeContext2D { public void rect(double x, double y, double w, double h) { context.rect(x, y, w, h); } }
DelegateNativeContext2D implements INativeContext2D { public void rect(double x, double y, double w, double h) { context.rect(x, y, w, h); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); }
DelegateNativeContext2D implements INativeContext2D { public void rect(double x, double y, double w, double h) { context.rect(x, y, w, h); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
DelegateNativeContext2D implements INativeContext2D { public void rect(double x, double y, double w, double h) { context.rect(x, y, w, h); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
@Test public void rotate() { delegateNativeContext2D.rotate(1); verify(context, times(1)).rotate(1); }
public void rotate(double angle) { context.rotate(angle); }
DelegateNativeContext2D implements INativeContext2D { public void rotate(double angle) { context.rotate(angle); } }
DelegateNativeContext2D implements INativeContext2D { public void rotate(double angle) { context.rotate(angle); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); }
DelegateNativeContext2D implements INativeContext2D { public void rotate(double angle) { context.rotate(angle); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
DelegateNativeContext2D implements INativeContext2D { public void rotate(double angle) { context.rotate(angle); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
@Test public void scale() { delegateNativeContext2D.scale(1, 1); verify(context, times(1)).scale(1, 1); }
public void scale(double sx, double sy) { context.scale(sx, sy); }
DelegateNativeContext2D implements INativeContext2D { public void scale(double sx, double sy) { context.scale(sx, sy); } }
DelegateNativeContext2D implements INativeContext2D { public void scale(double sx, double sy) { context.scale(sx, sy); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); }
DelegateNativeContext2D implements INativeContext2D { public void scale(double sx, double sy) { context.scale(sx, sy); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
DelegateNativeContext2D implements INativeContext2D { public void scale(double sx, double sy) { context.scale(sx, sy); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
@Test public void setStrokeColor() { delegateNativeContext2D.setStrokeColor("black"); verify(context, times(1)).setStrokeStyle("black"); }
public void setStrokeColor(String color) { context.setStrokeStyle(color); }
DelegateNativeContext2D implements INativeContext2D { public void setStrokeColor(String color) { context.setStrokeStyle(color); } }
DelegateNativeContext2D implements INativeContext2D { public void setStrokeColor(String color) { context.setStrokeStyle(color); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); }
DelegateNativeContext2D implements INativeContext2D { public void setStrokeColor(String color) { context.setStrokeStyle(color); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
DelegateNativeContext2D implements INativeContext2D { public void setStrokeColor(String color) { context.setStrokeStyle(color); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
@Test public void setStrokeWidth() { delegateNativeContext2D.setStrokeWidth(1); verify(context, times(1)).setLineWidth(1); }
public void setStrokeWidth(double width) { context.setLineWidth(width); }
DelegateNativeContext2D implements INativeContext2D { public void setStrokeWidth(double width) { context.setLineWidth(width); } }
DelegateNativeContext2D implements INativeContext2D { public void setStrokeWidth(double width) { context.setLineWidth(width); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); }
DelegateNativeContext2D implements INativeContext2D { public void setStrokeWidth(double width) { context.setLineWidth(width); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
DelegateNativeContext2D implements INativeContext2D { public void setStrokeWidth(double width) { context.setLineWidth(width); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
@Test public void setImageSmoothingEnabled() { delegateNativeContext2D.setImageSmoothingEnabled(true); verify(context, times(1)).setImageSmoothingEnabled(true); }
public void setImageSmoothingEnabled(boolean enabled) { context.setImageSmoothingEnabled(enabled); }
DelegateNativeContext2D implements INativeContext2D { public void setImageSmoothingEnabled(boolean enabled) { context.setImageSmoothingEnabled(enabled); } }
DelegateNativeContext2D implements INativeContext2D { public void setImageSmoothingEnabled(boolean enabled) { context.setImageSmoothingEnabled(enabled); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); }
DelegateNativeContext2D implements INativeContext2D { public void setImageSmoothingEnabled(boolean enabled) { context.setImageSmoothingEnabled(enabled); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
DelegateNativeContext2D implements INativeContext2D { public void setImageSmoothingEnabled(boolean enabled) { context.setImageSmoothingEnabled(enabled); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
@Test public void setFillGradientLinear() { delegateNativeContext2D.setFillGradient(linearGradientJSO); verify(context, times(1)).setFillStyle(null); }
public void setFillGradient(LinearGradient.LinearGradientJSO grad) { setFillColor(null); }
DelegateNativeContext2D implements INativeContext2D { public void setFillGradient(LinearGradient.LinearGradientJSO grad) { setFillColor(null); } }
DelegateNativeContext2D implements INativeContext2D { public void setFillGradient(LinearGradient.LinearGradientJSO grad) { setFillColor(null); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); }
DelegateNativeContext2D implements INativeContext2D { public void setFillGradient(LinearGradient.LinearGradientJSO grad) { setFillColor(null); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
DelegateNativeContext2D implements INativeContext2D { public void setFillGradient(LinearGradient.LinearGradientJSO grad) { setFillColor(null); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
@Test public void testWBFromDMNWhenNull() { final OutputClauseLiteralExpression wb = OutputClauseLiteralExpressionPropertyConverter.wbFromDMN(null); assertThat(wb).isNotNull(); }
public static OutputClauseLiteralExpression wbFromDMN(final JSITLiteralExpression dmn) { if (Objects.isNull(dmn)) { return new OutputClauseLiteralExpression(); } final Id id = IdPropertyConverter.wbFromDMN(dmn.getId()); final Description description = DescriptionPropertyConverter.wbFromDMN(dmn.getDescription()); final QName typeRef = QNamePropertyConverter.wbFromDMN(dmn.getTypeRef()); final Text text = new Text(dmn.getText()); final ImportedValues importedValues = ImportedValuesConverter.wbFromDMN(dmn.getImportedValues()); final OutputClauseLiteralExpression result = new OutputClauseLiteralExpression(id, description, typeRef, text, importedValues); if (Objects.nonNull(importedValues)) { importedValues.setParent(result); } return result; }
OutputClauseLiteralExpressionPropertyConverter { public static OutputClauseLiteralExpression wbFromDMN(final JSITLiteralExpression dmn) { if (Objects.isNull(dmn)) { return new OutputClauseLiteralExpression(); } final Id id = IdPropertyConverter.wbFromDMN(dmn.getId()); final Description description = DescriptionPropertyConverter.wbFromDMN(dmn.getDescription()); final QName typeRef = QNamePropertyConverter.wbFromDMN(dmn.getTypeRef()); final Text text = new Text(dmn.getText()); final ImportedValues importedValues = ImportedValuesConverter.wbFromDMN(dmn.getImportedValues()); final OutputClauseLiteralExpression result = new OutputClauseLiteralExpression(id, description, typeRef, text, importedValues); if (Objects.nonNull(importedValues)) { importedValues.setParent(result); } return result; } }
OutputClauseLiteralExpressionPropertyConverter { public static OutputClauseLiteralExpression wbFromDMN(final JSITLiteralExpression dmn) { if (Objects.isNull(dmn)) { return new OutputClauseLiteralExpression(); } final Id id = IdPropertyConverter.wbFromDMN(dmn.getId()); final Description description = DescriptionPropertyConverter.wbFromDMN(dmn.getDescription()); final QName typeRef = QNamePropertyConverter.wbFromDMN(dmn.getTypeRef()); final Text text = new Text(dmn.getText()); final ImportedValues importedValues = ImportedValuesConverter.wbFromDMN(dmn.getImportedValues()); final OutputClauseLiteralExpression result = new OutputClauseLiteralExpression(id, description, typeRef, text, importedValues); if (Objects.nonNull(importedValues)) { importedValues.setParent(result); } return result; } }
OutputClauseLiteralExpressionPropertyConverter { public static OutputClauseLiteralExpression wbFromDMN(final JSITLiteralExpression dmn) { if (Objects.isNull(dmn)) { return new OutputClauseLiteralExpression(); } final Id id = IdPropertyConverter.wbFromDMN(dmn.getId()); final Description description = DescriptionPropertyConverter.wbFromDMN(dmn.getDescription()); final QName typeRef = QNamePropertyConverter.wbFromDMN(dmn.getTypeRef()); final Text text = new Text(dmn.getText()); final ImportedValues importedValues = ImportedValuesConverter.wbFromDMN(dmn.getImportedValues()); final OutputClauseLiteralExpression result = new OutputClauseLiteralExpression(id, description, typeRef, text, importedValues); if (Objects.nonNull(importedValues)) { importedValues.setParent(result); } return result; } static OutputClauseLiteralExpression wbFromDMN(final JSITLiteralExpression dmn); static JSITLiteralExpression dmnFromWB(final OutputClauseLiteralExpression wb); }
OutputClauseLiteralExpressionPropertyConverter { public static OutputClauseLiteralExpression wbFromDMN(final JSITLiteralExpression dmn) { if (Objects.isNull(dmn)) { return new OutputClauseLiteralExpression(); } final Id id = IdPropertyConverter.wbFromDMN(dmn.getId()); final Description description = DescriptionPropertyConverter.wbFromDMN(dmn.getDescription()); final QName typeRef = QNamePropertyConverter.wbFromDMN(dmn.getTypeRef()); final Text text = new Text(dmn.getText()); final ImportedValues importedValues = ImportedValuesConverter.wbFromDMN(dmn.getImportedValues()); final OutputClauseLiteralExpression result = new OutputClauseLiteralExpression(id, description, typeRef, text, importedValues); if (Objects.nonNull(importedValues)) { importedValues.setParent(result); } return result; } static OutputClauseLiteralExpression wbFromDMN(final JSITLiteralExpression dmn); static JSITLiteralExpression dmnFromWB(final OutputClauseLiteralExpression wb); }
@Test public void setFillGradientRadial() { delegateNativeContext2D.setFillGradient(radialGradientJSO); verify(context, times(1)).setFillStyle(null); }
public void setFillGradient(LinearGradient.LinearGradientJSO grad) { setFillColor(null); }
DelegateNativeContext2D implements INativeContext2D { public void setFillGradient(LinearGradient.LinearGradientJSO grad) { setFillColor(null); } }
DelegateNativeContext2D implements INativeContext2D { public void setFillGradient(LinearGradient.LinearGradientJSO grad) { setFillColor(null); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); }
DelegateNativeContext2D implements INativeContext2D { public void setFillGradient(LinearGradient.LinearGradientJSO grad) { setFillColor(null); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
DelegateNativeContext2D implements INativeContext2D { public void setFillGradient(LinearGradient.LinearGradientJSO grad) { setFillColor(null); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
@Test public void setFillGradientPattern() { delegateNativeContext2D.setFillGradient(patternGradientJSO); verify(context, times(1)).setFillStyle(null); }
public void setFillGradient(LinearGradient.LinearGradientJSO grad) { setFillColor(null); }
DelegateNativeContext2D implements INativeContext2D { public void setFillGradient(LinearGradient.LinearGradientJSO grad) { setFillColor(null); } }
DelegateNativeContext2D implements INativeContext2D { public void setFillGradient(LinearGradient.LinearGradientJSO grad) { setFillColor(null); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); }
DelegateNativeContext2D implements INativeContext2D { public void setFillGradient(LinearGradient.LinearGradientJSO grad) { setFillColor(null); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
DelegateNativeContext2D implements INativeContext2D { public void setFillGradient(LinearGradient.LinearGradientJSO grad) { setFillColor(null); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
@Test public void transform() { delegateNativeContext2D.transform(1, 1, 1, 1, 1, 1); verify(context, times(1)).transform(1, 1, 1, 1, 1, 1); }
public void transform(Transform.TransformJSO jso) { this.transform(jso.get(0), jso.get(1), jso.get(2), jso.get(3), jso.get(4), jso.get(5)); }
DelegateNativeContext2D implements INativeContext2D { public void transform(Transform.TransformJSO jso) { this.transform(jso.get(0), jso.get(1), jso.get(2), jso.get(3), jso.get(4), jso.get(5)); } }
DelegateNativeContext2D implements INativeContext2D { public void transform(Transform.TransformJSO jso) { this.transform(jso.get(0), jso.get(1), jso.get(2), jso.get(3), jso.get(4), jso.get(5)); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); }
DelegateNativeContext2D implements INativeContext2D { public void transform(Transform.TransformJSO jso) { this.transform(jso.get(0), jso.get(1), jso.get(2), jso.get(3), jso.get(4), jso.get(5)); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
DelegateNativeContext2D implements INativeContext2D { public void transform(Transform.TransformJSO jso) { this.transform(jso.get(0), jso.get(1), jso.get(2), jso.get(3), jso.get(4), jso.get(5)); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
@Test public void transform1() { delegateNativeContext2D.transform(Transform.TransformJSO.make(1, 1, 1, 1, 1, 1)); verify(context, times(1)).transform(1, 1, 1, 1, 1, 1); }
public void transform(Transform.TransformJSO jso) { this.transform(jso.get(0), jso.get(1), jso.get(2), jso.get(3), jso.get(4), jso.get(5)); }
DelegateNativeContext2D implements INativeContext2D { public void transform(Transform.TransformJSO jso) { this.transform(jso.get(0), jso.get(1), jso.get(2), jso.get(3), jso.get(4), jso.get(5)); } }
DelegateNativeContext2D implements INativeContext2D { public void transform(Transform.TransformJSO jso) { this.transform(jso.get(0), jso.get(1), jso.get(2), jso.get(3), jso.get(4), jso.get(5)); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); }
DelegateNativeContext2D implements INativeContext2D { public void transform(Transform.TransformJSO jso) { this.transform(jso.get(0), jso.get(1), jso.get(2), jso.get(3), jso.get(4), jso.get(5)); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
DelegateNativeContext2D implements INativeContext2D { public void transform(Transform.TransformJSO jso) { this.transform(jso.get(0), jso.get(1), jso.get(2), jso.get(3), jso.get(4), jso.get(5)); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
@Test public void setTransform() { delegateNativeContext2D.setTransform(Transform.TransformJSO.make(1, 1, 1, 1, 1, 1)); verify(context, times(1)).setTransform(1, 1, 1, 1, 1, 1); }
public void setTransform(Transform.TransformJSO jso) { this.setTransform(jso.get(0), jso.get(1), jso.get(2), jso.get(3), jso.get(4), jso.get(5)); }
DelegateNativeContext2D implements INativeContext2D { public void setTransform(Transform.TransformJSO jso) { this.setTransform(jso.get(0), jso.get(1), jso.get(2), jso.get(3), jso.get(4), jso.get(5)); } }
DelegateNativeContext2D implements INativeContext2D { public void setTransform(Transform.TransformJSO jso) { this.setTransform(jso.get(0), jso.get(1), jso.get(2), jso.get(3), jso.get(4), jso.get(5)); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); }
DelegateNativeContext2D implements INativeContext2D { public void setTransform(Transform.TransformJSO jso) { this.setTransform(jso.get(0), jso.get(1), jso.get(2), jso.get(3), jso.get(4), jso.get(5)); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
DelegateNativeContext2D implements INativeContext2D { public void setTransform(Transform.TransformJSO jso) { this.setTransform(jso.get(0), jso.get(1), jso.get(2), jso.get(3), jso.get(4), jso.get(5)); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
@Test public void setTransform1() { delegateNativeContext2D.setTransform(1, 1, 1, 1, 1, 1); verify(context, times(1)).setTransform(1, 1, 1, 1, 1, 1); }
public void setTransform(Transform.TransformJSO jso) { this.setTransform(jso.get(0), jso.get(1), jso.get(2), jso.get(3), jso.get(4), jso.get(5)); }
DelegateNativeContext2D implements INativeContext2D { public void setTransform(Transform.TransformJSO jso) { this.setTransform(jso.get(0), jso.get(1), jso.get(2), jso.get(3), jso.get(4), jso.get(5)); } }
DelegateNativeContext2D implements INativeContext2D { public void setTransform(Transform.TransformJSO jso) { this.setTransform(jso.get(0), jso.get(1), jso.get(2), jso.get(3), jso.get(4), jso.get(5)); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); }
DelegateNativeContext2D implements INativeContext2D { public void setTransform(Transform.TransformJSO jso) { this.setTransform(jso.get(0), jso.get(1), jso.get(2), jso.get(3), jso.get(4), jso.get(5)); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
DelegateNativeContext2D implements INativeContext2D { public void setTransform(Transform.TransformJSO jso) { this.setTransform(jso.get(0), jso.get(1), jso.get(2), jso.get(3), jso.get(4), jso.get(5)); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
@Test public void setToIdentityTransform() { delegateNativeContext2D.setToIdentityTransform(); verify(context, times(1)).setTransform(1, 0, 0, 1, 0, 0); }
public void setToIdentityTransform() { this.setTransform(1, 0, 0, 1, 0, 0); }
DelegateNativeContext2D implements INativeContext2D { public void setToIdentityTransform() { this.setTransform(1, 0, 0, 1, 0, 0); } }
DelegateNativeContext2D implements INativeContext2D { public void setToIdentityTransform() { this.setTransform(1, 0, 0, 1, 0, 0); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); }
DelegateNativeContext2D implements INativeContext2D { public void setToIdentityTransform() { this.setTransform(1, 0, 0, 1, 0, 0); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
DelegateNativeContext2D implements INativeContext2D { public void setToIdentityTransform() { this.setTransform(1, 0, 0, 1, 0, 0); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
@Test public void setTextFont() { delegateNativeContext2D.setTextFont("arial"); verify(context, times(1)).setFont("arial"); }
public void setTextFont(String font) { context.setFont(font); }
DelegateNativeContext2D implements INativeContext2D { public void setTextFont(String font) { context.setFont(font); } }
DelegateNativeContext2D implements INativeContext2D { public void setTextFont(String font) { context.setFont(font); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); }
DelegateNativeContext2D implements INativeContext2D { public void setTextFont(String font) { context.setFont(font); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
DelegateNativeContext2D implements INativeContext2D { public void setTextFont(String font) { context.setFont(font); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
@Test public void setTextBaseline() { delegateNativeContext2D.setTextBaseline("base"); verify(context, times(1)).setTextBaseline("base"); }
public void setTextBaseline(String baseline) { context.setTextBaseline(baseline); }
DelegateNativeContext2D implements INativeContext2D { public void setTextBaseline(String baseline) { context.setTextBaseline(baseline); } }
DelegateNativeContext2D implements INativeContext2D { public void setTextBaseline(String baseline) { context.setTextBaseline(baseline); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); }
DelegateNativeContext2D implements INativeContext2D { public void setTextBaseline(String baseline) { context.setTextBaseline(baseline); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
DelegateNativeContext2D implements INativeContext2D { public void setTextBaseline(String baseline) { context.setTextBaseline(baseline); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
@Test public void setTextAlign() { delegateNativeContext2D.setTextAlign("left"); verify(context, times(1)).setTextAlign("left"); }
public void setTextAlign(String align) { context.setTextAlign(align); }
DelegateNativeContext2D implements INativeContext2D { public void setTextAlign(String align) { context.setTextAlign(align); } }
DelegateNativeContext2D implements INativeContext2D { public void setTextAlign(String align) { context.setTextAlign(align); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); }
DelegateNativeContext2D implements INativeContext2D { public void setTextAlign(String align) { context.setTextAlign(align); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
DelegateNativeContext2D implements INativeContext2D { public void setTextAlign(String align) { context.setTextAlign(align); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
@Test public void testWBFromDMNWhenNonNull() { when(jsitLiteralExpression.getText()).thenReturn(TEXT); final OutputClauseLiteralExpression wb = OutputClauseLiteralExpressionPropertyConverter.wbFromDMN(jsitLiteralExpression); assertThat(wb).isNotNull(); assertThat(wb.getText().getValue()).isEqualTo(TEXT); }
public static OutputClauseLiteralExpression wbFromDMN(final JSITLiteralExpression dmn) { if (Objects.isNull(dmn)) { return new OutputClauseLiteralExpression(); } final Id id = IdPropertyConverter.wbFromDMN(dmn.getId()); final Description description = DescriptionPropertyConverter.wbFromDMN(dmn.getDescription()); final QName typeRef = QNamePropertyConverter.wbFromDMN(dmn.getTypeRef()); final Text text = new Text(dmn.getText()); final ImportedValues importedValues = ImportedValuesConverter.wbFromDMN(dmn.getImportedValues()); final OutputClauseLiteralExpression result = new OutputClauseLiteralExpression(id, description, typeRef, text, importedValues); if (Objects.nonNull(importedValues)) { importedValues.setParent(result); } return result; }
OutputClauseLiteralExpressionPropertyConverter { public static OutputClauseLiteralExpression wbFromDMN(final JSITLiteralExpression dmn) { if (Objects.isNull(dmn)) { return new OutputClauseLiteralExpression(); } final Id id = IdPropertyConverter.wbFromDMN(dmn.getId()); final Description description = DescriptionPropertyConverter.wbFromDMN(dmn.getDescription()); final QName typeRef = QNamePropertyConverter.wbFromDMN(dmn.getTypeRef()); final Text text = new Text(dmn.getText()); final ImportedValues importedValues = ImportedValuesConverter.wbFromDMN(dmn.getImportedValues()); final OutputClauseLiteralExpression result = new OutputClauseLiteralExpression(id, description, typeRef, text, importedValues); if (Objects.nonNull(importedValues)) { importedValues.setParent(result); } return result; } }
OutputClauseLiteralExpressionPropertyConverter { public static OutputClauseLiteralExpression wbFromDMN(final JSITLiteralExpression dmn) { if (Objects.isNull(dmn)) { return new OutputClauseLiteralExpression(); } final Id id = IdPropertyConverter.wbFromDMN(dmn.getId()); final Description description = DescriptionPropertyConverter.wbFromDMN(dmn.getDescription()); final QName typeRef = QNamePropertyConverter.wbFromDMN(dmn.getTypeRef()); final Text text = new Text(dmn.getText()); final ImportedValues importedValues = ImportedValuesConverter.wbFromDMN(dmn.getImportedValues()); final OutputClauseLiteralExpression result = new OutputClauseLiteralExpression(id, description, typeRef, text, importedValues); if (Objects.nonNull(importedValues)) { importedValues.setParent(result); } return result; } }
OutputClauseLiteralExpressionPropertyConverter { public static OutputClauseLiteralExpression wbFromDMN(final JSITLiteralExpression dmn) { if (Objects.isNull(dmn)) { return new OutputClauseLiteralExpression(); } final Id id = IdPropertyConverter.wbFromDMN(dmn.getId()); final Description description = DescriptionPropertyConverter.wbFromDMN(dmn.getDescription()); final QName typeRef = QNamePropertyConverter.wbFromDMN(dmn.getTypeRef()); final Text text = new Text(dmn.getText()); final ImportedValues importedValues = ImportedValuesConverter.wbFromDMN(dmn.getImportedValues()); final OutputClauseLiteralExpression result = new OutputClauseLiteralExpression(id, description, typeRef, text, importedValues); if (Objects.nonNull(importedValues)) { importedValues.setParent(result); } return result; } static OutputClauseLiteralExpression wbFromDMN(final JSITLiteralExpression dmn); static JSITLiteralExpression dmnFromWB(final OutputClauseLiteralExpression wb); }
OutputClauseLiteralExpressionPropertyConverter { public static OutputClauseLiteralExpression wbFromDMN(final JSITLiteralExpression dmn) { if (Objects.isNull(dmn)) { return new OutputClauseLiteralExpression(); } final Id id = IdPropertyConverter.wbFromDMN(dmn.getId()); final Description description = DescriptionPropertyConverter.wbFromDMN(dmn.getDescription()); final QName typeRef = QNamePropertyConverter.wbFromDMN(dmn.getTypeRef()); final Text text = new Text(dmn.getText()); final ImportedValues importedValues = ImportedValuesConverter.wbFromDMN(dmn.getImportedValues()); final OutputClauseLiteralExpression result = new OutputClauseLiteralExpression(id, description, typeRef, text, importedValues); if (Objects.nonNull(importedValues)) { importedValues.setParent(result); } return result; } static OutputClauseLiteralExpression wbFromDMN(final JSITLiteralExpression dmn); static JSITLiteralExpression dmnFromWB(final OutputClauseLiteralExpression wb); }
@Test public void strokeText() { delegateNativeContext2D.strokeText("text", 1, 1); verify(context, times(1)).strokeText("text", 1, 1); }
public void strokeText(String text, double x, double y) { context.strokeText(text, x, y); }
DelegateNativeContext2D implements INativeContext2D { public void strokeText(String text, double x, double y) { context.strokeText(text, x, y); } }
DelegateNativeContext2D implements INativeContext2D { public void strokeText(String text, double x, double y) { context.strokeText(text, x, y); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); }
DelegateNativeContext2D implements INativeContext2D { public void strokeText(String text, double x, double y) { context.strokeText(text, x, y); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
DelegateNativeContext2D implements INativeContext2D { public void strokeText(String text, double x, double y) { context.strokeText(text, x, y); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
@Test public void setGlobalAlpha() { delegateNativeContext2D.setGlobalAlpha(1); verify(context, times(1)).setGlobalAlpha(1); }
public void setGlobalAlpha(double alpha) { context.setGlobalAlpha(alpha); }
DelegateNativeContext2D implements INativeContext2D { public void setGlobalAlpha(double alpha) { context.setGlobalAlpha(alpha); } }
DelegateNativeContext2D implements INativeContext2D { public void setGlobalAlpha(double alpha) { context.setGlobalAlpha(alpha); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); }
DelegateNativeContext2D implements INativeContext2D { public void setGlobalAlpha(double alpha) { context.setGlobalAlpha(alpha); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
DelegateNativeContext2D implements INativeContext2D { public void setGlobalAlpha(double alpha) { context.setGlobalAlpha(alpha); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
@Test public void translate() { delegateNativeContext2D.translate(1, 1); verify(context, times(1)).translate(1, 1); }
public void translate(double x, double y) { context.translate(x, y); }
DelegateNativeContext2D implements INativeContext2D { public void translate(double x, double y) { context.translate(x, y); } }
DelegateNativeContext2D implements INativeContext2D { public void translate(double x, double y) { context.translate(x, y); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); }
DelegateNativeContext2D implements INativeContext2D { public void translate(double x, double y) { context.translate(x, y); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
DelegateNativeContext2D implements INativeContext2D { public void translate(double x, double y) { context.translate(x, y); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
@Test public void setShadow() { delegateNativeContext2D.setShadow(null); verify(context).setShadowColor(Mockito.anyString()); verify(context).setShadowOffsetX(Mockito.anyInt()); verify(context).setShadowOffsetY(Mockito.anyInt()); verify(context).setShadowBlur(Mockito.anyInt()); delegateNativeContext2D.setShadow(null); }
public void setShadow(Shadow.ShadowJSO shadow) { if (Objects.nonNull(shadow)) { context.setShadowColor(shadow.getColor()); context.setShadowOffsetX(shadow.getOffset().getX()); context.setShadowOffsetY(shadow.getOffset().getY()); context.setShadowBlur(shadow.getBlur()); } else { context.setShadowColor("transparent"); context.setShadowOffsetX(0); context.setShadowOffsetY(0); context.setShadowBlur(0); } }
DelegateNativeContext2D implements INativeContext2D { public void setShadow(Shadow.ShadowJSO shadow) { if (Objects.nonNull(shadow)) { context.setShadowColor(shadow.getColor()); context.setShadowOffsetX(shadow.getOffset().getX()); context.setShadowOffsetY(shadow.getOffset().getY()); context.setShadowBlur(shadow.getBlur()); } else { context.setShadowColor("transparent"); context.setShadowOffsetX(0); context.setShadowOffsetY(0); context.setShadowBlur(0); } } }
DelegateNativeContext2D implements INativeContext2D { public void setShadow(Shadow.ShadowJSO shadow) { if (Objects.nonNull(shadow)) { context.setShadowColor(shadow.getColor()); context.setShadowOffsetX(shadow.getOffset().getX()); context.setShadowOffsetY(shadow.getOffset().getY()); context.setShadowBlur(shadow.getBlur()); } else { context.setShadowColor("transparent"); context.setShadowOffsetX(0); context.setShadowOffsetY(0); context.setShadowBlur(0); } } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); }
DelegateNativeContext2D implements INativeContext2D { public void setShadow(Shadow.ShadowJSO shadow) { if (Objects.nonNull(shadow)) { context.setShadowColor(shadow.getColor()); context.setShadowOffsetX(shadow.getOffset().getX()); context.setShadowOffsetY(shadow.getOffset().getY()); context.setShadowBlur(shadow.getBlur()); } else { context.setShadowColor("transparent"); context.setShadowOffsetX(0); context.setShadowOffsetY(0); context.setShadowBlur(0); } } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
DelegateNativeContext2D implements INativeContext2D { public void setShadow(Shadow.ShadowJSO shadow) { if (Objects.nonNull(shadow)) { context.setShadowColor(shadow.getColor()); context.setShadowOffsetX(shadow.getOffset().getX()); context.setShadowOffsetY(shadow.getOffset().getY()); context.setShadowBlur(shadow.getBlur()); } else { context.setShadowColor("transparent"); context.setShadowOffsetX(0); context.setShadowOffsetY(0); context.setShadowBlur(0); } } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
@Test(expected = UnsupportedOperationException.class) public void isSupported() { delegateNativeContext2D.isSupported("feature"); }
public boolean isSupported(String feature) { throwException(); return false; }
DelegateNativeContext2D implements INativeContext2D { public boolean isSupported(String feature) { throwException(); return false; } }
DelegateNativeContext2D implements INativeContext2D { public boolean isSupported(String feature) { throwException(); return false; } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); }
DelegateNativeContext2D implements INativeContext2D { public boolean isSupported(String feature) { throwException(); return false; } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
DelegateNativeContext2D implements INativeContext2D { public boolean isSupported(String feature) { throwException(); return false; } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
@Test public void isPointInPath() { delegateNativeContext2D.isPointInPath(1, 1); verify(context, times(1)).isPointInPath(1, 1); }
public boolean isPointInPath(double x, double y) { return context.isPointInPath(x, y); }
DelegateNativeContext2D implements INativeContext2D { public boolean isPointInPath(double x, double y) { return context.isPointInPath(x, y); } }
DelegateNativeContext2D implements INativeContext2D { public boolean isPointInPath(double x, double y) { return context.isPointInPath(x, y); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); }
DelegateNativeContext2D implements INativeContext2D { public boolean isPointInPath(double x, double y) { return context.isPointInPath(x, y); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
DelegateNativeContext2D implements INativeContext2D { public boolean isPointInPath(double x, double y) { return context.isPointInPath(x, y); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
@Test public void getImageData() { delegateNativeContext2D.getImageData(1, 1, 1, 1); verify(context, times(1)).getImageData(1, 1, 1, 1); }
public ImageData getImageData(double x, double y, double width, double height) { elemental2.dom.ImageData nativeImageData = context.getImageData(x, y, width, height); return nativeClassConverter.convert(nativeImageData, ImageData.class); }
DelegateNativeContext2D implements INativeContext2D { public ImageData getImageData(double x, double y, double width, double height) { elemental2.dom.ImageData nativeImageData = context.getImageData(x, y, width, height); return nativeClassConverter.convert(nativeImageData, ImageData.class); } }
DelegateNativeContext2D implements INativeContext2D { public ImageData getImageData(double x, double y, double width, double height) { elemental2.dom.ImageData nativeImageData = context.getImageData(x, y, width, height); return nativeClassConverter.convert(nativeImageData, ImageData.class); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); }
DelegateNativeContext2D implements INativeContext2D { public ImageData getImageData(double x, double y, double width, double height) { elemental2.dom.ImageData nativeImageData = context.getImageData(x, y, width, height); return nativeClassConverter.convert(nativeImageData, ImageData.class); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
DelegateNativeContext2D implements INativeContext2D { public ImageData getImageData(double x, double y, double width, double height) { elemental2.dom.ImageData nativeImageData = context.getImageData(x, y, width, height); return nativeClassConverter.convert(nativeImageData, ImageData.class); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
@Test public void createImageData() { delegateNativeContext2D.createImageData(null); verify(context, times(1)).createImageData(null); }
public ImageData createImageData(double width, double height) { return nativeClassConverter.convert(context.createImageData(width, height), ImageData.class); }
DelegateNativeContext2D implements INativeContext2D { public ImageData createImageData(double width, double height) { return nativeClassConverter.convert(context.createImageData(width, height), ImageData.class); } }
DelegateNativeContext2D implements INativeContext2D { public ImageData createImageData(double width, double height) { return nativeClassConverter.convert(context.createImageData(width, height), ImageData.class); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); }
DelegateNativeContext2D implements INativeContext2D { public ImageData createImageData(double width, double height) { return nativeClassConverter.convert(context.createImageData(width, height), ImageData.class); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
DelegateNativeContext2D implements INativeContext2D { public ImageData createImageData(double width, double height) { return nativeClassConverter.convert(context.createImageData(width, height), ImageData.class); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
@Test public void createImageData1() { delegateNativeContext2D.createImageData(1, 1); verify(context, times(1)).createImageData(1, 1); }
public ImageData createImageData(double width, double height) { return nativeClassConverter.convert(context.createImageData(width, height), ImageData.class); }
DelegateNativeContext2D implements INativeContext2D { public ImageData createImageData(double width, double height) { return nativeClassConverter.convert(context.createImageData(width, height), ImageData.class); } }
DelegateNativeContext2D implements INativeContext2D { public ImageData createImageData(double width, double height) { return nativeClassConverter.convert(context.createImageData(width, height), ImageData.class); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); }
DelegateNativeContext2D implements INativeContext2D { public ImageData createImageData(double width, double height) { return nativeClassConverter.convert(context.createImageData(width, height), ImageData.class); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
DelegateNativeContext2D implements INativeContext2D { public ImageData createImageData(double width, double height) { return nativeClassConverter.convert(context.createImageData(width, height), ImageData.class); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
@Test public void putImageData() { delegateNativeContext2D.putImageData(null, 1, 1); verify(context, times(1)).putImageData(null, 1, 1); }
public void putImageData(ImageData image, double x, double y) { context.putImageData(nativeClassConverter.convert(image, elemental2.dom.ImageData.class), x, y); }
DelegateNativeContext2D implements INativeContext2D { public void putImageData(ImageData image, double x, double y) { context.putImageData(nativeClassConverter.convert(image, elemental2.dom.ImageData.class), x, y); } }
DelegateNativeContext2D implements INativeContext2D { public void putImageData(ImageData image, double x, double y) { context.putImageData(nativeClassConverter.convert(image, elemental2.dom.ImageData.class), x, y); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); }
DelegateNativeContext2D implements INativeContext2D { public void putImageData(ImageData image, double x, double y) { context.putImageData(nativeClassConverter.convert(image, elemental2.dom.ImageData.class), x, y); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
DelegateNativeContext2D implements INativeContext2D { public void putImageData(ImageData image, double x, double y) { context.putImageData(nativeClassConverter.convert(image, elemental2.dom.ImageData.class), x, y); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
@Test public void testDMNFromWBWhenNull() { final JSITLiteralExpression dmn = OutputClauseLiteralExpressionPropertyConverter.dmnFromWB(null); assertThat(dmn).isNull(); }
public static JSITLiteralExpression dmnFromWB(final OutputClauseLiteralExpression wb) { if (Objects.isNull(wb)) { return null; } else if (Objects.isNull(wb.getText())) { return null; } else if (StringUtils.isEmpty(wb.getText().getValue())) { return null; } return LiteralExpressionPropertyConverter.dmnFromWB(wb); }
OutputClauseLiteralExpressionPropertyConverter { public static JSITLiteralExpression dmnFromWB(final OutputClauseLiteralExpression wb) { if (Objects.isNull(wb)) { return null; } else if (Objects.isNull(wb.getText())) { return null; } else if (StringUtils.isEmpty(wb.getText().getValue())) { return null; } return LiteralExpressionPropertyConverter.dmnFromWB(wb); } }
OutputClauseLiteralExpressionPropertyConverter { public static JSITLiteralExpression dmnFromWB(final OutputClauseLiteralExpression wb) { if (Objects.isNull(wb)) { return null; } else if (Objects.isNull(wb.getText())) { return null; } else if (StringUtils.isEmpty(wb.getText().getValue())) { return null; } return LiteralExpressionPropertyConverter.dmnFromWB(wb); } }
OutputClauseLiteralExpressionPropertyConverter { public static JSITLiteralExpression dmnFromWB(final OutputClauseLiteralExpression wb) { if (Objects.isNull(wb)) { return null; } else if (Objects.isNull(wb.getText())) { return null; } else if (StringUtils.isEmpty(wb.getText().getValue())) { return null; } return LiteralExpressionPropertyConverter.dmnFromWB(wb); } static OutputClauseLiteralExpression wbFromDMN(final JSITLiteralExpression dmn); static JSITLiteralExpression dmnFromWB(final OutputClauseLiteralExpression wb); }
OutputClauseLiteralExpressionPropertyConverter { public static JSITLiteralExpression dmnFromWB(final OutputClauseLiteralExpression wb) { if (Objects.isNull(wb)) { return null; } else if (Objects.isNull(wb.getText())) { return null; } else if (StringUtils.isEmpty(wb.getText().getValue())) { return null; } return LiteralExpressionPropertyConverter.dmnFromWB(wb); } static OutputClauseLiteralExpression wbFromDMN(final JSITLiteralExpression dmn); static JSITLiteralExpression dmnFromWB(final OutputClauseLiteralExpression wb); }
@Test public void putImageData1() { delegateNativeContext2D.putImageData(null, 1, 1, 1, 1, 1, 1); verify(context, times(1)).putImageData(null, 1, 1, 1, 1, 1, 1); }
public void putImageData(ImageData image, double x, double y) { context.putImageData(nativeClassConverter.convert(image, elemental2.dom.ImageData.class), x, y); }
DelegateNativeContext2D implements INativeContext2D { public void putImageData(ImageData image, double x, double y) { context.putImageData(nativeClassConverter.convert(image, elemental2.dom.ImageData.class), x, y); } }
DelegateNativeContext2D implements INativeContext2D { public void putImageData(ImageData image, double x, double y) { context.putImageData(nativeClassConverter.convert(image, elemental2.dom.ImageData.class), x, y); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); }
DelegateNativeContext2D implements INativeContext2D { public void putImageData(ImageData image, double x, double y) { context.putImageData(nativeClassConverter.convert(image, elemental2.dom.ImageData.class), x, y); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
DelegateNativeContext2D implements INativeContext2D { public void putImageData(ImageData image, double x, double y) { context.putImageData(nativeClassConverter.convert(image, elemental2.dom.ImageData.class), x, y); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
@Test public void measureText() { delegateNativeContext2D.measureText("text"); verify(context, times(1)).measureText("text"); }
public TextMetrics measureText(String text) { return nativeClassConverter.convert(context.measureText(text), TextMetrics.class); }
DelegateNativeContext2D implements INativeContext2D { public TextMetrics measureText(String text) { return nativeClassConverter.convert(context.measureText(text), TextMetrics.class); } }
DelegateNativeContext2D implements INativeContext2D { public TextMetrics measureText(String text) { return nativeClassConverter.convert(context.measureText(text), TextMetrics.class); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); }
DelegateNativeContext2D implements INativeContext2D { public TextMetrics measureText(String text) { return nativeClassConverter.convert(context.measureText(text), TextMetrics.class); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
DelegateNativeContext2D implements INativeContext2D { public TextMetrics measureText(String text) { return nativeClassConverter.convert(context.measureText(text), TextMetrics.class); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
@Test public void resetClip() { delegateNativeContext2D.resetClip(); verify(context, times(1)).resetClip(); }
public void resetClip() { context.resetClip(); }
DelegateNativeContext2D implements INativeContext2D { public void resetClip() { context.resetClip(); } }
DelegateNativeContext2D implements INativeContext2D { public void resetClip() { context.resetClip(); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); }
DelegateNativeContext2D implements INativeContext2D { public void resetClip() { context.resetClip(); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
DelegateNativeContext2D implements INativeContext2D { public void resetClip() { context.resetClip(); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
@Test public void setMiterLimit() { delegateNativeContext2D.setMiterLimit(1); verify(context, times(1)).setMiterLimit(1); }
public void setMiterLimit(double limit) { context.setMiterLimit(limit); }
DelegateNativeContext2D implements INativeContext2D { public void setMiterLimit(double limit) { context.setMiterLimit(limit); } }
DelegateNativeContext2D implements INativeContext2D { public void setMiterLimit(double limit) { context.setMiterLimit(limit); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); }
DelegateNativeContext2D implements INativeContext2D { public void setMiterLimit(double limit) { context.setMiterLimit(limit); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
DelegateNativeContext2D implements INativeContext2D { public void setMiterLimit(double limit) { context.setMiterLimit(limit); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
@Test public void setLineDash() { delegateNativeContext2D.setLineDash(NFastDoubleArrayJSO.make(1, 1)); verify(context, times(1)).setLineDash(new double[]{1, 1}); }
public void setLineDash(NFastDoubleArrayJSO dashes) { context.setLineDash(dashes.toArray()); }
DelegateNativeContext2D implements INativeContext2D { public void setLineDash(NFastDoubleArrayJSO dashes) { context.setLineDash(dashes.toArray()); } }
DelegateNativeContext2D implements INativeContext2D { public void setLineDash(NFastDoubleArrayJSO dashes) { context.setLineDash(dashes.toArray()); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); }
DelegateNativeContext2D implements INativeContext2D { public void setLineDash(NFastDoubleArrayJSO dashes) { context.setLineDash(dashes.toArray()); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
DelegateNativeContext2D implements INativeContext2D { public void setLineDash(NFastDoubleArrayJSO dashes) { context.setLineDash(dashes.toArray()); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
@Test public void setLineDashOffset() { delegateNativeContext2D.setLineDashOffset(1); verify(context, times(1)).setLineDashOffset(1); }
public void setLineDashOffset(double offset) { context.setLineDashOffset(offset); }
DelegateNativeContext2D implements INativeContext2D { public void setLineDashOffset(double offset) { context.setLineDashOffset(offset); } }
DelegateNativeContext2D implements INativeContext2D { public void setLineDashOffset(double offset) { context.setLineDashOffset(offset); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); }
DelegateNativeContext2D implements INativeContext2D { public void setLineDashOffset(double offset) { context.setLineDashOffset(offset); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
DelegateNativeContext2D implements INativeContext2D { public void setLineDashOffset(double offset) { context.setLineDashOffset(offset); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
@Test public void getBackingStorePixelRatio() { assertEquals(delegateNativeContext2D.getBackingStorePixelRatio(), 1, 0); }
public double getBackingStorePixelRatio() { return 1; }
DelegateNativeContext2D implements INativeContext2D { public double getBackingStorePixelRatio() { return 1; } }
DelegateNativeContext2D implements INativeContext2D { public double getBackingStorePixelRatio() { return 1; } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); }
DelegateNativeContext2D implements INativeContext2D { public double getBackingStorePixelRatio() { return 1; } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
DelegateNativeContext2D implements INativeContext2D { public double getBackingStorePixelRatio() { return 1; } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
@Test public void path() { assertTrue(delegateNativeContext2D.path(buildPathPartList())); verify(context, times(1)).lineTo(1, 1); verify(context, times(1)).moveTo(2, 2); verify(context, times(1)).bezierCurveTo(1, 2, 3, 4, 5, 6); verify(context, times(1)).quadraticCurveTo(1, 2, 3, 4); verify(context, times(1)).ellipse(1, 2, 3, 4, 7, 5, 5 + 6, false); verify(context, times(1)).closePath(); verify(context, times(1)).arcTo(1, 2, 3, 4, 5); }
public boolean path(PathPartList.PathPartListJSO list) { if (list == null) { return false; } int leng = list.length(); if (leng < 1) { return false; } int indx = 0; this.beginPath(); while (indx < leng) { PathPartEntryJSO e = list.get(indx); indx++; NFastDoubleArrayJSO p = e.getPoints(); switch (e.getCommand()) { case 1: lineTo(p.get(0), p.get(1)); break; case 2: moveTo(p.get(0), p.get(1)); break; case 3: bezierCurveTo(p.get(0), p.get(1), p.get(2), p.get(3), p.get(4), p.get(5)); break; case 4: quadraticCurveTo(p.get(0), p.get(1), p.get(2), p.get(3)); break; case 5: ellipse(p.get(0), p.get(1), p.get(2), p.get(3), p.get(6), p.get(4), p.get(4) + p.get(5), (1 - p.get(7)) > 0); break; case 6: closePath(); break; case 7: this.arcTo(p.get(0), p.get(1), p.get(2), p.get(3), p.get(4)); break; } } return true; }
DelegateNativeContext2D implements INativeContext2D { public boolean path(PathPartList.PathPartListJSO list) { if (list == null) { return false; } int leng = list.length(); if (leng < 1) { return false; } int indx = 0; this.beginPath(); while (indx < leng) { PathPartEntryJSO e = list.get(indx); indx++; NFastDoubleArrayJSO p = e.getPoints(); switch (e.getCommand()) { case 1: lineTo(p.get(0), p.get(1)); break; case 2: moveTo(p.get(0), p.get(1)); break; case 3: bezierCurveTo(p.get(0), p.get(1), p.get(2), p.get(3), p.get(4), p.get(5)); break; case 4: quadraticCurveTo(p.get(0), p.get(1), p.get(2), p.get(3)); break; case 5: ellipse(p.get(0), p.get(1), p.get(2), p.get(3), p.get(6), p.get(4), p.get(4) + p.get(5), (1 - p.get(7)) > 0); break; case 6: closePath(); break; case 7: this.arcTo(p.get(0), p.get(1), p.get(2), p.get(3), p.get(4)); break; } } return true; } }
DelegateNativeContext2D implements INativeContext2D { public boolean path(PathPartList.PathPartListJSO list) { if (list == null) { return false; } int leng = list.length(); if (leng < 1) { return false; } int indx = 0; this.beginPath(); while (indx < leng) { PathPartEntryJSO e = list.get(indx); indx++; NFastDoubleArrayJSO p = e.getPoints(); switch (e.getCommand()) { case 1: lineTo(p.get(0), p.get(1)); break; case 2: moveTo(p.get(0), p.get(1)); break; case 3: bezierCurveTo(p.get(0), p.get(1), p.get(2), p.get(3), p.get(4), p.get(5)); break; case 4: quadraticCurveTo(p.get(0), p.get(1), p.get(2), p.get(3)); break; case 5: ellipse(p.get(0), p.get(1), p.get(2), p.get(3), p.get(6), p.get(4), p.get(4) + p.get(5), (1 - p.get(7)) > 0); break; case 6: closePath(); break; case 7: this.arcTo(p.get(0), p.get(1), p.get(2), p.get(3), p.get(4)); break; } } return true; } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); }
DelegateNativeContext2D implements INativeContext2D { public boolean path(PathPartList.PathPartListJSO list) { if (list == null) { return false; } int leng = list.length(); if (leng < 1) { return false; } int indx = 0; this.beginPath(); while (indx < leng) { PathPartEntryJSO e = list.get(indx); indx++; NFastDoubleArrayJSO p = e.getPoints(); switch (e.getCommand()) { case 1: lineTo(p.get(0), p.get(1)); break; case 2: moveTo(p.get(0), p.get(1)); break; case 3: bezierCurveTo(p.get(0), p.get(1), p.get(2), p.get(3), p.get(4), p.get(5)); break; case 4: quadraticCurveTo(p.get(0), p.get(1), p.get(2), p.get(3)); break; case 5: ellipse(p.get(0), p.get(1), p.get(2), p.get(3), p.get(6), p.get(4), p.get(4) + p.get(5), (1 - p.get(7)) > 0); break; case 6: closePath(); break; case 7: this.arcTo(p.get(0), p.get(1), p.get(2), p.get(3), p.get(4)); break; } } return true; } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
DelegateNativeContext2D implements INativeContext2D { public boolean path(PathPartList.PathPartListJSO list) { if (list == null) { return false; } int leng = list.length(); if (leng < 1) { return false; } int indx = 0; this.beginPath(); while (indx < leng) { PathPartEntryJSO e = list.get(indx); indx++; NFastDoubleArrayJSO p = e.getPoints(); switch (e.getCommand()) { case 1: lineTo(p.get(0), p.get(1)); break; case 2: moveTo(p.get(0), p.get(1)); break; case 3: bezierCurveTo(p.get(0), p.get(1), p.get(2), p.get(3), p.get(4), p.get(5)); break; case 4: quadraticCurveTo(p.get(0), p.get(1), p.get(2), p.get(3)); break; case 5: ellipse(p.get(0), p.get(1), p.get(2), p.get(3), p.get(6), p.get(4), p.get(4) + p.get(5), (1 - p.get(7)) > 0); break; case 6: closePath(); break; case 7: this.arcTo(p.get(0), p.get(1), p.get(2), p.get(3), p.get(4)); break; } } return true; } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
@Test public void getDelegate() { assertEquals(context, delegateNativeContext2D.getDelegate()); }
public IContext2D getDelegate() { return context; }
DelegateNativeContext2D implements INativeContext2D { public IContext2D getDelegate() { return context; } }
DelegateNativeContext2D implements INativeContext2D { public IContext2D getDelegate() { return context; } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); }
DelegateNativeContext2D implements INativeContext2D { public IContext2D getDelegate() { return context; } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
DelegateNativeContext2D implements INativeContext2D { public IContext2D getDelegate() { return context; } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
@Test public void drawImage() { delegateNativeContext2D.drawImage(element, 1, 1); verify(context, times(1)).drawImage(htmlElement, 1, 1); }
public void drawImage(Element image, double x, double y) { context.drawImage(nativeClassConverter.convert(image, HTMLCanvasElement.class), x, y); }
DelegateNativeContext2D implements INativeContext2D { public void drawImage(Element image, double x, double y) { context.drawImage(nativeClassConverter.convert(image, HTMLCanvasElement.class), x, y); } }
DelegateNativeContext2D implements INativeContext2D { public void drawImage(Element image, double x, double y) { context.drawImage(nativeClassConverter.convert(image, HTMLCanvasElement.class), x, y); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); }
DelegateNativeContext2D implements INativeContext2D { public void drawImage(Element image, double x, double y) { context.drawImage(nativeClassConverter.convert(image, HTMLCanvasElement.class), x, y); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
DelegateNativeContext2D implements INativeContext2D { public void drawImage(Element image, double x, double y) { context.drawImage(nativeClassConverter.convert(image, HTMLCanvasElement.class), x, y); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
@Test public void testDMNFromWBWhenTextIsNull() { final OutputClauseLiteralExpression wb = new OutputClauseLiteralExpression(); wb.setText(null); final JSITLiteralExpression dmn = OutputClauseLiteralExpressionPropertyConverter.dmnFromWB(wb); assertThat(dmn).isNull(); }
public static JSITLiteralExpression dmnFromWB(final OutputClauseLiteralExpression wb) { if (Objects.isNull(wb)) { return null; } else if (Objects.isNull(wb.getText())) { return null; } else if (StringUtils.isEmpty(wb.getText().getValue())) { return null; } return LiteralExpressionPropertyConverter.dmnFromWB(wb); }
OutputClauseLiteralExpressionPropertyConverter { public static JSITLiteralExpression dmnFromWB(final OutputClauseLiteralExpression wb) { if (Objects.isNull(wb)) { return null; } else if (Objects.isNull(wb.getText())) { return null; } else if (StringUtils.isEmpty(wb.getText().getValue())) { return null; } return LiteralExpressionPropertyConverter.dmnFromWB(wb); } }
OutputClauseLiteralExpressionPropertyConverter { public static JSITLiteralExpression dmnFromWB(final OutputClauseLiteralExpression wb) { if (Objects.isNull(wb)) { return null; } else if (Objects.isNull(wb.getText())) { return null; } else if (StringUtils.isEmpty(wb.getText().getValue())) { return null; } return LiteralExpressionPropertyConverter.dmnFromWB(wb); } }
OutputClauseLiteralExpressionPropertyConverter { public static JSITLiteralExpression dmnFromWB(final OutputClauseLiteralExpression wb) { if (Objects.isNull(wb)) { return null; } else if (Objects.isNull(wb.getText())) { return null; } else if (StringUtils.isEmpty(wb.getText().getValue())) { return null; } return LiteralExpressionPropertyConverter.dmnFromWB(wb); } static OutputClauseLiteralExpression wbFromDMN(final JSITLiteralExpression dmn); static JSITLiteralExpression dmnFromWB(final OutputClauseLiteralExpression wb); }
OutputClauseLiteralExpressionPropertyConverter { public static JSITLiteralExpression dmnFromWB(final OutputClauseLiteralExpression wb) { if (Objects.isNull(wb)) { return null; } else if (Objects.isNull(wb.getText())) { return null; } else if (StringUtils.isEmpty(wb.getText().getValue())) { return null; } return LiteralExpressionPropertyConverter.dmnFromWB(wb); } static OutputClauseLiteralExpression wbFromDMN(final JSITLiteralExpression dmn); static JSITLiteralExpression dmnFromWB(final OutputClauseLiteralExpression wb); }
@Test public void drawImage2() { delegateNativeContext2D.drawImage(element, 1, 1, 1, 1); verify(context, times(1)).drawImage(htmlElement, 1, 1, 1, 1); }
public void drawImage(Element image, double x, double y) { context.drawImage(nativeClassConverter.convert(image, HTMLCanvasElement.class), x, y); }
DelegateNativeContext2D implements INativeContext2D { public void drawImage(Element image, double x, double y) { context.drawImage(nativeClassConverter.convert(image, HTMLCanvasElement.class), x, y); } }
DelegateNativeContext2D implements INativeContext2D { public void drawImage(Element image, double x, double y) { context.drawImage(nativeClassConverter.convert(image, HTMLCanvasElement.class), x, y); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); }
DelegateNativeContext2D implements INativeContext2D { public void drawImage(Element image, double x, double y) { context.drawImage(nativeClassConverter.convert(image, HTMLCanvasElement.class), x, y); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
DelegateNativeContext2D implements INativeContext2D { public void drawImage(Element image, double x, double y) { context.drawImage(nativeClassConverter.convert(image, HTMLCanvasElement.class), x, y); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
@Test public void drawImage3() { delegateNativeContext2D.drawImage(element, 1, 1, 1, 1, 1, 1, 1, 1); verify(context, times(1)).drawImage(htmlElement, 1, 1, 1, 1, 1, 1, 1, 1); }
public void drawImage(Element image, double x, double y) { context.drawImage(nativeClassConverter.convert(image, HTMLCanvasElement.class), x, y); }
DelegateNativeContext2D implements INativeContext2D { public void drawImage(Element image, double x, double y) { context.drawImage(nativeClassConverter.convert(image, HTMLCanvasElement.class), x, y); } }
DelegateNativeContext2D implements INativeContext2D { public void drawImage(Element image, double x, double y) { context.drawImage(nativeClassConverter.convert(image, HTMLCanvasElement.class), x, y); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); }
DelegateNativeContext2D implements INativeContext2D { public void drawImage(Element image, double x, double y) { context.drawImage(nativeClassConverter.convert(image, HTMLCanvasElement.class), x, y); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
DelegateNativeContext2D implements INativeContext2D { public void drawImage(Element image, double x, double y) { context.drawImage(nativeClassConverter.convert(image, HTMLCanvasElement.class), x, y); } DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler); DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter); void initDeviceRatio(); @Override void saveContainer(String id); @Override void restoreContainer(); void save(); void save(String id); void restore(); void beginPath(); void closePath(); void moveTo(double x, double y); void lineTo(double x, double y); void setGlobalCompositeOperation(String operation); void setLineCap(String lineCap); void setLineJoin(String lineJoin); void quadraticCurveTo(double cpx, double cpy, double x, double y); void arc(double x, double y, double radius, double startAngle, double endAngle); void arc(double x, double y, double radius, double startAngle, double endAngle, boolean antiClockwise); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea, boolean ac); void ellipse(double x, double y, double rx, double ry, double ro, double sa, double ea); void arcTo(double x1, double y1, double x2, double y2, double radius); void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y); void clearRect(double x, double y, double w, double h); void clip(); void fill(); void stroke(); void fillRect(double x, double y, double w, double h); void fillText(String text, double x, double y); void fillTextWithGradient(String text, double x, double y, double sx, double sy, double ex, double ey, String color); void fillText(String text, double x, double y, double maxWidth); void setFillColor(String fill); void rect(double x, double y, double w, double h); void rotate(double angle); void scale(double sx, double sy); void setStrokeColor(String color); void setStrokeWidth(double width); void setImageSmoothingEnabled(boolean enabled); void setFillGradient(LinearGradient.LinearGradientJSO grad); void setFillGradient(PatternGradient.PatternGradientJSO grad); void setFillGradient(RadialGradient.RadialGradientJSO grad); void transform(Transform.TransformJSO jso); void transform(double d0, double d1, double d2, double d3, double d4, double d5); void setTransform(Transform.TransformJSO jso); void setTransform(double d0, double d1, double d2, double d3, double d4, double d5); void setToIdentityTransform(); void setTextFont(String font); void setTextBaseline(String baseline); void setTextAlign(String align); void strokeText(String text, double x, double y); void setGlobalAlpha(double alpha); void translate(double x, double y); void setShadow(Shadow.ShadowJSO shadow); boolean isSupported(String feature); boolean isPointInPath(double x, double y); ImageData getImageData(double x, double y, double width, double height); ImageData createImageData(double width, double height); ImageData createImageData(ImageData data); void putImageData(ImageData image, double x, double y); void putImageData(ImageData image, double x, double y, double dx, double dy, double dw, double dh); TextMetrics measureText(String text); void drawImage(Element image, double x, double y); void drawImage(Element image, double x, double y, double w, double h); void drawImage(Element image, double sx, double sy, double sw, double sh, double x, double y, double w, double h); void resetClip(); void setMiterLimit(double limit); void setLineDash(NFastDoubleArrayJSO dashes); void setLineDashOffset(double offset); double getBackingStorePixelRatio(); boolean path(PathPartList.PathPartListJSO list); boolean clip(PathPartList.PathPartListJSO list); void fill(Path2D.NativePath2D path); void stroke(Path2D.NativePath2D path); void clip(Path2D.NativePath2D path); Path2D.NativePath2D getCurrentPath(); void setCurrentPath(Path2D.NativePath2D path); IContext2D getDelegate(); }
@Test public void testToJpgImageData() { tested.toImageData(canvasHandler, CanvasURLExportSettings.build(JPG)); verify(context2D, times(1)).setFillColor(eq(LienzoCanvasExport.BG_COLOR)); verify(context2D, times(1)).fillRect(eq(0d), eq(0d), eq(100d), eq(200d)); verify(layer, times(1)).drawWithTransforms(eq(context2D), eq(1d), any(BoundingBox.class)); verify(scratchPad, times(1)).toDataURL(eq(DataURLType.JPG), eq(1d)); verify(scratchPad, times(1)).clear(); }
@Override public String toImageData(final AbstractCanvasHandler canvasHandler, final CanvasURLExportSettings settings) { final LienzoLayer layer = getLayer(canvasHandler); final int[] bounds = boundsProvider.compute(layer, settings); return LienzoLayerUtils.layerToDataURL(layer, getDataType(settings.getUrlDataType()), bounds[0], bounds[1], bounds[2], bounds[3], BG_COLOR); }
LienzoCanvasExport implements CanvasExport<AbstractCanvasHandler> { @Override public String toImageData(final AbstractCanvasHandler canvasHandler, final CanvasURLExportSettings settings) { final LienzoLayer layer = getLayer(canvasHandler); final int[] bounds = boundsProvider.compute(layer, settings); return LienzoLayerUtils.layerToDataURL(layer, getDataType(settings.getUrlDataType()), bounds[0], bounds[1], bounds[2], bounds[3], BG_COLOR); } }
LienzoCanvasExport implements CanvasExport<AbstractCanvasHandler> { @Override public String toImageData(final AbstractCanvasHandler canvasHandler, final CanvasURLExportSettings settings) { final LienzoLayer layer = getLayer(canvasHandler); final int[] bounds = boundsProvider.compute(layer, settings); return LienzoLayerUtils.layerToDataURL(layer, getDataType(settings.getUrlDataType()), bounds[0], bounds[1], bounds[2], bounds[3], BG_COLOR); } LienzoCanvasExport(); LienzoCanvasExport(final BoundsProvider boundsProvider); }
LienzoCanvasExport implements CanvasExport<AbstractCanvasHandler> { @Override public String toImageData(final AbstractCanvasHandler canvasHandler, final CanvasURLExportSettings settings) { final LienzoLayer layer = getLayer(canvasHandler); final int[] bounds = boundsProvider.compute(layer, settings); return LienzoLayerUtils.layerToDataURL(layer, getDataType(settings.getUrlDataType()), bounds[0], bounds[1], bounds[2], bounds[3], BG_COLOR); } LienzoCanvasExport(); LienzoCanvasExport(final BoundsProvider boundsProvider); @Override IContext2D toContext2D(final AbstractCanvasHandler canvasHandler, final CanvasExportSettings settings); @Override String toImageData(final AbstractCanvasHandler canvasHandler, final CanvasURLExportSettings settings); }
LienzoCanvasExport implements CanvasExport<AbstractCanvasHandler> { @Override public String toImageData(final AbstractCanvasHandler canvasHandler, final CanvasURLExportSettings settings) { final LienzoLayer layer = getLayer(canvasHandler); final int[] bounds = boundsProvider.compute(layer, settings); return LienzoLayerUtils.layerToDataURL(layer, getDataType(settings.getUrlDataType()), bounds[0], bounds[1], bounds[2], bounds[3], BG_COLOR); } LienzoCanvasExport(); LienzoCanvasExport(final BoundsProvider boundsProvider); @Override IContext2D toContext2D(final AbstractCanvasHandler canvasHandler, final CanvasExportSettings settings); @Override String toImageData(final AbstractCanvasHandler canvasHandler, final CanvasURLExportSettings settings); static final String BG_COLOR; static final int PADDING; }