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

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

?? midpsvgcanvas.java

?? 一個(gè)mobile svg
?? JAVA
?? 第 1 頁(yè) / 共 2 頁(yè)
字號(hào):
/****************************************************************** * Copyright (C) 2002-2006 Andrew Girow. All rights reserved.     * * ---------------------------------------------------------------* * This software is published under the terms of the TinyLine     * * License, a copy of which has been included with this           * * distribution in the TINYLINE_LICENSE.TXT file.                 * *                                                                * * For more information on the TinyLine,                          * * please see <http://www.tinyline.com/>.                         * *****************************************************************/package com.tinyline.app;import java.io.*;import javax.microedition.io.*;import javax.microedition.lcdui.*;import java.util.*;import com.tinyline.tiny2d.*;import com.tinyline.svg.*;import com.tinyline.util.GZIPInputStream;/** * This class represents a TinyLine SVG Canvas for MIDP 2.0. * * @author <a href="mailto:andrewgirow@yahoo.com">Andrew Girow</a> * @version 1.11 */public class MIDPSVGCanvas extends  Canvasimplements Runnable, ImageConsumer, ImageLoader,org.w3c.dom.events.EventTarget{    /** The SVG renderer */    public SVGRaster raster;    MIDPSVGImageProducer imageProducer;    /** The events queue */    SVGEventQueue   eventQueue;    /** The events dispatching thread */    Thread   thread;    /** The events listeners */    TinyVector listeners;    /* The clock image */    Image wait;    /* The current SVG document URL */    String  currentURL="";    /* The current loading status */    boolean load = true;    /* The current display */    Display display;    // Records data structure    Vector bookmarks;    List bookmarkList;    /* The image cash */    Hashtable imageCash;    /* The UI modes */    final static int  MODE_NEXTPREV  = 0;  // Navigation mode === Default mode    final static int  MODE_PAN       = 1;  // Pan mode    final static int  MODE_LINK      = 2;  // Link mode    final static int  MODE_ZOOM      = 3;  // Zoom mode    final static int  MODE_MAXCOUNT  = 4;  // MAX    /* The mode index */    int index;    /* The current mode */    int mode = MODE_NEXTPREV;    /* The pointer device data */    int pressedX;    int pressedY;    int draggedX;    int draggedY;    static final int PAN_STEP    = 4;    static final int MENU_HEIGHT = 18;    int x,y,width,height;    /* Contructor a new MIDPSVGCanvas */    public MIDPSVGCanvas(Display display)    {        this.display  = display;        width = getWidth();        height = getHeight();        // Creates the SVG raster        TinyPixbuf      buffer = new TinyPixbuf(width, height);        raster = new SVGRaster(buffer);        imageProducer = new MIDPSVGImageProducer(raster);        imageProducer.setConsumer(this);        raster.setSVGImageProducer(imageProducer);        // Sets the ImageLoader implementation needed for        // loading bitmaps        SVGImageElem.setImageLoader(this);        // Uncomment the following line for full antialiasing        raster.setAntialiased(true);        // Creates the event queue and listeners array.        eventQueue  =  new SVGEventQueue();        listeners   =  new TinyVector(4);        // Creates the image cash.        imageCash = new Hashtable();    }    /** Starts the events dispatching thread */    public synchronized void start()    {        thread = new Thread(this);        thread.setPriority(Thread.MIN_PRIORITY);        thread.start();    }    /** Stops the event dispatching  thread */    public synchronized void stop()    {        thread = null;        SVGEvent  event = new SVGEvent(SVGEvent.EVENT_UNLOAD, null);        postEvent(event);    }    /**     * The events dispatching thread run()     */    public void run()    {        Thread currentThread = Thread.currentThread();        try        {            while (currentThread == thread)            {                eventQueue.handleEvent(eventQueue.getNextEvent());            }        }        catch (InterruptedException e)        {            return;        }        catch( Throwable thr)        {            thr.printStackTrace();            alertError("Internal Error");        }    }    /**     * Loads and dispalys an SVGT document from the given URL.     * External hyperlinks handling     */    synchronized public void goURL(String url)    {        SVGEvent event = new SVGEvent(SVGEvent.EVENT_LOAD,url);        postEvent(event);    }    /**     *  Returns the current SVGT document to its original view.     */    public void origView()    {        SVGEvent  event = new SVGEvent(SVGEvent.EVENT_ORIGVIEW, null);        postEvent(event);    }    /**     * Switches the rendering quality.     */    public void switchQuality()    {        SVGEvent event = new SVGEvent(SVGEvent.EVENT_QUALITY, null );        postEvent(event);    }    /**     * Suspends or unsuspends all animations that are defined     * within the current SVGT document fragment.     */    public void pauseResumeAnimations()    {        SVGEvent event = new SVGEvent(SVGEvent.EVENT_PAUSERESUME, null );        postEvent(event);    }    /**     * Inits this canvas. Loads icons     */     public void init()     {        try        {           wait    = Image.createImage("/tinyline/wait.png");           // Load svg font           load = false;           // ? More or less the same time           //   Faster to use HelveticaFont class           // HelveticaFont.getFont();        }        catch(Exception e)        {           alertError("Resources (helvetica.svg and/or icons) could not be loaded!");        }     }    /**     * Delivers the pixels of the image. The pixel (px,py) is     * stored in the pixels array at index (px * scansize + py + off).     * @param x,&nbsp;y the coordinates of the upper-left corner of the     *        area of pixels to be set     * @param w the width of the area of pixels     * @param h the height of the area of pixels     * @see  ImageConsumer     */    public void newPixels(int x, int y, int w, int h)    {        repaint(x,y,w,h);        // paint it now!        serviceRepaints();    }    /**     * Returns a TinyBitmap for the given image URL or path.     * @param imgRef The image URL or path.     * @return a TinyBitmap object which gets its pixel data from     *                         the specified URL or path.     */    public TinyBitmap createTinyBitmap(TinyString uri)    {       String imgRef = new String(uri.data);       TinyBitmap bitmap = null;       if( imgRef.startsWith("..") || !imgRef.startsWith("http:"))       {          // This is relative path, then attach the basePath          int p = currentURL.lastIndexOf('/');          if(p!=-1)          {             imgRef = currentURL.substring(0,p)+'/' + imgRef;// System.out.println("imgRef "+imgRef);          }          else          {             return null;          }       }       try       {           // check in the cash           bitmap = (TinyBitmap)imageCash.get(imgRef);           // not found           if(bitmap == null)           {              Image image  = createImage(imgRef);              bitmap = new TinyBitmap();              bitmap.width  = image.getWidth();              bitmap.height = image.getHeight();              // Grap bits              bitmap.pixels32 = new int[bitmap.width * bitmap.height];              image.getRGB(bitmap.pixels32, 0, bitmap.width, 0, 0, bitmap.width, bitmap.height);              imageCash.put(imgRef, bitmap);           }       }       catch (Exception ex)       {       }       return bitmap;                }    /**     * Loads <tt> TinyBitmap </tt> raster image.     * @param imageData     The input image data buffer.     * @param imageOffset   The input image data buffer pointer.     * @param imageLength   The input image data buffer length.     * @return The raster image.     * @ see ImageLoader Interface     */    public TinyBitmap createTinyBitmap(byte[] imageData, int imageOffset, int imageLength)    {        TinyBitmap bitmap = new TinyBitmap();        try        {           Image image  =  Image.createImage(imageData, imageOffset, imageLength);           bitmap.width  = image.getWidth();           bitmap.height = image.getHeight();           // Grap bits           bitmap.pixels32 = new int[bitmap.width * bitmap.height];           image.getRGB(bitmap.pixels32, 0, bitmap.width, 0, 0, bitmap.width, bitmap.height);        }        catch (Throwable thr)        {           // alertError(imgRef + " image could not be loaded.");           return null;        }        return bitmap;    }    /**     * Selects mode.     * @param newmode The new mode id.     */    void selectMode( int newmode)    {        if(mode == MODE_LINK)        {            SVGEvent  event = new SVGEvent(SVGEvent.EVENT_FOCUSHIDE, null );            postEvent(event);        }        mode = newmode;        if(mode == MODE_LINK)        {            SVGEvent  event = new SVGEvent(SVGEvent.EVENT_FOCUSSHOW, null );            postEvent(event);        }    }    /**     * Loads an SVG document.     * @param url The SVG document URL.     * @return The loaded document.     */    public SVGDocument loadSVG(String url)    {//        System.out.println(""+url);        load = true;        repaint(0, height, getWidth(), MENU_HEIGHT);        SVGDocument doc = raster.createSVGDocument();        ContentConnection c = null;        InputStream is = null;        Runtime.getRuntime().gc();        try        {            if (url.startsWith("/"))            {                is = getClass().getResourceAsStream(url);            }            else if (url.startsWith("http:"))            {                c = (ContentConnection)Connector.open(url);                is = c.openInputStream();                if(url.endsWith("svgz"))                {                    is = new GZIPInputStream(is);                }            }            else            {                alertError("Wrong URL "+ url);                load = false;                return doc; // The stream is not open so it is safe to return            }            // Read and parse the SVGT stream            TinyPixbuf pixbuf = raster.getPixelBuffer();            // Create the SVGT attributes parser            SVGAttr attrParser = new SVGAttr(pixbuf.width, pixbuf.height);            // Create the SVGT stream parser            SVGParser parser = new SVGParser(attrParser);            // Parse the input SVGT stream parser into the document            parser.load(doc,is);            load = true;        }        catch( IOException ioe)        {            doc = null;            alertError(ioe.getMessage() );        }        catch(OutOfMemoryError memerror)        {            doc = null;            alertError("Not enought memory");            Runtime.getRuntime().gc();        }        catch( Throwable thr)        {            doc = null;

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品美女久久久久久久网站| 日韩毛片视频在线看| caoporn国产一区二区| 午夜欧美电影在线观看| 国产亚洲精品福利| 欧美日韩久久久久久| 波多野结衣在线aⅴ中文字幕不卡| 五月激情综合婷婷| 亚洲欧洲综合另类在线| 精品国产乱码久久久久久夜甘婷婷| 色综合久久中文综合久久97| 国产美女娇喘av呻吟久久| 日韩精品久久理论片| 亚洲视频香蕉人妖| 日本一区二区久久| 精品欧美一区二区三区精品久久 | 国产成人av福利| 日韩av中文字幕一区二区| 亚洲欧美区自拍先锋| 国产精品入口麻豆原神| 精品sm在线观看| 欧美一区二区福利视频| 欧美日韩和欧美的一区二区| 91一区二区三区在线播放| 丁香婷婷综合色啪| 国产激情91久久精品导航| 激情综合色综合久久综合| 天堂成人免费av电影一区| 亚洲国产精品尤物yw在线观看| 中文字幕一区二区三| 国产精品免费aⅴ片在线观看| 久久久精品国产免大香伊| 欧美精品一区二区三区四区| 日韩免费高清av| 日韩精品一区二区三区蜜臀| 欧美一区二区在线免费观看| 91精品国产一区二区三区| 欧美日韩国产精品自在自线| 欧美色综合影院| 精品视频一区三区九区| 欧美日韩五月天| 欧美卡1卡2卡| 日韩三区在线观看| 欧美精品一区二区三区蜜臀| 国产网站一区二区| 国产精品污网站| 最新中文字幕一区二区三区| 亚洲欧美日韩在线| 一区二区三区四区国产精品| 亚洲国产成人高清精品| 日韩精品午夜视频| 国产一区二区三区不卡在线观看 | 最新中文字幕一区二区三区 | 欧美在线观看一区| 欧美精品在线观看一区二区| 欧美夫妻性生活| 欧美xxxxx牲另类人与| 久久一区二区视频| 国产精品乱码妇女bbbb| 亚洲婷婷在线视频| 婷婷六月综合网| 久久成人免费电影| 福利视频网站一区二区三区| 91在线观看污| 91麻豆精品国产91久久久久| 精品99999| 亚洲欧美日韩精品久久久久| 午夜成人免费电影| 国精产品一区一区三区mba桃花 | 91亚洲午夜精品久久久久久| 欧美午夜理伦三级在线观看| 91精品国产91久久综合桃花| 久久午夜免费电影| 亚洲免费大片在线观看| 日韩精品亚洲一区二区三区免费| 精品亚洲欧美一区| 色婷婷亚洲精品| 日韩欧美精品三级| 中文字幕一区二区三区四区不卡| 午夜精品久久久久久久蜜桃app| 久久国产福利国产秒拍| 91在线无精精品入口| 欧美一区二区三区影视| 中文一区在线播放| 日韩电影在线免费看| 懂色av一区二区三区免费看| 欧美日韩免费观看一区三区| 久久日韩粉嫩一区二区三区| 亚洲综合激情小说| 国产成人av电影在线观看| 欧美性猛交一区二区三区精品| 26uuu国产日韩综合| 亚洲在线视频网站| 粉嫩av亚洲一区二区图片| 69久久99精品久久久久婷婷| 国产精品夫妻自拍| 麻豆精品一二三| 欧美性生交片4| 国产精品情趣视频| 精品无码三级在线观看视频| 欧美亚洲综合一区| 亚洲国产电影在线观看| 蜜桃传媒麻豆第一区在线观看| 色综合久久中文综合久久97| 国产日韩欧美综合一区| 美女视频网站久久| 欧美日韩国产中文| 亚洲另类在线一区| 精品国产三级a在线观看| 亚洲伦理在线精品| 丁香啪啪综合成人亚洲小说| 日韩欧美一区二区视频| 性做久久久久久久免费看| 成人激情免费电影网址| 久久久不卡网国产精品一区| 日本视频一区二区| 欧美日韩免费电影| 一区二区三区日韩欧美| av一区二区不卡| 国产精品美女久久久久aⅴ国产馆 国产精品美女久久久久av爽李琼 国产精品美女久久久久高潮 | 麻豆久久久久久| 欧美日韩国产在线播放网站| 亚洲欧美另类图片小说| 不卡大黄网站免费看| 欧美国产成人在线| 从欧美一区二区三区| 久久久www成人免费毛片麻豆| 久久国产欧美日韩精品| 欧美电影免费观看高清完整版| 日本视频中文字幕一区二区三区| 欧美视频一区二区三区在线观看| 亚洲一区二区五区| 欧洲一区二区av| 性做久久久久久| 欧美日韩精品二区第二页| 亚洲自拍偷拍麻豆| 欧美日本一道本在线视频| 午夜免费久久看| 4hu四虎永久在线影院成人| 日本v片在线高清不卡在线观看| 欧美男男青年gay1069videost| 亚洲综合成人在线| 欧美军同video69gay| 日本不卡一二三| 日韩欧美的一区| 国产乱码精品一区二区三区五月婷| 精品久久久久99| 国产成人av一区| 亚洲啪啪综合av一区二区三区| 在线观看免费一区| 日韩精品一卡二卡三卡四卡无卡| 日韩免费高清av| 国产成人精品三级麻豆| 亚洲色图欧美在线| 欧美日韩国产另类一区| 蜜臀av一区二区在线免费观看| 久久久久久综合| 成人高清av在线| 一区二区三区自拍| 欧美一区二区三区在线看| 国产麻豆精品久久一二三| 亚洲日本在线看| 欧美精品一卡两卡| 国产精品一区二区视频| 一区二区在线观看不卡| 91精品国产综合久久香蕉的特点 | 欧美亚洲综合久久| 日本不卡的三区四区五区| 国产日韩视频一区二区三区| 91亚洲永久精品| 免费成人在线观看视频| 国产精品色呦呦| 欧美顶级少妇做爰| 国产精品77777| 亚洲综合清纯丝袜自拍| 久久先锋影音av| 欧美亚洲国产一区二区三区va| 美脚の诱脚舐め脚责91 | 欧美精品少妇一区二区三区| 精品一区二区日韩| 一区二区三区影院| 久久亚洲免费视频| 欧美亚洲综合色| 福利电影一区二区三区| 视频一区国产视频| 国产精品大尺度| 精品国产三级a在线观看| 色悠久久久久综合欧美99| 蜜臀91精品一区二区三区| 亚洲视频在线一区二区| 精品乱码亚洲一区二区不卡| 色婷婷亚洲综合| 国产激情视频一区二区三区欧美| 一区二区三区四区激情| 国产人妖乱国产精品人妖| 91精品国产免费| 在线免费不卡电影| 成人精品视频一区| 精品午夜久久福利影院| 午夜精品久久久久久久蜜桃app|