use of org.kie.workbench.common.stunner.svg.gen.model.StyleDefinition in project kie-wb-common by kiegroup.
the class SVGTranslationTestAssertions method assertPath.
public static void assertPath(final MultiPathDefinition pathDefinition) {
assertEquals("M150 0 L75 200 L225 200 Z", pathDefinition.getPath());
assertEquals("p1", pathDefinition.getId());
assertEquals(1d, pathDefinition.getAlpha(), 0d);
assertEquals(0d, pathDefinition.getX(), 0d);
assertEquals(0d, pathDefinition.getY(), 0d);
final TransformDefinition transformDefinition = pathDefinition.getTransformDefinition();
assertTransformDef(transformDefinition, 0.25d, 0.25d, 10d, 10d);
final StyleDefinition styleDefinition = pathDefinition.getStyleDefinition();
assertStyleDef(styleDefinition, 1d, "#ff0000", 1d, "#0000ff", 1d, 2d);
}
use of org.kie.workbench.common.stunner.svg.gen.model.StyleDefinition in project kie-wb-common by kiegroup.
the class SVGTranslationTestAssertions method assertRectangle.
public static void assertRectangle(final RectDefinition rectDefinition) {
assertNotNull(rectDefinition);
assertEquals("r1", rectDefinition.getId());
assertEquals(1d, rectDefinition.getAlpha(), 0d);
assertEquals(1d, rectDefinition.getX(), 0d);
assertEquals(2d, rectDefinition.getY(), 0d);
assertEquals(200d, rectDefinition.getWidth(), 0d);
assertEquals(230d, rectDefinition.getHeight(), 0d);
assertEquals(15d, rectDefinition.getCornerRadius(), 0d);
final TransformDefinition transformDefinition = rectDefinition.getTransformDefinition();
assertTransformDef(transformDefinition, 0.5d, 0.5d, 25d, 30d);
final StyleDefinition styleDefinition = rectDefinition.getStyleDefinition();
assertStyleDef(styleDefinition, 1d, "#0000ff", 1d, "#000000", 1d, 3d);
}
Aggregations