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

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

?? mizerclip.c

?? linux下電話本所依賴的一些圖形庫
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* $XFree86: xc/programs/Xserver/mi/mizerclip.c,v 1.1 1999/10/13 22:33:13 dawes Exp $ *//***********************************************************Copyright 1987, 1998  The Open GroupAll Rights Reserved.The above copyright notice and this permission notice shall be included inall copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ORIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THEOPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER INAN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR INCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.Except as contained in this notice, the name of The Open Group shall not beused in advertising or otherwise to promote the sale, use or other dealingsin this Software without prior written authorization from The Open Group.Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.                        All Rights ReservedPermission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and thatboth that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not beused in advertising or publicity pertaining to distribution of thesoftware without specific, written prior permission.  DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDINGALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALLDIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES ORANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THISSOFTWARE.******************************************************************/#include <config.h>#include "mi.h"#include "miline.h"/*The bresenham error equation used in the mi/mfb/cfb line routines is:	e = error	dx = difference in raw X coordinates	dy = difference in raw Y coordinates	M = # of steps in X direction	N = # of steps in Y direction	B = 0 to prefer diagonal steps in a given octant,	    1 to prefer axial steps in a given octant	For X major lines:		e = 2Mdy - 2Ndx - dx - B		-2dx <= e < 0	For Y major lines:		e = 2Ndx - 2Mdy - dy - B		-2dy <= e < 0At the start of the line, we have taken 0 X steps and 0 Y steps,so M = 0 and N = 0:	X major	e = 2Mdy - 2Ndx - dx - B		  = -dx - B	Y major	e = 2Ndx - 2Mdy - dy - B		  = -dy - BAt the end of the line, we have taken dx X steps and dy Y steps,so M = dx and N = dy:	X major	e = 2Mdy - 2Ndx - dx - B		  = 2dxdy - 2dydx - dx - B		  = -dx - B	Y major e = 2Ndx - 2Mdy - dy - B		  = 2dydx - 2dxdy - dy - B		  = -dy - BThus, the error term is the same at the start and end of the line.Let us consider clipping an X coordinate.  There are 4 cases whichrepresent the two independent cases of clipping the start vs. theend of the line and an X major vs. a Y major line.  In any of thesecases, we know the number of X steps (M) and we wish to find thenumber of Y steps (N).  Thus, we will solve our error term equation.If we are clipping the start of the line, we will find the smallestN that satisfies our error term inequality.  If we are clipping theend of the line, we will find the largest number of Y steps thatsatisfies the inequality.  In that case, since we are representingthe Y steps as (dy - N), we will actually want to solve for thesmallest N in that equation.Case 1:  X major, starting X coordinate moved by M steps		-2dx <= 2Mdy - 2Ndx - dx - B < 0	2Ndx <= 2Mdy - dx - B + 2dx	2Ndx > 2Mdy - dx - B	2Ndx <= 2Mdy + dx - B		N > (2Mdy - dx - B) / 2dx	N <= (2Mdy + dx - B) / 2dxSince we are trying to find the smallest N that satisfies theseequations, we should use the > inequality to find the smallest:	N = floor((2Mdy - dx - B) / 2dx) + 1	  = floor((2Mdy - dx - B + 2dx) / 2dx)	  = floor((2Mdy + dx - B) / 2dx)Case 1b: X major, ending X coordinate moved to M stepsSame derivations as Case 1, but we want the largest N that satisfiesthe equations, so we use the <= inequality:	N = floor((2Mdy + dx - B) / 2dx)Case 2: X major, ending X coordinate moved by M steps		-2dx <= 2(dx - M)dy - 2(dy - N)dx - dx - B < 0		-2dx <= 2dxdy - 2Mdy - 2dxdy + 2Ndx - dx - B < 0		-2dx <= 2Ndx - 2Mdy - dx - B < 0	2Ndx >= 2Mdy + dx + B - 2dx	2Ndx < 2Mdy + dx + B	2Ndx >= 2Mdy - dx + B		N < (2Mdy + dx + B) / 2dx	N >= (2Mdy - dx + B) / 2dxSince we are trying to find the highest number of Y steps thatsatisfies these equations, we need to find the smallest N, sowe should use the >= inequality to find the smallest:	N = ceiling((2Mdy - dx + B) / 2dx)	  = floor((2Mdy - dx + B + 2dx - 1) / 2dx)	  = floor((2Mdy + dx + B - 1) / 2dx)Case 2b: X major, starting X coordinate moved to M steps from endSame derivations as Case 2, but we want the smallest number of Ysteps, so we want the highest N, so we use the < inequality:	N = ceiling((2Mdy + dx + B) / 2dx) - 1	  = floor((2Mdy + dx + B + 2dx - 1) / 2dx) - 1	  = floor((2Mdy + dx + B + 2dx - 1 - 2dx) / 2dx)	  = floor((2Mdy + dx + B - 1) / 2dx)Case 3: Y major, starting X coordinate moved by M steps		-2dy <= 2Ndx - 2Mdy - dy - B < 0	2Ndx >= 2Mdy + dy + B - 2dy	2Ndx < 2Mdy + dy + B	2Ndx >= 2Mdy - dy + B		N < (2Mdy + dy + B) / 2dx	N >= (2Mdy - dy + B) / 2dxSince we are trying to find the smallest N that satisfies theseequations, we should use the >= inequality to find the smallest:	N = ceiling((2Mdy - dy + B) / 2dx)	  = floor((2Mdy - dy + B + 2dx - 1) / 2dx)	  = floor((2Mdy - dy + B - 1) / 2dx) + 1Case 3b: Y major, ending X coordinate moved to M stepsSame derivations as Case 3, but we want the largest N that satisfiesthe equations, so we use the < inequality:	N = ceiling((2Mdy + dy + B) / 2dx) - 1	  = floor((2Mdy + dy + B + 2dx - 1) / 2dx) - 1	  = floor((2Mdy + dy + B + 2dx - 1 - 2dx) / 2dx)	  = floor((2Mdy + dy + B - 1) / 2dx)Case 4: Y major, ending X coordinate moved by M steps		-2dy <= 2(dy - N)dx - 2(dx - M)dy - dy - B < 0		-2dy <= 2dxdy - 2Ndx - 2dxdy + 2Mdy - dy - B < 0		-2dy <= 2Mdy - 2Ndx - dy - B < 0	2Ndx <= 2Mdy - dy - B + 2dy	2Ndx > 2Mdy - dy - B	2Ndx <= 2Mdy + dy - B		N > (2Mdy - dy - B) / 2dx	N <= (2Mdy + dy - B) / 2dxSince we are trying to find the highest number of Y steps thatsatisfies these equations, we need to find the smallest N, sowe should use the > inequality to find the smallest:	N = floor((2Mdy - dy - B) / 2dx) + 1Case 4b: Y major, starting X coordinate moved to M steps from endSame analysis as Case 4, but we want the smallest number of Y stepswhich means the largest N, so we use the <= inequality:	N = floor((2Mdy + dy - B) / 2dx)Now let's try the Y coordinates, we have the same 4 cases.Case 5: X major, starting Y coordinate moved by N steps		-2dx <= 2Mdy - 2Ndx - dx - B < 0	2Mdy >= 2Ndx + dx + B - 2dx	2Mdy < 2Ndx + dx + B	2Mdy >= 2Ndx - dx + B		M < (2Ndx + dx + B) / 2dy	M >= (2Ndx - dx + B) / 2dySince we are trying to find the smallest M, we use the >= inequality:	M = ceiling((2Ndx - dx + B) / 2dy)	  = floor((2Ndx - dx + B + 2dy - 1) / 2dy)	  = floor((2Ndx - dx + B - 1) / 2dy) + 1Case 5b: X major, ending Y coordinate moved to N stepsSame derivations as Case 5, but we want the largest M that satisfiesthe equations, so we use the < inequality:	M = ceiling((2Ndx + dx + B) / 2dy) - 1	  = floor((2Ndx + dx + B + 2dy - 1) / 2dy) - 1	  = floor((2Ndx + dx + B + 2dy - 1 - 2dy) / 2dy)	  = floor((2Ndx + dx + B - 1) / 2dy)Case 6: X major, ending Y coordinate moved by N steps		-2dx <= 2(dx - M)dy - 2(dy - N)dx - dx - B < 0		-2dx <= 2dxdy - 2Mdy - 2dxdy + 2Ndx - dx - B < 0		-2dx <= 2Ndx - 2Mdy - dx - B < 0	2Mdy <= 2Ndx - dx - B + 2dx	2Mdy > 2Ndx - dx - B	2Mdy <= 2Ndx + dx - B		M > (2Ndx - dx - B) / 2dy	M <= (2Ndx + dx - B) / 2dyLargest # of X steps means smallest M, so use the > inequality:	M = floor((2Ndx - dx - B) / 2dy) + 1Case 6b: X major, starting Y coordinate moved to N steps from endSame derivations as Case 6, but we want the smallest # of X stepswhich means the largest M, so use the <= inequality:	M = floor((2Ndx + dx - B) / 2dy)Case 7: Y major, starting Y coordinate moved by N steps		-2dy <= 2Ndx - 2Mdy - dy - B < 0	2Mdy <= 2Ndx - dy - B + 2dy	2Mdy > 2Ndx - dy - B	2Mdy <= 2Ndx + dy - B		M > (2Ndx - dy - B) / 2dy	M <= (2Ndx + dy - B) / 2dyTo find the smallest M, use the > inequality:	M = floor((2Ndx - dy - B) / 2dy) + 1	  = floor((2Ndx - dy - B + 2dy) / 2dy)	  = floor((2Ndx + dy - B) / 2dy)Case 7b: Y major, ending Y coordinate moved to N stepsSame derivations as Case 7, but we want the largest M that satisfiesthe equations, so use the <= inequality:	M = floor((2Ndx + dy - B) / 2dy)Case 8: Y major, ending Y coordinate moved by N steps		-2dy <= 2(dy - N)dx - 2(dx - M)dy - dy - B < 0		-2dy <= 2dxdy - 2Ndx - 2dxdy + 2Mdy - dy - B < 0		-2dy <= 2Mdy - 2Ndx - dy - B < 0	2Mdy >= 2Ndx + dy + B - 2dy	2Mdy < 2Ndx + dy + B	2Mdy >= 2Ndx - dy + B		M < (2Ndx + dy + B) / 2dy	M >= (2Ndx - dy + B) / 2dyTo find the highest X steps, find the smallest M, use the >= inequality:	M = ceiling((2Ndx - dy + B) / 2dy)	  = floor((2Ndx - dy + B + 2dy - 1) / 2dy)	  = floor((2Ndx + dy + B - 1) / 2dy)Case 8b: Y major, starting Y coordinate moved to N steps from the endSame derivations as Case 8, but we want to find the smallest # of Xsteps which means the largest M, so we use the < inequality:	M = ceiling((2Ndx + dy + B) / 2dy) - 1	  = floor((2Ndx + dy + B + 2dy - 1) / 2dy) - 1	  = floor((2Ndx + dy + B + 2dy - 1 - 2dy) / 2dy)	  = floor((2Ndx + dy + B - 1) / 2dy)So, our equations are:	1:  X major move x1 to x1+M	floor((2Mdy + dx - B) / 2dx)	1b: X major move x2 to x1+M	floor((2Mdy + dx - B) / 2dx)	2:  X major move x2 to x2-M	floor((2Mdy + dx + B - 1) / 2dx)	2b: X major move x1 to x2-M	floor((2Mdy + dx + B - 1) / 2dx)	3:  Y major move x1 to x1+M	floor((2Mdy - dy + B - 1) / 2dx) + 1	3b: Y major move x2 to x1+M	floor((2Mdy + dy + B - 1) / 2dx)	4:  Y major move x2 to x2-M	floor((2Mdy - dy - B) / 2dx) + 1	4b: Y major move x1 to x2-M	floor((2Mdy + dy - B) / 2dx)	5:  X major move y1 to y1+N	floor((2Ndx - dx + B - 1) / 2dy) + 1	5b: X major move y2 to y1+N	floor((2Ndx + dx + B - 1) / 2dy)	6:  X major move y2 to y2-N	floor((2Ndx - dx - B) / 2dy) + 1	6b: X major move y1 to y2-N	floor((2Ndx + dx - B) / 2dy)	7:  Y major move y1 to y1+N	floor((2Ndx + dy - B) / 2dy)	7b: Y major move y2 to y1+N	floor((2Ndx + dy - B) / 2dy)	8:  Y major move y2 to y2-N	floor((2Ndx + dy + B - 1) / 2dy)	8b: Y major move y1 to y2-N	floor((2Ndx + dy + B - 1) / 2dy)We have the following constraints on all of the above terms:

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
美女www一区二区| 亚洲品质自拍视频| 狠狠色综合日日| 日韩欧美一二三四区| 久久99精品网久久| 国产亚洲欧洲997久久综合| 国产999精品久久| 国产精品理论在线观看| 99久久精品国产导航| 亚洲人成精品久久久久久 | 欧美一级片在线| 美女爽到高潮91| 国产女人aaa级久久久级| a美女胸又www黄视频久久| 亚洲黄色小视频| 日韩一区二区三区精品视频| 国产美女一区二区| 亚洲综合在线电影| 欧美一区二区三区的| 风间由美一区二区三区在线观看| 国产精品超碰97尤物18| 久久久久久久久久久黄色| 国产精品一级在线| 亚洲午夜免费电影| 久久精品男人的天堂| 99国产精品99久久久久久| 亚洲电影一区二区三区| 亚洲精品一区二区三区四区高清 | 亚洲欧美国产高清| 欧美xxxxx牲另类人与| 91丝袜美女网| 久久66热偷产精品| 一区二区三区四区在线| 精品999在线播放| 色成人在线视频| 国产精品影视网| 亚洲成a人v欧美综合天堂下载| 久久久国产精品麻豆| 91久久精品一区二区| 国产91在线|亚洲| 性做久久久久久免费观看欧美| 国产三级久久久| 欧美日韩国产免费一区二区| 白白色 亚洲乱淫| 精品一区二区三区欧美| 亚洲成人免费在线| 国产精品久久久久aaaa樱花| 91精品国产综合久久香蕉的特点 | 色哟哟精品一区| 国产精品911| 蜜臀av在线播放一区二区三区| 亚洲欧美日本在线| 中文字幕av一区 二区| 日韩三级电影网址| 欧美午夜不卡视频| 99riav久久精品riav| 欧美日韩你懂的| av亚洲精华国产精华精华| 国内国产精品久久| 久久电影网站中文字幕| 三级不卡在线观看| 午夜精品久久久久久久久| 亚洲免费观看在线观看| 中文字幕一区免费在线观看| 久久久久久久久久看片| 精品国产百合女同互慰| 91精品在线一区二区| 欧美精三区欧美精三区| 欧美优质美女网站| 91精品办公室少妇高潮对白| 99精品视频一区二区| 99久久久免费精品国产一区二区 | 亚洲色图在线看| 国产欧美日韩麻豆91| 久久久亚洲国产美女国产盗摄| 26uuu精品一区二区| 欧美大片顶级少妇| 亚洲精品一区二区三区精华液| 欧美成人官网二区| 精品国产第一区二区三区观看体验| 日韩欧美一级特黄在线播放| 精品少妇一区二区三区在线播放| 日韩亚洲欧美一区| 久久综合国产精品| 欧美激情一区二区三区| 国产欧美日韩在线| 1024亚洲合集| 亚洲国产婷婷综合在线精品| 水蜜桃久久夜色精品一区的特点| 亚洲国产精品久久久久婷婷884| 亚洲1区2区3区4区| 色哟哟一区二区| 欧美日韩精品免费| 日韩女优制服丝袜电影| 久久一区二区三区国产精品| 日本一区二区三区在线观看| 亚洲欧洲日韩一区二区三区| 一级日本不卡的影视| 免费欧美高清视频| 国产精品99久久久久久久vr| 91小视频在线观看| 欧美日韩国产欧美日美国产精品| 日韩免费观看高清完整版在线观看| 久久久精品tv| 一区二区免费视频| 青椒成人免费视频| 成人亚洲一区二区一| 欧美日韩一区中文字幕| 精品国产123| 亚洲欧美自拍偷拍色图| 午夜国产精品一区| 国产精品亚洲一区二区三区妖精 | 亚洲国产cao| 国产一区二区三区免费观看| 一本一本大道香蕉久在线精品 | 亚洲丶国产丶欧美一区二区三区| 麻豆精品在线视频| 91啦中文在线观看| 欧美成人a视频| 亚洲免费在线看| 极品销魂美女一区二区三区| 色综合久久六月婷婷中文字幕| 日韩一二三四区| 一区二区三区中文在线| 国产精品99久久久久久似苏梦涵| 欧美视频在线一区| 亚洲欧美成人一区二区三区| 国产毛片精品视频| 欧美老人xxxx18| 亚洲欧美一区二区三区国产精品| 极品尤物av久久免费看| 欧美吻胸吃奶大尺度电影 | 亚洲chinese男男1069| 国产精品456露脸| 欧美高清www午色夜在线视频| 国产精品久久久久久久久晋中| 日韩av电影天堂| 色94色欧美sute亚洲线路一久| 欧美经典三级视频一区二区三区| 日本不卡视频在线| 欧美日韩一区久久| 亚洲精品免费在线| 成人一区二区三区在线观看| 久久这里只有精品首页| 日本中文在线一区| 欧美视频一区在线| 亚洲婷婷在线视频| jizz一区二区| 国产精品人成在线观看免费| 久久国产免费看| 在线播放中文字幕一区| 亚洲地区一二三色| 欧美三级视频在线播放| 久久亚洲精品国产精品紫薇| 亚洲国产一区二区三区| 色婷婷亚洲精品| 一区在线观看视频| www.爱久久.com| 国产精品美女久久久久aⅴ | 亚洲一区二区三区四区五区中文 | av电影天堂一区二区在线 | 成人免费看黄yyy456| 欧美日本在线视频| 一区二区三区中文在线观看| 99久久99久久精品免费看蜜桃| 欧美国产激情二区三区| 亚洲综合男人的天堂| 91美女片黄在线观看91美女| 亚洲欧美另类图片小说| 91丨九色丨蝌蚪丨老版| 亚洲欧美另类小说视频| 91久久精品一区二区三| 亚洲第四色夜色| 91精品国产欧美日韩| 免费在线观看不卡| 欧美videos中文字幕| 九九九久久久精品| 国产亚洲综合在线| 成人在线视频一区| 亚洲欧美另类综合偷拍| 欧美影院午夜播放| 日本伊人午夜精品| 精品国产伦一区二区三区免费 | 在线观看日韩精品| 婷婷久久综合九色国产成人| 91麻豆精品久久久久蜜臀| 久久精品国产色蜜蜜麻豆| 久久一留热品黄| 99r国产精品| 亚洲成人久久影院| 日韩精品一区二区三区四区| 风流少妇一区二区| 一区二区三区在线视频免费 | 久久久久久久网| 91丝袜美女网| 免费成人美女在线观看.| 国产丝袜在线精品| 欧美亚洲国产怡红院影院| 免费成人美女在线观看.| 国产精品视频一二三区|