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

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

?? graphic.c

?? Linux下在LCD上顯示圖片的程序 現(xiàn)可顯示大分辨圖片640×480
?? C
?? 第 1 頁(yè) / 共 3 頁(yè)
字號(hào):
/* * $Id: graphic.c,v 1.2 1999/11/12 13:03:26 till Exp $ * * Graphics primitive drawing functions * derived from: graphic.c Pixy Graphic Library * derived from: lissa.c: Graphics demos * * Copyright (C) 2001  Chen Yang <support@hhcn.com> * Copyright (C) 1999  Till Krech <till@snafu.de> * Copyright (C) 1998  Kenneth Albanowski <kjahds@kjahds.com> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * The code in this file is partially based on Kenneth Albanowskis work * for the lissa graphics demo. *//******************Notice*********************************** * The Default Font size for ASCII Font is 8x16 * The Default Font size of Chinese Font is 16x16 ***********************************************************/#include <sys/types.h>#include <sys/stat.h>#include <linux/fb.h>#include <stdio.h>#include <unistd.h>#include <fcntl.h>#include <sys/mman.h>#include "mathf.h"#include "font_8x16.h"#include "gui.h"/*Define the correct Chinese Font File Path*/#define CHINESE_FONT_FILE "hanzi"#define ScreenHeight 480#define ScreenWidth 640typedef struct {    unsigned short height;    unsigned char data[0];} Pattern;const Pattern _BlackPattern ={  1,    {~0}};const Pattern _WhitePattern ={  1,  { 0 }};const Pattern _DarkGreyPattern ={  2,  {    (unsigned char)0x55555555,    (unsigned char)0xCCCCCCCC  }};const Pattern _LightGreyPattern ={  4,  {    (unsigned char)0x88888888,    (unsigned char)0x00000000,    (unsigned char)0x22222222,    (unsigned char)0x00000000,  }};const Pattern _MicroPengPattern ={  16,  {    0x3c,0x7e,0x56,0xaa,0x86,0x4e,0x7b,0xc3,0x83,0x83,0xc3,0xc7,0xbd,0x99,0x99,    0xff  }};static const Pattern *patterns[] = {  /* This must correspond to the enum in pixy.h! */  &_BlackPattern,  &_WhitePattern,  &_DarkGreyPattern,  &_LightGreyPattern,  &_MicroPengPattern,};//unsigned char getbit[8]={0x80,0x40,0x20,0x10,0x08,0x04,0x02,0x01}static short masktab[]={0x80,0x40,0x20,0x10,0x08,0x04,0x02,0x01};static int screen_fd=-1;FILE *C_Font;unsigned char * screen_ptr=(unsigned char*)(0x0400),*E_Font=(unsigned char*)(0x8500);static short screen_width=240,screen_height=320;static short WinSX,WinSY,WinEX,WinEY;static unsigned short X,Y,Color,P_Index,Mode=MODE_SRC;//CopyMode pixy_copy_mode = Mode_SRC;inline void setpixel(short x, short y, short color){    if ((x<0) || (x>=screen_width) || (y<0) || (y>=screen_height))		return;    {	       	unsigned char * loc = screen_ptr + ((y * screen_width*2 + x*2 ));	if (color){		*loc =0xff;*(loc+1)=0xff;	}else{		*loc = 0x0;*(loc+1)=0x0;	}			/*	short mask = masktab[(x&7)];    	unsigned char * loc = screen_ptr + ((y * screen_width + x )>>3);		if (color)			*loc |= mask;		else			*loc &= ~mask;*/	    }}/* Abrash's take on the simplest Bresenham line-drawing algorithm.  * * This isn't especially efficient, as we aren't combining the bit-mask * logic and addresses with the line drawing code, never mind higher * level optimizations like run-length slicing, etc. * */static inline void draw_xish_line(short x, short y, short dx, short dy, short xdir){	short dyX2=dy+dy;	short dyX2mdxX2=dyX2-(dx+dx);	short error=dyX2-dx;		setpixel(x, y, Color);	while (dx--) {		if (error >= 0) {			y++;			error += dyX2mdxX2;		} else {			error += dyX2;		}		x += xdir;		setpixel(x,y,Color);	//	printf("Color1inline=%d\n",Color);	}}static inline void draw_yish_line(short x, short y, short dx, short dy,short xdir){	short dxX2=dx + dx;	short dxX2mdyX2=dxX2-(dy+dy);	short error=dxX2-dy;		setpixel(x, y, Color);	while (dy--) {		if (error >= 0) {			x+= xdir;			error += dxX2mdyX2;		} else {			error += dxX2;		}		y++;		setpixel(x,y, Color);	}}void line(short x1, short y1, short x2, short y2){	short dx,dy;		if ( y1 > y2) {		short t = y1;		y1 = y2;		y2 = t;		t = x1;		x1 = x2;		x2 = t;	}		dx = x2-x1;	dy = y2-y1;		if (dx > 0) {		if (dx > dy)			draw_xish_line(x1, y1, dx, dy, 1);		else			draw_yish_line(x1, y1, dx, dy, 1);	} else {		dx = -dx;		if (dx > dy)			draw_xish_line(x1, y1, dx, dy, -1);		else			draw_yish_line(x1, y1, dx, dy, -1);	}		}/* One of Abrash's ellipse algorithms  */void ellipse(short x, short y, short a, short b){	short wx, wy;	short thresh;	short asq = a * a;	short bsq = b * b;	short xa, ya;		setpixel(x, y+b, Color);	setpixel(x, y-b, Color);		wx = 0;	wy = b;	xa = 0;	ya = asq * 2 * b;	thresh = asq / 4 - asq * b;		for (;;) {		thresh += xa + bsq;				if (thresh >= 0) {			ya -= asq * 2;			thresh -= ya;			wy--;		}				xa += bsq * 2;		wx++;				if (xa >= ya)		  break;						setpixel(x+wx, y-wy, Color);		setpixel(x-wx, y-wy, Color);		setpixel(x+wx, y+wy, Color);		setpixel(x-wx, y+wy, Color);	}		setpixel(x+a, y, Color);	setpixel(x-a, y, Color);		wx = a;	wy = 0;	xa = (bsq * a) << 1;		ya = 0;	thresh = (bsq >> 2) - bsq * a;		for (;;) {		thresh += ya + asq;				if (thresh >= 0) {			xa -= bsq + bsq;			thresh = thresh - xa;			wx--;		}				ya += asq + asq;		wy++;				if (ya > xa)		  break;		 		setpixel(x+wx, y-wy, Color);		setpixel(x-wx, y-wy, Color);		setpixel(x+wx, y+wy, Color);		setpixel(x-wx, y+wy, Color);	}}inline void h_line(int x1,int x2,int y){ static short ftab[]={0xff,0x7f,0x3f,0x1f,0x0f,0x7,0x3,0x1}; static short btab[]={0x0,0x80,0xc0,0xe0,0xf0,0xf8,0xfc,0xfe}; short count;  count=(x2-x1)>>3; if(count>1) {  unsigned char *loc;    loc=screen_ptr+((y*screen_width+x1)>>3);    if(Color)  {    *(loc)|=ftab[x1&7];         memset(loc+1,0xff,count-1);   *(loc+count)|= ftab[7-(x2&7)];  }   else   {    *loc &=btab[x1&7];    memset(loc+1,0,count-1);      *(loc+count)&=ftab[(x2&7)+1];   } }  else    line(x1, y, x2, y);	  }/* Composites */void rectangle(short x1, short y1, short x2, short y2){	line(x1, y1, x2, y1);	line(x2, y1, x2, y2);	line(x2, y2, x1, y2);	line(x1, y2, x1, y1);}void bar(short x1,short y1,short x2,short y2){		for(;y1<y2;y1++)		h_line(x1,x2,y1);}inline void clip_screen(short in_x, short in_y, short in_w, short in_h, short *out_x, short *out_y, short *out_w, short *out_h) {  short swp;  if (in_w < 0) {    in_x += in_w;    in_w = -in_w;  }  if (in_h < 0) {    in_y += in_h;    in_h = -in_h;  }  if (in_x < 0) {    in_w -= in_x;    in_x = 0;  }  if (in_y < 0) {    in_h -= in_y;    in_y = 0;  }  if (in_w > screen_width) {    in_w = screen_width;  }  if (in_h > screen_height) {    in_h = screen_height;  }  if (in_w < 0) {    in_w = 0;  }  if (in_h < 0) {    in_h = 0;  }  *out_x = in_x;  *out_y = in_y;  *out_w = in_w;  *out_h = in_h;}		void patternfill( short dest_x,		 short dest_y, 		 short w,		 short h,		 unsigned char*dest,		 short dest_units_per_line);void  fillrectangle(short x1, short y1, short x2, short y2){	short x, y, w, h,i,j;	//clip_screen(x1, y1, x2-x1, y2-y1, &x, &y, &w, &h); 	//patternfill(x, y, w, h, screen_ptr, screen_width>>3);        for(i=x1;i<x2;i++)	for(j=y1;j<y2;j++)		{setpixel(i, j, 1);  			}}void  fillrect(short x1, short y1, short x2, short y2){        short x, y, w, h;        clip_screen(x1, y1, x2-x1, y2-y1, &x, &y, &w, &h);        patternfill(x, y, w, h, screen_ptr, screen_width>>3);}void bitblt(		 short src_x,		 short src_y,		 short w,		 short h,		 short dest_x,		 short dest_y, 		 unsigned char *src,		 short src_units_per_line, 		 unsigned char *dest,		 short dest_units_per_line		 ) {  /* todo: clip */  register char dx;  unsigned short x,y;  unsigned char src_off, dest_off;  short dest_n;  unsigned char dest_beg_mask, dest_end_mask;    /* goto line y */  src += src_y * src_units_per_line;  dest += dest_y * dest_units_per_line;    /* goto UNIT-offset x */  src += src_x >>3;  dest += dest_x >>3;  /* determine number of affected units per line */    dest_n = ((dest_x + w + 8 - 1) >>3) - (dest_x >>3);  /* determine PIXEL-offsets */  src_off = src_x & 7;  dest_off = dest_x & 7;  dx = dest_off - src_off;  

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
中文字幕亚洲综合久久菠萝蜜| 国产精品久久久久婷婷二区次| 国产一区二区在线看| 国产精品少妇自拍| 91精品国产色综合久久久蜜香臀| 成人福利视频网站| 久久99国产精品久久99果冻传媒 | 日本一区二区免费在线观看视频| 欧美日韩一区三区四区| 风间由美一区二区av101| 日韩av在线播放中文字幕| 中文字幕亚洲在| 久久久久久一二三区| 欧美顶级少妇做爰| 日本韩国一区二区三区视频| 国产成人亚洲综合a∨婷婷图片| 日本91福利区| 亚洲成人一区在线| 一区二区三区视频在线观看| 国产三级欧美三级日产三级99| 日韩你懂的在线播放| 欧美日本视频在线| 日本伦理一区二区| aaa国产一区| 粗大黑人巨茎大战欧美成人| 国产原创一区二区| 六月丁香婷婷色狠狠久久| 午夜精品久久久久久久| 亚洲免费视频中文字幕| 国产精品嫩草影院av蜜臀| 久久女同性恋中文字幕| 337p粉嫩大胆噜噜噜噜噜91av| 91精品国产综合久久久久久久 | 99久久99久久精品免费观看| 国产成人亚洲精品青草天美| 国产一区二区影院| 黄页视频在线91| 狂野欧美性猛交blacked| 五月激情六月综合| 婷婷丁香久久五月婷婷| 午夜精品一区二区三区电影天堂| 一区二区三区蜜桃网| 国产一区二区三区久久久 | 风间由美性色一区二区三区| 国产一区在线不卡| 国产精品99久久久久久久vr| 国产精品资源网| 丁香婷婷综合网| 成人高清av在线| 91国产成人在线| 欧美精品第1页| 日韩视频一区二区| 久久综合久久综合九色| 国产亚洲综合色| 国产精品美女一区二区三区| 亚洲天堂av一区| 午夜一区二区三区在线观看| 日韩av电影天堂| 国产在线播放一区三区四| 成人一区在线看| 色哟哟精品一区| 9191久久久久久久久久久| 日韩三级电影网址| 国产女人aaa级久久久级| 一色屋精品亚洲香蕉网站| 亚洲欧美另类图片小说| 亚洲国产精品久久久男人的天堂| 日韩精品一级中文字幕精品视频免费观看| 91久久精品午夜一区二区| 欧美中文字幕一区二区三区亚洲 | 欧美一区二区在线免费观看| 欧美精品一区二区久久婷婷| 久久免费看少妇高潮| 亚洲天堂成人在线观看| 手机精品视频在线观看| 国产九九视频一区二区三区| 91浏览器在线视频| 欧美一区二区三区系列电影| 国产欧美一区在线| 亚洲成人综合网站| 国产精品一区二区久久不卡| 日本精品视频一区二区三区| 日韩一区二区精品葵司在线| 国产精品伦理在线| 五月婷婷久久综合| 成人黄色777网| 91精品国产综合久久久久久久 | 欧美性生活一区| 欧美电影精品一区二区| 亚洲色欲色欲www| 老司机免费视频一区二区| 91网站最新地址| 日韩欧美电影一区| 一区二区视频在线看| 国产一区二区三区免费观看| 欧美午夜精品一区二区蜜桃| 国产日产欧美一区二区视频| 午夜精品久久久久久久99水蜜桃| 成人福利视频网站| 日韩精品一区二区三区四区| 亚洲图片欧美激情| 国内成+人亚洲+欧美+综合在线| 欧美性xxxxxxxx| 国产精品久久毛片av大全日韩| 麻豆一区二区99久久久久| 91官网在线免费观看| 欧美国产精品一区二区三区| 蜜桃精品视频在线观看| 在线观看亚洲a| 狠狠久久亚洲欧美| 在线观看亚洲专区| 一色屋精品亚洲香蕉网站| 国产在线视频一区二区| 欧美一级视频精品观看| 亚洲国产一区二区三区| aa级大片欧美| 欧美国产一区在线| 国产裸体歌舞团一区二区| 91精品欧美一区二区三区综合在| 亚洲国产美女搞黄色| 91麻豆国产自产在线观看| 国产精品色哟哟网站| 国产成人aaa| 久久九九久精品国产免费直播| 日本vs亚洲vs韩国一区三区 | 欧美国产日韩一二三区| 久久激情五月激情| 欧美一区二区私人影院日本| 午夜久久久久久| 欧美日韩你懂的| 亚洲成人午夜电影| 欧美日韩一区二区三区在线| 亚洲精品欧美在线| 91蜜桃免费观看视频| 亚洲男同1069视频| 成人短视频下载| 亚洲天堂2016| 日本韩国一区二区| 洋洋av久久久久久久一区| 在线看不卡av| 香蕉乱码成人久久天堂爱免费| 欧美偷拍一区二区| 天堂精品中文字幕在线| 欧美一卡二卡在线| 久草热8精品视频在线观看| 精品久久久久久久人人人人传媒| 麻豆精品一区二区三区| 精品久久一区二区三区| 国产一区二区在线影院| 欧美激情中文字幕一区二区| 白白色 亚洲乱淫| 一区二区三区在线观看视频| 亚洲精品国产无天堂网2021| 欧美综合视频在线观看| 日韩av中文在线观看| 欧美电影免费观看高清完整版在线| 久久99精品国产麻豆婷婷洗澡| 久久免费看少妇高潮| www.欧美亚洲| 亚洲成人免费看| 精品久久久久av影院| 国产不卡一区视频| 亚洲精品日日夜夜| 91精品久久久久久久99蜜桃| 国产一区二区三区黄视频 | 国产毛片精品视频| 国产精品美女久久久久久久久久久| av资源站一区| 亚洲国产视频一区二区| 欧美一卡二卡三卡| 国产成人免费在线| 一区二区三区四区国产精品| 日韩网站在线看片你懂的| 国产精品综合在线视频| 国产精品传媒在线| 在线成人免费视频| 国产一区二区不卡| 一区二区三区不卡视频在线观看 | 国产性做久久久久久| 色88888久久久久久影院按摩| 美女被吸乳得到大胸91| 国产精品视频在线看| 欧美日韩国产小视频在线观看| 韩国三级在线一区| 亚洲精品乱码久久久久| 日韩免费高清av| 色婷婷av一区二区三区gif| 麻豆国产欧美日韩综合精品二区| 国产精品久久久久久亚洲毛片| 88在线观看91蜜桃国自产| 成人美女视频在线观看18| 天天操天天色综合| 国产精品欧美久久久久无广告| 7777精品伊人久久久大香线蕉经典版下载 | 日本成人在线视频网站| 中文字幕一区日韩精品欧美| 日韩欧美国产精品一区| 日本韩国欧美国产| 成人精品在线视频观看| 久久se精品一区二区|