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

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

?? rtextline.java

?? java 作圖的程序
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
                                else                                if(j == RIGHT )  return  0;   	                        else                         return  -width;           default:                                return -descent-leading;         }     }  /**   * Parse the text then draw it.   * @param g Graphics context   * @param x pixel position of the text   * @param y pixel position of the text   */     public void draw(Graphics g, int x, int y) {         if( g == null ) return;         if(component == null ) angle = 0;         if(angle == 0 ) super.draw(g,x,y);         else            draw(component,g,x,y);       }  /**   * Parse the text then draw it.   * @param g Graphics context   * @param x pixel position of the text   * @param y pixel position of the text   * @param j justification of the text   */     public void draw(Graphics g, int x, int y, int j) {         justification = j;         if( g == null ) return;         if(component == null ) angle = 0;         if(angle == 0 ) super.draw(g,x,y);         else            draw(component,g,x,y);       }  /**   * Parse the text, rotate it then draw it to the screen.   * @param g Graphics context   * @param x pixel position of the text   * @param y pixel position of the text   */     public synchronized void draw(Component comp, Graphics g, int x, int y) {         TextState ts;         int xoffset = 0;         int yoffset = 0;         Image    offsI        = null;         Graphics offsG        = null;         Image    rotatedImage = null;         int maxHeight = 0;         if(text == null || comp == null) return;         parseText(g);         maxHeight = maxAscent + maxDescent;	 /*	 ** Calculate the offset of the rotated image so that it	 ** will be positioned correctly. Remeber the image is calculated         ** on the Maximum Ascent and descent so that no character          ** is truncated	 */         switch (angle) {  	   case 90: case -270:                    xoffset = -maxAscent;                    if(justification == CENTER ) yoffset = - width/2;                    else                    if(justification == RIGHT )  yoffset = 0;   	            else                         yoffset = - width;                    break;	   case 180: case -180:                    yoffset = -maxDescent;                    if(justification == CENTER ) xoffset = - width/2;                    else                    if(justification == RIGHT )  xoffset = 0;   	            else                         xoffset = - width;                    break;	   case 270: case -90:                    xoffset = -maxDescent;                    if(justification == CENTER ) yoffset = - width/2;                    else                    if(justification == RIGHT )  yoffset = - width;   	            else                         yoffset = 0;                    break;           default:                    xoffset = 0;                    yoffset = 0;                    break;         }	 /*	 ** Create the offscreen image that the text will be written into	 */         offsI = comp.createImage(width,maxHeight);         offsG = offsI.getGraphics();	 /*	 ** Color the image with the background color	 */         if(background != null) {                offsG.setColor(background);         } else {                offsG.setColor(comp.getBackground());         }         offsG.fillRect(0,0,width,maxHeight);	 /*	 ** Set the image font and color	 */         offsG.setFont(g.getFont());         offsG.setColor(g.getColor());         if(font  != null) offsG.setFont(font);         if(color != null) offsG.setColor(color);	 /*	 ** Write to the offscreen image	 */         for(int i=0; i<list.size(); i++) {              ts = ((TextState)(list.elementAt(i)));              if(ts.f != null) offsG.setFont(ts.f);              if(ts.s != null)                  offsG.drawString(ts.toString(),ts.x,ts.y+maxAscent );	 }         /*	 ** Rotate the Offscreen image	 */         RotateTextFilter f = new RotateTextFilter(angle);         ImageProducer producer = new FilteredImageSource(offsI.getSource(),f);         rotatedImage = comp.createImage(producer);	 /*	 ** Draw the rotated image to the Component. Do not notify any         ** image consumer especially the component, otherwise we will get a          ** feedback loop starting up,         ** as this method is normally called from a paint method.	 */         g.drawImage(rotatedImage,x+xoffset,y+yoffset,null);       }}/** * This is an extension to the ImageFilter class that will rotate an image * a multiple of 90 degrees. This filter is easily extended to allow arbitrary * rotations */class RotateTextFilter extends ImageFilter {  /*  ** The angle to rotate the image in degrees  */     private int angle = 0;  /*  ** The minimum and maximum points on the image after rotation.  ** More important if arbitrary rotation was allowed  */     private int xmin = 0;     private int xmax = 0;     private int ymin = 0;     private int ymax = 0;  /*  ** The width and height of the New rotated image  */     private int width;     private int height;  /*  ** the rotation cosines of the angle  */     private double cos = 1.0;     private double sin = 0.0;  /*  ** The arrays that will store the new image. Only one is used depending  ** on the data type of the original image.  */     private int   ipixels[];     private byte  bpixels[];  /*  ** the color model of the original image  */     private ColorModel colorModel;    /******************** Constructors****************/   /**   * Instantiate the class   * @param angle the angle to rotate the image. Only multiples of 90 degrees   * are allowed   */     public RotateTextFilter(int angle) {         this.angle = ((angle%360)/90)*90;         cos = Math.cos( angle*Math.PI/180.0 );         sin = Math.sin( angle*Math.PI/180.0 );     }  /**   * Add to the properties table of the image that it has been rotated   * @param props The property table of the original image   */     public void setProperties(Hashtable props) {         props = (Hashtable) props.clone();         props.put("rotAngle", new Integer(angle) );         super.setProperties(props);     }  /**   * Find the dimensions of the original image and pass onto   * the image consumer the dimensions of the new roated image   * @param w width of the original image   * @param h height of the original image   */     public void setDimensions(int w, int h) {         int x[] = {0,w-1,w-1,0};         int y[] = {0,0,h-1,h-1};         int xx;         int yy;         for( int i=0; i<4; i++ ) {               xx = (int)Math.round( x[i]*cos + y[i]*sin);               yy = (int)Math.round(-x[i]*sin + y[i]*cos);               xmin = Math.min(xmin,xx);               xmax = Math.max(xmax,xx);               ymin = Math.min(ymin,yy);               ymax = Math.max(ymax,yy);         }         width  = xmax-xmin+1;         height = ymax-ymin+1;         consumer.setDimensions(width, height);      }  /**   * As the pixels of the original image are sent store them in memory   * as the rotated image.   *   * This method is called with a subset rectangle of the original image.   *   * @param x position of Left column in original image of this rectangle   * @param y poisition of Top row in original image of this rectangle   * @param w width of this rectangle   * @param h height of this rectangle   * @param model Colormodel associated with original image     * @param pixels Array containing the image or part of it   * @param off The offset into the pixels array where the parsed    *            rectangle starts    * @param scan The actual width of the image.   */    public void setPixels(int x, int y, int w, int h,                          ColorModel model, byte pixels[], int off,                          int scan) {        int i,j,k;        int ir,jr;          /*	** If the byte array is null create it. Also remember the color	** model so that we can pass it onto the image consumer	*/        if(bpixels == null) {                             colorModel = model;                             bpixels  = new byte[width*height];        }        /*	** place the rotated image into memory one pixel at a time	*/        j = y;        for(int n=0; n<h; n++, j++) {          i = x;          for(int m=0; m<w; m++, i++) {             ir = (int)Math.round( i*cos + j*sin) - xmin;             jr = (int)Math.round(-i*sin + j*cos) - ymin;             k = ir+jr*width;             bpixels[k] = pixels[ (j-y)*scan+(i-x)+off ];	  }        }    }  /**   * As the pixels of the original image are sent store them in memory   * as the rotated image.   *   * This method is called with a subset rectangle of the original image.   *   * @param x position of Left column in original image of this rectangle   * @param y poisition of Top row in original image of this rectangle   * @param w width of this rectangle   * @param h height of this rectangle   * @param model Colormodel associated with original image     * @param pixels Array containing the image or part of it   * @param off The offset into the pixels array where the parsed    *            rectangle starts    * @param scan The actual width of the image.   */    public void setPixels(int x, int y, int w, int h,                          ColorModel model, int pixels[], int off,                          int scan) {        int i,j,k;        int ir,jr;        /*	** If the integer array is null create it. Also remember the color	** model so that we can pass it onto the image consumer	*/        if(ipixels == null) {                              colorModel = model;                              ipixels  = new int[width*height];        }        /*	** place the rotated image into memory one pixel at a time	*/        j = y;        for(int n=0; n<h; n++, j++) {          i = x;          for(int m=0; m<w; m++, i++) {             ir = (int)Math.round( i*cos + j*sin) - xmin;             jr = (int)Math.round(-i*sin + j*cos) - ymin;             k = ir+jr*width;             ipixels[k] = pixels[ (j-y)*scan+(i-x)+off ];	  }        }    }  /**   * Called when the image is complete.   * When this is called by the image producer, we can then pass the rotated   * image onto the image consumer.   *   * @param status Status of the original image from the image producer.   */    public void imageComplete(int status) {         if(status == ImageConsumer.IMAGEABORTED ||            status == ImageConsumer.IMAGEERROR ) {                consumer.imageComplete(status);                ipixels = null;                bpixels = null;                return;         }       /*       ** Send the rotated image to the image consumer. Not forgetting to tell       ** it when the image is complete                   */         if(bpixels != null) {  	      for(int j=0; j<height; j++) consumer.setPixels(0, j, width, 1,                                          colorModel, bpixels, j*width, width);              consumer.imageComplete(status);         } else         if(ipixels != null) {  	      for(int j=0; j<height; j++) consumer.setPixels(0, j, width, 1,                                           colorModel, ipixels, j*width, width);             consumer.imageComplete(status);          } else             consumer.imageComplete(ImageConsumer.IMAGEABORTED);         ipixels = null;         bpixels = null;    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
高清成人在线观看| 精品视频一区三区九区| 欧美专区在线观看一区| 久久久激情视频| 亚洲6080在线| 成人免费观看av| 欧美一区二区三区四区高清| 国产精品久久久久三级| 国产精品一区二区免费不卡| 欧美日韩视频在线一区二区| 最新国产精品久久精品| 日韩av电影免费观看高清完整版在线观看 | 在线综合视频播放| 亚洲精品免费播放| voyeur盗摄精品| 久久嫩草精品久久久精品| 男女男精品视频| 欧美艳星brazzers| 自拍偷拍欧美精品| 国产精品香蕉一区二区三区| 在线综合+亚洲+欧美中文字幕| 亚洲免费色视频| www.综合网.com| 国产精品无遮挡| 国产制服丝袜一区| 精品乱码亚洲一区二区不卡| 免费欧美在线视频| 欧美一区二区三区电影| 日本亚洲三级在线| 日韩一区二区三区视频| 丝袜美腿亚洲色图| 91麻豆精品国产91久久久使用方法| 亚洲激情自拍视频| 欧美日韩一区 二区 三区 久久精品 | 亚洲五码中文字幕| 欧美日韩一区久久| 午夜精品福利视频网站| 欧美视频精品在线观看| 午夜一区二区三区视频| 日韩一区二区三| 精品一区二区免费看| 久久久激情视频| av亚洲精华国产精华精华| 亚洲美女偷拍久久| 欧美日韩一区二区在线观看| 午夜久久久影院| 88在线观看91蜜桃国自产| 亚洲五码中文字幕| 精品三级av在线| 国产精品白丝jk黑袜喷水| 国产精品久久久久影院亚瑟| 色妹子一区二区| 日韩极品在线观看| 久久免费看少妇高潮| 91在线免费看| 三级欧美韩日大片在线看| 精品国产欧美一区二区| 不卡视频一二三四| 亚洲一区二区影院| 日韩精品一区二区三区swag| 成人自拍视频在线| 亚洲va在线va天堂| 久久久www成人免费毛片麻豆| 成人av第一页| 午夜精品视频一区| 国产女主播视频一区二区| 色综合中文字幕国产 | 一区二区三区欧美日韩| 91麻豆精品国产91久久久更新时间 | 91黄色免费看| 精品一区二区三区在线观看| 国产精品二三区| 欧美一区二区在线视频| 丁香一区二区三区| 首页国产欧美久久| 18成人在线视频| 欧美成人伊人久久综合网| 懂色av一区二区三区免费观看| 爽好多水快深点欧美视频| 中文字幕av资源一区| 91精品国产综合久久精品图片| 成人免费看的视频| 久久精品国产亚洲一区二区三区| 亚洲视频一区二区在线| 精品成人私密视频| 欧美丝袜丝交足nylons图片| 高清beeg欧美| 精品一区二区免费视频| 天天综合色天天综合色h| 国产精品传媒入口麻豆| 欧美va在线播放| 欧美日韩在线播放三区四区| 91在线国产观看| 粉嫩高潮美女一区二区三区| 蜜臀久久99精品久久久久久9| 亚洲精品国产成人久久av盗摄 | 日韩欧美一二三四区| 色婷婷综合激情| 成人黄色一级视频| 久久国产综合精品| 日一区二区三区| 午夜免费欧美电影| 亚洲 欧美综合在线网络| 一区二区三区久久| 亚洲色图在线播放| 亚洲免费观看高清完整版在线| 精品久久久久香蕉网| 91精品在线观看入口| 欧美男男青年gay1069videost| 色综合婷婷久久| 一本大道av伊人久久综合| 成人午夜av影视| 成人综合婷婷国产精品久久免费| 精品一区二区三区影院在线午夜 | 99精品久久99久久久久| 成人毛片老司机大片| 成人a免费在线看| 成人app在线| 色哟哟欧美精品| 欧美羞羞免费网站| 欧美精品777| 精品欧美黑人一区二区三区| www亚洲一区| 国产视频不卡一区| 中文字幕一区二区三区av| 综合激情成人伊人| 中文字幕一区二| 一区二区三区毛片| 日韩精品免费视频人成| 日本sm残虐另类| 国产乱色国产精品免费视频| 成人视屏免费看| 91福利精品第一导航| 欧美高清激情brazzers| 日韩欧美国产wwwww| 国产欧美中文在线| 一区二区三区视频在线看| 丝袜美腿亚洲一区二区图片| 激情综合色播五月| 成人国产亚洲欧美成人综合网| av不卡免费电影| 欧美三级三级三级| 久久亚洲一区二区三区四区| 国产精品久久久久久福利一牛影视| 亚洲黄色片在线观看| 久久综合综合久久综合| 成人精品视频一区二区三区尤物| 成人免费视频免费观看| 欧美日韩精品系列| 国产网站一区二区三区| 亚洲精品成人精品456| 另类人妖一区二区av| 波多野结衣中文字幕一区| 欧美高清性hdvideosex| 国产三级精品在线| 日韩激情中文字幕| 97久久精品人人澡人人爽| 欧美一区二区三区成人| 亚洲欧美日韩在线| 经典三级在线一区| 欧美在线视频全部完| 国产丝袜在线精品| 日本欧美大码aⅴ在线播放| 国产传媒日韩欧美成人| 欧美老人xxxx18| 国产精品乱码一区二三区小蝌蚪| 五月婷婷久久综合| av毛片久久久久**hd| 欧美精品一区二| 偷窥国产亚洲免费视频| 91浏览器打开| 国产欧美视频在线观看| 蜜桃精品视频在线| 欧美日韩第一区日日骚| 综合电影一区二区三区| 国产**成人网毛片九色 | 国产精品久久久久久久久快鸭 | 日韩午夜在线播放| 亚洲曰韩产成在线| 91香蕉国产在线观看软件| 国产欧美一区二区三区在线老狼| 日韩av网站免费在线| 欧美精品亚洲一区二区在线播放| 国产精品久久精品日日| 国产精品一区专区| 99久久国产综合精品女不卡| av资源网一区| 日韩欧美久久久| 一区二区在线看| 99re亚洲国产精品| 国产精品网站在线| 国产一区二区三区在线看麻豆| 制服丝袜在线91| 午夜视频一区二区| 欧美女孩性生活视频| 午夜精品久久久久| 7777精品伊人久久久大香线蕉经典版下载| 日韩理论电影院| 91网站在线播放| 一区二区视频免费在线观看|