Esempio n. 1
0
inline void process_glyphcache(GlyphCache & gly_cache, InStream & stream) {
    const uint8_t cacheId = stream.in_uint8();
    const uint8_t nglyphs = stream.in_uint8();
    for (uint8_t i = 0; i < nglyphs; i++) {
        const uint16_t cacheIndex = stream.in_uint16_le();
        const int16_t  offset     = stream.in_sint16_le();
        const int16_t  baseline   = stream.in_sint16_le();
        const uint16_t width      = stream.in_uint16_le();
        const uint16_t height     = stream.in_uint16_le();

        const unsigned int   datasize = (height * nbbytes(width) + 3) & ~3;
        const uint8_t      * data     = stream.in_uint8p(datasize);

        server_add_char(gly_cache, cacheId, cacheIndex, offset, baseline, width, height, data);
    }
}
Esempio n. 2
0
static inline uint32_t row_size(int width, uint8_t bpp)
{
    return align4(width * nbbytes(bpp));
}
Esempio n. 3
0
 //==============================================================================
 inline int datasize() const noexcept
 //==============================================================================
 {
     return align4(nbbytes(this->width) * this->height);
 }