views:

341

answers:

1

The Christmas is coming and I got idea to send electricity card (little program). Something like dropping snow would be fine. But it is little bit boring something nice extra effects would be nice. Then I find this little flash example. http://wonderfl.net/code/71344f9a655053d9f793a32c68f00921c67f1977

But I don’t have idea how to convert theses lines (47-49) to C#.

this._forceMap = new BitmapData(465, 465, false, 0x0); 
this._forceMap.draw(tf, tf.transform.matrix); 
this._forceMap.applyFilter(this._forceMap, 
                           this._forceMap.rect, 
                           new Point(0, 0), 
                           new BlurFilter(8, 8));
A: 

If the value of autosize is "left" and the text field line type is set to Multiline in the text Property inspector, then the text field expands or contracts its right and bottom sides to fit all contained text.

  1. tf.autoSize = TextFieldAutoSize.LEFT;
  2. tf.text = 'Wonderfl!!';
  3. tf.x = (465 - tf.width) / 2; // tf.width = textfield.width
  4. tf.y = (465 - tf.height) / 2; // tf.height = textfield.height

x = paddingleft y = paddingtop

pipelinecache