public BasicStroke getStroke() { return getStroke(getShape().getStrokeStyle()); }
protected void drawDecoration(Graphics2D graphics, Paint line, BasicStroke stroke) { if(line == null) { return; } graphics.setPaint(line); List<Outline> lst = new ArrayList<>(); LineDecoration deco = getShape().getLineDecoration(); Outline head = getHeadDecoration(graphics, deco, stroke); if (head != null) { lst.add(head); } Outline tail = getTailDecoration(graphics, deco, stroke); if (tail != null) { lst.add(tail); } for(Outline o : lst){ java.awt.Shape s = o.getOutline(); Path p = o.getPath(); graphics.setRenderingHint(Drawable.GRADIENT_SHAPE, s); if(p.isFilled()) { graphics.fill(s); } if(p.isStroked()) { graphics.draw(s); } } }
, Paint line ) { Shadow<?,?> shadow = getShape().getShadow(); if (shadow == null || (fill == null && line == null)) { return; Color shadowColor = DrawPaint.applyColorTransform(shadowPaint.getSolidColor()); double shapeRotation = getShape().getRotation(); if(getShape().getFlipVertical()) { shapeRotation += 180;
protected Collection<Outline> computeOutlines(Graphics2D graphics) { final SimpleShape<?,?> sh = getShape();
Rectangle2D anchor = getAnchor(graphics, getShape()); double x2 = anchor.getX() + anchor.getWidth(), y2 = anchor.getY() + anchor.getHeight();
Rectangle2D anchor = getAnchor(graphics, getShape()); double x1 = anchor.getX(), y1 = anchor.getY();
@Override public void draw(Graphics2D graphics) { DrawPaint drawPaint = DrawFactory.getInstance(graphics).getPaint(getShape()); Paint fill = drawPaint.getPaint(graphics, getShape().getFillStyle().getPaint()); Paint line = drawPaint.getPaint(graphics, getShape().getStrokeStyle().getPaint()); for (Outline o : elems) { if (o.getPath().isFilled()){ Paint fillMod = drawPaint.getPaint(graphics, getShape().getFillStyle().getPaint(), o.getPath().getFill()); if (fillMod != null) { graphics.setPaint(fillMod);
public BasicStroke getStroke() { return getStroke(getShape().getStrokeStyle()); }
protected Collection<Outline> computeOutlines(Graphics2D graphics) { final SimpleShape<?,?> sh = getShape();
, Paint line ) { Shadow<?,?> shadow = getShape().getShadow(); if (shadow == null || (fill == null && line == null)) { return; Color shadowColor = DrawPaint.applyColorTransform(shadowPaint.getSolidColor()); double shapeRotation = getShape().getRotation(); if(getShape().getFlipVertical()) { shapeRotation += 180;
protected void drawDecoration(Graphics2D graphics, Paint line, BasicStroke stroke) { if(line == null) { return; } graphics.setPaint(line); List<Outline> lst = new ArrayList<>(); LineDecoration deco = getShape().getLineDecoration(); Outline head = getHeadDecoration(graphics, deco, stroke); if (head != null) { lst.add(head); } Outline tail = getTailDecoration(graphics, deco, stroke); if (tail != null) { lst.add(tail); } for(Outline o : lst){ java.awt.Shape s = o.getOutline(); Path p = o.getPath(); graphics.setRenderingHint(Drawable.GRADIENT_SHAPE, s); if(p.isFilled()) { graphics.fill(s); } if(p.isStroked()) { graphics.draw(s); } } }
Rectangle2D anchor = getAnchor(graphics, getShape()); double x2 = anchor.getX() + anchor.getWidth(), y2 = anchor.getY() + anchor.getHeight();
Rectangle2D anchor = getAnchor(graphics, getShape()); double x1 = anchor.getX(), y1 = anchor.getY();
@Override public void draw(Graphics2D graphics) { DrawPaint drawPaint = DrawFactory.getInstance(graphics).getPaint(getShape()); Paint fill = drawPaint.getPaint(graphics, getShape().getFillStyle().getPaint()); Paint line = drawPaint.getPaint(graphics, getShape().getStrokeStyle().getPaint()); for (Outline o : elems) { if (o.getPath().isFilled()){ Paint fillMod = drawPaint.getPaint(graphics, getShape().getFillStyle().getPaint(), o.getPath().getFill()); if (fillMod != null) { graphics.setPaint(fillMod);