Compartir a través de


2.2.2.2.1.1.2.12 SaveBitmap (SAVEBITMAP_ORDER)

The SaveBitmap Primary Drawing Order encodes a rectangle of the screen image for saving or restoring by the client.

 Encoding order number: 11 (0x0B)
 Negotiation order number: 11 (0x0B)
 Number of fields: 6
 Number of field encoding bytes: 1
 Maximum encoded field length: 13 bytes


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

SavedBitmapPosition (optional)

nLeftRect (variable)

nTopRect (variable)

nRightRect (variable)

nBottomRect (variable)

Operation (optional)

SavedBitmapPosition (4 bytes): A 32-bit, unsigned integer. Encoded start position of the rectangle in the Saved Bitmap that will be read from (in the case of a bitmap restore operation) or written to (in the case of a bitmap save operation), depending on the value of the Operation field.

The SavedBitmapPosition field is constructed by using the desktopSaveXGranularity and desktopSaveYGranularity values specified in the Order Capability Set (see [MS-RDPBCGR] section 2.2.7.1.3). The size of the Save Bitmap MUST be 480 x 480 pixels.

Specification [T128] section 8.16.17 shows how to compute the value to insert into the SavedBitmapPosition field. When performing a save operation, the SavedBitmapPosition field contains the cumulative area of the virtual desktop rectangles already in the Save Bitmap (the area of the rectangle being written to the Save Bitmap is excluded). When performing a restore operation, the SavedBitmapPosition field contains the cumulative area of all the rectangles that were written to the Save Bitmap before the rectangle being restored was saved.

The functions used to compute the area by using the specified X and Y granularity are as follows.

 AreaWidthInPixels = [(width + XGranularity - 1) / XGranularity] * XGranularity
 AreaHeightInPixels = [(height + YGranularity - 1) / YGranularity] * YGranularity
 Area = AreaWidthInPixels * AreaHeightInPixels

To determine the X and Y position in the Save Bitmap using the YGranularity and the Save Bitmap width of 480, the following functions are used.

 Y = [SaveBitmapPosition / (480 * YGranularity)] * YGranularity
 X = [SaveBitmapPosition - (Y * 480)] / YGranularity

An example of calculations to obtain the X and Y positions from the SavedBitmapPosition field are defined visually in section 4.5.

nLeftRect (variable): The left coordinate of the virtual desktop rectangle to save specified by using a Coord Field (section 2.2.2.2.1.1.1.1).

nTopRect (variable): The top coordinate of the virtual desktop rectangle to save specified by using a Coord Field (section 2.2.2.2.1.1.1.1).

nRightRect (variable): The right inclusive coordinate of the virtual desktop rectangle to save specified by using a Coord Field (section 2.2.2.2.1.1.1.1).

nBottomRect (variable): The bottom inclusive coordinate of the virtual desktop rectangle to save specified by using a Coord Field (section 2.2.2.2.1.1.1.1).

Operation (1 byte): An 8-bit, unsigned integer. The operation to perform that MUST be one of the following values.

Value

Meaning

SV_SAVEBITS

0x00

Save bitmap operation.

SV_RESTOREBITS

0x01

Restore bitmap operation.