Graphics绘制工具

Graphics是draw2d中的绘制类,所有的figure都是由这个类的子类画成的。在Graphics里面所有的drawXxx()方法都是绘制轮廓的(边框),所有的fillXxx()都是填充。

 

Graphics是一个抽象类,里面有很多抽象方法:

clipRect:裁剪矩形,这个不太明白

 

 

drawArc:圆弧

drawFocus:

drawImage:

drawLine:

drawOval:一个椭圆

drawPoint:

drawPolygon:折线的定义

drawRectangle:矩形

drawRoundRectangle:圆角矩形

drawString:字符串

drawText:

 

fillGradient:渐变

 

popState();

 

pushState();

 

restoreState();

 

rotate:坐标旋转

你可能感兴趣的:(graphics)