/*
@class gx.graphics.GGDI
@package gx.graphics
@author 高翔
@tooltip GGDI类,目前仅有绘制矩形方法
*/
import gx.graphics.GPen;
//GGDI类
class gx.graphics.GGDI extends MovieClip {
private static var _target:MovieClip;
public static function set target(target:MovieClip):Void {
_target = target;
}
//绘制矩形方法-静态(画笔、顶点的x坐标、y坐标、长、宽)
public static function DrawRect(pen:GPen, x:Number, y:Number, h:Number,
w:Number):Void {
_target.lineStyle(pen.width, pen.color, pen.alpha);
_target.moveTo(x, y);
_target.lineTo(x+w, y);
_target.lineTo(x+w, y+h);
_target.lineTo(x, y+h);
_target.lineTo(x, y);
}
} |