Esempio n. 1
0
/*****************************************************************************
** �������: LCD_DrawLine
** ��������: ��ָ��λ�û�һ��ָ����С��Բ
				(x,y):���ĵ� 	 r    :�뾶
** ��  ����: Dream
** �ա�  ��: 2010��12��06��
*****************************************************************************/
void Draw_Circle(uint8_t x0,uint16_t y0,uint8_t r)
{
	int a,b;
	int di;
	a=0;b=r;	  
	di=3-(r<<1);             //�ж��¸���λ�õı�־
	while(a<=b)
	{
		LCD_DrawPoint(x0-b,y0-a);             //3           
		LCD_DrawPoint(x0+b,y0-a);             //0           
		LCD_DrawPoint(x0-a,y0+b);             //1       
		LCD_DrawPoint(x0-b,y0-a);             //7           
		LCD_DrawPoint(x0-a,y0-b);             //2             
		LCD_DrawPoint(x0+b,y0+a);             //4               
		LCD_DrawPoint(x0+a,y0-b);             //5
		LCD_DrawPoint(x0+a,y0+b);             //6 
		LCD_DrawPoint(x0-b,y0+a);             
		a++;
		//ʹ��Bresenham�㷨��Բ     
		if(di<0)di +=4*a+6;	  
		else
		{
			di+=10+4*(a-b);   
			b--;
		} 
		LCD_DrawPoint(x0+a,y0+b);
	}
} 
Esempio n. 2
0
//画一个大点
//2*2的点			   
void Draw_Big_Point(u8 x,u16 y)
{	    
	LCD_DrawPoint(x,y);//中心点 
	LCD_DrawPoint(x+1,y);
	LCD_DrawPoint(x,y+1);
	LCD_DrawPoint(x+1,y+1);	 	  	
}
//在指定位置画一个指定大小的圆
//(x,y):中心点
//r    :半径
void Draw_Circle(u16 x0,u16 y0,u8 r)
{
	int a,b;
	int di;
	a=0;b=r;	  
	di=3-(r<<1);             //判断下个点位置的标志
	while(a<=b)
	{
		LCD_DrawPoint(x0-b,y0-a);             //3           
		LCD_DrawPoint(x0+b,y0-a);             //0           
		LCD_DrawPoint(x0-a,y0+b);             //1       
		LCD_DrawPoint(x0-b,y0-a);             //7           
		LCD_DrawPoint(x0-a,y0-b);             //2             
		LCD_DrawPoint(x0+b,y0+a);             //4               
		LCD_DrawPoint(x0+a,y0-b);             //5
		LCD_DrawPoint(x0+a,y0+b);             //6 
		LCD_DrawPoint(x0-b,y0+a);             
		a++;
		//使用Bresenham算法画圆     
		if(di<0)di +=4*a+6;	  
		else
		{
			di+=10+4*(a-b);   
			b--;
		} 
		LCD_DrawPoint(x0+a,y0+b);
	}
} 
Esempio n. 4
0
void Draw_Big_Point(u16 x,u16 y)
{	    
	LCD_DrawPoint(x,y);
	LCD_DrawPoint(x+1,y);
	LCD_DrawPoint(x,y+1);
	LCD_DrawPoint(x+1,y+1);	 	  	
}
Esempio n. 5
0
void Draw_Circle(uint x0,uint y0,uchar r)
{
  int a,b;
  int di;
  a=0;b=r;	  
  di=3-(r<<1); 
  while(a<=b)
  {
    LCD_DrawPoint(x0-b,y0-a);             //3           
    LCD_DrawPoint(x0+b,y0-a);             //0           
    LCD_DrawPoint(x0-a,y0+b);             //1       
    LCD_DrawPoint(x0-b,y0-a);             //7           
    LCD_DrawPoint(x0-a,y0-b);             //2             
    LCD_DrawPoint(x0+b,y0+a);             //4               
    LCD_DrawPoint(x0+a,y0-b);             //5
    LCD_DrawPoint(x0+a,y0+b);             //6 
    LCD_DrawPoint(x0-b,y0+a);             
    a++;
    if(di<0)di +=4*a+6;	  
    else
    {
      di+=10+4*(a-b);   
      b--;
    } 
    LCD_DrawPoint(x0+a,y0+b);
  }
} 
Esempio n. 6
0
/**
  * @brief: 画一个大点(2*2的点)		   
  * @param: x,y:坐标
  * @param: color:颜色
  * @retval: none
  */
void TP_Draw_Big_Point(u16 x,u16 y,u16 color)
{	    
	POINT_COLOR=color;
	LCD_DrawPoint(x,y);//中心点 
	LCD_DrawPoint(x+1,y);
	LCD_DrawPoint(x,y+1);
	LCD_DrawPoint(x+1,y+1);	 	  	
}						  
Esempio n. 7
0
//////////////////////////////////////////////////
//与LCD部分有关的函数  
//画一个触摸点
//用来校准用的
void Drow_Touch_Point(u8 x,u16 y)
{
	LCD_DrawLine(x-12,y,x+13,y);//横线
	LCD_DrawLine(x,y-12,x,y+13);//竖线
	LCD_DrawPoint(x+1,y+1);
	LCD_DrawPoint(x-1,y+1);
	LCD_DrawPoint(x+1,y-1);
	LCD_DrawPoint(x-1,y-1);
	Draw_Circle(x,y,6);//画中心圈
}	  
Esempio n. 8
0
//在指定位置显示一个字符
//x,y:起始坐标
//num:要显示的字符:" "--->"~"
//size:字体大小 12/16
//mode:叠加方式(1)还是非叠加方式(0)
void LCD_ShowChar(uint16_t x,uint16_t y,uint8_t num,uint8_t size,uint8_t mode)
{  							  
    uint8_t temp,t1,t;
	uint16_t y0=y;
	uint16_t colortemp=POINT_COLOR;      			     
	//设置窗口		   
	num=num-' ';//得到偏移后的值
	if(!mode) //非叠加方式
	{
	    for(t=0;t<size;t++)
	    {   
			if(size==12)temp=asc2_1206[num][t];  //调用1206字体
			else temp=asc2_1608[num][t];		 //调用1608字体 	                          
	        for(t1=0;t1<8;t1++)
			{			    
		        if(temp&0x80)POINT_COLOR=colortemp;
				else POINT_COLOR=BACK_COLOR;
				LCD_DrawPoint(x,y);	
				temp<<=1;
				y++;
				if(y>=lcddev.height){POINT_COLOR=colortemp;return;}//超区域了
				if((y-y0)==size)
				{
					y=y0;
					x++;
					if(x>=lcddev.width){POINT_COLOR=colortemp;return;}//超区域了
					break;
				}
			}  	 
	    }    
	}else//叠加方式
	{
	    for(t=0;t<size;t++)
	    {   
			if(size==12)temp=asc2_1206[num][t];  //调用1206字体
			else temp=asc2_1608[num][t];		 //调用1608字体 	                          
	        for(t1=0;t1<8;t1++)
			{			    
		        if(temp&0x80)LCD_DrawPoint(x,y); 
				temp<<=1;
				y++;
				if(y>=lcddev.height){POINT_COLOR=colortemp;return;}//超区域了
				if((y-y0)==size)
				{
					y=y0;
					x++;
					if(x>=lcddev.width){POINT_COLOR=colortemp;return;}//超区域了
					break;
				}
			}  	 
	    }     
	}
	POINT_COLOR=colortemp;	    	   	 	  
}   
Esempio n. 9
0
/**
  * @brief: 画一个触摸点, 用来校准用的
  * @param: x,y:坐标
  * @param: color:颜色
  * @retval: none
  */
void TP_Drow_Touch_Point(u16 x,u16 y,u16 color)
{
	POINT_COLOR=color;
	LCD_DrawLine(x-12,y,x+13,y);//横线
	LCD_DrawLine(x,y-12,x,y+13);//竖线
	LCD_DrawPoint(x+1,y+1);
	LCD_DrawPoint(x-1,y+1);
	LCD_DrawPoint(x+1,y-1);
	LCD_DrawPoint(x-1,y-1);
	Draw_Circle(x,y,6);//画中心圈
}	  
Esempio n. 10
0
//显示一个指定大小的汉字
//x,y :汉字的坐标
//font:汉字GBK码
//size:字体大小
//mode:0,正常显示,1,叠加显示	   
void Show_Font(u16 x,u16 y,u8 *font,u8 size,u8 mode)
{
	u8 temp,t,t1;
	u16 y0=y;
	u8 dzk[32];
	u16 tempcolor;	  
	if(size!=12&&size!=16)return;//不支持的size
	Get_HzMat(font,dzk,size);//得到相应大小的点阵数据
	if(mode==0)//正常显示
	{	 
	    for(t=0;t<size*2;t++)
	    {   												   
		    temp=dzk[t];//得到12数据                          
	    for(t1=0;t1<8;t1++)
			{
				if(temp&0x80) LCD_DrawPoint(x,y);
	 			else 
				{
					tempcolor=POINT_COLOR;
					POINT_COLOR=BACK_COLOR;
					LCD_DrawPoint(x,y);
					POINT_COLOR=tempcolor;//还原
				}
				temp<<=1;
				y++;
				if((y-y0)==size)
				{
					y=y0;
					x++;
					break;
				}
			}  	 
    	} 
	}else//叠加显示
	{
	    for(t=0;t<size*2;t++)
	    {   												   
		    temp=dzk[t];//得到12数据                          
	        for(t1=0;t1<8;t1++)
			{
				if(temp&0x80)LCD_DrawPoint(x,y);   
				temp<<=1;
				y++;
				if((y-y0)==size)
				{
					y=y0;
					x++;
					break;
				}
			}  	 
    	} 
	}    
}
Esempio n. 11
0
/******************************************************
* 函数名:DrawCross
* 描述  :在LCD指定位置画十字
* 输入  : Xpos		--X方向位置
Ypos		--Y方向位置
* 输出  :无
* 举例  :DrawCross(100,100);
* 注意  :触摸校正专用
*********************************************************/    
void DrawCross(uint16_t Xpos,uint16_t Ypos)
{
    u8 b;    
    for(b=0; b<10; b++)
    {
        LCD_DrawPoint(240-(Xpos),Ypos-b);
        LCD_DrawPoint(240-(Xpos),Ypos+b);
        LCD_DrawPoint(240-(Xpos+b),Ypos);
        LCD_DrawPoint(240-(Xpos-b),Ypos);
    }
    
    
}	
Esempio n. 12
0
//在指定位置画一个指定大小的圆
//(x,y):中心点
//r    :半径 (液晶屏分辨率320*240,不会超过255,定义成unsigned char即可)
void LCD_DrawCircle(unsigned int x0,unsigned int y0,unsigned char r)
{
	int a,b;
	int di;
	a=0;b=r;	  
	di=3-(r<<1);             //判断下个点位置的标志
	while(a<=b)
	{
		LCD_DrawPoint(x0+a,y0-b);             //5
 		LCD_DrawPoint(x0+b,y0-a);             //0           
		LCD_DrawPoint(x0+b,y0+a);             //4               
		LCD_DrawPoint(x0+a,y0+b);             //6 
		LCD_DrawPoint(x0-a,y0+b);             //1       
 		LCD_DrawPoint(x0-b,y0+a);             
		LCD_DrawPoint(x0-a,y0-b);             //2             
  		LCD_DrawPoint(x0-b,y0-a);             //7     	         
		a++;
		//使用Bresenham算法画圆     
		if(di<0)di +=4*a+6;	  
		else
		{
			di+=10+4*(a-b);   
			b--;
		} 						    
	}
}     
Esempio n. 13
0
/*****************************************************************************
** �������: LCD_DrawLine
** ��������: ��ָ��������λ�û�һ����
				x1,y1:�������  x2,y2:�յ����
** ��  ����: Dream
** �ա�  ��: 2010��12��06��
*****************************************************************************/
void LCD_DrawLine(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2)
{
	uint16_t t; 
	int xerr=0,yerr=0,delta_x,delta_y,distance; 
	int incx,incy,uRow,uCol; 

	delta_x=x2-x1; 				//����������� 
	delta_y=y2-y1; 
	uRow=x1; 
	uCol=y1; 
	if(delta_x>0)incx=1; 		//���õ������� 
	else if(delta_x==0)incx=0;	//��ֱ�� 
	else {incx=-1;delta_x=-delta_x;} 
	if(delta_y>0)incy=1; 
	else if(delta_y==0)incy=0;	//ˮƽ�� 
	else{incy=-1;delta_y=-delta_y;} 
	if( delta_x>delta_y)distance=delta_x; //ѡȡ����������� 
	else distance=delta_y; 
	for(t=0;t<=distance+1;t++ )	//������� 
	{  
		LCD_DrawPoint(uRow,uCol);//���� 
		xerr+=delta_x ; 
		yerr+=delta_y ; 
		if(xerr>distance) 
		{ 
			xerr-=distance; 
			uRow+=incx; 
		} 
		if(yerr>distance) 
		{ 
			yerr-=distance; 
			uCol+=incy; 
		} 
	}  
}
Esempio n. 14
0
//画线
//x1,y1:起点坐标
//x2,y2:终点坐标  
void LCD_DrawLine(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2)
{
	uint16_t t; 
	int xerr=0,yerr=0,delta_x,delta_y,distance; 
	int incx,incy,uRow,uCol; 
	delta_x=x2-x1; //计算坐标增量 
	delta_y=y2-y1; 
	uRow=x1; 
	uCol=y1; 
	if(delta_x>0)incx=1; //设置单步方向 
	else if(delta_x==0)incx=0;//垂直线 
	else {incx=-1;delta_x=-delta_x;} 
	if(delta_y>0)incy=1; 
	else if(delta_y==0)incy=0;//水平线 
	else{incy=-1;delta_y=-delta_y;} 
	if( delta_x>delta_y)distance=delta_x; //选取基本增量坐标轴 
	else distance=delta_y; 
	for(t=0;t<=distance+1;t++ )//画线输出 
	{  
		LCD_DrawPoint(uRow,uCol);//画点 
		xerr+=delta_x ; 
		yerr+=delta_y ; 
		if(xerr>distance) 
		{ 
			xerr-=distance; 
			uRow+=incx; 
		} 
		if(yerr>distance) 
		{ 
			yerr-=distance; 
			uCol+=incy; 
		} 
	}  
}    
Esempio n. 15
0
File: gui.c Progetto: nvero/fmhobby
//将读取的显存Temp_Color_Buf重新显示出来
//(x,y):起始坐标
//xsize:x方向上的长度
//ysize:y方向上的长度
//总写入的数据大小为:xsize*ysize
void Reshow_Temp_Color(u16 x,u16 y,u16 xsize,u16 ysize)
{
	u16 i,t;
	u16 tcnt=0;
	for(i=0;i<xsize;i++)
	{
		for(t=0;t<ysize;t++)
		{
			POINT_COLOR=Temp_Color_Buf[tcnt];//读取当前点的颜色值
			LCD_DrawPoint(x+i,y+t);
			tcnt++;
		}
	}
}
Esempio n. 16
0
/******************************************************************
函数名:  LCD_ShowChar
作者:    Anti_CDQ
日期:    2017-09-10
功能:    显示单个英文字符
输入参数:(x,y):字符显示位置起始坐标
        	fc:前置画笔颜色
			bc:背景颜色
			num:数值(0-94)
返回值:  无
修改记录:无
******************************************************************/  
void LCD_ShowChar(uint16_t x, uint16_t y, uint8_t ch, uint16_t charColor, uint16_t bkColor)
{
  uint16_t i=0;
  uint16_t j=0;
  
  uint8_t tmp_char=0;

  for (i=0;i<6;i++)
  {
    tmp_char = F6x8[ch-0x20][i];
    for (j=0;j<8;j++)
    {
      if ( tmp_char & (0x01 << j) )
        {
          LCD_DrawPoint(x+i,y+j,charColor); // 字符颜色
        }
        else
        {
          LCD_DrawPoint(x+i,y+j,bkColor); // 背景颜色
        }
    }
  }
}
Esempio n. 17
0
void LCD_ShowChar(uint8_t x,uint16_t y,uint8_t chars,uint8_t size,uint8_t mode)
{
	uint8_t temp;
    uint8_t pos,t;
    if(x>MAX_CHAR_POSX||y>MAX_CHAR_POSY) return;

	LCD_SetDisplayWindow(x,y,(size/2-1),size-1);  //����

	LCD_WriteRAM_Prepare();        //��ʼд��GRAM
	if(!mode) 						//�ǵ��ӷ�ʽ
	{
		for(pos=0;pos<size;pos++)
		{
			if(size==12)temp=ASCII_1206[chars-0x20][pos];//����1206����
			else temp=ASCII_1608[chars-0x20][pos];		 //����1608����
			for(t=0;t<size/2;t++)
		    {
		        //if(temp&0x01)            	 			//�ȴ���λ��ȡģ�й�ϵ
		        if((temp<<t)&0x80)						//�ȴ���λ
				{
					Write_Dat(RED);
				}
				else
				{
					Write_Dat(WHITE);
		        }
				//temp>>=1; 	   							//����ȴ���λ��ȥ��������
		    }
		}
	}
	else//���ӷ�ʽ
	{
		for(pos=0;pos<size;pos++)
		{
			if(size==12)temp=ASCII_1206[chars-0x20][pos];	//����1206����
			else temp=ASCII_1608[chars-0x20][pos];		 	//����1608����
			for(t=0;t<size/2;t++)
		    {
		        if((temp<<t)&0x80)LCD_DrawPoint(x+t,y+pos);	//��һ����
		        //temp>>=1; 								//����ȴ���λ��ȥ��������
		    }
		}
	}
	/* �ָ������С	*/
	LCD_WriteReg(R80, 0x0000); //ˮƽ����GRAM��ʼ��ַ
	LCD_WriteReg(R81, 0x00EF); //ˮƽ����GRAM�����ַ
	LCD_WriteReg(R82, 0x0000); //��ֱ����GRAM��ʼ��ַ
	LCD_WriteReg(R83, 0x013F); //��ֱ����GRAM�����ַ
}
//在指定位置显示一个字符
//x:0~234
//y:0~308
//num:要显示的字符:" "--->"~"
//size:字体大小 12/16
//mode:叠加方式(1)还是非叠加方式(0)
//在指定位置显示一个字符
//x:0~234
//y:0~308
//num:要显示的字符:" "--->"~"
//size:字体大小 12/16
//mode:叠加方式(1)还是非叠加方式(0)
void LCD_ShowChar(u16 x,u16 y,u8 num,u8 size,u8 mode)
{  
#if USE_HORIZONTAL==1
#define MAX_CHAR_POSX 312
#define MAX_CHAR_POSY 232 
#else     
#define MAX_CHAR_POSX 232
#define MAX_CHAR_POSY 312
#endif 
    u8 temp;
    u8 pos,t;
	u16 x0=x;
	u16 colortemp=POINT_COLOR;      
    if(x>MAX_CHAR_POSX||y>MAX_CHAR_POSY)return;	    
	//设置窗口		   
	num=num-' ';//得到偏移后的值
	if(!mode) //非叠加方式
	{
		for(pos=0;pos<size;pos++)
		{
			if(size==12)temp=asc2_1206[num][pos];//调用1206字体
			else temp=asc2_1608[num][pos];		 //调用1608字体
			for(t=0;t<size/2;t++)
		    {                 
		        if(temp&0x01)POINT_COLOR=colortemp;
				else POINT_COLOR=BACK_COLOR;
				LCD_DrawPoint(x,y);	
				temp>>=1; 
				x++;
		    }
			x=x0;
			y++;
		}	
	}else//叠加方式
	{
		for(pos=0;pos<size;pos++)
Esempio n. 19
0
/*.............................................................................
@Name		:	Show_Char1206
@Param	:	u16 Xpos 横坐标
					u16 Ypos 纵坐标
					u8 character 待显示的字符
					u8 mode 显示模式 HAVE_BK  NO_BK
@return	:	void
@Info		:	显示12*06的ASCII字符
.............................................................................*/
void Show_Char1206(u16 Xpos, u16 Ypos, u8 character, u8 mode)
{
	u8 t;
	u8 m;
	u8 temp;	
	u16 colortemp = POINT_COLOR;
	u16 y0 = Ypos;
	character = character - ' ';
	if(mode == HAVE_BK)												//有背景色
	{
		for(t=0;t<12;t++)
		{
			temp = ascii_1206[character][t];
			for(m=0;m<8;m++)											//以一个字节的单位进行显示
			{
				if(temp & 0x80)
				{
					POINT_COLOR = colortemp;
				}else
				{
					POINT_COLOR = BACK_COLOR;
				}
				LCD_DrawPoint(Xpos, Ypos);					//显示
				temp <<= 1;													//向左移动一位
				Ypos++;															//行自增
				if(Xpos >= lcddev.width)						//超出屏幕的高度,退出
				{
					POINT_COLOR = colortemp;
					return;
				}
				if((Ypos-y0) == 12)									//写完一行
				{
					Ypos = y0;
					Xpos++;														//列自增
					if(Xpos >= lcddev.width)					//超出屏幕
					{
						POINT_COLOR = colortemp;
						return;
					}
					break;														//转到下一行
				}
			}
		}
	}else																			//无背景色
	{
		for(t=0;t<12;t++)
		{
			temp = ascii_1206[character][t];
			for(m=0;m<8;m++)											//以一个字节的单位进行显示
			{
				if(temp & 0x80)
				{
					LCD_DrawPoint(Xpos, Ypos);				//显示
				}
				temp <<=1;													//向左移动一位
				Ypos++;															//行自增
				if(Xpos>=lcddev.height)							//超出屏幕的高度,退出
				{
					POINT_COLOR = colortemp;
					return;
				}
				if((Ypos-y0) == 12)									//写完一行
				{
					Ypos = y0;
					Xpos++;														//列自增
					if(Xpos >= lcddev.width)					//超出屏幕
					{
						POINT_COLOR = colortemp;
						return;
					}
					break;														//转到下一行
				}
			}
		}		
	}
	POINT_COLOR = colortemp;
}
Esempio n. 20
0
//解码这个BMP文件							 	      	  
BOOL BmpDecode(u8 *filename)
{	FIL* f_bmp;
    u16 count;	
	u8 res;	    	   
	u8  rgb ,color_byte;
	u16 x ,y,color,tmp_color ;	  
	u16 uiTemp;	   //x轴方向像素计数器 
	u16 countpix=0;//记录像素 	 
	//x,y的实际坐标	
	u8  realx=0;
	u16 realy=0;
	u8  yok=1;  				   
	BITMAPINFO *pbmp;//临时指针 
	f_bmp=&f_bfile;

    res=f_open(f_bmp,(const TCHAR*)filename,FA_READ);//打开文件 
	if(res!=FR_OK) return FALSE;
	f_read(f_bmp,jpg_buffer,1024,(UINT*)&br);
 
	pbmp=(BITMAPINFO*)jpg_buffer;//得到BMP的头部信息   
	count=pbmp->bmfHeader.bfOffBits;        //数据偏移,得到数据段的开始地址
	color_byte=pbmp->bmiHeader.biBitCount/8;//彩色位 16/24/32  
	PICINFO.ImgHeight=pbmp->bmiHeader.biHeight;//得到图片高度
	PICINFO.ImgWidth=pbmp->bmiHeader.biWidth;  //得到图片宽度   
	//水平像素必须是4的倍数!!
	if((PICINFO.ImgWidth*color_byte)%4)
		uiTemp=((PICINFO.ImgWidth*color_byte)/4+1)*4;
	else
		uiTemp=PICINFO.ImgWidth*color_byte;	    
	AI_Drow_Init();//初始化智能画图	    
	//开始解码BMP   	 													 
	x =0 ;
	y=PICINFO.ImgHeight;
	rgb=0;      
	realy=y*PICINFO.Div_Fac/10000;
	while(1)
	{				 
		while(count<1024)  //读取一簇512扇区 (SectorsPerClust 每簇扇区数)
	    {
			if(color_byte==3)   //24位颜色图
			{
				switch (rgb) 
				{
					case 0:
						tmp_color = jpg_buffer[count]>>3 ;
						color |= tmp_color;
						break ;	   
					case 1: 
						tmp_color = jpg_buffer[count]>>2 ;
						tmp_color <<= 5 ;
						color |= tmp_color ;
						break;	  
					case 2 : 
						tmp_color = jpg_buffer[count]>>3 ;
						tmp_color <<= 11 ;
						color |= tmp_color ;
						break ;			
				}   
			}
			else
			{
				if(color_byte==2)  //16位颜色图
				{
					switch(rgb)
					{
						case 0 : 
							color=jpg_buffer[count]&0x1f;
						    tmp_color=jpg_buffer[count]>>5;
							tmp_color<<=6;
							color|=tmp_color;
							break ;   
						case 1 : 			  
							tmp_color=jpg_buffer[count];
							tmp_color<<=9 ;
							color |= tmp_color ;
							break ;	 
					}		     
				}
				else 
				{
					if(color_byte==4)//32位颜色图
					{
						switch (rgb)
						{
							case 0 :  
								tmp_color=jpg_buffer[count];
								color|=tmp_color>>3;
								break ;     
							case 1 :  
								tmp_color=jpg_buffer[count];
								tmp_color>>=2;
								color|=tmp_color<<5;
								break ;	  
							case 2 :  
								tmp_color=jpg_buffer[count];
								tmp_color>>=3;
								color|=tmp_color<<11;
								break ;	 
							case 3 :break ;   
						}		  	 
					}  
				}     
			}//位图颜色得到	
			rgb++;	  
			count++ ;		  
			if(rgb==color_byte) //水平方向读取到1像素数数据后显示
			{	
				if(x<PICINFO.ImgWidth)	 					 			   
				{	
					realx=x*PICINFO.Div_Fac/10000;//x轴实际值
					if(IsElementOk(realx,realy,1)&&yok)//符合条件
					{						 				 	  	       
						POINT_COLOR=color;		 
						LCD_DrawPoint(realx+PICINFO.S_XOFF,realy+PICINFO.S_YOFF-1); 
					}   									    
				}
				x++;//x轴增加一个像素 
				color=0x00; 
				rgb=0;  		  
			}
			countpix++;//像素累加
			if(countpix>=uiTemp)//水平方向像素值到了.换行
			{		 
				y--; 
				if(y<=0)return TRUE; 
				realy=y*PICINFO.Div_Fac/10000;//实际y值改变	 
				if(IsElementOk(realx,realy,0))yok=1;//此处不改变PICINFO.staticx,y的值	 
				else yok=0; 
				x=0; 
				countpix=0;
				color=0x00;
				rgb=0;
			}	 
		}