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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? customstrokes.java

?? 共有164個java源程序
?? JAVA
字號:
/* * Copyright (c) 2000 David Flanagan.  All rights reserved. * This code is from the book Java Examples in a Nutshell, 2nd Edition. * It is provided AS-IS, WITHOUT ANY WARRANTY either expressed or implied. * You may study, use, and modify it for any non-commercial purpose. * You may distribute it non-commercially as long as you retain this notice. * For a commercial use license, or to purchase the book (recommended), * visit http://www.davidflanagan.com/javaexamples2. */package com.davidflanagan.examples.graphics;import java.awt.*;import java.awt.geom.*;import java.awt.font.*;/** A demonstration of writing custom Stroke classes */public class CustomStrokes implements GraphicsExample {    static final int WIDTH = 750, HEIGHT = 200;        // Size of our example    public String getName() {return "Custom Strokes";} // From GraphicsExample    public int getWidth() { return WIDTH; }            // From GraphicsExample    public int getHeight() { return HEIGHT; }          // From GraphicsExample    // These are the various stroke objects we'll demonstrate    Stroke[] strokes = new Stroke[] {	new BasicStroke(4.0f),          // The standard, predefined stroke	new NullStroke(),               // A Stroke that does nothing	new DoubleStroke(8.0f, 2.0f),   // A Stroke that strokes twice	new ControlPointsStroke(2.0f),  // Shows the vertices & control points	new SloppyStroke(2.0f, 3.0f)    // Perturbs the shape before stroking    };    /** Draw the example */    public void draw(Graphics2D g, Component c) {	// Get a shape to work with.  Here we'll use the letter B	Font f = new Font("Serif", Font.BOLD, 200);	GlyphVector gv = f.createGlyphVector(g.getFontRenderContext(), "B");	Shape shape = gv.getOutline();	// Set drawing attributes and starting position	g.setColor(Color.black);	g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, 			   RenderingHints.VALUE_ANTIALIAS_ON);	g.translate(10, 175);	// Draw the shape once with each stroke	for(int i = 0; i < strokes.length; i++) {	    g.setStroke(strokes[i]);   // set the stroke	    g.draw(shape);             // draw the shape	    g.translate(140,0);        // move to the right	}    }}/** * This Stroke implementation does nothing.  Its createStrokedShape() * method returns an unmodified shape.  Thus, drawing a shape with * this Stroke is the same as filling that shape! **/class NullStroke implements Stroke {    public Shape createStrokedShape(Shape s) { return s; }}/** * This Stroke implementation applies a BasicStroke to a shape twice. * If you draw with this Stroke, then instead of outlining the shape, * you're outlining the outline of the shape. **/class DoubleStroke implements Stroke {    BasicStroke stroke1, stroke2;   // the two strokes to use    public DoubleStroke(float width1, float width2) {	stroke1 = new BasicStroke(width1);  // Constructor arguments specify	stroke2 = new BasicStroke(width2);  // the line widths for the strokes    }    public Shape createStrokedShape(Shape s) {	// Use the first stroke to create an outline of the shape	Shape outline = stroke1.createStrokedShape(s);  	// Use the second stroke to create an outline of that outline.	// It is this outline of the outline that will be filled in	return stroke2.createStrokedShape(outline);    }}/** * This Stroke implementation strokes the shape using a thin line, and * also displays the end points and Bezier curve control points of all * the line and curve segments that make up the shape.  The radius * argument to the constructor specifies the size of the control point * markers. Note the use of PathIterator to break the shape down into * its segments, and of GeneralPath to build up the stroked shape. **/class ControlPointsStroke implements Stroke {    float radius;  // how big the control point markers should be    public ControlPointsStroke(float radius) { this.radius = radius; }    public Shape createStrokedShape(Shape shape) {	// Start off by stroking the shape with a thin line.  Store the	// resulting shape in a GeneralPath object so we can add to it.	GeneralPath strokedShape = 	    new GeneralPath(new BasicStroke(1.0f).createStrokedShape(shape));		// Use a PathIterator object to iterate through each of the line and	// curve segments of the shape.  For each one, mark the endpoint and	// control points (if any) by adding a rectangle to the GeneralPath	float[] coords = new float[6];	for(PathIterator i=shape.getPathIterator(null); !i.isDone();i.next()) {	    int type = i.currentSegment(coords);	    Shape s = null, s2 = null, s3 = null;	    switch(type) {	    case PathIterator.SEG_CUBICTO:		markPoint(strokedShape, coords[4], coords[5]); // falls through	    case PathIterator.SEG_QUADTO:		markPoint(strokedShape, coords[2], coords[3]); // falls through	    case PathIterator.SEG_MOVETO:	    case PathIterator.SEG_LINETO:		markPoint(strokedShape, coords[0], coords[1]); // falls through	    case PathIterator.SEG_CLOSE:		break;	    }	}	return strokedShape;    }    /** Add a small square centered at (x,y) to the specified path */    void markPoint(GeneralPath path, float x, float y) {	path.moveTo(x-radius, y-radius);  // Begin a new sub-path	path.lineTo(x+radius, y-radius);  // Add a line segment to it	path.lineTo(x+radius, y+radius);  // Add a second line segment	path.lineTo(x-radius, y+radius);  // And a third	path.closePath();                 // Go back to last moveTo position    }}/** * This Stroke implementation randomly perturbs the line and curve segments * that make up a Shape, and then strokes that perturbed shape.  It uses * PathIterator to loop through the Shape and GeneralPath to build up the * modified shape.  Finally, it uses a BasicStroke to stroke the modified * shape.  The result is a "sloppy" looking shape. **/class SloppyStroke implements Stroke {    BasicStroke stroke;    float sloppiness;    public SloppyStroke(float width, float sloppiness) {	this.stroke = new BasicStroke(width); // Used to stroke modified shape	this.sloppiness = sloppiness;         // How sloppy should we be?    }        public Shape createStrokedShape(Shape shape) {	GeneralPath newshape = new GeneralPath();  // Start with an empty shape		// Iterate through the specified shape, perturb its coordinates, and	// use them to build up the new shape.	float[] coords = new float[6];	for(PathIterator i=shape.getPathIterator(null); !i.isDone();i.next()) {	    int type = i.currentSegment(coords);	    switch(type) {	    case PathIterator.SEG_MOVETO:		perturb(coords, 2);		newshape.moveTo(coords[0], coords[1]);		break;	    case PathIterator.SEG_LINETO:		perturb(coords, 2);		newshape.lineTo(coords[0], coords[1]);		break;	    case PathIterator.SEG_QUADTO:		perturb(coords, 4);		newshape.quadTo(coords[0], coords[1], coords[2], coords[3]);		break;	    case PathIterator.SEG_CUBICTO:		perturb(coords, 6);		newshape.curveTo(coords[0], coords[1], coords[2], coords[3],				 coords[4], coords[5]);		break;	    case PathIterator.SEG_CLOSE:		newshape.closePath();		break;	    }	}	// Finally, stroke the perturbed shape and return the result	return stroke.createStrokedShape(newshape);    }    // Randomly modify the specified number of coordinates, by an amount    // specified by the sloppiness field.    void perturb(float[] coords, int numCoords) {	for(int i = 0; i < numCoords; i++)	    coords[i] += (float)((Math.random()*2-1.0)*sloppiness);    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧洲精品在线观看| 国产又黄又大久久| 欧美喷水一区二区| 亚洲曰韩产成在线| 91精品国产91综合久久蜜臀| 亚洲主播在线观看| 日韩一卡二卡三卡| 麻豆91免费观看| 国产日韩精品久久久| 成人av电影在线观看| 亚洲精品成人少妇| 91精品中文字幕一区二区三区| 午夜亚洲福利老司机| 精品国产123| 色一情一伦一子一伦一区| 亚洲1区2区3区4区| 精品成人a区在线观看| 在线视频国内自拍亚洲视频| 日韩电影在线看| 国产精品女人毛片| 欧美三级蜜桃2在线观看| 国产综合久久久久久鬼色| 亚洲精品视频免费观看| 精品国产一区二区三区四区四 | 一级中文字幕一区二区| 欧美在线三级电影| 麻豆成人免费电影| 一区在线观看免费| 欧美丰满一区二区免费视频| 国产成人免费9x9x人网站视频| 国产亚洲1区2区3区| 欧美日本一区二区三区四区| 国产91在线看| 秋霞成人午夜伦在线观看| 亚洲日本在线a| 久久影音资源网| 在线一区二区视频| 成人福利在线看| 国产制服丝袜一区| 免费观看久久久4p| 亚洲高清一区二区三区| 亚洲午夜激情网站| 国产精品传媒视频| 精品久久久久久久人人人人传媒| 欧洲一区二区av| www.欧美日韩| 国产成人av资源| 成人涩涩免费视频| 国产福利一区二区三区| 蓝色福利精品导航| 99热在这里有精品免费| 色综合久久久久综合| 成人久久18免费网站麻豆| 理论电影国产精品| 久久激五月天综合精品| 狠狠网亚洲精品| 99在线精品免费| 91成人免费在线| 欧美男女性生活在线直播观看| 欧美日韩在线不卡| 欧美日韩你懂得| 精品国产髙清在线看国产毛片| 久久只精品国产| 亚洲欧美日韩一区二区三区在线观看| 国产亚洲欧洲997久久综合| 久久久综合激的五月天| 亚洲三级视频在线观看| 日韩高清不卡一区二区三区| 久草这里只有精品视频| 99re6这里只有精品视频在线观看| 色狠狠一区二区| 精品国产网站在线观看| 亚洲精品成人天堂一二三| 日韩二区三区四区| 成人黄色777网| 欧美一二三区在线观看| 国产精品久久99| 亚洲va欧美va人人爽| 狠狠狠色丁香婷婷综合激情| 欧美综合天天夜夜久久| 337p亚洲精品色噜噜噜| 国产精品久久久久久久久果冻传媒 | 久久久夜色精品亚洲| 亚洲高清免费视频| 色婷婷综合激情| 国产精品美女久久久久aⅴ | 亚洲欧洲成人自拍| 久久99国产精品久久| 欧美三级日韩在线| 国产精品私人影院| 国产一区二区精品久久99| 欧美大白屁股肥臀xxxxxx| 日韩电影在线观看电影| 91片黄在线观看| 亚洲视频一区二区在线| 成人av在线资源网| 国产精品天美传媒| 国产成人av一区| 久久亚洲免费视频| 韩国三级中文字幕hd久久精品| 欧美日本韩国一区二区三区视频| 亚洲精品乱码久久久久久| 色网综合在线观看| √…a在线天堂一区| av网站免费线看精品| 中文字幕一区二区三区四区| 欧美色老头old∨ideo| 亚洲自拍与偷拍| 日韩精品一区二区三区在线 | 91精品福利视频| 亚洲精品视频在线观看网站| 在线亚洲人成电影网站色www| 五月天丁香久久| 国产欧美日韩三级| 欧美日韩综合在线| 国产九九视频一区二区三区| 亚洲欧美一区二区三区国产精品| 一本久道久久综合中文字幕| 亚洲18影院在线观看| 久久一夜天堂av一区二区三区| 成人av网站在线| 经典三级在线一区| 亚洲激情一二三区| 国产精品美日韩| 精品国产一区二区三区四区四 | 亚洲成人福利片| 国产欧美精品区一区二区三区| 91一区二区三区在线观看| 美女视频黄免费的久久 | 国产91富婆露脸刺激对白| 午夜精品福利在线| 亚洲欧美日韩国产成人精品影院| 日韩欧美国产wwwww| 欧美亚洲日本一区| 99精品视频一区二区三区| 久久爱www久久做| 男人的天堂久久精品| 视频一区在线播放| 亚洲最新在线观看| 国产精品久久久久桃色tv| 久久精品亚洲国产奇米99| 欧美一区二区三区免费大片| 欧美色窝79yyyycom| 欧美性猛交xxxxxxxx| 一本一道久久a久久精品| 播五月开心婷婷综合| 成人免费高清视频| 成人免费毛片片v| 99久久婷婷国产综合精品电影| 国产一区二区三区美女| 国产91对白在线观看九色| 国产91色综合久久免费分享| 国产一区不卡视频| 福利91精品一区二区三区| 成人av电影在线播放| 在线观看日韩av先锋影音电影院| 色综合 综合色| 69久久99精品久久久久婷婷| 久久女同精品一区二区| 亚洲国产精品综合小说图片区| 国产一区美女在线| 欧美在线视频不卡| 2020日本不卡一区二区视频| 国产精品麻豆久久久| 日韩福利电影在线| 96av麻豆蜜桃一区二区| 日韩女优制服丝袜电影| 亚洲激情综合网| 国产毛片精品视频| 在线不卡的av| 午夜精品视频一区| 欧美综合欧美视频| 中文字幕在线不卡国产视频| 国产精品亚洲视频| 欧美一区二区三区在线观看| 欧美激情一区二区三区不卡| 日韩av一二三| 欧美精品v日韩精品v韩国精品v| 国产精品电影一区二区| 成人黄色小视频| 久久久不卡网国产精品一区| 免费日韩伦理电影| 欧美日韩二区三区| 亚洲午夜一区二区| 色老综合老女人久久久| 国产精品久久毛片av大全日韩| 精品一二线国产| 久久精品视频免费观看| 国产精品资源站在线| 日韩精品一区二| 久久草av在线| 国产欧美日韩亚州综合 | 亚洲精品v日韩精品| 国产成人免费视频网站| 国产精品午夜在线观看| 95精品视频在线| 亚洲高清免费视频| 91精品国产一区二区三区香蕉| 麻豆精品蜜桃视频网站| 欧美大肚乱孕交hd孕妇|