線の幅について
/**
* Copyright pon ( http://wonderfl.net/user/pon )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/mFLe
*/
package {
import flash.text.TextFormat;
import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.text.TextField;
import flash.display.Sprite;
public class FlashTest extends Sprite {
public function FlashTest() {
// write as3 code here..
var tf1:TextField=new TextField()
tf1.text="1:幅10px/50px";
tf1.x=50;
addChild(tf1);
this.graphics.lineStyle(10);
this.graphics.moveTo(50,20);
this.graphics.lineTo(50,200);
var tf2:TextField=new TextField()
tf2.text="2:幅10px/100.5px";
tf2.x=100
tf2.y=30;
addChild(tf2);
this.graphics.lineStyle(10);
this.graphics.moveTo(100.5,50);
this.graphics.lineTo(100.5,200);
var tf3:TextField=new TextField()
tf3.text="3:幅11px/150px";
tf3.x=150
tf3.y=60;
addChild(tf3);
this.graphics.lineStyle(11);
this.graphics.moveTo(150,80);
this.graphics.lineTo(150,200);
var tf4:TextField=new TextField()
tf4.text="4:幅11px/200.5px";
tf4.x=200
tf4.y=90;
addChild(tf4);
this.graphics.lineStyle(11);
this.graphics.moveTo(200.5,110);
this.graphics.lineTo(200.5,200);
var bmp:BitmapData=new BitmapData(width,height);
bmp.draw(this);
var bit:Bitmap=new Bitmap(bmp)
bit.scaleY=bit.scaleX=2;
bit.y=220;
bit.x=-50;
addChild(bit);
var tfA:TextField=new TextField()
tfA.defaultTextFormat=new TextFormat(null,20,0xFF0000);
tfA.autoSize="left";
tfA.text="↓bitmap.drowして2倍に拡大"
tfA.x=200;
tfA.y=220
addChild(tfA)
}
}
}