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

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

?? gd.c

?? linux平臺下的多系統漏洞掃描工具客戶端
?? C
?? 第 1 頁 / 共 4 頁
字號:
#include <stdio.h>#include <math.h>#include <string.h>#include <stdlib.h>#include "gd.h"#include "mtables.c"static void gdImageBrushApply(gdImagePtr im, int x, int y);static void gdImageTileApply(gdImagePtr im, int x, int y);gdImagePtr gdImageCreate(int sx, int sy){	int i;	gdImagePtr im;	im = (gdImage *) malloc(sizeof(gdImage));	/* NOW ROW-MAJOR IN GD 1.3 */	im->pixels = (unsigned char **) malloc(sizeof(unsigned char *) * sy);	im->polyInts = 0;	im->polyAllocated = 0;	im->brush = 0;	im->tile = 0;	im->style = 0;	for (i=0; (i<sy); i++) {		/* NOW ROW-MAJOR IN GD 1.3 */		im->pixels[i] = (unsigned char *) calloc(			sx, sizeof(unsigned char));	}		im->sx = sx;	im->sy = sy;	im->colorsTotal = 0;	im->transparent = (-1);	im->interlace = 0;	return im;}void gdImageDestroy(gdImagePtr im){	int i;	for (i=0; (i<im->sy); i++) {		free(im->pixels[i]);	}		free(im->pixels);	if (im->polyInts) {			free(im->polyInts);	}	if (im->style) {		free(im->style);	}	free(im);}int gdImageColorClosest(gdImagePtr im, int r, int g, int b){	int i;	long rd, gd, bd;	int ct = (-1);	long mindist = 0;	for (i=0; (i<(im->colorsTotal)); i++) {		long dist;		if (im->open[i]) {			continue;		}		rd = (im->red[i] - r);			gd = (im->green[i] - g);		bd = (im->blue[i] - b);		dist = rd * rd + gd * gd + bd * bd;		if ((i == 0) || (dist < mindist)) {			mindist = dist;				ct = i;		}	}	return ct;}int gdImageColorExact(gdImagePtr im, int r, int g, int b){	int i;	for (i=0; (i<(im->colorsTotal)); i++) {		if (im->open[i]) {			continue;		}		if ((im->red[i] == r) && 			(im->green[i] == g) &&			(im->blue[i] == b)) {			return i;		}	}	return -1;}int gdImageColorAllocate(gdImagePtr im, int r, int g, int b){	int i;	int ct = (-1);	for (i=0; (i<(im->colorsTotal)); i++) {		if (im->open[i]) {			ct = i;			break;		}	}		if (ct == (-1)) {		ct = im->colorsTotal;		if (ct == gdMaxColors) {			return -1;		}		im->colorsTotal++;	}	im->red[ct] = r;	im->green[ct] = g;	im->blue[ct] = b;	im->open[ct] = 0;	return ct;}void gdImageColorDeallocate(gdImagePtr im, int color){	/* Mark it open. */	im->open[color] = 1;}void gdImageColorTransparent(gdImagePtr im, int color){	im->transparent = color;}void gdImageSetPixel(gdImagePtr im, int x, int y, int color){	int p;	switch(color) {		case gdStyled:		if (!im->style) {			/* Refuse to draw if no style is set. */			return;		} else {			p = im->style[im->stylePos++];		}		if (p != (gdTransparent)) {			gdImageSetPixel(im, x, y, p);		}		im->stylePos = im->stylePos %  im->styleLength;		break;		case gdStyledBrushed:		if (!im->style) {			/* Refuse to draw if no style is set. */			return;		}		p = im->style[im->stylePos++];		if ((p != gdTransparent) && (p != 0)) {			gdImageSetPixel(im, x, y, gdBrushed);		}		im->stylePos = im->stylePos %  im->styleLength;		break;		case gdBrushed:		gdImageBrushApply(im, x, y);		break;		case gdTiled:		gdImageTileApply(im, x, y);		break;		default:		if (gdImageBoundsSafe(im, x, y)) {			/* NOW ROW-MAJOR IN GD 1.3 */			im->pixels[y][x] = color;		}		break;	}}static void gdImageBrushApply(gdImagePtr im, int x, int y){	int lx, ly;	int hy;	int hx;	int x1, y1, x2, y2;	int srcx, srcy;	if (!im->brush) {		return;	}	hy = gdImageSY(im->brush)/2;	y1 = y - hy;	y2 = y1 + gdImageSY(im->brush);		hx = gdImageSX(im->brush)/2;	x1 = x - hx;	x2 = x1 + gdImageSX(im->brush);	srcy = 0;	for (ly = y1; (ly < y2); ly++) {		srcx = 0;		for (lx = x1; (lx < x2); lx++) {			int p;			p = gdImageGetPixel(im->brush, srcx, srcy);			/* Allow for non-square brushes! */			if (p != gdImageGetTransparent(im->brush)) {				gdImageSetPixel(im, lx, ly,					im->brushColorMap[p]);			}			srcx++;		}		srcy++;	}	}		static void gdImageTileApply(gdImagePtr im, int x, int y){	int srcx, srcy;	int p;	if (!im->tile) {		return;	}	srcx = x % gdImageSX(im->tile);	srcy = y % gdImageSY(im->tile);	p = gdImageGetPixel(im->tile, srcx, srcy);	/* Allow for transparency */	if (p != gdImageGetTransparent(im->tile)) {		gdImageSetPixel(im, x, y,			im->tileColorMap[p]);	}}		int gdImageGetPixel(gdImagePtr im, int x, int y){	if (gdImageBoundsSafe(im, x, y)) {		/* NOW ROW-MAJOR IN GD 1.3 */		return im->pixels[y][x];	} else {		return 0;	}}/* Bresenham as presented in Foley & Van Dam */void gdImageLine(gdImagePtr im, int x1, int y1, int x2, int y2, int color){	int dx, dy, incr1, incr2, d, x, y, xend, yend, xdirflag, ydirflag;	dx = abs(x2-x1);	dy = abs(y2-y1);	if (dy <= dx) {		d = 2*dy - dx;		incr1 = 2*dy;		incr2 = 2 * (dy - dx);		if (x1 > x2) {			x = x2;			y = y2;			ydirflag = (-1);			xend = x1;		} else {			x = x1;			y = y1;			ydirflag = 1;			xend = x2;		}		gdImageSetPixel(im, x, y, color);		if (((y2 - y1) * ydirflag) > 0) {			while (x < xend) {				x++;				if (d <0) {					d+=incr1;				} else {					y++;					d+=incr2;				}				gdImageSetPixel(im, x, y, color);			}		} else {			while (x < xend) {				x++;				if (d <0) {					d+=incr1;				} else {					y--;					d+=incr2;				}				gdImageSetPixel(im, x, y, color);			}		}			} else {		d = 2*dx - dy;		incr1 = 2*dx;		incr2 = 2 * (dx - dy);		if (y1 > y2) {			y = y2;			x = x2;			yend = y1;			xdirflag = (-1);		} else {			y = y1;			x = x1;			yend = y2;			xdirflag = 1;		}		gdImageSetPixel(im, x, y, color);		if (((x2 - x1) * xdirflag) > 0) {			while (y < yend) {				y++;				if (d <0) {					d+=incr1;				} else {					x++;					d+=incr2;				}				gdImageSetPixel(im, x, y, color);			}		} else {			while (y < yend) {				y++;				if (d <0) {					d+=incr1;				} else {					x--;					d+=incr2;				}				gdImageSetPixel(im, x, y, color);			}		}	}}static void dashedSet(gdImagePtr im, int x, int y, int color,	int *onP, int *dashStepP);void gdImageDashedLine(gdImagePtr im, int x1, int y1, int x2, int y2, int color){	int dx, dy, incr1, incr2, d, x, y, xend, yend, xdirflag, ydirflag;	int dashStep = 0;	int on = 1;	dx = abs(x2-x1);	dy = abs(y2-y1);	if (dy <= dx) {		d = 2*dy - dx;		incr1 = 2*dy;		incr2 = 2 * (dy - dx);		if (x1 > x2) {			x = x2;			y = y2;			ydirflag = (-1);			xend = x1;		} else {			x = x1;			y = y1;			ydirflag = 1;			xend = x2;		}		dashedSet(im, x, y, color, &on, &dashStep);		if (((y2 - y1) * ydirflag) > 0) {			while (x < xend) {				x++;				if (d <0) {					d+=incr1;				} else {					y++;					d+=incr2;				}				dashedSet(im, x, y, color, &on, &dashStep);			}		} else {			while (x < xend) {				x++;				if (d <0) {					d+=incr1;				} else {					y--;					d+=incr2;				}				dashedSet(im, x, y, color, &on, &dashStep);			}		}			} else {		d = 2*dx - dy;		incr1 = 2*dx;		incr2 = 2 * (dx - dy);		if (y1 > y2) {			y = y2;			x = x2;			yend = y1;			xdirflag = (-1);		} else {			y = y1;			x = x1;			yend = y2;			xdirflag = 1;		}		dashedSet(im, x, y, color, &on, &dashStep);		if (((x2 - x1) * xdirflag) > 0) {			while (y < yend) {				y++;				if (d <0) {					d+=incr1;				} else {					x++;					d+=incr2;				}				dashedSet(im, x, y, color, &on, &dashStep);			}		} else {			while (y < yend) {				y++;				if (d <0) {					d+=incr1;				} else {					x--;					d+=incr2;				}				dashedSet(im, x, y, color, &on, &dashStep);			}		}	}}static void dashedSet(gdImagePtr im, int x, int y, int color,	int *onP, int *dashStepP){	int dashStep = *dashStepP;	int on = *onP;	dashStep++;	if (dashStep == gdDashSize) {		dashStep = 0;		on = !on;	}	if (on) {		gdImageSetPixel(im, x, y, color);	}	*dashStepP = dashStep;	*onP = on;}	int gdImageBoundsSafe(gdImagePtr im, int x, int y){	return (!(((y < 0) || (y >= im->sy)) ||		((x < 0) || (x >= im->sx))));}void gdImageChar(gdImagePtr im, gdFontPtr f, int x, int y, 	int c, int color){	int cx, cy;	int px, py;	int fline;	cx = 0;	cy = 0;	if ((c < f->offset) || (c >= (f->offset + f->nchars))) {		return;	}	fline = (c - f->offset) * f->h * f->w;	for (py = y; (py < (y + f->h)); py++) {		for (px = x; (px < (x + f->w)); px++) {			if (f->data[fline + cy * f->w + cx]) {				gdImageSetPixel(im, px, py, color);				}			cx++;		}		cx = 0;		cy++;	}}void gdImageCharUp(gdImagePtr im, gdFontPtr f, 	int x, int y, int c, int color){	int cx, cy;	int px, py;	int fline;	cx = 0;	cy = 0;	if ((c < f->offset) || (c >= (f->offset + f->nchars))) {		return;	}	fline = (c - f->offset) * f->h * f->w;	for (py = y; (py > (y - f->w)); py--) {		for (px = x; (px < (x + f->h)); px++) {			if (f->data[fline + cy * f->w + cx]) {				gdImageSetPixel(im, px, py, color);				}			cy++;		}		cy = 0;		cx++;	}}void gdImageString(gdImagePtr im, gdFontPtr f, 	int x, int y, unsigned char *s, int color){	int i;	int l;	l = strlen((char*)s);	for (i=0; (i<l); i++) {		gdImageChar(im, f, x, y, s[i], color);		x += f->w;	}}void gdImageStringUp(gdImagePtr im, gdFontPtr f, 	int x, int y, unsigned char *s, int color){	int i;	int l;	l = strlen((char*)s);	for (i=0; (i<l); i++) {		gdImageCharUp(im, f, x, y, s[i], color);		y -= f->w;	}}static int strlen16(unsigned short *s);void gdImageString16(gdImagePtr im, gdFontPtr f, 	int x, int y, unsigned short *s, int color){	int i;	int l;	l = strlen16(s);	for (i=0; (i<l); i++) {		gdImageChar(im, f, x, y, s[i], color);		x += f->w;	}}void gdImageStringUp16(gdImagePtr im, gdFontPtr f, 	int x, int y, unsigned short *s, int color){	int i;	int l;	l = strlen16(s);	for (i=0; (i<l); i++) {		gdImageCharUp(im, f, x, y, s[i], color);		y -= f->w;	}}static int strlen16(unsigned short *s){	int len = 0;	while (*s) {		s++;		len++;	}	return len;}/* s and e are integers modulo 360 (degrees), with 0 degrees  being the rightmost extreme and degrees changing clockwise.  cx and cy are the center in pixels; w and h are the horizontal   and vertical diameter in pixels. Nice interface, but slow, since  I don't yet use Bresenham (I'm using an inefficient but  simple solution with too much work going on in it; generalizing  Bresenham to ellipses and partial arcs of ellipses is non-trivial,  at least for me) and there are other inefficiencies (small circles  do far too much work). */void gdImageArc(gdImagePtr im, int cx, int cy, int w, int h, int s, int e, int color){	int i;	int lx = 0, ly = 0;	int w2, h2;	w2 = w/2;	h2 = h/2;	while (e < s) {		e += 360;	}	for (i=s; (i <= e); i++) {		int x, y;		x = ((long)cost[i % 360] * (long)w2 / costScale) + cx; 		y = ((long)sint[i % 360] * (long)h2 / sintScale) + cy;		if (i != s) {			gdImageLine(im, lx, ly, x, y, color);			}		lx = x;		ly = y;	}}#if 0	/* Bresenham octant code, which I should use eventually */	int x, y, d;	x = 0;	y = w;	d = 3-2*w;	while (x < y) {		gdImageSetPixel(im, cx+x, cy+y, color);		if (d < 0) {			d += 4 * x + 6;		} else {			d += 4 * (x - y) + 10;			y--;		}		x++;	}	if (x == y) {		gdImageSetPixel(im, cx+x, cy+y, color);	}#endifvoid gdImageFillToBorder(gdImagePtr im, int x, int y, int border, int color){	int lastBorder;	/* Seek left */	int leftLimit, rightLimit;	int i;	leftLimit = (-1);	if (border < 0) {		/* Refuse to fill to a non-solid border */		return;	}	for (i = x; (i >= 0); i--) {		if (gdImageGetPixel(im, i, y) == border) {			break;		}		gdImageSetPixel(im, i, y, color);		leftLimit = i;	}	if (leftLimit == (-1)) {		return;	}	/* Seek right */	rightLimit = x;	for (i = (x+1); (i < im->sx); i++) {			if (gdImageGetPixel(im, i, y) == border) {			break;		}		gdImageSetPixel(im, i, y, color);		rightLimit = i;	}	/* Look at lines above and below and start paints */	/* Above */	if (y > 0) {		lastBorder = 1;		for (i = leftLimit; (i <= rightLimit); i++) {			int c;			c = gdImageGetPixel(im, i, y-1);			if (lastBorder) {				if ((c != border) && (c != color)) {						gdImageFillToBorder(im, i, y-1, 						border, color);							lastBorder = 0;				}			} else if ((c == border) || (c == color)) {				lastBorder = 1;			}		}	}	/* Below */	if (y < ((im->sy) - 1)) {		lastBorder = 1;		for (i = leftLimit; (i <= rightLimit); i++) {			int c;			c = gdImageGetPixel(im, i, y+1);			if (lastBorder) {				if ((c != border) && (c != color)) {						gdImageFillToBorder(im, i, y+1, 						border, color);							lastBorder = 0;				}			} else if ((c == border) || (c == color)) {				lastBorder = 1;			}		}	}}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
不卡一区二区中文字幕| 国产成人精品亚洲日本在线桃色| 日韩视频一区二区三区在线播放| 91一区二区三区在线观看| 久久精品免费观看| 日韩成人一级片| 日本欧美在线看| 91网站最新地址| 国产色产综合产在线视频| xnxx国产精品| 精品日韩成人av| 国产欧美一区二区在线| 欧美经典一区二区| 精品国产乱子伦一区| 国产亚洲一区二区在线观看| 丝袜亚洲另类丝袜在线| 免费观看成人鲁鲁鲁鲁鲁视频| 蜜桃视频第一区免费观看| 激情综合网最新| 高清不卡一二三区| 色婷婷激情久久| 欧美在线一区二区| 91精品免费观看| 日韩欧美一区中文| 丝袜亚洲另类欧美综合| 欧美亚一区二区| 久久婷婷色综合| jlzzjlzz亚洲女人18| 欧美探花视频资源| 亚洲美女屁股眼交3| 午夜精品一区二区三区三上悠亚| 热久久免费视频| 欧美日韩精品欧美日韩精品一 | 午夜精品久久久久久久99水蜜桃| 成人免费视频视频在线观看免费| 色伊人久久综合中文字幕| 中文字幕一区二区三区乱码在线| 一区二区三区四区不卡在线 | 欧美tk丨vk视频| 老司机免费视频一区二区| 91精品一区二区三区久久久久久 | 日韩精品一区在线| 国产精品污www在线观看| 香蕉影视欧美成人| 国产精品亚洲人在线观看| 日本乱人伦一区| www久久久久| 国产精品91一区二区| 国产精品丝袜一区| 99在线精品一区二区三区| 夜夜嗨av一区二区三区中文字幕 | 日韩国产精品久久久久久亚洲| 欧美日韩aaaaa| 久久99国产精品免费网站| 国产亚洲视频系列| 99亚偷拍自图区亚洲| 亚洲自拍偷拍图区| 91在线高清观看| 亚洲国产一区二区视频| 成人午夜视频在线观看| ...xxx性欧美| 日韩一二三四区| 成人一区二区在线观看| 亚洲最大成人综合| 亚洲精品一区二区三区在线观看| 99久久99久久精品免费看蜜桃| 亚洲精品一区二区三区影院| 成+人+亚洲+综合天堂| 污片在线观看一区二区| 国产人妖乱国产精品人妖| 欧美亚一区二区| 国产成人亚洲综合a∨婷婷| 夜色激情一区二区| 丝袜美腿成人在线| 久久久久97国产精华液好用吗| 麻豆成人久久精品二区三区红 | 国产盗摄精品一区二区三区在线 | 欧美日韩国产高清一区二区三区 | 中文字幕一区二| 欧洲精品视频在线观看| 午夜久久久影院| 精品国产污网站| 播五月开心婷婷综合| 中文字幕制服丝袜一区二区三区| 中文字幕精品一区二区三区精品| 91麻豆精品一区二区三区| 亚洲成av人片一区二区梦乃| 精品国产伦一区二区三区观看体验| 大胆欧美人体老妇| 一区二区三区视频在线看| 日韩欧美国产精品| 色婷婷综合激情| 国产在线播放一区| 欧美中文字幕一区| 国产乱码精品一区二区三| 中文字幕不卡在线观看| 欧美一区二区福利在线| 天堂av在线一区| 中文天堂在线一区| 欧美大片一区二区三区| 一本久久a久久免费精品不卡| 奇米888四色在线精品| 国产精品毛片无遮挡高清| 欧美蜜桃一区二区三区| 91欧美激情一区二区三区成人| 久久精品国产一区二区| 国产日韩三级在线| 日韩欧美国产午夜精品| 欧美亚洲日本国产| av电影天堂一区二区在线 | 国产成人免费视频| 免费观看在线色综合| 国产精品一区二区免费不卡 | 欧美精品一区二区三区在线播放| 欧美亚洲综合另类| jizzjizzjizz欧美| 蜜臀av一区二区在线免费观看 | 99re成人在线| 国产成人亚洲综合a∨婷婷图片| 秋霞午夜av一区二区三区| 国产精品久久久久久久久晋中 | 色婷婷精品大在线视频| 成人国产精品免费观看动漫| 蜜臀av一区二区在线免费观看 | 精品国产髙清在线看国产毛片| 4438x成人网最大色成网站| 一本色道久久加勒比精品| www.激情成人| 91视频.com| 色婷婷综合久色| 色婷婷国产精品综合在线观看| 99久久久无码国产精品| 国产成人精品网址| 成人中文字幕在线| av电影一区二区| 国产精品女同互慰在线看| 久久久综合视频| 欧美激情一区三区| 欧美一区二区三区视频免费播放| 日韩三级精品电影久久久| 337p日本欧洲亚洲大胆色噜噜| 日韩免费观看高清完整版在线观看| 日韩一区二区三区免费观看| 精品国产凹凸成av人导航| 亚洲精品在线免费观看视频| 欧美激情中文字幕| 亚洲成在线观看| 久久不见久久见免费视频7| 国产一区二区成人久久免费影院| 国产精品一二一区| 色婷婷精品大在线视频| 欧美精品1区2区| 日韩小视频在线观看专区| 欧美女孩性生活视频| 精品国精品国产| 欧美国产97人人爽人人喊| 亚洲小少妇裸体bbw| 日韩成人精品视频| 成人综合在线视频| 欧美性xxxxxxxx| xf在线a精品一区二区视频网站| 国产精品久久久久久久裸模| 欧美精彩视频一区二区三区| 亚洲成a人v欧美综合天堂下载| 国产主播一区二区| 国产精品欧美综合在线| 亚洲国产aⅴ成人精品无吗| 久久国产夜色精品鲁鲁99| 97久久精品人人做人人爽| 精品国产三级a在线观看| 国产精品乱人伦中文| 亚洲va欧美va人人爽午夜| 韩国女主播成人在线| 色94色欧美sute亚洲13| 欧美xxxx在线观看| 中文字幕中文乱码欧美一区二区| 日韩激情一区二区| 成人国产免费视频| 欧美xxxx老人做受| 亚洲国产裸拍裸体视频在线观看乱了 | 国产成人鲁色资源国产91色综| 欧美性一二三区| 中文子幕无线码一区tr| 一卡二卡三卡日韩欧美| 99国产一区二区三精品乱码| 日韩精品一区二区三区在线观看| 亚洲精品成a人| 国产精品99久久久| 91精品国产综合久久久久| 亚洲欧美一区二区三区久本道91| 成人小视频在线| 久久综合色一综合色88| 偷拍日韩校园综合在线| 91极品视觉盛宴| 中文字幕一区二区三区在线不卡| 伦理电影国产精品| 色综合天天狠狠| 国产精品福利在线播放| 国产精品99久| 久久在线免费观看|