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

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

?? pen.java.svn-base

?? 開發框架。 一.說明: 此框架的意圖是解決手機軟件開發中常遇到
?? SVN-BASE
字號:
package org.gggeye.easymf.ui;
import javax.microedition.lcdui.Graphics;
import javax.microedition.lcdui.Font;
import javax.microedition.lcdui.Image;

/**
 * 圖形繪制包裝類
 * 
 * 跟PPC Android Pen 有異曲同工之妙
 * 
 * @author wuhua
 * <a href="http://wuhua.3geye.net">我的博客</a>
 *
 */
public class Pen {
    Graphics graphics;
    int top;
    int left;
    Font bakFont;
    int bakStyle;
    int bakColor;
    int bakClipX = 0;
    int bakClipY = 0;
    int bakClipWidth = 0;
    int bakClipHeight = 0;

    public Pen(Graphics graphics) {
        this(graphics, 0, 0);
    }

    public Pen(Graphics graphics, int top, int left) {
        this.graphics = graphics;
        this.top = top;
        this.left = left;
    }


    public final void save() {
        this.bakColor = graphics.getColor();
        this.bakStyle = graphics.getStrokeStyle();
        this.bakFont = graphics.getFont();
    }

    public final void reset() {
        graphics.setColor(this.bakColor);
        graphics.setStrokeStyle(this.bakStyle);
        graphics.setFont(this.bakFont);
    }

    public final void saveClip() {
        bakClipX = graphics.getClipX();
        bakClipY = graphics.getClipY();
        bakClipWidth = graphics.getClipWidth();
        bakClipHeight = graphics.getClipHeight();
    }

    public final void resetClip() {
        graphics.setClip(bakClipX, bakClipY,
                         bakClipWidth, bakClipHeight);
    }

    /**
     * 構造函數
     * @param graphics Graphics
     */

    public Graphics getGraphics() {
        return graphics;
    }

    /**
     * 設置左邊界和頂邊界
     * @param x int
     * @param y int
     */
    public void setOffset(int x, int y) {
        left = x;
        top = y;
    }


    public int getColor() {
        return graphics.getColor();
    }


    public void setColor(int i) {
        graphics.setColor(i);
    }

    /**
     * 該方法用于設置繪制線弧形,矩形等時指定繪制模式是SLLID或DOTTED.
     * @param i int
     */
    public void setStrokeStyle(int i) {
        graphics.setStrokeStyle(i);
    }


    public void setFont(Font font) {
        graphics.setFont(font);
    }

    public Font getFont() {
        return graphics.getFont();
    }

    /**
     * 獲取剪貼區X軸偏移量
     * @return int
     */
    public int getClipX() {
        return graphics.getClipX() - left;
    }

    /**
     * 獲取剪貼區Y軸偏移量
     * @return int
     */
    public int getClipY() {
        return graphics.getClipY() - top;
    }

    /**
     * 獲取剪貼區寬度
     * @return int
     */
    public int getClipWidth() {
        return graphics.getClipWidth();
    }

    /**
     * 獲取剪貼區高度
     * @return int
     */
    public int getClipHeight() {
        return graphics.getClipHeight();
    }

    /**
     *該方法指定的矩形區域與當前的剪貼區交叉,形成并集的新的剪貼區.
     * @param x int
     * @param y int
     * @param width int
     * @param height int
     */
    public void clipRect(int x, int y, int width, int height) {
        graphics.clipRect(x + left, y + top, width, height);
    }

    /**
     * 設置剪貼區
     * @param x int
     * @param y int
     * @param width int
     * @param height int
     */
    public void setClip(int x, int y, int width, int height) {
        graphics.setClip(x + left, y + top, width, height);
    }

    /**
     * 繪制直線
     * @param x int
     * @param y int
     * @param x2 int
     * @param y2 int
     */
    public void drawLine(int x, int y, int x2, int y2) {
        graphics.drawLine(x + left, y + top, x2 + left, y2 + top);
    }

    /**
     * 填充矩形框
     * @param x int
     * @param y int
     * @param width int
     * @param height int
     */
    public void fillRect(int x, int y, int width, int height) {
        graphics.fillRect(x + left, y + top, width, height);
    }

    /**
     * 繪制矩形,通過多種顏色進行繪制
     * @param colors int[]
     * @param x int
     * @param y int
     * @param width int
     * @param height int
     */
    public void drawRects(int[] colors, int x, int y,
                          int width, int height) {
        int cof = 0;
        for (int k = 0; k < colors.length; k++) {
            cof++;
            this.setColor(colors[k]);
            this.drawRect(x - cof,
                          y - cof,
                          width + (cof << 1),
                          height + (cof << 1));
        }
    }
    public void drawRects(int x, int y,
                         int width, int height) {
      // int[] colors = new int[] {0xB0E2FF, 0x4876FF, 0x1E90FF};
       int[] colors = new int[] {0xCEF};
       drawRects(colors, x, y, width, height);
   }



    /**
     * 填充,指定區域
     * @param color int
     * @param x int
     * @param y int
     * @param width int
     * @param height int
     * @param size int
     */
    public void fillRect(int color, int x, int y, int width, int height,
                         int size) {
//     graphics.setColor(color);
//     //if(size == 0){
//          graphics.fillRect(x + left, y + top, width, height);
//     if(size != 0){
//         int h = height/size;
//         for(int i=1; i<size; i++){
//              graphics.fillRect(0, y + h*i, width, h);
//         }
//         graphics.fillRect(0, y + top, width, h);
//     }

    }


    /**
     * 繪制矩形
     * @param x int
     * @param y int
     * @param width int
     * @param height int
     */
    public void drawRect(int x, int y, int width, int height) {
        graphics.drawRect(x + left, y + top, width, height);
    }

    /**
     * 填充弧形.
     * @param x int
     * @param y int
     * @param width int
     * @param height int
     * @param startAngle int
     * @param arcAngle int
     */
    public void fillArc(int x, int y, int width, int height, int startAngle,
                        int arcAngle) {
        graphics.fillArc(x + left, y + top, width, height, startAngle, arcAngle);
    }

    /**
     * 繪制弧形
     * @param x int
     * @param y int
     * @param width int
     * @param height int
     * @param startAngle int
     * @param arcAngle int
     */
    public void drawArc(int x, int y, int width, int height, int startAngle,
                        int arcAngle) {
        graphics.drawArc(x + left, y + top, width, height, startAngle, arcAngle);
    }

    /**
     * 繪制字符串
     * @param s String
     * @param x int
     * @param y int
     * @param anchor int
     */
    public void drawChars(char[] c, int os, int len, int x, int y, int anchor) {
        graphics.drawChars(c, os, len, x + left, y + top, anchor);
    }

    public void drawChar(char c, int _x, int _y, int _anchor){
        graphics.drawChar(c, _x + left, _y + top, _anchor);
    }

    public void drawString(String s, int x, int y, int anchor) {
        graphics.drawString(s, x + left, y + top, anchor);
    }


    public void drawSubstring(String s, int x, int y, int k, int i1, int anchor) {
        graphics.drawSubstring(s, x, y, k + left, i1 + top, anchor);
    }


    public void drawImage(Image image, int x, int y, int anchor) {
        graphics.drawImage(image, x + left, y + top, anchor);
    }

    public void fillTriangle(int x1, int y1, int x2, int y2, int x3, int y3) {
        graphics.fillTriangle(x1 + left, y1 + top, x2 + left, y2 + top,
                              x3 + left,
                              y3 + top);
    }


    public final void drawStrings(String[] values,  Font font, int left, int top,
                                  int fontColor) {
        if(values == null)
            return;
        this.save();
        this.setFont(font);
        this.setColor(fontColor);

        int x = left;
        int y = top;
        for (int j = 0; j < values.length; j++) {
            drawString(values[j],x, y, 20);
            x = 0;
            y += font.getHeight();
        }
       this.reset();
    }
    
    /**
	 * 繪制漸變色選擇條
	 * 
	 * @param g -- 
	 * @param color
	 * @param x
	 * @param y
	 * @param width
	 * @param height
	 */
	public final  void drawShadeRect(int color, int x , int y, int width, int height){
		 int[] rgb = getShadeColor(color, width);
		 int h = y+height;
		 for(int i =y ; i < h; i+=2){
			graphics.drawRGB(rgb, 0, width, x, i, width,
			  			2, true);
		 }
		  
		 
	}
	
	/**
	 * 獲取顏色漸變RGB數組,
	 * 為了獲取這個數據,而又跟CLDC1.0兼容,導致項目增加了一個Float類
	 * 導致程序變大
	 * @param width
	 * @return
	 */
	public final static int[] getShadeColor(int color , int width){
		 int[] rgb;
	 
		  int shadeWidth = width;
		  int nRgbData = shadeWidth * 4;
			
	      rgb = new int[nRgbData];
	    
		  int alpha = -127;
		  for (int i = 0; i < shadeWidth; i++)
	      {
		    alpha = -127 + i;
			//主要算法在這里。
			int col = color | (128 - alpha << 24);
	        rgb[i]                  = col;
	        rgb[i + shadeWidth    ] = col;
	        rgb[i + shadeWidth * 2] = col;
	        rgb[i + shadeWidth * 3] = col;		        
	      }
		  return rgb;
	}
	


}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久一二三国产| 不卡一卡二卡三乱码免费网站 | 国产精一区二区三区| 日韩欧美一二区| 极品少妇xxxx精品少妇| 久久新电视剧免费观看| 国产成人鲁色资源国产91色综| 欧美激情在线观看视频免费| a美女胸又www黄视频久久| 亚洲欧美视频一区| 欧美疯狂性受xxxxx喷水图片| 免费欧美高清视频| 国产色综合一区| 欧美日韩精品电影| 国产精品自在在线| **欧美大码日韩| 欧美日韩免费视频| 国产毛片精品视频| 亚洲激情综合网| 欧美一区二区在线看| 国产精品亚洲一区二区三区在线| 亚洲人亚洲人成电影网站色| 精品婷婷伊人一区三区三| 蜜桃精品在线观看| 亚洲色图视频网| 日韩欧美一区二区久久婷婷| av影院午夜一区| 免费观看日韩av| 中文字幕视频一区二区三区久| 6080日韩午夜伦伦午夜伦| 国产精品亚洲成人| 午夜电影一区二区| 国产精品人成在线观看免费| 91精品国产色综合久久久蜜香臀| 成人精品免费看| 日产欧产美韩系列久久99| 国产精品理伦片| 精品久久国产字幕高潮| 色婷婷综合久久久中文一区二区| 久久精品免费观看| 亚洲高清不卡在线| 国产精品久久福利| 精品国产91乱码一区二区三区 | 久久国产视频网| 亚洲一线二线三线久久久| 久久人人爽人人爽| 欧美久久久久久久久中文字幕| 成人精品视频一区| 久久99深爱久久99精品| 午夜国产精品一区| 亚洲人吸女人奶水| 中文字幕av一区二区三区| 欧美一区二区三区影视| 欧美色图在线观看| 不卡视频一二三| 高清不卡一区二区在线| 国精产品一区一区三区mba桃花| 日韩精品午夜视频| 亚洲一区二区欧美| 亚洲欧美电影院| 亚洲视频免费观看| 中文乱码免费一区二区| 久久久久久久久久久久电影| 欧美不卡一区二区| 日韩免费在线观看| 日韩欧美一区二区三区在线| 91麻豆精品91久久久久同性| 欧美日韩日日摸| 久久免费国产精品 | 国产欧美一区二区三区鸳鸯浴| 欧美一区二区三区四区在线观看| 欧美在线免费播放| 色狠狠综合天天综合综合| a4yy欧美一区二区三区| 高清国产午夜精品久久久久久| 国产馆精品极品| 国产麻豆9l精品三级站| 国产激情一区二区三区| 国产一区999| 国产福利视频一区二区三区| 国产精品亚洲专一区二区三区| 国产精品自拍av| 国产成人精品一区二区三区网站观看| 久久国产夜色精品鲁鲁99| 韩日av一区二区| 国产一区二区精品久久99| 成人午夜在线免费| 99精品国产91久久久久久 | 欧美在线免费视屏| 欧美肥胖老妇做爰| 日韩精品专区在线影院观看 | 成人欧美一区二区三区| 樱桃国产成人精品视频| 午夜精品一区二区三区电影天堂 | 精品免费一区二区三区| 久久久噜噜噜久噜久久综合| 国产欧美视频一区二区三区| 国产精品久久久久久久久免费樱桃| 国产日韩综合av| 亚洲欧美一区二区三区久本道91 | 老司机精品视频导航| 黑人巨大精品欧美一区| a在线播放不卡| 欧美日韩久久久久久| 日韩欧美123| 中文字幕乱码一区二区免费| 亚洲综合免费观看高清完整版在线| 亚洲国产日韩一区二区| 久久精品噜噜噜成人88aⅴ| 9l国产精品久久久久麻豆| 欧美日韩在线观看一区二区 | 欧美一区二区精品在线| 26uuu久久综合| 最新国产の精品合集bt伙计| 亚洲大片一区二区三区| 国产一区二区精品在线观看| 在线免费不卡视频| 精品剧情在线观看| 亚洲激情av在线| 韩国三级电影一区二区| 在线免费观看不卡av| 久久麻豆一区二区| 亚洲高清视频的网址| 粉嫩嫩av羞羞动漫久久久| 欧美日韩激情在线| ●精品国产综合乱码久久久久| 无吗不卡中文字幕| fc2成人免费人成在线观看播放 | 欧美美女网站色| 欧美经典一区二区| 日本亚洲最大的色成网站www| 99re这里只有精品视频首页| 日韩一区二区三区视频在线| 亚洲美女偷拍久久| 国产成人午夜电影网| 日韩视频一区二区三区在线播放 | 中文一区在线播放 | 国产91精品精华液一区二区三区 | 日韩欧美国产不卡| 亚洲午夜免费福利视频| 福利电影一区二区| 精品少妇一区二区三区免费观看| 亚洲精品乱码久久久久久久久 | 亚洲成人先锋电影| 91在线视频官网| 国产婷婷色一区二区三区在线| 奇米色777欧美一区二区| 欧美www视频| 午夜电影网一区| 欧美视频中文字幕| 亚洲免费观看高清完整版在线观看 | 日韩一区二区精品葵司在线| 亚洲影院久久精品| 91视频在线看| 亚洲日本青草视频在线怡红院| 国产成人自拍网| 精品少妇一区二区三区在线播放 | 国产精品亚洲第一区在线暖暖韩国| 91精品国产高清一区二区三区蜜臀 | 久久www免费人成看片高清| 欧美一区二区三区思思人| 亚洲va韩国va欧美va| 欧美精品免费视频| 亚洲一区二区在线播放相泽| 色网综合在线观看| 亚洲欧洲精品一区二区三区不卡| av电影在线观看一区| 欧美激情综合在线| 99久久久国产精品| 中文字幕日韩一区二区| 色婷婷狠狠综合| 亚洲国产视频在线| 91精品国产一区二区人妖| 蜜臀久久久久久久| 久久综合999| 波多野结衣的一区二区三区| 日韩一区中文字幕| 欧美在线free| 日韩精品乱码免费| 欧美v国产在线一区二区三区| 国产成人在线视频播放| 综合久久综合久久| 精品视频在线看| 国模冰冰炮一区二区| 国产精品久久久99| 欧洲精品一区二区| 日韩成人dvd| 久久久久国产免费免费| 成人免费视频一区二区| 玉米视频成人免费看| 欧美妇女性影城| 欧美日韩电影一区| 久久草av在线| 亚洲免费观看高清完整版在线观看| 欧美日韩综合在线| 国产美女视频91| 亚洲人123区| 精品区一区二区| av电影天堂一区二区在线观看| 亚洲.国产.中文慕字在线|