本文整理了Java中com.ait.lienzo.client.core.shape.Rectangle.setFillAlpha
方法的一些代码示例,展示了Rectangle.setFillAlpha
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Rectangle.setFillAlpha
方法的具体详情如下:
包路径:com.ait.lienzo.client.core.shape.Rectangle
类名称:Rectangle
方法名:setFillAlpha
暂无
代码示例来源:origin: org.kie.workbench.stunner/kie-wb-common-stunner-lienzo-extensions
public Rectangle createRectangle(final double width,
final double height) {
return new Rectangle(width + padding,
height + padding)
.setCornerRadius(5)
.setFillColor(ColorName.BLACK)
.setFillAlpha(0.01)
.setStrokeWidth(1)
.setStrokeColor(ColorName.BLACK)
.setStrokeAlpha(0);
}
代码示例来源:origin: org.kie.workbench.stunner/kie-wb-common-stunner-lienzo
public static IPrimitive<?> rectangle(final int width,
final int height,
final double dAlpha,
final double dWidth,
final String dColor) {
return new Rectangle(width, height)
.setListening(false)
.setDraggable(false)
.setX(0)
.setY(0)
.setFillAlpha(0)
.setStrokeAlpha(dAlpha)
.setStrokeWidth(dWidth)
.setStrokeColor(dColor);
}
代码示例来源:origin: org.kie.workbench.stunner/kie-wb-common-stunner-lienzo
@Override
public Group render(final G glyph,
final double width,
final double height) {
final Group group = new Group();
final Rectangle decorator =
new Rectangle(width,
height)
.setCornerRadius(5)
.setFillColor(ColorName.LIGHTGREY)
.setFillAlpha(0.7d);
group.add(decorator);
getShape(glyph,
width,
height,
shape -> {
group.add(shape);
scaleShape(shape,
width,
height);
group.remove(decorator);
});
return group;
}
代码示例来源:origin: org.kie.workbench.stunner/kie-wb-common-stunner-bpmn-client
private SVGBasicShapeView rectangleBasicView(final double width, final double height) {
SVGPrimitiveShape mainShape = SVGPrimitiveFactory.newSVGPrimitiveShape(new com.ait.lienzo.client.core.shape.Rectangle(448.00, 448.00).setCornerRadius(15.00).setDraggable(false).setID("rectangle__sJZ2").setX(0.00).setY(0.00).setAlpha(1.00).setListening(true).setScale(1.00,1.00).setOffset(0.00,0.00).setFillAlpha(0.00).setStrokeColor("#000000").setStrokeWidth(5.00), false, null);
final SVGBasicShapeViewImpl view = new SVGBasicShapeViewImpl("rectangle", mainShape, width, height);
return view;
}
代码示例来源:origin: org.kie.workbench.stunner/kie-wb-common-stunner-svg-client
@Before
public void setup() throws Exception {
shape = new Rectangle(10, 10)
.setID("theShape")
.setAlpha(0.5d)
.setX(100d)
.setY(200d)
.setFillColor("fillColor")
.setFillAlpha(0.1d)
.setStrokeColor("strokeColor")
.setStrokeAlpha(0.2d)
.setStrokeWidth(0.3d);
tested = new SVGPrimitiveShape(shape);
}
代码示例来源:origin: org.kie.workbench.stunner/kie-wb-common-stunner-bpmn-client
private SVGShapeView rectangleView(final double width, final double height, final boolean resizable) {
SVGPrimitiveShape mainShape = SVGPrimitiveFactory.newSVGPrimitiveShape(new com.ait.lienzo.client.core.shape.Rectangle(448.00, 448.00).setCornerRadius(15.00).setDraggable(false).setID("rectangle__sJZ2").setX(0.00).setY(0.00).setAlpha(1.00).setListening(true).setScale(1.00,1.00).setOffset(0.00,0.00).setFillAlpha(0.00).setStrokeColor("#000000").setStrokeWidth(5.00), true, null);
final SVGShapeView view = getViewBuilder().build("rectangle", mainShape, width, height, resizable);
view.setTitleAlpha(1.00d);view.setTitleFontFamily("Open Sans");view.setTitleFontSize(12.00d);view.setTitleFontColor("#000000");view.setTitleStrokeWidth(1.00d);view.setTitleStrokeColor("#393f44");
if (view instanceof SVGShapeViewImpl) {
((SVGShapeViewImpl) view).getShapeStateHandler().setBorderShape(() -> SVGViewUtils.getVisibleShape(view));
((SVGShapeViewImpl) view).getShapeStateHandler().setRenderType(org.kie.workbench.common.stunner.client.lienzo.shape.impl.ShapeStateDefaultHandler.RenderType.STROKE);
}
return view;
}
代码示例来源:origin: org.kie.workbench.stunner/kie-wb-common-stunner-lienzo-extensions
.setCornerRadius(10)
.setFillColor(BG_COLOR)
.setFillAlpha(ALPHA)
.setStrokeAlpha(0)
.setCornerRadius(5);
代码示例来源:origin: org.kie.workbench.stunner/kie-wb-common-stunner-bpmn-client
private SVGBasicShapeView reusableSubProcessBasicView(final double width, final double height) {
SVGPrimitiveShape mainShape = SVGPrimitiveFactory.newSVGPrimitiveShape(new com.ait.lienzo.client.core.shape.Rectangle(150.00, 98.00).setCornerRadius(2.00).setDraggable(false).setID("subProcess-background").setX(0.00).setY(0.00).setAlpha(1.00).setListening(true).setScale(1.00,1.00).setOffset(0.00,0.00).setFillColor("#ffffff"), false, null);
final SVGBasicShapeViewImpl view = new SVGBasicShapeViewImpl("reusableSubProcess", mainShape, width, height);
SVGPrimitiveShape subProcess_border = SVGPrimitiveFactory.newSVGPrimitiveShape(new com.ait.lienzo.client.core.shape.Rectangle(150.00, 98.00).setCornerRadius(2.00).setDraggable(false).setID("subProcess-border").setX(0.00).setY(0.00).setAlpha(1.00).setListening(false).setScale(1.00,1.00).setOffset(0.00,0.00).setStrokeColor("#393f44").setStrokeWidth(1.50), true, null);
view.addChild(subProcess_border);
SVGContainer subProcess__D5TA = SVGPrimitiveFactory.newSVGContainer("subProcess__D5TA",new com.ait.lienzo.client.core.shape.Group().setDraggable(false).add( new com.ait.lienzo.client.core.shape.Group().setDraggable(false).setID("subProcess__D5TA").setX(0.00).setY(0.00).setAlpha(1.00).setListening(false).setScale(1.00,1.00).setOffset(0.00,0.00).setListening(false) ), false, com.ait.lienzo.client.core.shape.wires.LayoutContainer.Layout.BOTTOM);SVGPrimitiveShape subProcess__D5TA__5wNY = SVGPrimitiveFactory.newSVGPrimitiveShape(new com.ait.lienzo.client.core.shape.Rectangle(25.00, 25.00).setCornerRadius(0.00).setDraggable(false).setID("subProcess__D5TA__5wNY").setX(63.00).setY(66.00).setAlpha(1.00).setListening(false).setScale(1.00,1.00).setOffset(0.00,0.00).setFillAlpha(0.00).setStrokeColor("#393f44").setStrokeWidth(1.50), false, null);subProcess__D5TA.add(subProcess__D5TA__5wNY);SVGPrimitiveShape subProcess__D5TA__X9Hg = SVGPrimitiveFactory.newSVGPrimitiveShape(new com.ait.lienzo.client.core.shape.MultiPath(VALUE_SUBPROCESS__D5TA__X9HG).setDraggable(false).setID("subProcess__D5TA__X9Hg").setX(0.00).setY(0.00).setAlpha(1.00).setListening(false).setScale(0.04,0.04).setOffset(71.50,72.50).setFillColor("#000000").setStrokeColor("#000000"), false, null);subProcess__D5TA.add(subProcess__D5TA__X9Hg);
view.addChild(subProcess__D5TA);
return view;
}
代码示例来源:origin: org.kie.workbench.stunner/kie-wb-common-stunner-bpmn-client
private SVGShapeView reusableSubProcessView(final double width, final double height, final boolean resizable) {
SVGPrimitiveShape mainShape = SVGPrimitiveFactory.newSVGPrimitiveShape(new com.ait.lienzo.client.core.shape.Rectangle(150.00, 98.00).setCornerRadius(2.00).setDraggable(false).setID("subProcess-background").setX(0.00).setY(0.00).setAlpha(1.00).setListening(true).setScale(1.00,1.00).setOffset(0.00,0.00).setFillColor("#ffffff"), true, null);
final SVGShapeView view = getViewBuilder().build("reusableSubProcess", mainShape, width, height, resizable);
SVGPrimitiveShape subProcess_border = SVGPrimitiveFactory.newSVGPrimitiveShape(new com.ait.lienzo.client.core.shape.Rectangle(150.00, 98.00).setCornerRadius(2.00).setDraggable(false).setID("subProcess-border").setX(0.00).setY(0.00).setAlpha(1.00).setListening(false).setScale(1.00,1.00).setOffset(0.00,0.00).setStrokeColor("#393f44").setStrokeWidth(1.50), true, null);
view.addChild(subProcess_border);
SVGContainer subProcess__D5TA = SVGPrimitiveFactory.newSVGContainer("subProcess__D5TA",new com.ait.lienzo.client.core.shape.Group().setDraggable(false).add( new com.ait.lienzo.client.core.shape.Group().setDraggable(false).setID("subProcess__D5TA").setX(0.00).setY(0.00).setAlpha(1.00).setListening(false).setScale(1.00,1.00).setOffset(0.00,0.00).setListening(false) ), false, com.ait.lienzo.client.core.shape.wires.LayoutContainer.Layout.BOTTOM);SVGPrimitiveShape subProcess__D5TA__5wNY = SVGPrimitiveFactory.newSVGPrimitiveShape(new com.ait.lienzo.client.core.shape.Rectangle(25.00, 25.00).setCornerRadius(0.00).setDraggable(false).setID("subProcess__D5TA__5wNY").setX(63.00).setY(66.00).setAlpha(1.00).setListening(false).setScale(1.00,1.00).setOffset(0.00,0.00).setFillAlpha(0.00).setStrokeColor("#393f44").setStrokeWidth(1.50), false, null);subProcess__D5TA.add(subProcess__D5TA__5wNY);SVGPrimitiveShape subProcess__D5TA__X9Hg = SVGPrimitiveFactory.newSVGPrimitiveShape(new com.ait.lienzo.client.core.shape.MultiPath(VALUE_SUBPROCESS__D5TA__X9HG).setDraggable(false).setID("subProcess__D5TA__X9Hg").setX(0.00).setY(0.00).setAlpha(1.00).setListening(false).setScale(0.04,0.04).setOffset(71.50,72.50).setFillColor("#000000").setStrokeColor("#000000"), false, null);subProcess__D5TA.add(subProcess__D5TA__X9Hg);
view.addChild(subProcess__D5TA);
view.setTitleAlpha(1.00d);view.setTitleFontFamily("Open Sans");view.setTitleFontSize(12.00d);view.setTitleFontColor("#000000");view.setTitleStrokeWidth(1.00d);view.setTitleStrokeColor("#393f44");
if (view instanceof SVGShapeViewImpl) {
((SVGShapeViewImpl) view).getShapeStateHandler().setBorderShape(() -> SVGViewUtils.getVisibleShape(subProcess_border));
((SVGShapeViewImpl) view).getShapeStateHandler().setRenderType(org.kie.workbench.common.stunner.client.lienzo.shape.impl.ShapeStateDefaultHandler.RenderType.STROKE);
}
return view;
}
内容来源于网络,如有侵权,请联系作者删除!