Made to Order Software Corporation Logo

SWF Rectangle (swf_rect)

SWF Structure Info
Tag Flash Version: 
1
SWF Structure: 
struct swf_rect {
	char align;
	unsigned		f_size : 5;
	signed twips		f_x_min : f_size;
	signed twips		f_x_max : f_size;
	signed twips		f_y_min : f_size;
	signed twips		f_y_max : f_size;
};

The rectangles are very well compressed in an SWF file. These make use of a 5 bits size which specifies how many bits are present in the following four fields. Don't forget that the bits are read from the MSB to the LSB and in big endian like when multiple bytes are necessary.