/**
* Draws the background to the specified graphics device. If the dial
* frame specifies a window, the clipping region will already have been
* set to this window before this method is called.
*
* @param g2 the graphics device (<code>null</code> not permitted).
* @param plot the plot (ignored here).
* @param frame the dial frame (ignored here).
* @param view the view rectangle (<code>null</code> not permitted).
*/
@Override
public void draw(Graphics2D g2, DialPlot plot, Rectangle2D frame,
Rectangle2D view) {
// work out the anchor point
Rectangle2D f = DialPlot.rectangleByRadius(frame, this.radius,
this.radius);
Arc2D arc = new Arc2D.Double(f, this.angle, 0.0, Arc2D.OPEN);
Point2D pt = arc.getStartPoint();
g2.setPaint(this.paint);
g2.setFont(this.font);
TextUtilities.drawAlignedString(this.label, g2, (float) pt.getX(),
(float) pt.getY(), this.anchor);
}
DialTextAnnotation.java 文件源码
java
阅读 25
收藏 0
点赞 0
评论 0
项目:ccu-historian
作者:
评论列表
文章目录