老熟妇,老熟女chese老熟女,亚洲AV中文无码字幕色三,超碰欧美

Ultimaker2Malin——ultimakerTextGfx轉(zhuǎn)成lcd_buffer數(shù)據(jù)格式 

2016-12-05 10:13
170159hejxznuioefaau5a.webp

測試代碼:
#include
#include
#include
#include "common.h"

const uint8_t ultimakerTextGfx[]= {
    128, 21, //size
   0x6,0x6,0x6,0x6,0xfe,0xfe,0xfe,0xfe,0xfc,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
   0xfc,0xfe,0xfe,0xfe,0xfc,0x0,0x0,0x0,0xe,0xfe,0xfe,0xfe,0xfe,0x0,0x0,0xe0,
   0xfc,0xfe,0xfe,0xfc,0xe0,0xe0,0x0,0x0,0x0,0xce,0xce,0xce,0x0,0x0,0x0,0xc0,
   0xc0,0xc0,0xc0,0xc0,0xc0,0x80,0x0,0x0,0x0,0x0,0x0,0x0,0x80,0xc0,0xc0,0x80,
   0x0,0x0,0x0,0x0,0x0,0x0,0x80,0x80,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0x80,
   0x80,0x0,0x0,0x0,0x0,0x6,0xfe,0xfe,0xfe,0xfe,0x0,0x0,0x0,0x0,0x80,0xc0,
   0xc0,0xc0,0x0,0x0,0x0,0x0,0x0,0x0,0x80,0x80,0xc0,0xc0,0xc0,0x80,0x80,0x80,
   0x0,0x0,0x0,0x0,0xc0,0xc0,0xc0,0xc0,0x0,0x80,0xc0,0xc0,0xc0,0xc0,0x80,0x0,

   0x0,0x0,0x0,0x0,0x7f,0xff,0xff,0xff,0xff,0x80,0x0,0x0,0x0,0x0,0x0,0x80,
   0xff,0xff,0xff,0xff,0xff,0x0,0x0,0x0,0x0,0xff,0xff,0xff,0xff,0x0,0x0,0x0,
   0xff,0xff,0xff,0xff,0x0,0x0,0x0,0x0,0x0,0xff,0xff,0xff,0x0,0x0,0x0,0x81,
   0xf1,0xff,0xff,0x3f,0xf,0x3f,0xff,0xfc,0xf0,0xf0,0xfc,0xff,0x3f,0xf,0x3f,0xff,
   0xfe,0xf8,0x80,0x0,0x0,0x0,0xc1,0xe1,0xf1,0xf1,0x71,0x31,0x1,0x1,0x83,0xff,
   0xff,0xff,0xfc,0x0,0x0,0x0,0xff,0xff,0xff,0xff,0x0,0xc,0x3e,0xff,0xff,0xf7,
   0xc3,0x1,0x0,0x0,0x0,0xfc,0xfe,0xff,0x87,0x3,0x11,0x31,0x31,0x33,0x3f,0x3f,
   0x3f,0x1e,0x0,0x0,0x1,0xff,0xff,0xff,0xff,0x7,0x3,0x1,0x1,0x1,0x1,0x0,

   0x0,0x0,0x0,0x0,0x0,0x1,0x3,0x7,0x7,0xf,0xf,0xf,0xf,0xf,0xf,0xf,
   0x7,0x7,0x7,0xf,0xf,0x6,0x0,0x0,0x0,0x7,0xf,0xf,0x7,0x0,0x0,0x0,
   0x7,0xf,0xf,0x7,0x0,0x0,0x0,0x0,0x0,0xf,0xf,0xf,0x0,0x0,0x6,0xf,
   0xf,0x7,0x1,0x0,0x0,0x0,0x1,0x7,0xf,0xf,0x7,0x1,0x0,0x0,0x0,0x1,
   0x7,0xf,0xf,0x6,0x0,0x0,0x3,0x7,0xf,0xf,0xe,0xe,0x6,0x7,0x3,0x7,
   0xf,0xf,0x7,0x0,0x0,0x0,0x7,0xf,0xf,0x7,0x0,0x0,0x0,0x0,0x3,0xf,
   0xf,0xf,0x6,0x0,0x0,0x0,0x3,0x7,0x7,0xf,0xe,0xe,0xe,0xe,0xe,0xe,
   0x6,0x0,0x0,0x0,0x0,0xf,0xf,0xf,0xf,0x0,0x0,0x0,0x0,0x0,0x0,0x0
};

#define LCD_GFX_WIDTH 128
#define LCD_GFX_HEIGHT 64
uint8_t lcd_buffer[LCD_GFX_WIDTH * LCD_GFX_HEIGHT / 8];

static inline uint8_t pgm_read_byte(const void* ptr)
{
    return *(constuint8_t*)ptr;
}

void lcd_lib_draw_gfx(uint8_t x, uint8_t y, const uint8_t*gfx)
{
    uint8_t w =pgm_read_byte(gfx++);             //w=128
    uint8_t h =(pgm_read_byte(gfx++) + 7) / 8; //h=3
    uint8_t shift = y % 8;                        //shift=6
    uint8_t shift2 = 8 -shift;                     //shift2=2
    y /= 8;                                         //y=2
                                        //x=0

    for(; h; h--)
    {
       if (y >= LCD_GFX_HEIGHT / 8) break;

       uint8_t* dst0 = lcd_buffer + x + y *LCD_GFX_WIDTH;
       uint8_t* dst1 = lcd_buffer + x + y *LCD_GFX_WIDTH + LCD_GFX_WIDTH;
       for(uint8_t _w = w; _w; _w--)
       {
           uint8_t c= pgm_read_byte(gfx++);
           *dst0++ |=c << shift;
           if (shift&& y < 7)
              *dst1++ |= c >>shift2;
       }
       y++;
    }
}

void main()
{
    unsigned int i,j,k;
     charb='#';
     charc='*';
     chard='@';
    initgraph(8*128, 16*64);
    lcd_lib_draw_gfx(0, 22, ultimakerTextGfx);

    for(i=0;i<8;i++)//8行掃描
    {
        for(k=0;k<8;k++)//字節(jié)8位掃描
         {
            for(j=0;j<128;j++)//128列掃描
             {   
                 if( lcd_buffer[i*128+j]&(0x01<<k))
                 {      
                     outtextxy(j*8, (i*8+k)*16, b);
                 }
             }
         }
    }
    getch();
    closegraph();
}
測試結(jié)果:
聲明:3D打印資源庫(3dzyk)內(nèi)網(wǎng)友所發(fā)表的所有內(nèi)容及言論僅代表其本人,并不代表3D打印資源庫(3dzyk)觀點和立場;如對文章有異議或投訴,請联系kefu@3dzyk.cn。
B Color Smilies
Ultimaker2Malin——ultimakerTextGfx轉(zhuǎn)成lcd_buffer數(shù)據(jù)格式 
欧美综合啪啪| 亚洲中文字幕无码一久久区| 国产1页| 国产精品久久一二区| 亚洲精品少妇| 日本啪啪视频| 久久香蕉-本国产线看观看视| 亚洲一区二区三区四区| 亚洲码欧美码一区二区三区| 乱伦一级片| 亚洲av大全| 超 碰 中文字幕| 在线视频1区| 久久国内视频| 中文字幕精品导航| 人人澡人人澡人人看添AV| 久久人妻无码一区二区美国快递| 午夜高清福利| 99热这里只有精品8| 国产日韩亚洲| 国产另类ts人妖一区二区| 成人国产欧美一品二品下载| 一区二区在线中文字幕| 色九九影院曰韩| jav中文字幕在线| 久久精品国产99久久无毒不卡| 亚洲精品无码AAA在线播放| 日 欧美 一本 视频| 久久的色偷偷| 久久久成人无码一区| 欧美色欲一区二区三区| 欧美日韩激情在线一区二区三区| 丁香六月婷婷| 国产影视一区| 日韩一区二区三区四区| 国产一级黄色免费AAAAA| 欧美色综合一区二区三区| 日本影院| 免费人妻在线视频| 国产熟女三个东北女人| 物业久久久|