use of com.ait.lienzo.client.core.types.Shadow in project kie-wb-common by kiegroup.
the class WiresConnectorViewTest method testSetShadow.
@Test
public void testSetShadow() {
tested.setShadow("red", 1, 2d, 3d);
ArgumentCaptor<Shadow> shadowArgumentCaptor = ArgumentCaptor.forClass(Shadow.class);
verify(line, times(1)).setShadow(shadowArgumentCaptor.capture());
final Shadow shadow = shadowArgumentCaptor.getValue();
assertEquals("red", shadow.getColor());
assertEquals(1, shadow.getBlur());
assertEquals(2d, shadow.getOffset().getX(), 0d);
assertEquals(3d, shadow.getOffset().getY(), 0d);
}
use of com.ait.lienzo.client.core.types.Shadow in project kie-wb-common by kiegroup.
the class SVGPrimitiveShapeTest method testShadow.
@Test
public void testShadow() {
Shape<?> instance = mock(Shape.class);
tested = new SVGPrimitiveShape(instance);
tested.setShadow("c1", 1, 2, 3);
ArgumentCaptor<Shadow> shadowArgumentCaptor = ArgumentCaptor.forClass(Shadow.class);
verify(instance, times(1)).setShadow(shadowArgumentCaptor.capture());
Shadow shadow = shadowArgumentCaptor.getValue();
assertEquals("c1", shadow.getColor());
assertEquals(1, shadow.getBlur());
assertEquals(2, shadow.getOffset().getX(), 0);
assertEquals(3, shadow.getOffset().getY(), 0);
}
use of com.ait.lienzo.client.core.types.Shadow in project lienzo-core by ahome-it.
the class Shape method doApplyShadow.
/**
* Applies this shape's Shadow.
*
* @param context
* @param attr
* @return boolean
*/
protected final void doApplyShadow(final Context2D context, final Attributes attr) {
if ((false == isAppliedShadow()) && (attr.hasShadow())) {
setAppliedShadow(true);
final Shadow shadow = attr.getShadow();
if (null != shadow) {
context.setShadow(shadow);
}
}
}
use of com.ait.lienzo.client.core.types.Shadow in project kie-wb-common by kiegroup.
the class FlowActionsToolboxView method createDecorator.
@Override
protected BoxDecorator createDecorator() {
final BoxDecorator decorator = super.createDecorator();
decorator.configure(path -> {
path.setStrokeWidth(1).setStrokeColor("#0000FF").setShadow(new Shadow(ColorName.BLACK.getColor().setA(0.80), 10, 3, 3));
});
return decorator;
}
Aggregations