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

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

?? devarc.c

?? eCos操作系統源碼
?? C
字號:
/* * Copyright (c) 2000-2001 Greg Haerr <greg@censoft.com> * * Device-independent arc, pie and ellipse routines. * GdArc is integer only and requires start/end points. * GdArcAngle requires floating point and uses angles. * GdArcAngle uses qsin() and qcos() instead of sin() / cos()  * so no math lib needed. * * Portions Copyright (c) 1991 David I. Bell * Permission is granted to use, distribute, or modify this source, * provided that this copyright notice remains intact. * * Arc line clipping and integer qsin/qcos routines used by permission: * Copyright (C) 1997-1998 by Eero Tamminen * Bugfixed by Greg Haerr */#include <stdio.h>#include "device.h"#if HAVEFLOAT			/* =1 compiles in GdArcAngle*/#define HIGHPRECISION	0	/* =1 for high precision angles, uses mathlib*/#if !HIGHPRECISIONtypedef float	FLOAT;/* * qsin/qcos - calculate sin() and cos() approximations from a lookup table * * This uses a cosine lookup table of 0-90 degrees at one degree steps * with the difference between successive values used for interpolation. * The achieved accuracy should be about +/-0.0001.  If you want more * accuracy, use doubles and smaller steps.  If you want more speed, use * fixed point arithmetics. */static float cosine[91][2] = {	{ 1.000000, -1.523048e-04 },	{ 0.999848, -4.568681e-04 },	{ 0.999391, -7.612923e-04 },	{ 0.998630, -1.065484e-03 },	{ 0.997564, -1.369352e-03 },	{ 0.996195, -1.672803e-03 },	{ 0.994522, -1.975744e-03 },	{ 0.992546, -2.278083e-03 },	{ 0.990268, -2.579728e-03 },	{ 0.987688, -2.880588e-03 },	{ 0.984808, -3.180570e-03 },	{ 0.981627, -3.479583e-03 },	{ 0.978148, -3.777536e-03 },	{ 0.974370, -4.074339e-03 },	{ 0.970296, -4.369900e-03 },	{ 0.965926, -4.664130e-03 },	{ 0.961262, -4.956940e-03 },	{ 0.956305, -5.248240e-03 },	{ 0.951057, -5.537941e-03 },	{ 0.945519, -5.825955e-03 },	{ 0.939693, -6.112194e-03 },	{ 0.933580, -6.396572e-03 },	{ 0.927184, -6.679001e-03 },	{ 0.920505, -6.959396e-03 },	{ 0.913545, -7.237671e-03 },	{ 0.906308, -7.513741e-03 },	{ 0.898794, -7.787522e-03 },	{ 0.891007, -8.058931e-03 },	{ 0.882948, -8.327886e-03 },	{ 0.874620, -8.594303e-03 },	{ 0.866025, -8.858103e-03 },	{ 0.857167, -9.119205e-03 },	{ 0.848048, -9.377528e-03 },	{ 0.838671, -9.632995e-03 },	{ 0.829038, -9.885528e-03 },	{ 0.819152, -1.013505e-02 },	{ 0.809017, -1.038148e-02 },	{ 0.798636, -1.062476e-02 },	{ 0.788011, -1.086479e-02 },	{ 0.777146, -1.110152e-02 },	{ 0.766044, -1.133486e-02 },	{ 0.754710, -1.156475e-02 },	{ 0.743145, -1.179112e-02 },	{ 0.731354, -1.201390e-02 },	{ 0.719340, -1.223302e-02 },	{ 0.707107, -1.244841e-02 },	{ 0.694658, -1.266001e-02 },	{ 0.681998, -1.286775e-02 },	{ 0.669131, -1.307158e-02 },	{ 0.656059, -1.327142e-02 },	{ 0.642788, -1.346722e-02 },	{ 0.629320, -1.365892e-02 },	{ 0.615661, -1.384645e-02 },	{ 0.601815, -1.402977e-02 },	{ 0.587785, -1.420882e-02 },	{ 0.573576, -1.438353e-02 },	{ 0.559193, -1.455387e-02 },	{ 0.544639, -1.471977e-02 },	{ 0.529919, -1.488119e-02 },	{ 0.515038, -1.503807e-02 },	{ 0.500000, -1.519038e-02 },	{ 0.484810, -1.533806e-02 },	{ 0.469472, -1.548106e-02 },	{ 0.453990, -1.561935e-02 },	{ 0.438371, -1.575289e-02 },	{ 0.422618, -1.588162e-02 },	{ 0.406737, -1.600551e-02 },	{ 0.390731, -1.612454e-02 },	{ 0.374607, -1.623864e-02 },	{ 0.358368, -1.634781e-02 },	{ 0.342020, -1.645199e-02 },	{ 0.325568, -1.655116e-02 },	{ 0.309017, -1.664529e-02 },	{ 0.292372, -1.673435e-02 },	{ 0.275637, -1.681831e-02 },	{ 0.258819, -1.689715e-02 },	{ 0.241922, -1.697084e-02 },	{ 0.224951, -1.703936e-02 },	{ 0.207912, -1.710270e-02 },	{ 0.190809, -1.716082e-02 },	{ 0.173648, -1.721371e-02 },	{ 0.156434, -1.726136e-02 },	{ 0.139173, -1.730376e-02 },	{ 0.121869, -1.734088e-02 },	{ 0.104528, -1.737272e-02 },	{ 0.087156, -1.739927e-02 },	{ 0.069756, -1.742052e-02 },	{ 0.052336, -1.743646e-02 },	{ 0.034899, -1.744709e-02 },	{ 0.017452, -1.745241e-02 },	{ 0.000000, -1.745241e-02 }};static floatqcos(FLOAT angle){	short a, b, c;	a = angle;	if (a < 0) {		angle = a - angle;		a = -a;	} else {		angle = angle - a;	}	b = a / 90;	c = a - b * 90;	/* interpolate according to angle */	switch(b&3) {		case 3:			c = 90 - c;			return cosine[c][0] - cosine[c-1][1] * angle;		case 2:			return -(cosine[c][0] + cosine[c][1] * angle);		case 1:			c = 90 - c;			return cosine[c-1][1] * angle - cosine[c][0];		default:			return cosine[c][0] + cosine[c][1] * angle;	}}static floatqsin(FLOAT angle){	short a, b, c;	/* change to cosine by subtracting 90 */	a = (int)angle - 90;	if (a < 0) {		angle = (a + 90) - angle;		a = -a;	} else {		angle = angle - (a + 90);	}	b = a / 90;	c = a - b * 90;	/* interpolate according to angle */	switch(b&3) {		case 3:			c = 90 - c;			return cosine[c][0] - cosine[c-1][1] * angle;		case 2:			return -(cosine[c][0] + cosine[c][1] * angle);		case 1:			c = 90 - c;			return cosine[c-1][1] * angle - cosine[c][0];		default:			return cosine[c][0] + cosine[c][1] * angle;	}}#else /* HIGHPRECISION*/#include <math.h>#define qcos	QCOS#define qsin	QSINtypedef double	FLOAT;FLOAT QCOS(FLOAT a){	return cos(a * M_PI / 180.);}FLOAT QSIN(FLOAT a){	return sin(a * M_PI / 180.);}#endif /* HIGHPRECISION*/#endif /* HAVEFLOAT*//*  * Draw an arc or pie, angles are specified in 64th's of a degree. * This function requires floating point, use GdArc for integer only. */voidGdArcAngle(PSD psd, MWCOORD x0, MWCOORD y0, MWCOORD rx, MWCOORD ry,	MWCOORD angle1, MWCOORD angle2, int type){#if HAVEFLOAT	MWCOORD	ax, ay, bx, by;	FLOAT	a, b;	/* calculate pie edge offsets from center to the ellipse rim */	ax = qcos(angle1/64.) * rx;	bx = qcos(angle2/64.) * rx;	a = -qsin(angle1/64.);	b = -qsin(angle2/64.);	ay = a * ry;	by = b * ry;	/* call integer routine*/	GdArc(psd, x0, y0, rx, ry, ax, ay, bx, by, type);#endif /* HAVEFLOAT*/}/* argument holder for pie, arc and ellipse functions*/typedef struct {	PSD	psd;	MWCOORD	x0, y0;	MWCOORD	rx, ry;	MWCOORD	ax, ay;	MWCOORD	bx, by;	int	adir, bdir;	int	type;} SLICE;extern void drawpoint(PSD psd, MWCOORD x, MWCOORD y);extern void drawrow(PSD psd, MWCOORD x1, MWCOORD x2, MWCOORD y);/* * Clip a line segment for arc or pie drawing. * Returns 0 if line is clipped or on acceptable side, 1 if it's vertically * on other side, otherwise 3. */static intclip_line(SLICE *slice, MWCOORD xe, MWCOORD ye, int dir, MWCOORD y, MWCOORD *x0,	MWCOORD *x1){#if 0	/*	 * kluge: handle 180 degree case	 */	if (y >= 0 && ye == 0) {/*printf("cl %d,%d %d,%d %d,%d %d,%d %d,%d\n", xe, ye, y, dir,slice->ax, slice->ay, slice->bx, slice->by, slice->adir, slice->bdir);*/		/* bottom 180*/		if (slice->adir < 0) {			if (slice->ay || slice->by)				return 1;			if (slice->ax == -slice->bx)				return 0;		}		return 3;	}#endif	/* hline on the same vertical side with the given edge? */	if ((y >= 0 && ye >= 0) || (y < 0 && ye < 0)) {		MWCOORD x;		if (ye == 0) x = xe; else		x = (MWCOORD)(long)xe * y / ye;		if (x >= *x0 && x <= *x1) {			if (dir > 0)				*x0 = x;			else				*x1 = x;			return 0;		} else {			if (dir > 0) {				if (x <= *x0)					return 0;			} else {				if (x >= *x1)					return 0;			}		}		return 3;	}	return 1;}/* relative offsets, direction from left to right. */static voiddraw_line(SLICE *slice, MWCOORD x0, MWCOORD y, MWCOORD x1){	int	dbl = (slice->adir > 0 && slice->bdir < 0);	int 	discard, ret;	MWCOORD	x2 = x0, x3 = x1;	if (y == 0) {		if (slice->type != MWPIE)			return;		/* edges on different sides */		if ((slice->ay <= 0 && slice->by >= 0) ||		    (slice->ay >= 0 && slice->by <= 0)) {			if (slice->adir < 0)  {				if (x1 > 0)					x1 = 0;			}			if (slice->bdir > 0) {				if (x0 < 0)					x0 = 0;			}		} else {			if (!dbl) {				/* FIXME leaving in draws dot in center*/				drawpoint(slice->psd, slice->x0, slice->y0);				return;			}		}		drawrow(slice->psd, slice->x0 + x0, slice->x0 + x1, slice->y0);		return;	}	/* clip left edge / line */	ret = clip_line(slice, slice->ax, slice->ay, slice->adir, y, &x0, &x1);	if (dbl) {		if (!ret) {			/* edges separate line to two parts */			drawrow(slice->psd, slice->x0 + x0, slice->x0 + x1,				slice->y0 + y);			x0 = x2;			x1 = x3;		}	} else {		if (ret > 1) {			return;		}	}	discard = ret;	ret = clip_line(slice, slice->bx, slice->by, slice->bdir, y, &x0, &x1);	discard += ret;	if (discard > 2 && !(dbl && ret == 0 && discard == 3)) {		return;	}	if (discard == 2) {		/* line on other side than slice */		if (slice->adir < 0 || slice->bdir > 0) {			return;		}	}	drawrow(slice->psd, slice->x0 + x0, slice->x0 + x1, slice->y0 + y);}/* draw one line segment or set of points, called from drawarc routine*/static voiddrawarcsegment(SLICE *slice, MWCOORD xp, MWCOORD yp){	switch (slice->type) {	case MWELLIPSEFILL:		/* draw ellipse fill segment*/		drawrow(slice->psd, slice->x0-xp, slice->x0+xp, slice->y0-yp);		drawrow(slice->psd, slice->x0-xp, slice->x0+xp, slice->y0+yp);		return;	case MWELLIPSE:		/* set four points symmetrically situated around a point*/		drawpoint(slice->psd, slice->x0 + xp, slice->y0 + yp);		drawpoint(slice->psd, slice->x0 - xp, slice->y0 + yp);		drawpoint(slice->psd, slice->x0 + xp, slice->y0 - yp);		drawpoint(slice->psd, slice->x0 - xp, slice->y0 - yp);		return;	case MWPIE:		/* draw top and bottom halfs of pie*/		draw_line(slice, -xp, -yp, +xp);		draw_line(slice, -xp, +yp, +xp);		return;	default:	/* MWARC, MWARCOUTLINE*/		/* set four points symmetrically around a point and clip*/		draw_line(slice, +xp, +yp, +xp);		draw_line(slice, -xp, +yp, -xp);		draw_line(slice, +xp, -yp, +xp);		draw_line(slice, -xp, -yp, -xp);		return;	}}/* General routine to plot points on an arc.  Used by arc, pie and ellipse*/static voiddrawarc(SLICE *slice){	MWCOORD xp, yp;		/* current point (based on center) */	MWCOORD rx, ry;	long Asquared;		/* square of x semi axis */	long TwoAsquared;	long Bsquared;		/* square of y semi axis */	long TwoBsquared;	long d;	long dx, dy;	rx = slice->rx;	ry = slice->ry;	xp = 0;	yp = ry;	Asquared = rx * rx;	TwoAsquared = 2 * Asquared;	Bsquared = ry * ry;	TwoBsquared = 2 * Bsquared;	d = Bsquared - Asquared * ry + (Asquared >> 2);	dx = 0;	dy = TwoAsquared * ry;	while (dx < dy) {		drawarcsegment(slice, xp, yp);		if (d > 0) {			yp--;			dy -= TwoAsquared;			d -= dy;		}		xp++;		dx += TwoBsquared;		d += (Bsquared + dx);	}	d += ((3L * (Asquared - Bsquared) / 2L - (dx + dy)) >> 1);	while (yp >= 0) {		drawarcsegment(slice, xp, yp);		if (d < 0) {			xp++;			dx += TwoBsquared;			d += dx;		}		yp--;		dy -= TwoAsquared;		d += (Asquared - dy);	}}/*  * Draw an arc or pie using start/end points. * Integer only routine.  To specify start/end angles,  * use GdArcAngle, which requires floating point. */voidGdArc(PSD psd, MWCOORD x0, MWCOORD y0, MWCOORD rx, MWCOORD ry,	MWCOORD ax, MWCOORD ay, MWCOORD bx, MWCOORD by, int type){	MWCOORD	adir, bdir;	SLICE	slice;	if (rx <= 0 || ry <= 0)		return;	/*	 * Calculate right/left side clipping, based on quadrant.	 * dir is positive when right side is filled and negative when	 * left side is to be filled.	 *	 * >= 0 is bottom half	 */	if (ay >= 0)		adir = 1;	else		adir = -1;	if (by >= 0)		bdir = -1;	else		bdir = 1;	/*	 * The clip_line routine has problems around the 0 and	 * 180 degree axes.	 * This <fix> is required to make the clip_line algorithm	 * work.  Getting these routines to work for all angles is	 * a bitch.  And they're still buggy.  Doing this causes	 * half circles to be outlined with a slightly bent line	 * on the x axis. FIXME	 */	if (ay == 0) ++ay;	if (by == 0) ++by;	/* swap rightmost edge first */	if (bx > ax) {		MWCOORD swap;		swap = ax;		ax = bx;		bx = swap;		swap = ay;		ay = by;		by = swap;		swap = adir;		adir = bdir;		bdir = swap;	}	/* check for entire area clipped, draw with per-point clipping*/	if (GdClipArea(psd, x0-rx, y0-ry, x0+rx, y0+ry) == CLIP_INVISIBLE)		return;	slice.psd = psd;	slice.x0 = x0;	slice.y0 = y0;	slice.rx = rx;	slice.ry = ry;	slice.ax = ax;	slice.ay = ay;	slice.bx = bx;	slice.by = by;	slice.adir = adir;	slice.bdir = bdir;	slice.type = type;	drawarc(&slice);	if (type & MWOUTLINE) {		/* draw two lines from rx,ry to arc endpoints*/		GdLine(psd, x0, y0, x0+ax, y0+ay, TRUE);		GdLine(psd, x0, y0, x0+bx, y0+by, TRUE);	}	GdFixCursor(psd);}/* * Draw an ellipse using the current clipping region and foreground color. * This draws in the outline of the ellipse, or fills it. * Integer only routine. */voidGdEllipse(PSD psd, MWCOORD x, MWCOORD y, MWCOORD rx, MWCOORD ry, MWBOOL fill){	SLICE	slice;	if (rx < 0 || ry < 0)		return;	/* Check if the ellipse bounding box is either totally visible	 * or totally invisible.  Draw with per-point clipping.	 */	switch (GdClipArea(psd, x - rx, y - ry, x + rx, y + ry)) {	case CLIP_VISIBLE:		/*		 * For size considerations, there's no low-level ellipse		 * draw, so we've got to draw all ellipses		 * with per-point clipping for the time being		psd->DrawEllipse(psd, x, y, rx, ry, fill, gr_foreground);		GdFixCursor(psd);		return;		 */		break;	case CLIP_INVISIBLE:		return;  	}	slice.psd = psd;	slice.x0 = x;	slice.y0 = y;	slice.rx = rx;	slice.ry = ry;	slice.type = fill? MWELLIPSEFILL: MWELLIPSE;	/* other elements unused*/	drawarc(&slice);	GdFixCursor(psd);}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲一区在线观看视频| 大尺度一区二区| 国产精品伊人色| 欧美在线免费观看亚洲| 精品国产青草久久久久福利| 国产精品久久久久7777按摩| 激情偷乱视频一区二区三区| 日本精品视频一区二区三区| 国产精品女同一区二区三区| 久久国产麻豆精品| 欧美精品久久天天躁| 亚洲天堂精品在线观看| 精品系列免费在线观看| 欧美精品丝袜中出| 亚洲精品免费在线| 国产a视频精品免费观看| 精品国产乱码久久久久久老虎| 亚洲国产成人porn| 日本高清免费不卡视频| 国产精品福利一区| 成人国产在线观看| 国产精品免费av| 国产 日韩 欧美大片| 26uuu久久综合| 精品一区中文字幕| 日韩精品中文字幕在线不卡尤物| 性欧美疯狂xxxxbbbb| 欧美亚洲日本一区| 一区二区国产视频| 欧美日韩高清一区二区不卡| 亚洲一区影音先锋| 欧洲一区在线电影| 天天亚洲美女在线视频| 欧美男人的天堂一二区| 丝袜a∨在线一区二区三区不卡 | 亚洲图片自拍偷拍| 在线观看日韩毛片| 视频在线在亚洲| 91精品国产乱| 麻豆高清免费国产一区| 精品欧美一区二区三区精品久久| 麻豆免费精品视频| 欧美精品一区二区三区一线天视频| 麻豆成人综合网| 国产亚洲午夜高清国产拍精品| 国产乱色国产精品免费视频| 国产女人水真多18毛片18精品视频| 成人18精品视频| 亚洲综合图片区| 日韩一区二区在线看| 极品美女销魂一区二区三区免费| 久久久国产综合精品女国产盗摄| 国产成人综合在线| 亚洲日本成人在线观看| 欧美日韩高清一区二区三区| 久久97超碰色| 国产精品国产三级国产普通话99| 欧美亚洲精品一区| 久久99国产乱子伦精品免费| 欧美国产日韩在线观看| 在线观看国产日韩| 精品一区二区三区不卡| 成人欧美一区二区三区1314| 欧美日韩卡一卡二| 国产又黄又大久久| 亚洲色图欧洲色图婷婷| 欧美一区二区三区四区在线观看| 国产寡妇亲子伦一区二区| 亚洲日本一区二区| 欧美va亚洲va在线观看蝴蝶网| 成人激情视频网站| 美腿丝袜亚洲一区| 亚洲欧美日韩国产手机在线| 日韩一区二区在线免费观看| 97久久久精品综合88久久| 日本亚洲一区二区| 亚洲色图欧美偷拍| 欧美精品一区二区三区久久久| 91女厕偷拍女厕偷拍高清| 日本91福利区| 一区二区三区四区国产精品| 久久久精品影视| 日韩欧美的一区| 欧美亚洲国产一区在线观看网站| 国产大陆精品国产| 日本成人超碰在线观看| 日韩毛片一二三区| 国产视频一区二区在线| 678五月天丁香亚洲综合网| 91性感美女视频| 成人免费不卡视频| 久久国产精品72免费观看| 午夜在线成人av| 亚洲精品欧美综合四区| 国产精品视频看| 国产欧美日韩三区| 欧美精品一区二区三区蜜臀| 欧美一级艳片视频免费观看| 在线观看91精品国产入口| 91网站最新网址| 91亚洲精品一区二区乱码| 国产suv精品一区二区三区| 狠狠网亚洲精品| 捆绑紧缚一区二区三区视频| 日韩电影一区二区三区四区| 午夜电影网一区| 亚洲午夜在线电影| 一区二区高清免费观看影视大全| 亚洲欧洲制服丝袜| 成人免费在线观看入口| 国产精品区一区二区三区| 久久精品人人做人人爽97| 精品99一区二区三区| 精品成人在线观看| 精品国产麻豆免费人成网站| 日韩欧美成人激情| 久久这里只精品最新地址| www成人在线观看| 中文字幕欧美国产| 国产精品看片你懂得| 国产精品久久久爽爽爽麻豆色哟哟| 国产精品久久久久久久久久久免费看| 国产精品视频在线看| 亚洲九九爱视频| 亚洲国产美国国产综合一区二区| 亚洲图片有声小说| 日本不卡的三区四区五区| 久久99久久久欧美国产| 国产一区二区三区蝌蚪| 成人性生交大片免费看视频在线 | 色综合久久综合网欧美综合网| 99re这里只有精品6| 91搞黄在线观看| 日韩一级高清毛片| 国产视频在线观看一区二区三区 | 9色porny自拍视频一区二区| av亚洲精华国产精华| 欧美日免费三级在线| 欧美日韩国产影片| 精品国产免费久久| 亚洲免费在线观看视频| 日韩电影一二三区| 成人一区二区三区| 欧洲在线/亚洲| 久久精子c满五个校花| 亚洲欧美日韩久久| 精品一区二区三区视频| www.亚洲色图| 91精品在线麻豆| 久久久三级国产网站| 亚洲精品一二三四区| 麻豆精品视频在线观看| av电影在线观看一区| 91精品国产综合久久久久久| 国产欧美精品一区二区三区四区| 一区二区三区不卡视频| 国内精品伊人久久久久av影院| 91视频xxxx| 精品久久国产老人久久综合| 亚洲欧美精品午睡沙发| 精品一区二区免费视频| 欧美曰成人黄网| 国产午夜精品久久| 午夜电影一区二区| 91网站在线播放| 国产无人区一区二区三区| 天天综合色天天综合色h| yourporn久久国产精品| 欧美成人一区二区三区在线观看| 亚洲视频网在线直播| 国产99久久久国产精品潘金| 欧美自拍偷拍午夜视频| 国产三级欧美三级| 蜜桃免费网站一区二区三区| 91国内精品野花午夜精品| 国产精品免费网站在线观看| 麻豆精品精品国产自在97香蕉| 在线观看av一区二区| 成人欧美一区二区三区在线播放| 国产精品系列在线观看| 欧美一区二区视频观看视频| 亚洲综合久久久久| 国产成人在线观看| 26uuu欧美| 精品一区二区三区免费观看 | 久久色在线观看| 久久av中文字幕片| 欧美一级片免费看| 午夜av电影一区| 欧美日本不卡视频| 爽爽淫人综合网网站| 欧美日韩电影一区| 偷拍亚洲欧洲综合| 欧美另类一区二区三区| 夜色激情一区二区| 欧美亚洲综合另类| 午夜国产精品一区| 日韩一区二区三区四区 | 免费精品99久久国产综合精品| 欧美日韩精品三区|