Made to Order Software Corporation Logo

SWF Matrix (swf_matrix)

SWF Structure Info
Tag Flash Version: 
SWF Structure: 
struct swf_matrix {
	char align;
	unsigned		f_has_scale : 1;
	if(f_has_scale) {
		unsigned	f_scale_bits : 5;
		signed fixed	f_scale_x : f_scale_bits;
		signed fixed	f_scale_y : f_scale_bits;
	unsigned		f_has_rotate : 1;
	if(f_has_rotate) {
		unsigned	f_rotate_bits : 5;
		signed fixed	f_rotate_skew0 : f_rotate_bits;
		signed fixed	f_rotate_skew1 : f_rotate_bits;
	unsigned		f_translate_bits : 5;
	signed			f_translate_x : f_rotate_bits;
	signed			f_translate_y : f_rotate_bits;

By default...

  • f_scale_x and f_scale_y are set to 1.0
  • f_rotate_skew0 and f_rotate_skew1 are set to 0.0
  • f_translate_x and f_translate_y must be specified. The translation can be set to (0, 0) to avoid any side effects.

Scale is a ratio. Rotate is an angle in radian. Translate is in TWIPs (1/20th of a pixel.)


Post new comment

The content of this field is kept private and will not be shown publicly.
This question is for testing whether you are a human visitor and to prevent automated spam submissions.