public Paint getPaint(Graphics2D graphics, PaintStyle paint) { return getPaint(graphics, paint, PaintModifier.NORM); }
@SuppressWarnings("rawtypes") public void draw(Graphics2D graphics) { Dimension pg = shape.getSheet().getSlideShow().getPageSize(); final Rectangle2D anchor = new Rectangle2D.Double(0, 0, pg.getWidth(), pg.getHeight()); PlaceableShape<?,?> ps = new PlaceableShape(){ public ShapeContainer<?,?> getParent() { return null; } public Rectangle2D getAnchor() { return anchor; } public void setAnchor(Rectangle2D newAnchor) {} public double getRotation() { return 0; } public void setRotation(double theta) {} public void setFlipHorizontal(boolean flip) {} public void setFlipVertical(boolean flip) {} public boolean getFlipHorizontal() { return false; } public boolean getFlipVertical() { return false; } public Sheet<?,?> getSheet() { return shape.getSheet(); } }; DrawFactory drawFact = DrawFactory.getInstance(graphics); DrawPaint dp = drawFact.getPaint(ps); Paint fill = dp.getPaint(graphics, getShape().getFillStyle().getPaint()); Rectangle2D anchor2 = getAnchor(graphics, anchor); if(fill != null) { graphics.setRenderingHint(Drawable.GRADIENT_SHAPE, anchor); graphics.setPaint(fill); graphics.fill(anchor2); } }
@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);
Paint fgPaint = new DrawPaint(ps).getPaint(graphics, fgPaintStyle); attList.add(new AttributedStringData(TextAttribute.FOREGROUND, fgPaint, beginIndex, endIndex));
fgPaint = (Paint)firstLineAttr.getAttribute(TextAttribute.FOREGROUND); } else { fgPaint = new DrawPaint(ps).getPaint(graphics, fgPaintStyle);
public Paint getPaint(Graphics2D graphics, PaintStyle paint) { return getPaint(graphics, paint, PaintModifier.NORM); }
@SuppressWarnings("rawtypes") public void draw(Graphics2D graphics) { Dimension pg = shape.getSheet().getSlideShow().getPageSize(); final Rectangle2D anchor = new Rectangle2D.Double(0, 0, pg.getWidth(), pg.getHeight()); PlaceableShape<?,?> ps = new PlaceableShape(){ public ShapeContainer<?,?> getParent() { return null; } public Rectangle2D getAnchor() { return anchor; } public void setAnchor(Rectangle2D newAnchor) {} public double getRotation() { return 0; } public void setRotation(double theta) {} public void setFlipHorizontal(boolean flip) {} public void setFlipVertical(boolean flip) {} public boolean getFlipHorizontal() { return false; } public boolean getFlipVertical() { return false; } public Sheet<?,?> getSheet() { return shape.getSheet(); } }; DrawFactory drawFact = DrawFactory.getInstance(graphics); DrawPaint dp = drawFact.getPaint(ps); Paint fill = dp.getPaint(graphics, getShape().getFillStyle().getPaint()); Rectangle2D anchor2 = getAnchor(graphics, anchor); if(fill != null) { graphics.setRenderingHint(Drawable.GRADIENT_SHAPE, anchor); graphics.setPaint(fill); graphics.fill(anchor2); } }
@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);
Paint fgPaint = new DrawPaint(ps).getPaint(graphics, fgPaintStyle); attList.add(new AttributedStringData(TextAttribute.FOREGROUND, fgPaint, beginIndex, endIndex));
fgPaint = (Paint)firstLineAttr.getAttribute(TextAttribute.FOREGROUND); } else { fgPaint = new DrawPaint(ps).getPaint(graphics, fgPaintStyle);