类的用途
java.awt.Graphics2D
使用 Graphics2D 的包
包
描述
包含用于创建用户界面以及绘制图形和图像的所有类。
提供与字体相关的类和接口。
提供用于创建和修改图像的类。
提供一组“轻量级”(全 Java 语言)组件,尽可能在所有平台上以相同的方式工作。
提供根据基本外观构建的用户界面对象。
提供根据跨平台 Nimbus 外观构建的用户界面对象。
提供处理可编辑和不可编辑文本组件的类和接口。
-
Graphics2D 在 java.awt 中的用法
java.awt 中返回 Graphics2D 的方法修饰符和类型方法描述abstract Graphics2DGraphicsEnvironment.createGraphics(BufferedImage img) 返回一个Graphics2D对象以渲染到指定的BufferedImage中。SplashScreen.createGraphics()为启动画面覆盖图像创建一个图形上下文(作为Graphics2D对象),它允许您在启动画面上绘制。 -
Graphics2D 在 java.awt.font 中的用法
java.awt.font 中的方法,参数类型为 Graphics2D修饰符和类型方法描述abstract voidGraphicAttribute.draw(Graphics2D graphics, float x, float y) 在指定位置呈现此GraphicAttribute。voidImageGraphicAttribute.draw(Graphics2D graphics, float x, float y) 在指定位置呈现此GraphicAttribute。voidShapeGraphicAttribute.draw(Graphics2D graphics, float x, float y) 在指定位置呈现此GraphicAttribute。voidTextLayout.draw(Graphics2D g2, float x, float y) 在指定的Graphics2D上下文中的指定位置呈现此TextLayout。 -
Graphics2D 在 java.awt.image 中的用法
java.awt.image 中返回 Graphics2D 的方法修饰符和类型方法描述BufferedImage.createGraphics()创建一个Graphics2D,可用于绘制此BufferedImage。abstract Graphics2DVolatileImage.createGraphics()创建一个Graphics2D,可用于绘制此VolatileImage。 -
Graphics2D 在 javax.swing 中的用法
javax.swing 中的方法,参数类型为 Graphics2D -
Graphics2D 在 javax.swing.plaf.basic 中的用法
javax.swing.plaf.basic 中的方法,参数类型为 Graphics2D修饰符和类型方法描述static voidBasicGraphicsUtils.drawString(JComponent c, Graphics2D g, String string, float x, float y) 使用提供的组件的文本属性和抗锯齿提示在指定位置绘制给定字符串。static voidBasicGraphicsUtils.drawStringUnderlineCharAt(JComponent c, Graphics2D g, String string, int underlinedIndex, float x, float y) 在给定字符下划线的指定位置绘制给定字符串。 -
Graphics2D 在 javax.swing.plaf.nimbus 中的用法
javax.swing.plaf.nimbus 中的方法,参数类型为 Graphics2D修饰符和类型方法描述protected voidAbstractRegionPainter.configureGraphics(Graphics2D g) 配置给定的 Graphics2D。protected abstract voidAbstractRegionPainter.doPaint(Graphics2D g, JComponent c, int width, int height, Object[] extendedCacheKeys) 实际上执行绘画操作。final voidAbstractRegionPainter.paint(Graphics2D g, JComponent c, int w, int h) 呈现给定的Graphics2D对象。 -
Graphics2D 在 javax.swing.text 中的用法
javax.swing.text 中的方法,参数类型为 Graphics2D修饰符和类型方法描述protected floatPasswordView.drawEchoCharacter(Graphics2D g, float x, float y, char c) 呈现回显字符,或用于显示密码字符的任何图形。protected voidPlainView.drawLine(int lineIndex, Graphics2D g, float x, float y) 呈现一行文本,抑制末尾的空格并展开所有选项卡。protected voidWrappedPlainView.drawLine(int p0, int p1, Graphics2D g, float x, float y) 呈现一行文本,抑制末尾的空格并展开所有选项卡。protected floatPlainView.drawSelectedText(Graphics2D g, float x, float y, int p0, int p1) 将模型中的给定范围呈现为选定文本。protected floatWrappedPlainView.drawSelectedText(Graphics2D g, float x, float y, int p0, int p1) 将模型中的给定范围呈现为选定文本。static final floatUtilities.drawTabbedText(Segment s, float x, float y, Graphics2D g, TabExpander e, int startOffset) 绘制给定的文本,使用给定的选项卡扩展技术扩展包含的任何选项卡。protected floatPlainView.drawUnselectedText(Graphics2D g, float x, float y, int p0, int p1) 将模型中的给定范围呈现为正常的未选择文本。protected floatWrappedPlainView.drawUnselectedText(Graphics2D g, float x, float y, int p0, int p1) 将模型中的给定范围呈现为正常的未选择文本。