home *** CD-ROM | disk | FTP | other *** search
- package com.je.draw
- {
- import flash.display.Sprite;
-
- public class Rect extends Sprite
- {
- private var _width:Number;
-
- private var _height:Number;
-
- private var _cornerRadius:Number;
-
- private var _color:uint;
-
- private var _border:Boolean;
-
- private var _alpha:Number;
-
- public function Rect(param1:Number, param2:Number, param3:uint = 0, param4:Number = 0, param5:Boolean = false, param6:Number = 1)
- {
- super();
- this._width = param1;
- this._height = param2;
- this._color = param3;
- this._alpha = param6;
- this._border = param5;
- this._cornerRadius = param4;
- this.draw(this._width,this._height);
- }
-
- public function draw(param1:Number, param2:Number) : void
- {
- graphics.clear();
- if(this._border)
- {
- graphics.lineStyle(1,16777215,1,true);
- }
- graphics.beginFill(this._color,this._alpha);
- graphics.drawRoundRectComplex(0,0,param1,param2,this._cornerRadius,this._cornerRadius,this._cornerRadius,this._cornerRadius);
- graphics.endFill();
- }
-
- public function drawComplex(param1:Number, param2:Number, param3:Array) : void
- {
- graphics.clear();
- if(this._border)
- {
- graphics.lineStyle(1,16777215);
- }
- graphics.beginFill(this._color,this._alpha);
- graphics.drawRoundRectComplex(0,0,param1,param2,param3[0],param3[1],param3[2],param3[3]);
- graphics.endFill();
- }
-
- public function colorize(param1:uint, param2:Number) : void
- {
- graphics.clear();
- if(this._border)
- {
- graphics.lineStyle(1,16777215);
- }
- graphics.beginFill(param1,param2);
- graphics.drawRoundRectComplex(0,0,width,height,this._cornerRadius,this._cornerRadius,this._cornerRadius,this._cornerRadius);
- graphics.endFill();
- }
- }
- }
-
-