826 * Draws the text given by the specified byte array, using this
827 * graphics context's current font and color. The baseline of the
828 * first character is at position (<i>x</i>, <i>y</i>) in this
829 * graphics context's coordinate system.
830 * <p>
831 * Use of this method is not recommended as each byte is interpreted
832 * as a Unicode code point in the range 0 to 255, and so can only be
833 * used to draw Latin characters in that range.
834 * @param data the data to be drawn
835 * @param offset the start offset in the data
836 * @param length the number of bytes that are drawn
837 * @param x the <i>x</i> coordinate of the baseline of the text
838 * @param y the <i>y</i> coordinate of the baseline of the text
839 * @throws NullPointerException if <code>data</code> is <code>null</code>.
840 * @throws IndexOutOfBoundsException if <code>offset</code> or
841 * <code>length</code>is less than zero, or <code>offset+length</code>
842 * is greater than the length of the <code>data</code> array.
843 * @see java.awt.Graphics#drawChars
844 * @see java.awt.Graphics#drawString
845 */
846 public void drawBytes(byte data[], int offset, int length, int x, int y) {
847 drawString(new String(data, 0, offset, length), x, y);
848 }
849
850 /**
851 * Draws as much of the specified image as is currently available.
852 * The image is drawn with its top-left corner at
853 * (<i>x</i>, <i>y</i>) in this graphics context's coordinate
854 * space. Transparent pixels in the image do not affect whatever
855 * pixels are already there.
856 * <p>
857 * This method returns immediately in all cases, even if the
858 * complete image has not yet been loaded, and it has not been dithered
859 * and converted for the current output device.
860 * <p>
861 * If the image has completely loaded and its pixels are
862 * no longer being changed, then
863 * <code>drawImage</code> returns <code>true</code>.
864 * Otherwise, <code>drawImage</code> returns <code>false</code>
865 * and as more of
|
826 * Draws the text given by the specified byte array, using this
827 * graphics context's current font and color. The baseline of the
828 * first character is at position (<i>x</i>, <i>y</i>) in this
829 * graphics context's coordinate system.
830 * <p>
831 * Use of this method is not recommended as each byte is interpreted
832 * as a Unicode code point in the range 0 to 255, and so can only be
833 * used to draw Latin characters in that range.
834 * @param data the data to be drawn
835 * @param offset the start offset in the data
836 * @param length the number of bytes that are drawn
837 * @param x the <i>x</i> coordinate of the baseline of the text
838 * @param y the <i>y</i> coordinate of the baseline of the text
839 * @throws NullPointerException if <code>data</code> is <code>null</code>.
840 * @throws IndexOutOfBoundsException if <code>offset</code> or
841 * <code>length</code>is less than zero, or <code>offset+length</code>
842 * is greater than the length of the <code>data</code> array.
843 * @see java.awt.Graphics#drawChars
844 * @see java.awt.Graphics#drawString
845 */
846 @SuppressWarnings("deprecation")
847 public void drawBytes(byte data[], int offset, int length, int x, int y) {
848 drawString(new String(data, 0, offset, length), x, y);
849 }
850
851 /**
852 * Draws as much of the specified image as is currently available.
853 * The image is drawn with its top-left corner at
854 * (<i>x</i>, <i>y</i>) in this graphics context's coordinate
855 * space. Transparent pixels in the image do not affect whatever
856 * pixels are already there.
857 * <p>
858 * This method returns immediately in all cases, even if the
859 * complete image has not yet been loaded, and it has not been dithered
860 * and converted for the current output device.
861 * <p>
862 * If the image has completely loaded and its pixels are
863 * no longer being changed, then
864 * <code>drawImage</code> returns <code>true</code>.
865 * Otherwise, <code>drawImage</code> returns <code>false</code>
866 * and as more of
|