RDPMultiDstBlt(int16_t nLeftRect, int16_t nTopRect, int16_t nWidth, int16_t nHeight, uint8_t bRop, uint8_t nDeltaEntries, InStream & deltaEncodedRectangles) : nLeftRect(nLeftRect) , nTopRect(nTopRect) , nWidth(nWidth) , nHeight(nHeight) , bRop(bRop) , nDeltaEntries(nDeltaEntries) { ::memset(this->deltaEncodedRectangles, 0, sizeof(this->deltaEncodedRectangles)); for (int i = 0; i < this->nDeltaEntries; i++) { this->deltaEncodedRectangles[i].leftDelta = deltaEncodedRectangles.in_sint16_le(); this->deltaEncodedRectangles[i].topDelta = deltaEncodedRectangles.in_sint16_le(); this->deltaEncodedRectangles[i].width = deltaEncodedRectangles.in_sint16_le(); this->deltaEncodedRectangles[i].height = deltaEncodedRectangles.in_sint16_le(); } }
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); } }
RDPPolygonCB(int16_t xStart, int16_t yStart, uint8_t bRop2, uint8_t fillMode, RDPColor backColor, RDPColor foreColor, const RDPBrush & brush, uint8_t NumDeltaEntries, InStream & deltaPoints) : xStart(xStart) , yStart(yStart) , bRop2(bRop2) , fillMode(fillMode) , backColor(backColor) , foreColor(foreColor) , brush(brush) , NumDeltaEntries(0) { this->NumDeltaEntries = std::min<uint8_t>(NumDeltaEntries, sizeof(this->deltaPoints) / sizeof(this->deltaPoints[0])); ::memset(this->deltaPoints, 0, sizeof(this->deltaPoints)); for (int i = 0; i < this->NumDeltaEntries; i++) { this->deltaPoints[i].xDelta = deltaPoints.in_sint16_le(); this->deltaPoints[i].yDelta = deltaPoints.in_sint16_le(); } }