|

楼主 |
发表于 2019-7-2 15:28:17
|
显示全部楼层
- void display_latitude(struct minmea_position *latitude, int x0 , int y0)
- {
-
- char degree_buf[3],minute_buf[7];
- rt_memset(latitude_buf,0,12);
- rt_sprintf(degree_buf,"%d",latitude->degrees);
- sprintf(minute_buf,"%5.3f",latitude->minutes);
-
- rt_strncpy(latitude_buf,degree_buf,2);
- strcat(latitude_buf,"\xb0");
- strcat(latitude_buf,minute_buf);
- strcat(latitude_buf," ");
- strncat(latitude_buf,&latitude->direction,1);
- GUI_SetFont(&GUI_Font16B_1);
- GUI_DispStringAt(latitude_buf, x0, y0);
- }
复制代码
感谢各位解答,最简单的做法是上边那种。想要好看的,可以生成抗锯齿字体吧。 |
|