645 * Renders the text of the specified <code>String</code>, using the
646 * current text attribute state in the <code>Graphics2D</code> context.
647 * The baseline of the
648 * first character is at position (<i>x</i>, <i>y</i>) in
649 * the User Space.
650 * The rendering attributes applied include the <code>Clip</code>,
651 * <code>Transform</code>, <code>Paint</code>, <code>Font</code> and
652 * <code>Composite</code> attributes. For characters in script
653 * systems such as Hebrew and Arabic, the glyphs can be rendered from
654 * right to left, in which case the coordinate supplied is the
655 * location of the leftmost character on the baseline.
656 * @param str the string to be rendered
657 * @param x the x coordinate of the location where the
658 * <code>String</code> should be rendered
659 * @param y the y coordinate of the location where the
660 * <code>String</code> should be rendered
661 * @throws NullPointerException if <code>str</code> is
662 * <code>null</code>
663 * @see java.awt.Graphics#drawBytes
664 * @see java.awt.Graphics#drawChars
665 * @since JDK1.0
666 */
667 public abstract void drawString(String str, int x, int y);
668
669 /**
670 * Renders the text specified by the specified <code>String</code>,
671 * using the current text attribute state in the <code>Graphics2D</code> context.
672 * The baseline of the first character is at position
673 * (<i>x</i>, <i>y</i>) in the User Space.
674 * The rendering attributes applied include the <code>Clip</code>,
675 * <code>Transform</code>, <code>Paint</code>, <code>Font</code> and
676 * <code>Composite</code> attributes. For characters in script systems
677 * such as Hebrew and Arabic, the glyphs can be rendered from right to
678 * left, in which case the coordinate supplied is the location of the
679 * leftmost character on the baseline.
680 * @param str the <code>String</code> to be rendered
681 * @param x the x coordinate of the location where the
682 * <code>String</code> should be rendered
683 * @param y the y coordinate of the location where the
684 * <code>String</code> should be rendered
685 * @throws NullPointerException if <code>str</code> is
951 * one operation. Refer to the
952 * <code>RenderingHints</code> class for definitions of some common
953 * keys and values.
954 * @return a reference to an instance of <code>RenderingHints</code>
955 * that contains the current preferences.
956 * @see RenderingHints
957 * @see #setRenderingHints(Map)
958 */
959 public abstract RenderingHints getRenderingHints();
960
961 /**
962 * Translates the origin of the <code>Graphics2D</code> context to the
963 * point (<i>x</i>, <i>y</i>) in the current coordinate system.
964 * Modifies the <code>Graphics2D</code> context so that its new origin
965 * corresponds to the point (<i>x</i>, <i>y</i>) in the
966 * <code>Graphics2D</code> context's former coordinate system. All
967 * coordinates used in subsequent rendering operations on this graphics
968 * context are relative to this new origin.
969 * @param x the specified x coordinate
970 * @param y the specified y coordinate
971 * @since JDK1.0
972 */
973 public abstract void translate(int x, int y);
974
975 /**
976 * Concatenates the current
977 * <code>Graphics2D</code> <code>Transform</code>
978 * with a translation transform.
979 * Subsequent rendering is translated by the specified
980 * distance relative to the previous position.
981 * This is equivalent to calling transform(T), where T is an
982 * <code>AffineTransform</code> represented by the following matrix:
983 * <pre>
984 * [ 1 0 tx ]
985 * [ 0 1 ty ]
986 * [ 0 0 1 ]
987 * </pre>
988 * @param tx the distance to translate along the x-axis
989 * @param ty the distance to translate along the y-axis
990 */
991 public abstract void translate(double tx, double ty);
|
645 * Renders the text of the specified <code>String</code>, using the
646 * current text attribute state in the <code>Graphics2D</code> context.
647 * The baseline of the
648 * first character is at position (<i>x</i>, <i>y</i>) in
649 * the User Space.
650 * The rendering attributes applied include the <code>Clip</code>,
651 * <code>Transform</code>, <code>Paint</code>, <code>Font</code> and
652 * <code>Composite</code> attributes. For characters in script
653 * systems such as Hebrew and Arabic, the glyphs can be rendered from
654 * right to left, in which case the coordinate supplied is the
655 * location of the leftmost character on the baseline.
656 * @param str the string to be rendered
657 * @param x the x coordinate of the location where the
658 * <code>String</code> should be rendered
659 * @param y the y coordinate of the location where the
660 * <code>String</code> should be rendered
661 * @throws NullPointerException if <code>str</code> is
662 * <code>null</code>
663 * @see java.awt.Graphics#drawBytes
664 * @see java.awt.Graphics#drawChars
665 * @since 1.0
666 */
667 public abstract void drawString(String str, int x, int y);
668
669 /**
670 * Renders the text specified by the specified <code>String</code>,
671 * using the current text attribute state in the <code>Graphics2D</code> context.
672 * The baseline of the first character is at position
673 * (<i>x</i>, <i>y</i>) in the User Space.
674 * The rendering attributes applied include the <code>Clip</code>,
675 * <code>Transform</code>, <code>Paint</code>, <code>Font</code> and
676 * <code>Composite</code> attributes. For characters in script systems
677 * such as Hebrew and Arabic, the glyphs can be rendered from right to
678 * left, in which case the coordinate supplied is the location of the
679 * leftmost character on the baseline.
680 * @param str the <code>String</code> to be rendered
681 * @param x the x coordinate of the location where the
682 * <code>String</code> should be rendered
683 * @param y the y coordinate of the location where the
684 * <code>String</code> should be rendered
685 * @throws NullPointerException if <code>str</code> is
951 * one operation. Refer to the
952 * <code>RenderingHints</code> class for definitions of some common
953 * keys and values.
954 * @return a reference to an instance of <code>RenderingHints</code>
955 * that contains the current preferences.
956 * @see RenderingHints
957 * @see #setRenderingHints(Map)
958 */
959 public abstract RenderingHints getRenderingHints();
960
961 /**
962 * Translates the origin of the <code>Graphics2D</code> context to the
963 * point (<i>x</i>, <i>y</i>) in the current coordinate system.
964 * Modifies the <code>Graphics2D</code> context so that its new origin
965 * corresponds to the point (<i>x</i>, <i>y</i>) in the
966 * <code>Graphics2D</code> context's former coordinate system. All
967 * coordinates used in subsequent rendering operations on this graphics
968 * context are relative to this new origin.
969 * @param x the specified x coordinate
970 * @param y the specified y coordinate
971 * @since 1.0
972 */
973 public abstract void translate(int x, int y);
974
975 /**
976 * Concatenates the current
977 * <code>Graphics2D</code> <code>Transform</code>
978 * with a translation transform.
979 * Subsequent rendering is translated by the specified
980 * distance relative to the previous position.
981 * This is equivalent to calling transform(T), where T is an
982 * <code>AffineTransform</code> represented by the following matrix:
983 * <pre>
984 * [ 1 0 tx ]
985 * [ 0 1 ty ]
986 * [ 0 0 1 ]
987 * </pre>
988 * @param tx the distance to translate along the x-axis
989 * @param ty the distance to translate along the y-axis
990 */
991 public abstract void translate(double tx, double ty);
|