英特內軟體股份有限公司


jcx.util
Class pdf

java.lang.Object
  |
  +--java.awt.Graphics
        |
        +--java.awt.Graphics2D
              |
              +--jcx.util.pdf
All Implemented Interfaces:
java.awt.image.ImageConsumer, java.awt.image.ImageObserver

public class pdf
extends java.awt.Graphics2D
implements java.awt.image.ImageConsumer, java.awt.image.ImageObserver

/** 此類別 pdf 為一pdf 檔案之產生器, 凡是欲產生 pdf 檔案格式皆可引用本類別。 本 API 產生檔案的中文字體預設為標楷體, 可支援各種字體。 pdf 檔案需安裝 Acrobat reader4.0 方可讀取


Field Summary
protected  int currentFillGState
           
protected  int currentStrokeGState
           
static java.awt.Font eudc
           
 java.awt.Font font
           
protected  java.lang.String separator
           
protected  java.util.ArrayList stateList
           
 
Fields inherited from interface java.awt.image.ImageConsumer
COMPLETESCANLINES, IMAGEABORTED, IMAGEERROR, RANDOMPIXELORDER, SINGLEFRAME, SINGLEFRAMEDONE, SINGLEPASS, STATICIMAGEDONE, TOPDOWNLEFTRIGHT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
pdf()
          建立一空白(one page)的pdf文件,若須多頁文件,參照 newPage() 預設寬度為 612 , 預設高度為 792
pdf(int Width, int Height)
          建立一空白(one page , Width X Height) 的pdf文件,若須多頁文件,參照 newPage()
 
Method Summary
 void addRenderingHints(java.util.Map c)
           
 void beginText()
           
 void clearRect(int x, int y, int width, int height)
           
 void clip()
           
 void clip(java.awt.Shape s)
           
 void clipRect(int a1, int a2, int a3, int a4)
           
 void closePath()
           
 void copyArea(int a1, int a2, int a3, int a4, int a5, int a6)
           
 java.awt.Graphics create()
           
 void curveTo(float x2, float y2, float x3, float y3)
           
 void curveTo(float x1, float y1, float x2, float y2, float x3, float y3)
           
 void dispose()
           
protected  void doAttributes(java.text.AttributedCharacterIterator iter)
           
 void draw(java.awt.Shape c)
           
 void drawArc(int x, int y, int width, int height, int startAngle, int arcAngle)
           
 void drawGlyphVector(java.awt.font.GlyphVector g, float x, float y)
           
 void drawImage(java.awt.image.BufferedImage a1, java.awt.image.BufferedImageOp a2, int a3, int a4)
           
 boolean drawImage(java.awt.Image a1, java.awt.geom.AffineTransform a2, java.awt.image.ImageObserver a3)
           
 void drawImage(java.awt.Image img, int x, int y)
          繪製圖形於指定的座標,依照原大小 若長度超過邊界( 612 X 792 ) ,內容會被截斷。
 void drawImage(java.awt.Image img, int x, int y, java.awt.Color mask_color)
           
 boolean drawImage(java.awt.Image a1, int b1, int b2, java.awt.Color c, java.awt.image.ImageObserver a3)
           
 boolean drawImage(java.awt.Image a1, int b1, int b2, java.awt.image.ImageObserver a3)
           
 void drawImage(java.awt.Image img, int x, int y, int width, int height)
          繪製圖形於指定的座標,並指定大小 若長度超過邊界( 612 X 792 ) ,內容會被截斷。
 void drawImage(java.awt.Image img, int x, int y, int width, int height, java.awt.Color mask_color)
           
 boolean drawImage(java.awt.Image a1, int b1, int b2, int b3, int b4, java.awt.Color c, java.awt.image.ImageObserver a3)
           
 boolean drawImage(java.awt.Image a1, int b1, int b2, int b3, int b4, java.awt.image.ImageObserver a3)
           
 boolean drawImage(java.awt.Image a1, int b1, int b2, int b3, int b4, int b5, int b6, int b7, int b8, java.awt.Color c, java.awt.image.ImageObserver a3)
           
 boolean drawImage(java.awt.Image a1, int b1, int b2, int b3, int b4, int b5, int b6, int b7, int b8, java.awt.image.ImageObserver a3)
           
 void drawLine(int x1, int y1, int x2, int y2)
          繪製線條,顏色參照 setColor ,deault 為黑色,RGB(0,0,0), 若長度超過邊界( 612 X 792 ) ,內容會被截斷。
 void drawOval(int x, int y, int width, int height)
           
 void drawPolygon(int[] xPoints, int[] yPoints, int nPoints)
           
 void drawPolyline(int[] x, int[] y, int nPoints)
           
 void drawRect(int x1, int y1, int width, int height)
          繪製空心矩形,顏色參照 setColor ,deault 為黑色,RGB(0,0,0), 若長度超過邊界( 612 X 792 ) ,內容會被截斷。
 void drawRenderableImage(java.awt.image.renderable.RenderableImage a1, java.awt.geom.AffineTransform a2)
           
 void drawRenderedImage(java.awt.image.RenderedImage a1, java.awt.geom.AffineTransform a2)
           
 void drawRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight)
           
 void drawString(java.text.AttributedCharacterIterator iter, float x, float y)
           
 void drawString(java.text.AttributedCharacterIterator iterator, int x, int y)
           
 void drawString(int x, int y, java.lang.String s)
          在目前頁面寫入一字串,可支援中文。
 void drawString(java.lang.String s, float x, float y)
           
 void drawString(java.lang.String s, int x, int y)
          在目前頁面寫入一字串,可支援中文。
 void endText()
           
 void eoClip()
           
 void eoFill()
           
 void fill()
           
 void fill(java.awt.Shape c)
           
 void fillArc(int x, int y, int width, int height, int startAngle, int arcAngle)
           
 void fillOval(int x, int y, int width, int height)
           
 void fillPolygon(int[] xPoints, int[] yPoints, int nPoints)
           
 void fillRect(int x1, int y1, int width, int height)
          繪製實心矩形,顏色參照 setColor ,deault 為黑色,RGB(0,0,0), 若長度超過邊界( 612 X 792 ) ,內容會被截斷。
 void fillRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight)
           
 void g_drawString1(java.awt.Graphics2D g, java.lang.String s, int x, int y)
           
 java.awt.Color getBackground()
           
 java.awt.Shape getClip()
           
 java.awt.Rectangle getClipBounds()
           
 java.awt.Color getColor()
           
 java.awt.Composite getComposite()
           
 java.awt.GraphicsConfiguration getDeviceConfiguration()
           
static java.awt.Font getEUDCFont()
           
 java.awt.Font getFont()
           
 java.awt.FontMetrics getFontMetrics()
           
 java.awt.FontMetrics getFontMetrics(java.awt.Font f)
           
 java.awt.font.FontRenderContext getFontRenderContext()
           
 java.awt.Image getImage(java.lang.String filename)
          讀取圖形檔,目前支援 GIF,JPG 圖檔 若讀不到檔案或發生錯誤,傳回 null .
 java.awt.Paint getPaint()
           
 java.lang.Object getRenderingHint(java.awt.RenderingHints.Key k)
           
 java.awt.RenderingHints getRenderingHints()
           
 java.awt.Stroke getStroke()
           
 java.awt.geom.AffineTransform getTransform()
           
 boolean hit(java.awt.Rectangle a1, java.awt.Shape a2, boolean a3)
           
 void imageComplete(int status)
           
 boolean imageUpdate(java.awt.Image img, int infoflags, int x, int y, int width, int height)
           
 void lineTo(float x, float y)
           
static void main(java.lang.String[] args)
           
 void moveTo(float x, float y)
           
 void newPage()
          結束目前 Page,產生一新頁面.
 void newPath()
           
 void rectangle(float x, float y, float w, float h)
           
 void rotate(double d)
           
 void rotate(double d1, double d2, double d3)
           
 void scale(double scale)
           
 void scale(double sx, double sy)
           
 void setBackground(java.awt.Color c)
           
 void setCharacterSpacing(float charSpace)
           
 void setClip(int x, int y, int width, int height)
           
 void setClip(java.awt.Shape s)
           
 void setColor(java.awt.Color c)
          設定線條的顏色,deault 為黑色,RGB(0,0,0), 設定後將影響以後的繪圖顏色。
 void setColor(int red, int green, int blue)
          設定線條的顏色,deault 為黑色,RGB(0,0,0), 設定後將影響以後的繪圖顏色。
 void setColorModel(java.awt.image.ColorModel model)
           
 void setComposite(java.awt.Composite c)
           
 void setCTM(double a, double b, double c, double d, double e, double f)
           
 void setDimensions(int width, int height)
           
 void setFillColor(java.awt.Color c)
           
 void setFillColor(int red, int green, int blue)
          設定填滿圖框的顏色,deault 為黑色,RGB(0,0,0), 設定後將影響以後的填滿圖框的顏色。
 void setFont(java.awt.Font f)
          設定字體,deault 為 標楷體, 設定後將影響以後的 drawString 的字體。
 void setFontAndSize(java.lang.String font_name, float size)
           
 void setFontName(java.lang.String fontName)
          設定字體,deault 為 標楷體, 設定後將影響以後的 drawString 的字體。
 void setFontSize(int fontsize)
          設定字體的大小,deault 為 12, 設定後將影響以後的 drawString 的字體大小。
 void setHints(int hintflags)
           
 void setLineCap(int style)
           
 void setLineWidth(float lineWidth)
          設定畫線的線條粗細,deault 為 1, 設定後將影響以後的線條粗細。
 void setPaint(java.awt.Paint paint)
           
 void setPaintMode()
           
 void setPixels(int x, int y, int w, int h, java.awt.image.ColorModel model, byte[] pixels, int off, int scansize)
           
 void setPixels(int x, int y, int w, int h, java.awt.image.ColorModel model, int[] pixels, int off, int scansize)
           
 void setProperties(java.util.Hashtable props)
           
 void setRenderingHint(java.awt.RenderingHints.Key k, java.lang.Object k2)
           
 void setRenderingHints(java.util.Map c)
           
 void setRenderingHints(java.awt.RenderingHints c)
           
 void setRGBColorStroke(int red, int green, int blue)
           
 void setRotate(boolean rotate)
          設定中文字旋轉 90 度 (英文字母及數字不旋轉)
 void setRotate(boolean rotate, boolean e_rotate)
          設定中文字及英數字旋轉 90 度
 void setStroke(java.awt.Stroke c)
           
 void setStrokeColor(java.awt.Color color)
           
 void setTextMatrix(float a, float b, float c, float d, float x, float y)
           
 void setTransform(java.awt.geom.AffineTransform t)
           
 void setXORMode(java.awt.Color c)
           
 void shear(double d1, double d2)
           
 void showText(java.lang.String text)
          Shows the text.
 void stroke()
           
 void transform(java.awt.geom.AffineTransform tx)
           
 void translate(double sx, double sy)
           
 void translate(int d1, int d2)
           
 void writeToFile(java.lang.String filename)
          將內容產生 pdf 檔案。
 void writeToStream(java.io.OutputStream os)
          將內容產生 pdf 格式,並寫入 OutputStream。
 
Methods inherited from class java.awt.Graphics2D
draw3DRect, fill3DRect
 
Methods inherited from class java.awt.Graphics
create, drawBytes, drawChars, drawPolygon, fillPolygon, finalize, getClipBounds, getClipRect, hitClip, toString
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

font

public java.awt.Font font

eudc

public static java.awt.Font eudc

separator

protected java.lang.String separator

currentFillGState

protected int currentFillGState

currentStrokeGState

protected int currentStrokeGState

stateList

protected java.util.ArrayList stateList
Constructor Detail

pdf

public pdf()
建立一空白(one page)的pdf文件,若須多頁文件,參照 newPage() 預設寬度為 612 , 預設高度為 792

pdf

public pdf(int Width,
           int Height)
建立一空白(one page , Width X Height) 的pdf文件,若須多頁文件,參照 newPage()
Method Detail

newPage

public void newPage()
結束目前 Page,產生一新頁面.
Returns:
none.

setFont

public void setFont(java.awt.Font f)
設定字體,deault 為 標楷體, 設定後將影響以後的 drawString 的字體。
Overrides:
setFont in class java.awt.Graphics
Parameters:
Font. -  
Returns:
none.

setFontSize

public void setFontSize(int fontsize)
設定字體的大小,deault 為 12, 設定後將影響以後的 drawString 的字體大小。
Parameters:
fontsize - 字體的大小.
Returns:
none.

setFontName

public void setFontName(java.lang.String fontName)
設定字體,deault 為 標楷體, 設定後將影響以後的 drawString 的字體。
Parameters:
字體的名稱,如細明體,新細明體等等. -  
Returns:
none.

writeToFile

public void writeToFile(java.lang.String filename)
                 throws java.io.IOException
將內容產生 pdf 檔案。
Parameters:
filename - 欲產生的檔案名稱.
Returns:
none.
Throws:
java.io.IOException - if an I/O error occurs.

writeToStream

public void writeToStream(java.io.OutputStream os)
                   throws java.io.IOException
將內容產生 pdf 格式,並寫入 OutputStream。
Parameters:
os - 欲寫入的 OutputStream。
Returns:
none.
Throws:
java.io.IOException - if an I/O error occurs.

setRotate

public void setRotate(boolean rotate)
設定中文字旋轉 90 度 (英文字母及數字不旋轉)
Parameters:
rotate - 是否旋轉。
Returns:
none.

setRotate

public void setRotate(boolean rotate,
                      boolean e_rotate)
設定中文字及英數字旋轉 90 度
Parameters:
rotate - 中文是否旋轉。
e_rotate - 英數是否旋轉。(需先設定中文旋轉)
Returns:
none.

drawString

public void drawString(java.lang.String s,
                       int x,
                       int y)
在目前頁面寫入一字串,可支援中文。 若長度超過邊界( 612 X 792 ) ,內容會被截斷。
Overrides:
drawString in class java.awt.Graphics2D
Parameters:
s - 欲寫入的字串。
x - x座標。
y - y座標。
Returns:
none.

drawString

public void drawString(int x,
                       int y,
                       java.lang.String s)
在目前頁面寫入一字串,可支援中文。 若長度超過邊界( 612 X 792 ) ,內容會被截斷。
Parameters:
x - x座標。
y - y座標。
s - 欲寫入的字串。
Returns:
none.

setLineWidth

public void setLineWidth(float lineWidth)
設定畫線的線條粗細,deault 為 1, 設定後將影響以後的線條粗細。
Parameters:
lineWidth - 線條寬度.
Returns:
none.

getColor

public java.awt.Color getColor()
Overrides:
getColor in class java.awt.Graphics

setColor

public void setColor(java.awt.Color c)
設定線條的顏色,deault 為黑色,RGB(0,0,0), 設定後將影響以後的繪圖顏色。
Overrides:
setColor in class java.awt.Graphics
Parameters:
Color. -  
Returns:
none.

setColor

public void setColor(int red,
                     int green,
                     int blue)
設定線條的顏色,deault 為黑色,RGB(0,0,0), 設定後將影響以後的繪圖顏色。
Parameters:
red - 0~255.
green - 0~255.
blue - 0~255.
Returns:
none.

setFillColor

public void setFillColor(int red,
                         int green,
                         int blue)
設定填滿圖框的顏色,deault 為黑色,RGB(0,0,0), 設定後將影響以後的填滿圖框的顏色。
Parameters:
red - 0~255.
green - 0~255.
blue - 0~255.
Returns:
none.

setFillColor

public void setFillColor(java.awt.Color c)

drawLine

public void drawLine(int x1,
                     int y1,
                     int x2,
                     int y2)
繪製線條,顏色參照 setColor ,deault 為黑色,RGB(0,0,0), 若長度超過邊界( 612 X 792 ) ,內容會被截斷。
Overrides:
drawLine in class java.awt.Graphics
Parameters:
x1 - 第一點的 x 座標
y1 - 第一點的 y 座標
x2 - 第二點的 x 座標
x2 - 第二點的 y 座標
Returns:
none.

setLineCap

public void setLineCap(int style)

drawRect

public void drawRect(int x1,
                     int y1,
                     int width,
                     int height)
繪製空心矩形,顏色參照 setColor ,deault 為黑色,RGB(0,0,0), 若長度超過邊界( 612 X 792 ) ,內容會被截斷。
Overrides:
drawRect in class java.awt.Graphics
Parameters:
x1 - 左上角的 x 座標
y1 - 左上角的 y 座標
width - 矩形的寬度
height - 矩形的高度
Returns:
none.

drawImage

public void drawImage(java.awt.Image img,
                      int x,
                      int y)
繪製圖形於指定的座標,依照原大小 若長度超過邊界( 612 X 792 ) ,內容會被截斷。
Parameters:
img - 欲繪製的圖形
x - 左上角的 x 座標
y - 左上角的 y 座標
Returns:
none.

drawImage

public void drawImage(java.awt.Image img,
                      int x,
                      int y,
                      java.awt.Color mask_color)

drawImage

public void drawImage(java.awt.Image img,
                      int x,
                      int y,
                      int width,
                      int height)
繪製圖形於指定的座標,並指定大小 若長度超過邊界( 612 X 792 ) ,內容會被截斷。
Parameters:
img - 欲繪製的圖形
x - 左上角的 x 座標
y - 左上角的 y 座標
width - 放大後的寬度
height - 放大後的高度
Returns:
none.

drawImage

public void drawImage(java.awt.Image img,
                      int x,
                      int y,
                      int width,
                      int height,
                      java.awt.Color mask_color)

scale

public void scale(double scale)

scale

public void scale(double sx,
                  double sy)
Overrides:
scale in class java.awt.Graphics2D

translate

public void translate(double sx,
                      double sy)
Overrides:
translate in class java.awt.Graphics2D

setCTM

public void setCTM(double a,
                   double b,
                   double c,
                   double d,
                   double e,
                   double f)

fillRect

public void fillRect(int x1,
                     int y1,
                     int width,
                     int height)
繪製實心矩形,顏色參照 setColor ,deault 為黑色,RGB(0,0,0), 若長度超過邊界( 612 X 792 ) ,內容會被截斷。
Overrides:
fillRect in class java.awt.Graphics
Parameters:
x1 - 左上角的 x 座標
y1 - 左上角的 y 座標
width - 矩形的寬度
height - 矩形的高度
Returns:
none.

getImage

public java.awt.Image getImage(java.lang.String filename)
讀取圖形檔,目前支援 GIF,JPG 圖檔 若讀不到檔案或發生錯誤,傳回 null .
Parameters:
filename - 圖檔檔名
Returns:
Image object or null if errors.

setDimensions

public void setDimensions(int width,
                          int height)
Specified by:
setDimensions in interface java.awt.image.ImageConsumer

setProperties

public void setProperties(java.util.Hashtable props)
Specified by:
setProperties in interface java.awt.image.ImageConsumer

setColorModel

public void setColorModel(java.awt.image.ColorModel model)
Specified by:
setColorModel in interface java.awt.image.ImageConsumer

setHints

public void setHints(int hintflags)
Specified by:
setHints in interface java.awt.image.ImageConsumer

setPixels

public void setPixels(int x,
                      int y,
                      int w,
                      int h,
                      java.awt.image.ColorModel model,
                      byte[] pixels,
                      int off,
                      int scansize)
Specified by:
setPixels in interface java.awt.image.ImageConsumer

setPixels

public void setPixels(int x,
                      int y,
                      int w,
                      int h,
                      java.awt.image.ColorModel model,
                      int[] pixels,
                      int off,
                      int scansize)
Specified by:
setPixels in interface java.awt.image.ImageConsumer

imageComplete

public void imageComplete(int status)
Specified by:
imageComplete in interface java.awt.image.ImageConsumer

imageUpdate

public boolean imageUpdate(java.awt.Image img,
                           int infoflags,
                           int x,
                           int y,
                           int width,
                           int height)
Specified by:
imageUpdate in interface java.awt.image.ImageObserver

getBackground

public java.awt.Color getBackground()
Overrides:
getBackground in class java.awt.Graphics2D

setBackground

public void setBackground(java.awt.Color c)
Overrides:
setBackground in class java.awt.Graphics2D

setClip

public void setClip(int x,
                    int y,
                    int width,
                    int height)
Overrides:
setClip in class java.awt.Graphics

getFont

public java.awt.Font getFont()
Overrides:
getFont in class java.awt.Graphics

getFontMetrics

public java.awt.FontMetrics getFontMetrics()
Overrides:
getFontMetrics in class java.awt.Graphics

getFontMetrics

public java.awt.FontMetrics getFontMetrics(java.awt.Font f)
Overrides:
getFontMetrics in class java.awt.Graphics

rotate

public void rotate(double d)
Overrides:
rotate in class java.awt.Graphics2D

rotate

public void rotate(double d1,
                   double d2,
                   double d3)
Overrides:
rotate in class java.awt.Graphics2D

shear

public void shear(double d1,
                  double d2)
Overrides:
shear in class java.awt.Graphics2D

translate

public void translate(int d1,
                      int d2)
Overrides:
translate in class java.awt.Graphics2D

getComposite

public java.awt.Composite getComposite()
Overrides:
getComposite in class java.awt.Graphics2D

setComposite

public void setComposite(java.awt.Composite c)
Overrides:
setComposite in class java.awt.Graphics2D

getDeviceConfiguration

public java.awt.GraphicsConfiguration getDeviceConfiguration()
Overrides:
getDeviceConfiguration in class java.awt.Graphics2D

getPaint

public java.awt.Paint getPaint()
Overrides:
getPaint in class java.awt.Graphics2D

setPaint

public void setPaint(java.awt.Paint paint)
Overrides:
setPaint in class java.awt.Graphics2D

getRenderingHints

public java.awt.RenderingHints getRenderingHints()
Overrides:
getRenderingHints in class java.awt.Graphics2D

setRenderingHints

public void setRenderingHints(java.awt.RenderingHints c)

getRenderingHint

public java.lang.Object getRenderingHint(java.awt.RenderingHints.Key k)
Overrides:
getRenderingHint in class java.awt.Graphics2D

setRenderingHint

public void setRenderingHint(java.awt.RenderingHints.Key k,
                             java.lang.Object k2)
Overrides:
setRenderingHint in class java.awt.Graphics2D

clearRect

public void clearRect(int x,
                      int y,
                      int width,
                      int height)
Overrides:
clearRect in class java.awt.Graphics
See Also:
Graphics.clearRect(int, int, int, int)

drawRoundRect

public void drawRoundRect(int x,
                          int y,
                          int width,
                          int height,
                          int arcWidth,
                          int arcHeight)
Overrides:
drawRoundRect in class java.awt.Graphics
See Also:
Graphics.drawRoundRect(int, int, int, int, int, int)

fillRoundRect

public void fillRoundRect(int x,
                          int y,
                          int width,
                          int height,
                          int arcWidth,
                          int arcHeight)
Overrides:
fillRoundRect in class java.awt.Graphics
See Also:
Graphics.fillRoundRect(int, int, int, int, int, int)

drawOval

public void drawOval(int x,
                     int y,
                     int width,
                     int height)
Overrides:
drawOval in class java.awt.Graphics
See Also:
Graphics.drawOval(int, int, int, int)

fillOval

public void fillOval(int x,
                     int y,
                     int width,
                     int height)
Overrides:
fillOval in class java.awt.Graphics
See Also:
Graphics.fillOval(int, int, int, int)

drawArc

public void drawArc(int x,
                    int y,
                    int width,
                    int height,
                    int startAngle,
                    int arcAngle)
Overrides:
drawArc in class java.awt.Graphics
See Also:
Graphics.drawArc(int, int, int, int, int, int)

fillArc

public void fillArc(int x,
                    int y,
                    int width,
                    int height,
                    int startAngle,
                    int arcAngle)
Overrides:
fillArc in class java.awt.Graphics
See Also:
Graphics.fillArc(int, int, int, int, int, int)

drawPolyline

public void drawPolyline(int[] x,
                         int[] y,
                         int nPoints)
Overrides:
drawPolyline in class java.awt.Graphics
See Also:
Graphics.drawPolyline(int[], int[], int)

drawPolygon

public void drawPolygon(int[] xPoints,
                        int[] yPoints,
                        int nPoints)
Overrides:
drawPolygon in class java.awt.Graphics
See Also:
Graphics.drawPolygon(int[], int[], int)

fillPolygon

public void fillPolygon(int[] xPoints,
                        int[] yPoints,
                        int nPoints)
Overrides:
fillPolygon in class java.awt.Graphics
See Also:
Graphics.fillPolygon(int[], int[], int)

clipRect

public void clipRect(int a1,
                     int a2,
                     int a3,
                     int a4)
Overrides:
clipRect in class java.awt.Graphics

copyArea

public void copyArea(int a1,
                     int a2,
                     int a3,
                     int a4,
                     int a5,
                     int a6)
Overrides:
copyArea in class java.awt.Graphics

setPaintMode

public void setPaintMode()
Overrides:
setPaintMode in class java.awt.Graphics

dispose

public void dispose()
Overrides:
dispose in class java.awt.Graphics

create

public java.awt.Graphics create()
Overrides:
create in class java.awt.Graphics

draw

public void draw(java.awt.Shape c)
Overrides:
draw in class java.awt.Graphics2D

fill

public void fill(java.awt.Shape c)
Overrides:
fill in class java.awt.Graphics2D

closePath

public void closePath()

curveTo

public void curveTo(float x1,
                    float y1,
                    float x2,
                    float y2,
                    float x3,
                    float y3)

curveTo

public void curveTo(float x2,
                    float y2,
                    float x3,
                    float y3)

lineTo

public void lineTo(float x,
                   float y)

moveTo

public void moveTo(float x,
                   float y)

eoFill

public void eoFill()

fill

public void fill()

stroke

public void stroke()

rectangle

public void rectangle(float x,
                      float y,
                      float w,
                      float h)

eoClip

public void eoClip()

clip

public void clip()

newPath

public void newPath()

setStrokeColor

public void setStrokeColor(java.awt.Color color)

setRGBColorStroke

public void setRGBColorStroke(int red,
                              int green,
                              int blue)

getStroke

public java.awt.Stroke getStroke()
Overrides:
getStroke in class java.awt.Graphics2D

setStroke

public void setStroke(java.awt.Stroke c)
Overrides:
setStroke in class java.awt.Graphics2D

getFontRenderContext

public java.awt.font.FontRenderContext getFontRenderContext()
Overrides:
getFontRenderContext in class java.awt.Graphics2D

drawGlyphVector

public void drawGlyphVector(java.awt.font.GlyphVector g,
                            float x,
                            float y)
Overrides:
drawGlyphVector in class java.awt.Graphics2D

getTransform

public java.awt.geom.AffineTransform getTransform()
Overrides:
getTransform in class java.awt.Graphics2D

transform

public void transform(java.awt.geom.AffineTransform tx)
Overrides:
transform in class java.awt.Graphics2D

setTransform

public void setTransform(java.awt.geom.AffineTransform t)
Overrides:
setTransform in class java.awt.Graphics2D
See Also:
Graphics2D.setTransform(AffineTransform)

getEUDCFont

public static java.awt.Font getEUDCFont()

drawString

public void drawString(java.lang.String s,
                       float x,
                       float y)
Overrides:
drawString in class java.awt.Graphics2D

setCharacterSpacing

public void setCharacterSpacing(float charSpace)

endText

public void endText()

beginText

public void beginText()

setFontAndSize

public void setFontAndSize(java.lang.String font_name,
                           float size)

setTextMatrix

public void setTextMatrix(float a,
                          float b,
                          float c,
                          float d,
                          float x,
                          float y)

doAttributes

protected void doAttributes(java.text.AttributedCharacterIterator iter)

drawString

public void drawString(java.text.AttributedCharacterIterator iterator,
                       int x,
                       int y)
Overrides:
drawString in class java.awt.Graphics2D

drawString

public void drawString(java.text.AttributedCharacterIterator iter,
                       float x,
                       float y)
Overrides:
drawString in class java.awt.Graphics2D

showText

public void showText(java.lang.String text)
Shows the text.
Parameters:
text - the text to write

addRenderingHints

public void addRenderingHints(java.util.Map c)
Overrides:
addRenderingHints in class java.awt.Graphics2D

setRenderingHints

public void setRenderingHints(java.util.Map c)
Overrides:
setRenderingHints in class java.awt.Graphics2D

hit

public boolean hit(java.awt.Rectangle a1,
                   java.awt.Shape a2,
                   boolean a3)
Overrides:
hit in class java.awt.Graphics2D

drawRenderedImage

public void drawRenderedImage(java.awt.image.RenderedImage a1,
                              java.awt.geom.AffineTransform a2)
Overrides:
drawRenderedImage in class java.awt.Graphics2D

drawRenderableImage

public void drawRenderableImage(java.awt.image.renderable.RenderableImage a1,
                                java.awt.geom.AffineTransform a2)
Overrides:
drawRenderableImage in class java.awt.Graphics2D

drawImage

public void drawImage(java.awt.image.BufferedImage a1,
                      java.awt.image.BufferedImageOp a2,
                      int a3,
                      int a4)
Overrides:
drawImage in class java.awt.Graphics2D

drawImage

public boolean drawImage(java.awt.Image a1,
                         java.awt.geom.AffineTransform a2,
                         java.awt.image.ImageObserver a3)
Overrides:
drawImage in class java.awt.Graphics2D

drawImage

public boolean drawImage(java.awt.Image a1,
                         int b1,
                         int b2,
                         int b3,
                         int b4,
                         int b5,
                         int b6,
                         int b7,
                         int b8,
                         java.awt.image.ImageObserver a3)
Overrides:
drawImage in class java.awt.Graphics

drawImage

public boolean drawImage(java.awt.Image a1,
                         int b1,
                         int b2,
                         int b3,
                         int b4,
                         int b5,
                         int b6,
                         int b7,
                         int b8,
                         java.awt.Color c,
                         java.awt.image.ImageObserver a3)
Overrides:
drawImage in class java.awt.Graphics

drawImage

public boolean drawImage(java.awt.Image a1,
                         int b1,
                         int b2,
                         int b3,
                         int b4,
                         java.awt.Color c,
                         java.awt.image.ImageObserver a3)
Overrides:
drawImage in class java.awt.Graphics

drawImage

public boolean drawImage(java.awt.Image a1,
                         int b1,
                         int b2,
                         java.awt.image.ImageObserver a3)
Overrides:
drawImage in class java.awt.Graphics

drawImage

public boolean drawImage(java.awt.Image a1,
                         int b1,
                         int b2,
                         java.awt.Color c,
                         java.awt.image.ImageObserver a3)
Overrides:
drawImage in class java.awt.Graphics

drawImage

public boolean drawImage(java.awt.Image a1,
                         int b1,
                         int b2,
                         int b3,
                         int b4,
                         java.awt.image.ImageObserver a3)
Overrides:
drawImage in class java.awt.Graphics

setXORMode

public void setXORMode(java.awt.Color c)
Overrides:
setXORMode in class java.awt.Graphics

getClipBounds

public java.awt.Rectangle getClipBounds()
Overrides:
getClipBounds in class java.awt.Graphics

getClip

public java.awt.Shape getClip()
Overrides:
getClip in class java.awt.Graphics

clip

public void clip(java.awt.Shape s)
Overrides:
clip in class java.awt.Graphics2D

setClip

public void setClip(java.awt.Shape s)
Overrides:
setClip in class java.awt.Graphics

g_drawString1

public void g_drawString1(java.awt.Graphics2D g,
                          java.lang.String s,
                          int x,
                          int y)

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception

英特內軟體股份有限公司