本文整理汇总了Java中java.awt.MultipleGradientPaint.CycleMethod.values方法的典型用法代码示例。如果您正苦于以下问题:Java CycleMethod.values方法的具体用法?Java CycleMethod.values怎么用?Java CycleMethod.values使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类java.awt.MultipleGradientPaint.CycleMethod
的用法示例。
在下文中一共展示了CycleMethod.values方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testAll
import java.awt.MultipleGradientPaint.CycleMethod; //导入方法依赖的package包/类
private void testAll(Graphics gscreen,
BufferedImage refImg, VolatileImage testImg)
{
Graphics2D gref = refImg.createGraphics();
Graphics2D gtest = testImg.createGraphics();
for (PaintType paintType : PaintType.values()) {
for (CycleMethod cycleMethod : CycleMethod.values()) {
for (ColorSpaceType colorSpace : ColorSpaceType.values()) {
for (XformType xform : XformType.values()) {
for (Object aahint : hints) {
for (int numStops : numStopsArray) {
Paint paint =
makePaint(paintType, cycleMethod,
colorSpace, xform, numStops);
String msg =
"type=" + paintType +
" cycleMethod=" + cycleMethod +
" colorSpace=" + colorSpace +
" xformType=" + xform +
" numStops=" + numStops +
" aa=" + aahint;
renderTest(gref, paint, aahint);
renderTest(gtest, paint, aahint);
gscreen.drawImage(testImg, 0, 0, null);
Toolkit.getDefaultToolkit().sync();
int allowedMismatches =
paintType == PaintType.RADIAL ?
ALLOWED_MISMATCHES_RADIAL :
ALLOWED_MISMATCHES_LINEAR;
compareImages(refImg, testImg.getSnapshot(),
TOLERANCE, allowedMismatches,
msg);
}
}
}
}
}
}
gref.dispose();
gtest.dispose();
}