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

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

?? images.c

?? 用于移動設備上的java虛擬機源代碼
?? C
?? 第 1 頁 / 共 3 頁
字號:
  /* width * height * 4 gives us the size of a 32 bpp image */  imgLen = nWidth * nHeight << 2;  srcImgLen = imageWidth  * imageHeight << 2;          if(transform & TRANSFORM_INVERTED_AXES) {    t_width = nHeight;    t_height = nWidth;  } else {    t_width = nWidth;    t_height = nHeight;  }  if (transform & TRANSFORM_Y_FLIP) {    yStart = nHeight-1;    yIncr = -1;  } else {    yStart = 0;    yIncr = +1;  }  if (transform & TRANSFORM_X_FLIP) {    xStart = nWidth-1;    xIncr = -1;  } else {    xStart = 0;    xIncr = +1;  }  /* increment srcX,Y regular. increment destX,Y according to transform.     this makes handling of mask and alpha values easier */  for (srcY = nYOriginSrc, destY = yStart, yCounter = 0;        yCounter < nHeight;        srcY++, destY+=yIncr, yCounter++) {    /* in the current implementation we have source bitmap       dimension as the width of the image and the height of the region       destination bitmap is of the dimensions of the region */        for (srcX = nXOriginSrc, destX = xStart, xCounter = 0; 	 xCounter < nWidth; 	 srcX++, destX+=xIncr, xCounter++) {      if ( transform & TRANSFORM_INVERTED_AXES ) {      /* copy the pixel that is pointed to */      XPutPixel(&destP->bitmap->image, destY, destX, 		XGetPixel(&sourceBitmap->image, srcX, srcY));      } else {      /* copy the pixel that is pointed to */      XPutPixel(&destP->bitmap->image, destX, destY, 		XGetPixel(&sourceBitmap->image, srcX, srcY));      }    } /*for x*/  } /* for y */    /* --- */}static void*imageDone(imageDstPtr self, int *width, int *height){    _imageDstPtr p = (_imageDstPtr)self;    if (p == NULL) return;    if ((width != NULL) && (height != NULL)) {        *width = p->bitmap->width;        *height = p->bitmap->height;    }    return (void*)p->bitmap;}/* * Dither matrices. * * canonical matrix is *  { 0,  6,  9, 15}, *  {11, 13,  2,  4}, *  { 7,  1, 14,  8}, *  {12, 10,  5,  3} * * or, converted to signed: * *  {-8, -2,  1,  7}, *  { 3,  5, -6, -4}, *  {-1, -7,  6,  0}, *  { 4,  2, -3, -5} * */static signed char cmat[4][4] = {    {-24,  -6,   3,  21},    {  9,  15, -18, -12},    { -3, -21,  18,   0},    { 12,   6,  -9, -15}};static voidblendPixel(int *r, int *g, int *b, int *alpha, int off){#if USE_ALPHA_BLEND    if (*alpha < TRANS_THRESHOLD) {        *alpha = 0;    }#if TRANS_BINARY_THRESHOLD    else {        *alpha = 0xff;    }#endif    *r = (*r * *alpha) / 0xff;    *g = (*g * *alpha) / 0xff;    *b = (*b * *alpha) / 0xff;#else /* USE_ALPHA_BLEND */    /*     * if we're not using alphablending then dither the alpha     * values so we can approximate a blending effect     */    if ((*alpha != 0x00) && (*alpha != 0xff)) {        *alpha += off * 3;        if (*alpha < TRANS_THRESHOLD) {            *alpha = 0;        } else {            *alpha = 0xff;        }    }#endif}/* * build a bit mask for dealing with transparent images that either * only have pixels that are on or off or are dithering an alpha blend * */static voidbuildMask(myBitmapStruct *bitmap, int alpha, int x, int y){    /* the mask must be 8-bit aligned for myPtImageMask */    int width = bitmap->width + (8 - (bitmap->width & 7));    if (bitmap->imageMask == NULL) {        int len = (width >> 3) * bitmap->height;        bitmap->imageMask = (unsigned char *)midpCalloc(len, sizeof(char));    }    if (bitmap->imageMask != NULL) {        /*          * build the image mask         */         int offset = (y * width + x) >> 3;        *(bitmap->imageMask + offset) |= (alpha & 1) << (7 - (x & 7));    }}static voidbuildAlphaChannel(myBitmapStruct *bitmap, int alpha, int x, int y) {     if (bitmap->imageMask == NULL) {        int len = bitmap->width * bitmap->height;        bitmap->imageMask = (unsigned char *)midpCalloc(len, sizeof(char));    }    if (bitmap->imageMask != NULL) {        int offset = y * bitmap->width + x;        *(bitmap->imageMask + offset) = (unsigned char)(alpha & 0xff);    }}static void setARGBPixels(imageDstPtr self, int** imageBuf, int bufLen, int width,	      int height, jboolean useAlpha){    int x;    int y;     int offset;    int pixel;     int alpha;    int r;    int g;    int b;        _imageDstPtr p = (_imageDstPtr)self;        if ((p->bitmap == NULL) || (p->mutable)){	fprintf(stderr, "setARGBPixel error\n");	return;        }        if (useAlpha) {	p->bitmap->prop = HAS_ALPHA;    }    for (y = 0; y < height; y++){	for (x = 0; x < width; x++){	    offset = (y * width) + x;	    pixel = (*imageBuf)[offset];	    	    alpha = (pixel >> 24) & 0xff;	    r = (pixel >> 16) & 0xff;	    g = (pixel >> 8 ) & 0xff;	    b = pixel & 0xff;	    	    XPutPixel(&p->bitmap->image, x, y, getPixelValue(r, g, b));	    	    if (useAlpha){ 		buildAlphaChannel(p->bitmap, alpha, x, y);	    }	}    }}static voidsendPixelsColor(imageDstPtr self, int y, uchar *pixels, int pixelType){    int x;    signed char *mat = cmat[y & 3];    _imageDstPtr p = (_imageDstPtr)self;    if ((p->bitmap == NULL) || (p->mutable)) return;    if ((pixelType == CT_COLOR) ||              /* color triplet */        (pixelType == (CT_COLOR | CT_ALPHA))) { /* color triplet with alpha */        for (x = 0; x < p->bitmap->width; ++x) {            int off = mat[x & 3];            int r = pixels[0];            int g = pixels[1];            int b = pixels[2];            int alpha = 0xff;            if (pixelType & CT_ALPHA) {                alpha = pixels[3];                p->bitmap->prop = HAS_ALPHA;                pixels++;            } else if (p->hasTransMap) {                alpha = pixels[3];                p->bitmap->prop = HAS_ALPHA;                pixels++;            }            pixels += 3;             r += off;            g += off;            b += off;            if (r < 0) r = 0; else if (r > 0xff) r = 0xff;            if (g < 0) g = 0; else if (g > 0xff) g = 0xff;            if (b < 0) b = 0; else if (b > 0xff) b = 0xff;            if (p->bitmap->prop == HAS_ALPHA) {                blendPixel(&r, &g, &b, &alpha, off);            }#if USE_ALPHA_BLEND            if (p->bitmap->prop == HAS_MASK) {                buildMask(p->bitmap, alpha, x, y);            } else if (p->bitmap->prop == HAS_ALPHA) {                buildAlphaChannel(p->bitmap, alpha, x, y);            }#else            if (p->bitmap->prop == HAS_MASK ||                p->bitmap->prop == HAS_ALPHA) {                buildMask(p->bitmap, alpha, x, y);            } #endif            XPutPixel(&p->bitmap->image, x, y, getPixelValue(r, g, b));        }    } else { /* indexed color */        for (x = 0; x < p->bitmap->width; ++x) {            int off = mat[x & 3];            int cmapIndex = *pixels++;            int color = p->cmap[cmapIndex];            int r = ((color >> 16) & 0xff) + off;            int g = ((color >>  8) & 0xff) + off;            int b = ((color >>  0) & 0xff) + off;            int alpha = 0xff;            if (r < 0) r = 0; else if (r > 0xff) r = 0xff;            if (g < 0) g = 0; else if (g > 0xff) g = 0xff;            if (b < 0) b = 0; else if (b > 0xff) b = 0xff;            if ((pixelType & (CT_ALPHA | CT_COLOR)) == CT_ALPHA) {                alpha = *pixels++;                p->bitmap->prop = HAS_ALPHA;            } else if (p->hasTransMap) {                if ((pixelType & CT_COLOR) == 0) { /* grayscale */                alpha = *pixels++;                p->bitmap->prop = HAS_ALPHA;                } else { /* indexed color */                    alpha = p->tmap[cmapIndex];                    p->bitmap->prop = HAS_ALPHA;                }            }            if (p->bitmap->prop == HAS_ALPHA) {                blendPixel(&r, &g, &b, &alpha, off);            }#if USE_ALPHA_BLEND            if (p->bitmap->prop == HAS_MASK) {                buildMask(p->bitmap, alpha, x, y);            } else if (p->bitmap->prop == HAS_ALPHA) {                buildAlphaChannel(p->bitmap, alpha, x, y);            }#else            if (p->bitmap->prop == HAS_MASK ||                p->bitmap->prop == HAS_ALPHA) {                buildMask(p->bitmap, alpha, x, y);            } #endif            XPutPixel(&p->bitmap->image, x, y, getPixelValue(r, g, b));        }    } }static voidsendPackedPixelsColor(imageDstPtr self, int y, uchar *pixels){    /*      * since we specified a depth of 8, these must be      * pixels in 8-bit grayscale.  pngDecode gives us a     * colormap for that case, so...     */    sendPixelsColor(self, y, pixels, KNI_FALSE);}imageDstPtr LCDUIcreateImageDst(jboolean mutable) {    _imageDstPtr p = midpMalloc(sizeof(_imageDstData));    if (p == NULL) {        return NULL;    }    p->super.ptr = p;    p->super.depth            = 8;    p->super.setColormap = setImageColormap;    p->super.setTransMap = setImageTransparencyMap;    p->super.setSize     = setImageSize;    p->super.sendPixels       = sendPixelsColor;    p->super.sendPackedPixels = sendPackedPixelsColor;    p->super.copyPixels  = copyImagePixels;    p->super.done        = imageDone;    p->super.setARGBPixels    = setARGBPixels;    p->super.copyPixelsTransformed = copyPixelsTransform;    if ((p->bitmap=(myBitmapStruct*)midpCalloc(sizeof(myBitmapStruct),1)) == NULL) {        midpFree(p);	return NULL;    }    p->mutable           = mutable;    p->hasColormap = KNI_FALSE;    p->hasTransMap = KNI_FALSE;    return (imageDstPtr)p;}#define XDRAWPOINT(dx) \    XPutPixel(dest, x + dx, y, XGetPixel(image, x + dx, y));    static voidmyPutImageMask(Display *display, Drawable d, GC gc, XImage *image, 	       unsigned char *mask, int src_x, int src_y, int dest_x, 	       int dest_y, unsigned int width, unsigned int height){    int i, x, y;    unsigned char data;    unsigned char *maskPtr = mask;    XImage *dest;    dest = XGetImage(display, d, dest_x, dest_y, width, height, 0xff, ZPixmap);    if (dest == NULL || mask == NULL) {        XPutImage(display, d, gc, image, src_x, src_y, dest_x, dest_y,                  width, height);	if (dest != NULL) {	    XDestroyImage(dest);	}        return;    }    /* it won't matter if the new width is larger than the actual bitmap      * since invalid bitmap locations will have 0 in the corresponding     * mask position and therefore won't be accesed     */    width = width + (8 - (width & 7));    for (y = 0; y < height; y++) {        for (x = 0; x < width; x += 8) {            data = *maskPtr++;            if (data == 0xff) {                /*                 * all the bits in the mask are set so just put all the pixels                 */                XDRAWPOINT(0);                XDRAWPOINT(1);                XDRAWPOINT(2);                XDRAWPOINT(3);                XDRAWPOINT(4);                XDRAWPOINT(5);                XDRAWPOINT(6);                XDRAWPOINT(7);            } else if ((data & 0xf0) == 0xf0) {                /*                 * only half of the pixels are definitely set so put those                 * and then run through the others                 */                XDRAWPOINT(0);                XDRAWPOINT(1);                XDRAWPOINT(2);                XDRAWPOINT(3);                for (i = 4; i < 8; i++) {                    if (data & (1 << (7-i))) {                        XDRAWPOINT(i);                    }                }            } else if ((data & 0x0f) == 0x0f) {                /*                 * the other half of the pixels are definitely set so                  * run through the first set and put the rest                 */                for (i = 0; i < 4; i++) {                    if (data & (1 << (7-i))) {                        XDRAWPOINT(i);                    }                }                XDRAWPOINT(4);                XDRAWPOINT(5);                XDRAWPOINT(6);                XDRAWPOINT(7);            } else if (data != 0x00) {                /*

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩福利电影在线| 美女视频第一区二区三区免费观看网站 | 欧美日韩激情在线| 国产呦萝稀缺另类资源| 亚洲一区二区三区四区在线 | 久久99精品久久久久久动态图| 国产精品久久久久久妇女6080| 欧美亚洲自拍偷拍| 高清国产午夜精品久久久久久| 午夜国产精品一区| 亚洲色图视频网| 亚洲精品一区二区三区四区高清| 91精品办公室少妇高潮对白| 国产一区二区免费视频| 日韩和欧美一区二区| 亚洲精品免费在线播放| 国产日韩精品一区二区三区| 欧美一区二区性放荡片| 欧美日韩一区 二区 三区 久久精品| 高清不卡一区二区| 精品一区二区三区视频在线观看 | 亚洲黄色av一区| 国产午夜精品一区二区三区四区| 91精品国产乱码久久蜜臀| 色悠悠亚洲一区二区| 国产电影一区在线| 经典三级一区二区| 蜜桃av一区二区| 天天综合色天天综合色h| 一区二区三区四区在线播放 | 欧美日韩精品免费观看视频| 色老汉一区二区三区| 91丨porny丨在线| 成人免费黄色在线| 东方aⅴ免费观看久久av| 国产专区欧美精品| 精品一二三四在线| 精品在线一区二区| 免费看欧美女人艹b| 日韩av不卡在线观看| 性做久久久久久免费观看| 一区二区三区成人在线视频| 亚洲精品国产一区二区精华液| 国产精品久久久久久久久免费丝袜 | 国产精品视频在线看| 国产亚洲成av人在线观看导航| 久久久99精品久久| 国产亚洲制服色| 欧美激情综合五月色丁香小说| 国产欧美一二三区| 国产精品久线在线观看| 国产精品免费免费| 亚洲激情男女视频| 亚洲电影一级片| 日本aⅴ免费视频一区二区三区| 丝袜亚洲另类欧美| 热久久国产精品| 精品影视av免费| 国产电影一区二区三区| 99久久99久久综合| 在线区一区二视频| 91精品国产综合久久久久久久 | 国产欧美日韩另类视频免费观看| 日本一区二区三区国色天香 | 亚洲成在人线免费| 免费观看91视频大全| 国产乱码一区二区三区| 9久草视频在线视频精品| 日本精品视频一区二区三区| 欧美久久免费观看| 2019国产精品| 亚洲品质自拍视频网站| 日韩av在线发布| 国产成人在线影院| 色哟哟一区二区| 日韩一区二区不卡| 久久精品欧美一区二区三区麻豆| 亚洲男女一区二区三区| 蜜桃一区二区三区四区| 成年人国产精品| 欧美精品久久久久久久多人混战| wwwwww.欧美系列| 亚洲综合精品久久| 国产在线国偷精品免费看| 99r国产精品| 日韩欧美中文字幕公布| 国产精品乱码一区二三区小蝌蚪| 午夜视频在线观看一区二区| 国产高清在线精品| 欧美色精品天天在线观看视频| 欧美草草影院在线视频| 亚洲男同1069视频| 国产一区二区三区四区在线观看| 91福利资源站| 久久久www免费人成精品| 亚洲小说欧美激情另类| 国产福利一区二区三区| 欧美群妇大交群中文字幕| 欧美极品美女视频| 理论电影国产精品| 欧美无砖砖区免费| 国产精品免费看片| 国产永久精品大片wwwapp| 欧美精品一二三| 中文字幕制服丝袜成人av| 久久精品99久久久| 欧美日韩在线播放一区| 国产精品卡一卡二| 国产激情视频一区二区三区欧美 | 韩国av一区二区三区| 精品视频资源站| 中文字幕综合网| 国产成人免费视| 欧美mv日韩mv国产网站| 丝袜脚交一区二区| 日本黄色一区二区| 欧美激情中文不卡| 国产精品一级片在线观看| 日韩欧美亚洲国产另类| 亚洲国产精品久久一线不卡| 99精品视频免费在线观看| 国产日韩欧美亚洲| 国产一区二区伦理| 日韩精品最新网址| 青青草一区二区三区| 欧美日韩黄色一区二区| 亚洲一线二线三线视频| 色八戒一区二区三区| 亚洲丝袜精品丝袜在线| 成人福利电影精品一区二区在线观看| 26uuu成人网一区二区三区| 日韩中文字幕1| 在线观看91av| 日韩高清一级片| 在线播放国产精品二区一二区四区| 亚洲精品免费在线| 欧美性色综合网| 亚洲一区二区美女| 欧美日韩另类国产亚洲欧美一级| 亚洲午夜影视影院在线观看| 欧美在线观看一区| 午夜久久福利影院| 欧美一区二区三区啪啪| 另类人妖一区二区av| 亚洲精品在线三区| 国产经典欧美精品| 国产精品女同一区二区三区| 成人av片在线观看| 一区二区在线看| 欧美日韩中文字幕一区| 免费久久99精品国产| 久久影视一区二区| 国产精品1024| 亚洲精品日产精品乱码不卡| 欧美午夜精品久久久久久超碰| 午夜久久电影网| 精品国产乱码久久久久久老虎| 国产综合久久久久久鬼色| 国产精品女主播av| 欧美揉bbbbb揉bbbbb| 久久精品国产一区二区三| 久久综合中文字幕| 成人福利视频网站| 香港成人在线视频| 久久网站热最新地址| 色综合婷婷久久| 天堂久久久久va久久久久| 26uuu国产在线精品一区二区| 成人黄色av网站在线| 亚洲国产日韩一区二区| 欧美精品一区二| 972aa.com艺术欧美| 午夜欧美视频在线观看| 精品盗摄一区二区三区| 92精品国产成人观看免费| 水野朝阳av一区二区三区| 国产喂奶挤奶一区二区三区| 日本乱人伦aⅴ精品| 久久91精品国产91久久小草 | 国产精品人妖ts系列视频| 欧美日韩一区二区三区高清| 国产精品一区2区| 亚洲国产婷婷综合在线精品| 337p粉嫩大胆噜噜噜噜噜91av| 99国产精品久久久久| 国内偷窥港台综合视频在线播放| 亚洲欧美在线另类| 精品久久久久久久久久久久久久久久久| 成人一区在线观看| 奇米影视一区二区三区小说| 国产精品久久久久久久久免费桃花| 91精品久久久久久蜜臀| 91视频在线观看| 国产一区高清在线| 午夜精品久久久久久久久| 欧美激情综合网| 精品国产免费视频| 日本二三区不卡| 成人深夜在线观看| 另类成人小视频在线|