use of org.kie.workbench.common.stunner.shapes.def.picture.PictureShapeDef in project kie-wb-common by kiegroup.
the class BasicShapesFactory method newPicture.
@SuppressWarnings("unchecked")
private Shape newPicture(final Object instance, final BasicShapeDef shapeDef) {
final PictureShapeDef pictShapeDef = (PictureShapeDef) shapeDef;
final Object pictureSource = pictShapeDef.getPictureSource(instance);
final double width = pictShapeDef.getWidth(instance);
final double height = pictShapeDef.getHeight(instance);
final PictureShapeView view = shapeViewFactory.picture(pictureSource, width, height);
return new PictureShape(view);
}
Aggregations