本文整理汇总了Java中sun.java2d.SunGraphics2D.STROKE_THINDASHED属性的典型用法代码示例。如果您正苦于以下问题:Java SunGraphics2D.STROKE_THINDASHED属性的具体用法?Java SunGraphics2D.STROKE_THINDASHED怎么用?Java SunGraphics2D.STROKE_THINDASHED使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类sun.java2d.SunGraphics2D
的用法示例。
在下文中一共展示了SunGraphics2D.STROKE_THINDASHED属性的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: renderPath
public void renderPath(SunGraphics2D sg, Shape s, BasicStroke bs) {
boolean adjust = (bs != null &&
sg.strokeHint != SunHints.INTVAL_STROKE_PURE);
boolean thin = (sg.strokeState <= SunGraphics2D.STROKE_THINDASHED);
Region clip = sg.getCompClip();
int abox[] = new int[4];
AATileGenerator aatg =
renderengine.getAATileGenerator(s, sg.transform, clip,
bs, thin, adjust, abox);
if (aatg == null) {
// Nothing to render
return;
}
renderTiles(sg, s, aatg, abox);
}
示例2: getStrokeSpans
public static ShapeSpanIterator getStrokeSpans(SunGraphics2D sg2d,
Shape s)
{
ShapeSpanIterator sr = new ShapeSpanIterator(false);
try {
sr.setOutputArea(sg2d.getCompClip());
sr.setRule(PathIterator.WIND_NON_ZERO);
BasicStroke bs = (BasicStroke) sg2d.stroke;
boolean thin = (sg2d.strokeState <= SunGraphics2D.STROKE_THINDASHED);
boolean normalize =
(sg2d.strokeHint != SunHints.INTVAL_STROKE_PURE);
RenderEngine.strokeTo(s,
sg2d.transform, bs,
thin, normalize, false, sr);
} catch (Throwable t) {
sr.dispose();
sr = null;
throw new InternalError("Unable to Stroke shape ("+
t.getMessage()+")", t);
}
return sr;
}
示例3: renderPath
public void renderPath(SunGraphics2D sg, Shape s, BasicStroke bs) {
final boolean adjust = (bs != null &&
sg.strokeHint != SunHints.INTVAL_STROKE_PURE);
final boolean thin = (sg.strokeState <= SunGraphics2D.STROKE_THINDASHED);
final TileState ts = TILE_STATE_PROVIDER.acquire();
try {
final int[] abox = ts.abox;
final AATileGenerator aatg =
RDR_ENGINE.getAATileGenerator(s, sg.transform, sg.getCompClip(),
bs, thin, adjust, abox);
if (aatg != null) {
renderTiles(sg, s, aatg, abox, ts);
}
} finally {
TILE_STATE_PROVIDER.release(ts);
}
}