Advertisement
honey_the_codewitch

font render

Mar 19th, 2022
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.37 KB | None | 0 0
  1. using bmp_type = bitmap<rgb_pixel<16>>;
  2. uint8_t* bmp_buf = (uint8_t*)malloc(bmp_type::sizeof_buffer(bsz));
  3. if(bmp_buf==nullptr) {
  4.     return (int)gfx_result::out_of_memory;
  5. }
  6. bmp_type bmp(bsz,bmp_buf);
  7. draw::text(bmp,(srect16)bmp.bounds(),{0,0},buf,f,scale,sfg,sbg,false);
  8. char n[64];
  9. generate_array(ident,itoa(cp,n,16),bmp_buf,bmp.size_bytes(),handle);
  10. free(bmp_buf);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement