Flash / Flex / ActionScript/Graphics/drawRect

Материал из Web эксперт
Перейти к: навигация, поиск

Uses drawRect( ) to draw a blue rectangle with a black one-pixel outline

 
package{
  import flash.display.*;
  
  public class Main extends Sprite{
    public function Main(){
        var canvas:Shape = new Shape(  );
        addChild(canvas);
        
        canvas.graphics.lineStyle(1);
        canvas.graphics.beginFill(0x0000FF);
        canvas.graphics.drawRect(0, 0, 150, 75);
    }
  }
}