java文档中的The Java™ Tutorials ,离线的资源,下载下来方便无网络时看,打开文档中的index.html即可查看
代码片段和文件信息
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2017-11-15 20:29 tutorial
目录 0 2017-11-15 20:29 tutorial2d
目录 0 2017-11-15 20:29 tutorial2dadvanced
文件 12840 2017-11-15 20:21 tutorial2dadvancedClipImage.html
文件 21377 2017-09-19 02:18 tutorial2dadvancedclipping.html
文件 19401 2017-09-19 02:18 tutorial2dadvancedcomplexshapes.html
文件 12840 2017-11-15 20:21 tutorial2dadvancedComposite.html
文件 21834 2017-09-19 02:18 tutorial2dadvancedcompositing.html
目录 0 2017-11-15 20:29 tutorial2dadvancedexamples
文件 8299 2017-09-19 02:18 tutorial2dadvancedexamplesClipImage.java
文件 7660 2017-09-19 02:18 tutorial2dadvancedexamplesComposite.java
文件 7390 2017-09-19 02:18 tutorial2dadvancedexamplesHitTestSample.java
目录 0 2017-11-15 20:29 tutorial2dadvancedexamplesimages
文件 5116 2017-09-19 02:18 tutorial2dadvancedexamplesimagesclouds.jpg
文件 50708 2017-09-19 02:18 tutorial2dadvancedexamplesimagesStarry.gif
目录 0 2017-11-15 20:29 tutorial2dadvancedexampleslib
文件 14960 2017-09-19 02:18 tutorial2dadvancedexampleslibClipImageapplet.jar
文件 8922 2017-09-19 02:18 tutorial2dadvancedexampleslibCompositeapplet.jar
文件 9578 2017-09-19 02:18 tutorial2dadvancedexampleslibHitTestSampleapplet.jar
文件 7323 2017-09-19 02:18 tutorial2dadvancedexampleslibPearapplet.jar
文件 8853 2017-09-19 02:18 tutorial2dadvancedexampleslibShapeMoverapplet.jar
文件 57348 2017-09-19 02:18 tutorial2dadvancedexampleslibStarryapplet.jar
文件 10607 2017-09-19 02:18 tutorial2dadvancedexampleslibTransformapplet.jar
文件 4392 2017-09-19 02:18 tutorial2dadvancedexamplesPear.java
文件 7529 2017-09-19 02:18 tutorial2dadvancedexamplesShapeMover.java
文件 4175 2017-09-19 02:18 tutorial2dadvancedexamplesStarry.java
文件 8785 2017-09-19 02:18 tutorial2dadvancedexamplesSwingShapeMover.java
文件 11579 2017-09-19 02:18 tutorial2dadvancedexamplesTransform.java
文件 12840 2017-11-15 20:21 tutorial2dadvancedHitTestSample.html
文件 17491 2017-09-19 02:18 tutorial2dadvancedindex.html
文件 12840 2017-11-15 20:21 tutorial2dadvancedPear.html
............此处省略4956个文件信息
/*
* Copyright (c) 1995 2008 Oracle and/or its affiliates. All rights reserved.
*
* Redistribution and use in source and binary forms with or without
* modification are permitted provided that the following conditions
* are met:
*
* - Redistributions of source code must retain the above copyright
* notice this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of Oracle or the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS
* IS“ AND ANY EXPRESS OR IMPLIED WARRANTIES INCLUDING BUT NOT LIMITED TO
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT INDIRECT INCIDENTAL SPECIAL
* EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING BUT NOT LIMITED TO
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE DATA OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY WHETHER IN CONTRACT STRICT LIABILITY OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
import javax.swing.*;
import java.awt.*;
import java.awt.geom.*;
import java.awt.event.WindowEvent;
import java.awt.event.WindowListener;
import java.awt.event.WindowAdapter;
import java.awt.image.BufferedImage;
import java.net.URL;
/**
* Animated clipping of an image & shapes with alpha.
*/
public class ClipImage extends Japplet implements Runnable {
private Image img;
private final double OINC[] = {5.0 3.0};
private final double SINC[] = {5.0 5.0};
private double x y;
private double ix = OINC[0];
private double iy = OINC[1];
private double iw = SINC[0];
private double ih = SINC[1];
private double ew eh; // ellipse width & height
private GeneralPath p = new GeneralPath();
private AffineTransform at = new AffineTransform();
private BasicStroke bs = new BasicStroke(20.0f);
private Arc2D arc = new Arc2D.Float();
private Ellipse2D ellipse = new Ellipse2D.Float();
private RoundRectangle2D roundRect = new RoundRectangle2D.Float();
private Rectangle2D rect = new Rectangle2D.Float();
private Color redBlend = new Color(255 0 0 120);
private Color greenBlend = new Color(0 255 0 120);
private Thread thread;
private BufferedImage offImg;
private int w h;
private boolean newBufferedImage;
public void init() {
setBackground(Color.white);
img = getImage(getURL(“i
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2017-11-15 20:29 tutorial
目录 0 2017-11-15 20:29 tutorial2d
目录 0 2017-11-15 20:29 tutorial2dadvanced
文件 12840 2017-11-15 20:21 tutorial2dadvancedClipImage.html
文件 21377 2017-09-19 02:18 tutorial2dadvancedclipping.html
文件 19401 2017-09-19 02:18 tutorial2dadvancedcomplexshapes.html
文件 12840 2017-11-15 20:21 tutorial2dadvancedComposite.html
文件 21834 2017-09-19 02:18 tutorial2dadvancedcompositing.html
目录 0 2017-11-15 20:29 tutorial2dadvancedexamples
文件 8299 2017-09-19 02:18 tutorial2dadvancedexamplesClipImage.java
文件 7660 2017-09-19 02:18 tutorial2dadvancedexamplesComposite.java
文件 7390 2017-09-19 02:18 tutorial2dadvancedexamplesHitTestSample.java
目录 0 2017-11-15 20:29 tutorial2dadvancedexamplesimages
文件 5116 2017-09-19 02:18 tutorial2dadvancedexamplesimagesclouds.jpg
文件 50708 2017-09-19 02:18 tutorial2dadvancedexamplesimagesStarry.gif
目录 0 2017-11-15 20:29 tutorial2dadvancedexampleslib
文件 14960 2017-09-19 02:18 tutorial2dadvancedexampleslibClipImageap
文件 8922 2017-09-19 02:18 tutorial2dadvancedexampleslibCompositeap
文件 9578 2017-09-19 02:18 tutorial2dadvancedexampleslibHitTestSampleap
文件 7323 2017-09-19 02:18 tutorial2dadvancedexampleslibPearap
文件 8853 2017-09-19 02:18 tutorial2dadvancedexampleslibShapeMoverap
文件 57348 2017-09-19 02:18 tutorial2dadvancedexampleslibStarryap
文件 10607 2017-09-19 02:18 tutorial2dadvancedexampleslibTransformap
文件 4392 2017-09-19 02:18 tutorial2dadvancedexamplesPear.java
文件 7529 2017-09-19 02:18 tutorial2dadvancedexamplesShapeMover.java
文件 4175 2017-09-19 02:18 tutorial2dadvancedexamplesStarry.java
文件 8785 2017-09-19 02:18 tutorial2dadvancedexamplesSwingShapeMover.java
文件 11579 2017-09-19 02:18 tutorial2dadvancedexamplesTransform.java
文件 12840 2017-11-15 20:21 tutorial2dadvancedHitTestSample.html
文件 17491 2017-09-19 02:18 tutorial2dadvancedindex.html
文件 12840 2017-11-15 20:21 tutorial2dadvancedPear.html
............此处省略4956个文件信息
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。
评论列表(条)