在arm开发板上画日本国旗 您所在的位置:网站首页 德国国旗配色弓把怎么画 在arm开发板上画日本国旗

在arm开发板上画日本国旗

2024-07-09 07:31| 来源: 网络整理| 查看: 265

1.开发环境:ubuntu,arm-linux-gcc

2.圆的公式 (x-a)*(x-a)+(y-b)*(y-b)=r*r

3.日本国旗的是比是3:2

代码:

#include #include #include #include #include int main() {       //打开lcd     int fd_lcd;     fd_lcd=open("/dev/fb0",O_RDWR);     if(fd_lcd         printf("mmap fail\n");         return -1;     }

    int x;//lcd x坐标     int y;//lcd y坐标     int red=0x00ff0000;     int grenn=0x0000ff00;     int blue=0x000000ff;     int black=0x00000000;     int gold=0x00FFD700;     int white=0x00ffffff;     int a,b;

    for(y=0;y             if((a*a+b*b)                 *(addr+y*800+x)=white;             }             a=y-480/2,b=x-800/2;         }     }

    munmap(addr,800*480*4);     close(fd_lcd);

    return 0; }



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有