public void setPaint(Paint paint1) { if(paint1 != null) { _paint = paint1; if(paint1 instanceof Color) setColor( (Color)paint1 ); } }
/** * Constructs one escher graphics object from an escher graphics object. * * @param escherGraphics the original EscherGraphics2d object to copy */ public EscherGraphics2d(EscherGraphics escherGraphics) { this._escherGraphics = escherGraphics; setImg( new BufferedImage(1, 1, 2) ); setColor(Color.black); }
public void clearRect(int i, int j, int k, int l) { Paint paint1 = getPaint(); setColor(getBackground()); fillRect(i, j, k, l); setPaint(paint1); }
public void drawString(AttributedCharacterIterator attributedcharacteriterator, float x, float y) { TextLayout textlayout = new TextLayout(attributedcharacteriterator, getFontRenderContext()); Paint paint1 = getPaint(); setColor(getColor()); fill(textlayout.getOutline(AffineTransform.getTranslateInstance(x, y))); setPaint(paint1); }
public void setPaint(Paint paint1) { if(paint1 != null) { _paint = paint1; if(paint1 instanceof Color) setColor( (Color)paint1 ); } }
public void setPaint(Paint paint1) { if(paint1 != null) { _paint = paint1; if(paint1 instanceof Color) setColor( (Color)paint1 ); } }
public void setPaint(Paint paint1) { if(paint1 != null) { _paint = paint1; if(paint1 instanceof Color) setColor( (Color)paint1 ); } }
/** * Constructs one escher graphics object from an escher graphics object. * * @param escherGraphics the original EscherGraphics2d object to copy */ public EscherGraphics2d(EscherGraphics escherGraphics) { this._escherGraphics = escherGraphics; setImg( new BufferedImage(1, 1, 2) ); setColor(Color.black); }
/** * Constructs one escher graphics object from an escher graphics object. * * @param escherGraphics the original EscherGraphics2d object to copy */ public EscherGraphics2d(EscherGraphics escherGraphics) { this._escherGraphics = escherGraphics; setImg( new BufferedImage(1, 1, 2) ); setColor(Color.black); }
/** * Constructs one escher graphics object from an escher graphics object. * * @param escherGraphics the original EscherGraphics2d object to copy */ public EscherGraphics2d(EscherGraphics escherGraphics) { this._escherGraphics = escherGraphics; setImg( new BufferedImage(1, 1, 2) ); setColor(Color.black); }
private static void drawStar( EscherGraphics2d g2d ) { g2d.setRenderingHint( RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON ); for (double i = 0; i < Math.PI; i += 0.1) { g2d.setColor( new Color((int)(i * 5343062d) ) ); int x1 = (int) ( Math.cos(i) * 160.0 ) + 160; int y1 = (int) ( Math.sin(i) * 138.0 ) + 138; int x2 = (int) ( -Math.cos(i) * 160.0 ) + 160; int y2 = (int) ( -Math.sin(i) * 138.0 ) + 138; g2d.setStroke(new BasicStroke(2)); g2d.drawLine(x1,y1,x2,y2); } g2d.setFont(new Font("SansSerif",Font.BOLD | Font.ITALIC, 20)); g2d.drawString("EscherGraphics2d",70,100); g2d.setColor(Color.yellow); g2d.fillOval( 160-20,138-20,40,40); g2d.setColor(Color.black); g2d.fillPolygon(new int[] {-10+160,0+160,10+160,0+160}, new int[] {0+138,10+138,0+138,-10+138}, 4); g2d.drawPolygon(new int[] {-160+160,0+160,160+160,0+160}, new int[] {0+138,138+138,0+138,-138+138}, 4); } }
public void clearRect(int i, int j, int k, int l) { Paint paint1 = getPaint(); setColor(getBackground()); fillRect(i, j, k, l); setPaint(paint1); }
public void clearRect(int i, int j, int k, int l) { Paint paint1 = getPaint(); setColor(getBackground()); fillRect(i, j, k, l); setPaint(paint1); }
public void clearRect(int i, int j, int k, int l) { Paint paint1 = getPaint(); setColor(getBackground()); fillRect(i, j, k, l); setPaint(paint1); }
public void drawString(AttributedCharacterIterator attributedcharacteriterator, float x, float y) { TextLayout textlayout = new TextLayout(attributedcharacteriterator, getFontRenderContext()); Paint paint1 = getPaint(); setColor(getColor()); fill(textlayout.getOutline(AffineTransform.getTranslateInstance(x, y))); setPaint(paint1); }
public void drawString(AttributedCharacterIterator attributedcharacteriterator, float x, float y) { TextLayout textlayout = new TextLayout(attributedcharacteriterator, getFontRenderContext()); Paint paint1 = getPaint(); setColor(getColor()); fill(textlayout.getOutline(AffineTransform.getTranslateInstance(x, y))); setPaint(paint1); }
public void drawString(AttributedCharacterIterator attributedcharacteriterator, float x, float y) { TextLayout textlayout = new TextLayout(attributedcharacteriterator, getFontRenderContext()); Paint paint1 = getPaint(); setColor(getColor()); fill(textlayout.getOutline(AffineTransform.getTranslateInstance(x, y))); setPaint(paint1); }