亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? xypolygonannotation.java

?? 制作圖表的好工具
?? JAVA
字號:
/* ===========================================================
 * JFreeChart : a free chart library for the Java(tm) platform
 * ===========================================================
 *
 * (C) Copyright 2000-2005, by Object Refinery Limited and Contributors.
 *
 * Project Info:  http://www.jfree.org/jfreechart/index.html
 *
 * This library is free software; you can redistribute it and/or modify it 
 * under the terms of the GNU Lesser General Public License as published by 
 * the Free Software Foundation; either version 2.1 of the License, or 
 * (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful, but 
 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 
 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public 
 * License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, 
 * USA.  
 *
 * [Java is a trademark or registered trademark of Sun Microsystems, Inc. 
 * in the United States and other countries.]
 *
 * ------------------------
 * XYPolygonAnnotation.java
 * ------------------------
 * (C) Copyright 2005, by Object Refinery Limited and Contributors.
 *
 * Original Author:  David Gilbert (for Object Refinery Limited);
 * Contributor(s):   -;
 *
 * $Id: XYPolygonAnnotation.java,v 1.3.2.1 2005/10/25 16:51:15 mungady Exp $
 *
 * Changes:
 * --------
 * 09-Feb-2005 : Version 1 (DG);
 * 
 */
 
package org.jfree.chart.annotations;

import java.awt.BasicStroke;
import java.awt.Color;
import java.awt.Graphics2D;
import java.awt.Paint;
import java.awt.Stroke;
import java.awt.geom.GeneralPath;
import java.awt.geom.Rectangle2D;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.Serializable;
import java.util.Arrays;

import org.jfree.chart.axis.ValueAxis;
import org.jfree.chart.plot.Plot;
import org.jfree.chart.plot.PlotOrientation;
import org.jfree.chart.plot.PlotRenderingInfo;
import org.jfree.chart.plot.XYPlot;
import org.jfree.io.SerialUtilities;
import org.jfree.ui.RectangleEdge;
import org.jfree.util.ObjectUtilities;
import org.jfree.util.PublicCloneable;

/**
 * A polygon annotation that can be placed on an {@link XYPlot}.  The 
 * polygon coordinates are specified in data space.
 */
public class XYPolygonAnnotation extends AbstractXYAnnotation
                                 implements Cloneable, 
                                            PublicCloneable, 
                                            Serializable {
    
    /** For serialization. */
    private static final long serialVersionUID = -6984203651995900036L;
    
    /** The polygon. */
    private double[] polygon;

    /** The stroke used to draw the box outline. */
    private transient Stroke stroke;

    /** The paint used to draw the box outline. */
    private transient Paint outlinePaint;
    
    /** The paint used to fill the box. */
    private transient Paint fillPaint;

    /**
     * Creates a new annotation (where, by default, the polygon is drawn 
     * with a black outline).
     * 
     * @param polygon  the polygon coordinates.
     */
    public XYPolygonAnnotation(double[] polygon) {
        this(polygon, new BasicStroke(1.0f), Color.black);
    }
    
    /**
     * Creates a new annotation where the box is drawn as an outline using
     * the specified <code>stroke</code> and <code>outlinePaint</code>.
     *
     * @param polygon  the polygon.
     * @param stroke  the shape stroke (<code>null</code> not permitted).
     * @param outlinePaint  the shape color (<code>null</code> not permitted).
     */
    public XYPolygonAnnotation(double[] polygon, 
                               Stroke stroke, Paint outlinePaint) {
        this(polygon, stroke, outlinePaint, null);
    }

    /**
     * Creates a new annotation.
     *
     * @param polygon  the polygon.
     * @param stroke  the shape stroke (<code>null</code> permitted).
     * @param outlinePaint  the shape color (<code>null</code> permitted).
     * @param fillPaint  the paint used to fill the shape (<code>null</code> 
     *                   permitted).
     */
    public XYPolygonAnnotation(double[] polygon, 
                               Stroke stroke, 
                               Paint outlinePaint, Paint fillPaint) {
        this.polygon = polygon;
        this.stroke = stroke;
        this.outlinePaint = outlinePaint;
        this.fillPaint = fillPaint;
    }

    /**
     * Draws the annotation.  This method is usually called by the 
     * {@link XYPlot} class, you shouldn't need to call it directly.
     *
     * @param g2  the graphics device.
     * @param plot  the plot.
     * @param dataArea  the data area.
     * @param domainAxis  the domain axis.
     * @param rangeAxis  the range axis.
     * @param rendererIndex  the renderer index.
     * @param info  the plot rendering info.
     */
    public void draw(Graphics2D g2, XYPlot plot, Rectangle2D dataArea,
                     ValueAxis domainAxis, ValueAxis rangeAxis, 
                     int rendererIndex, PlotRenderingInfo info) {

        PlotOrientation orientation = plot.getOrientation();
        RectangleEdge domainEdge = Plot.resolveDomainAxisLocation(
            plot.getDomainAxisLocation(), orientation
        );
        RectangleEdge rangeEdge = Plot.resolveRangeAxisLocation(
            plot.getRangeAxisLocation(), orientation
        );

        GeneralPath area = new GeneralPath();
        double x = domainAxis.valueToJava2D(
            this.polygon[0], dataArea, domainEdge
        );
        double y = rangeAxis.valueToJava2D(
            this.polygon[1], dataArea, rangeEdge
        );
        if (orientation == PlotOrientation.HORIZONTAL) {
            area.moveTo((float) y, (float) x);
            for (int i = 2; i < this.polygon.length; i += 2) {
                x = domainAxis.valueToJava2D(
                    this.polygon[i], dataArea, domainEdge
                );
                y = rangeAxis.valueToJava2D(
                    this.polygon[i + 1], dataArea, rangeEdge
                );
                area.lineTo((float) y, (float) x);
            }
            area.closePath();
        }
        else if (orientation == PlotOrientation.VERTICAL) {
            area.moveTo((float) x, (float) y);            
            for (int i = 2; i < this.polygon.length; i += 2) {
                x = domainAxis.valueToJava2D(
                    this.polygon[i], dataArea, domainEdge
                );
                y = rangeAxis.valueToJava2D(
                    this.polygon[i + 1], dataArea, rangeEdge
                );
                area.lineTo((float) x, (float) y);
            }
            area.closePath();
       }
        

        if (this.fillPaint != null) {
            g2.setPaint(this.fillPaint);
            g2.fill(area);
        }
        
        if (this.stroke != null && this.outlinePaint != null) {
            g2.setPaint(this.outlinePaint);
            g2.setStroke(this.stroke);
            g2.draw(area);
        }
        addEntity(info, area, rendererIndex, getToolTipText(), getURL());
        
    }
        
    /**
     * Tests this annotation for equality with an arbitrary object.
     * 
     * @param obj  the object (<code>null</code> permitted).
     * 
     * @return A boolean.
     */
    public boolean equals(Object obj) {
        if (obj == this) {
            return true;
        }
        // now try to reject equality
        if (!super.equals(obj)) {
            return false;
        }
        if (!(obj instanceof XYPolygonAnnotation)) {
            return false;
        }
        XYPolygonAnnotation that = (XYPolygonAnnotation) obj;
        if (!Arrays.equals(this.polygon, that.polygon)) {
            return false;   
        }
        if (!ObjectUtilities.equal(this.stroke, that.stroke)) {
            return false;
        }
        if (!ObjectUtilities.equal(this.outlinePaint, that.outlinePaint)) {
            return false;
        }
        if (!ObjectUtilities.equal(this.fillPaint, that.fillPaint)) {
            return false;
        }
        // seem to be the same
        return true;
    }
    
    /**
     * Returns a clone.
     * 
     * @return A clone.
     * 
     * @throws CloneNotSupportedException not thrown by this class, but may be
     *                                    by subclasses.
     */
    public Object clone() throws CloneNotSupportedException {
        return super.clone();
    }
    
    /**
     * Provides serialization support.
     *
     * @param stream  the output stream (<code>null</code> not permitted).
     *
     * @throws IOException if there is an I/O error.
     */
    private void writeObject(ObjectOutputStream stream) throws IOException {
        stream.defaultWriteObject();
        SerialUtilities.writeStroke(this.stroke, stream);
        SerialUtilities.writePaint(this.outlinePaint, stream);
        SerialUtilities.writePaint(this.fillPaint, stream);
    }

    /**
     * Provides serialization support.
     *
     * @param stream  the input stream (<code>null</code> not permitted).
     *
     * @throws IOException  if there is an I/O error.
     * @throws ClassNotFoundException  if there is a classpath problem.
     */
    private void readObject(ObjectInputStream stream) 
        throws IOException, ClassNotFoundException {
        
        stream.defaultReadObject();
        this.stroke = SerialUtilities.readStroke(stream);
        this.outlinePaint = SerialUtilities.readPaint(stream);
        this.fillPaint = SerialUtilities.readPaint(stream);
    }

}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
午夜在线成人av| 欧美丝袜第三区| 在线免费av一区| 精品国内二区三区| 亚洲一区二区三区视频在线播放| 久久99国产精品免费| 91电影在线观看| 中文字幕免费不卡| 国产在线不卡视频| 日韩一区二区电影在线| 午夜私人影院久久久久| 91视频免费观看| 亚洲国产精品黑人久久久| 国内不卡的二区三区中文字幕| 欧美男人的天堂一二区| 亚洲一区二区在线免费观看视频| 成人一级视频在线观看| 久久亚洲私人国产精品va媚药| 首页国产欧美日韩丝袜| 色丁香久综合在线久综合在线观看| 国产日韩av一区二区| 国产剧情一区在线| 精品久久五月天| 久久精品国产澳门| 欧美一区2区视频在线观看| 日韩一区精品字幕| 欧美群妇大交群中文字幕| 亚洲一区二区欧美激情| 91福利社在线观看| 亚洲韩国精品一区| 欧美日韩中字一区| 亚洲.国产.中文慕字在线| 欧美猛男gaygay网站| 午夜精品久久久久久久99水蜜桃 | 亚洲国产高清在线| 国产麻豆精品95视频| 国产亚洲欧美日韩俺去了| 国产高清成人在线| 中文字幕五月欧美| 91福利精品视频| 五月天激情综合| 欧美一级国产精品| 精品伊人久久久久7777人| 久久影院电视剧免费观看| 成+人+亚洲+综合天堂| 亚洲欧美日韩国产中文在线| 欧美亚洲动漫另类| 麻豆精品视频在线观看免费| 久久人人爽爽爽人久久久| 成人免费毛片片v| 一区二区三区欧美在线观看| 欧美日本一区二区三区| 国产在线麻豆精品观看| 国产精品不卡一区| 欧美日韩国产综合久久| 国产综合一区二区| 亚洲人吸女人奶水| 日韩欧美国产一区二区在线播放| 国产91精品入口| 亚洲 欧美综合在线网络| 亚洲精品一区二区三区99| 波多野结衣一区二区三区| 亚洲成人动漫在线观看| 久久久久99精品一区| 在线中文字幕一区二区| 国产一区在线不卡| 一区二区三区在线视频观看58 | 欧美性大战久久久久久久蜜臀| 青青草原综合久久大伊人精品| 国产欧美中文在线| 7777精品伊人久久久大香线蕉经典版下载 | 亚洲欧洲av在线| 日韩欧美在线综合网| 99re这里都是精品| 毛片不卡一区二区| 一区二区三区久久| 中文字幕不卡三区| 欧美一区二区啪啪| 欧美亚州韩日在线看免费版国语版| 久久爱www久久做| 亚洲成人动漫在线观看| 国产精品国产三级国产专播品爱网| 欧美日产在线观看| 91香蕉视频黄| 国产999精品久久久久久| 肉色丝袜一区二区| 亚洲与欧洲av电影| 国产精品传媒入口麻豆| 精品成人a区在线观看| 8x福利精品第一导航| 色哟哟欧美精品| 成人国产在线观看| 国产一区二区三区精品视频| 婷婷六月综合网| 一区二区三区小说| 国产精品久久久久久久浪潮网站| 久久久亚洲精品一区二区三区| 日韩一区二区三区免费看 | 精品国产成人系列| 欧美精品乱人伦久久久久久| 一本到高清视频免费精品| 丁香婷婷综合五月| 国产成人综合在线观看| 激情文学综合丁香| 国产一区二区在线观看视频| 麻豆精品视频在线观看视频| 青青草成人在线观看| 日精品一区二区三区| 日韩国产高清在线| 蜜桃免费网站一区二区三区| 美女视频一区二区| 青青草视频一区| 久久精品国产在热久久| 琪琪久久久久日韩精品| 日本中文字幕一区二区视频| 天天操天天干天天综合网| 天堂成人免费av电影一区| 日韩激情视频网站| 免费精品视频在线| 国模一区二区三区白浆 | 精品一区二区国语对白| 毛片av一区二区| 韩国三级在线一区| 国产麻豆精品theporn| 成人一区在线看| 91视频精品在这里| 欧美日韩一级黄| 精品国产伦一区二区三区观看方式| xfplay精品久久| 中文字幕欧美一| 亚洲国产成人av网| 青青草97国产精品免费观看| 韩国精品久久久| 99在线热播精品免费| 欧美性受xxxx黑人xyx性爽| 欧美一区二区三区喷汁尤物| 欧美精品一区二| 国产欧美日韩三区| 亚洲一区二区三区影院| 蜜桃视频在线一区| 成人激情视频网站| 欧美三级电影网| 久久精品人人爽人人爽| 亚洲摸摸操操av| 奇米色一区二区| 成人黄色小视频| 欧美夫妻性生活| 国产欧美视频在线观看| 一区二区三区久久| 国产高清在线精品| 欧美日韩综合不卡| 国产日韩欧美精品综合| 亚洲h精品动漫在线观看| 国产寡妇亲子伦一区二区| 欧美手机在线视频| 欧美国产丝袜视频| 美日韩黄色大片| 色婷婷亚洲婷婷| 欧美精品一区二区三区蜜臀| 亚洲精品国产a久久久久久| 久久精品国产免费| 欧美日韩一区二区三区视频| 国产拍欧美日韩视频二区| 日日噜噜夜夜狠狠视频欧美人| 国产91在线看| 日韩一级大片在线观看| 国产精品久久二区二区| 理论电影国产精品| 色香色香欲天天天影视综合网| 久久综合久久99| 日本成人在线看| 欧美日韩免费高清一区色橹橹| 久久久久久久综合日本| 三级在线观看一区二区| 91久久精品一区二区| 国产精品嫩草99a| 国产一区 二区| 日韩欧美一区电影| 日韩精品成人一区二区在线| 欧美色图12p| 一区二区免费看| 色综合中文字幕国产 | 欧美一级一区二区| 亚洲精品免费在线| 91在线免费看| 国产精品传媒视频| 成人免费视频app| 久久精品亚洲精品国产欧美| 精品制服美女久久| 久久综合久久鬼色| 国产精品一色哟哟哟| 26uuu国产一区二区三区| 韩国v欧美v日本v亚洲v| 精品91自产拍在线观看一区| 久久99精品国产麻豆婷婷| 精品欧美一区二区三区精品久久| 免费一级欧美片在线观看| 日韩一区二区三区视频| 精品一区二区三区不卡| 2023国产一二三区日本精品2022|