⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 eschergraphics2d.java

📁 java 报表 to office文档: 本包由java语言开发
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
    public void fillArc(int i, int j, int k, int l, int i1, int j1)    {        fill(new java.awt.geom.Arc2D.Float(i, j, k, l, i1, j1, 2));    }    public void fillOval(int x, int y, int width, int height)    {        escherGraphics.fillOval(x,y,width,height);    }    /**     * Fills a closed polygon defined by     * arrays of <i>x</i> and <i>y</i> coordinates.     * <p>     * This method draws the polygon defined by <code>nPoint</code> line     * segments, where the first <code>nPoint&nbsp;-&nbsp;1</code>     * line segments are line segments from     * <code>(xPoints[i&nbsp;-&nbsp;1],&nbsp;yPoints[i&nbsp;-&nbsp;1])</code>     * to <code>(xPoints[i],&nbsp;yPoints[i])</code>, for     * 1&nbsp;&le;&nbsp;<i>i</i>&nbsp;&le;&nbsp;<code>nPoints</code>.     * The figure is automatically closed by drawing a line connecting     * the final point to the first point, if those points are different.     * <p>     * The area inside the polygon is defined using an     * even-odd fill rule, also known as the alternating rule.     * @param        xPoints   a an array of <code>x</code> coordinates.     * @param        yPoints   a an array of <code>y</code> coordinates.     * @param        nPoints   a the total number of points.     * @see          java.awt.Graphics#drawPolygon(int[], int[], int)     */    public void fillPolygon(int xPoints[], int yPoints[], int nPoints)    {        escherGraphics.fillPolygon(xPoints, yPoints, nPoints);    }    public void fillRect(int x, int y, int width, int height)    {        getEscherGraphics().fillRect(x,y,width,height);    }    public void fillRoundRect(int x, int y, int width, int height,				       int arcWidth, int arcHeight)    {        fill(new java.awt.geom.RoundRectangle2D.Float(x, y, width, height, arcWidth, arcHeight));    }    public Color getBackground()    {        return getEscherGraphics().getBackground();    }    public Shape getClip()    {        try        {            return getTrans().createInverse().createTransformedShape(getDeviceclip());        }        catch(Exception _ex)        {            return null;        }    }    public Rectangle getClipBounds()    {        if(getDeviceclip() != null)            return getClip().getBounds();        else            return null;    }    public Color getColor()    {        return escherGraphics.getColor();    }    public Composite getComposite()    {        return getG2D().getComposite();    }    public GraphicsConfiguration getDeviceConfiguration()    {        return getG2D().getDeviceConfiguration();    }    public Font getFont()    {        return getEscherGraphics().getFont();    }    public FontMetrics getFontMetrics(Font font)    {        return getEscherGraphics().getFontMetrics(font);    }    public FontRenderContext getFontRenderContext()    {        getG2D().setTransform(getTrans());        return getG2D().getFontRenderContext();    }    public Paint getPaint()    {        return paint;    }    public Object getRenderingHint(java.awt.RenderingHints.Key key)    {        return getG2D().getRenderingHint(key);    }    public RenderingHints getRenderingHints()    {        return getG2D().getRenderingHints();    }    public Stroke getStroke()    {        return stroke;    }    public AffineTransform getTransform()    {        return (AffineTransform)getTrans().clone();    }    public boolean hit(Rectangle rectangle, Shape shape, boolean flag)    {        getG2D().setTransform(getTrans());        getG2D().setStroke(getStroke());        getG2D().setClip(getClip());        return getG2D().hit(rectangle, shape, flag);    }    public void rotate(double d)    {        getTrans().rotate(d);    }    public void rotate(double d, double d1, double d2)    {        getTrans().rotate(d, d1, d2);    }    public void scale(double d, double d1)    {        getTrans().scale(d, d1);    }    public void setBackground(Color c)    {        getEscherGraphics().setBackground(c);    }    public void setClip(int i, int j, int k, int l)    {        setClip(((Shape) (new Rectangle(i, j, k, l))));    }    public void setClip(Shape shape)    {        setDeviceclip( getTrans().createTransformedShape(shape) );    }    public void setColor(Color c)    {        escherGraphics.setColor(c);    }    public void setComposite(Composite composite)    {        getG2D().setComposite(composite);    }    public void setFont(Font font)    {        getEscherGraphics().setFont(font);    }    public void setPaint(Paint paint1)    {        if(paint1 != null)        {            paint = paint1;            if(paint1 instanceof Color)                setColor( (Color)paint1 );        }    }    public void setPaintMode()    {        getEscherGraphics().setPaintMode();    }    public void setRenderingHint(java.awt.RenderingHints.Key key, Object obj)    {        getG2D().setRenderingHint(key, obj);    }    public void setRenderingHints(Map map)    {        getG2D().setRenderingHints(map);    }    public void setStroke(Stroke s)    {        stroke = s;    }    public void setTransform(AffineTransform affinetransform)    {        setTrans( (AffineTransform)affinetransform.clone() );    }    public void setXORMode(Color color1)    {        getEscherGraphics().setXORMode(color1);    }    public void shear(double d, double d1)    {        getTrans().shear(d, d1);    }    public void transform(AffineTransform affinetransform)    {        getTrans().concatenate(affinetransform);    }//    Image transformImage(Image image, Rectangle rectangle, Rectangle rectangle1, ImageObserver imageobserver, Color color1)//    {//        logger.log(POILogger.WARN,"transformImage() not supported");//        return null;//    }////    Image transformImage(Image image, int ai[], Rectangle rectangle, ImageObserver imageobserver, Color color1)//    {//        logger.log(POILogger.WARN,"transformImage() not supported");//        return null;//    }    public void translate(double d, double d1)    {        getTrans().translate(d, d1);    }    public void translate(int i, int j)    {        getTrans().translate(i, j);    }    private EscherGraphics getEscherGraphics()    {        return escherGraphics;    }    private BufferedImage getImg()    {        return img;    }    private void setImg( BufferedImage img )    {        this.img = img;    }    private Graphics2D getG2D()    {        return (Graphics2D) img.getGraphics();    }    private AffineTransform getTrans()    {        return trans;    }    private void setTrans( AffineTransform trans )    {        this.trans = trans;    }    private Shape getDeviceclip()    {        return deviceclip;    }    private void setDeviceclip( Shape deviceclip )    {        this.deviceclip = deviceclip;    }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -