graphics入门,显示文字

            protected function button32_clickHandler(event:MouseEvent):void
            {
                var LeftBarText:TextField = new TextField();
                LeftBarText.autoSize = TextFieldAutoSize.CENTER;
                LeftBarText.text = "jfhsdfsdvdnvd,vssdhsdj";
                var LeftBitmapData:BitmapData = new BitmapData(3*LeftBarText.width , LeftBarText.height);
                LeftBitmapData.draw(LeftBarText);
                var LeftBmp:Bitmap = new Bitmap(LeftBitmapData);
                LeftBmp.x = 0;
                LeftBmp.y = 20+25;
                LeftBmp.rotation = -90;
                //addChild(LeftBmp);
                
                var uic:UIComponent = new UIComponent();
                //将Bitmap对象加入到UIComponent对象中
                uic.addChild(LeftBmp);
                pnl_11.addElement(uic);
            }

你可能感兴趣的:(GIS开发)