|
JavaTM 2 Platform Std. Ed. v1. 4.0 |
||||||||||
ÀüÀÇ Å¬·¡½º ´ÙÀ½ÀÇ Å¬·¡½º | ÇÁ·¹ÀÓ ÀÖ¾î ÇÁ·¹ÀÓ ¾øÀ½ | ||||||||||
°³¿ä: »óÀÚ | Çʵå | constructor | ¸Þ¼Òµå | »ó¼¼: Çʵå | constructor | ¸Þ¼Òµå |
java.lang.Object | +--java.awt.GradientPaint
GradientPaint
Ŭ·¡½º´Â Ä®¶óÀÇ ¼±Çü ±×¶óµ¥ÀÌ¼ÇÆÄźÀ¸·Î Shape
¸¦ ÀüºÎ Ä¥ÇÏ´Â ¼ö´ÜÀ» Á¦°øÇÕ´Ï´Ù. Color
C1 ¸¦ °¡Áö´Â Point
P1, ¹× Color
C2 ¸¦ °¡Áö´Â Point
P2 °¡ À¯Àú °ø°£¿¡¼ ÁöÁ¤µÇ¸é(ÀÚ), P1 ¿Í P2 ¸¦ ¿¬°áÇÏ´Â ¼±»óÀÇ Color
°¡ C1 ·ÎºÎÅÍ C2 ·Î ¼¼È÷ º¯ÈÇØ °¥ °ÍÀÔ´Ï´Ù. P1 ¿Í P2 ¸¦ ¿¬°áÇÏ´Â ¼±ÀÇ ¿¬Àå¼±»ó¿¡ ¾ø´Â Á¡ P ´Â P1 ¿Í P2 ¸¦ ¿¬°áÇÏ´Â ¼±ÀÇ ¿¬Àå¼±»ó¿¡ ÀÖ´Â P ÀÇ ¼öÁ÷ÀÇ Åõ¿µÀÎ Á¡ P'ÀÇ »öÀ» °¡Áý´Ï´Ù. P1, P2 ¼¼±×¸ÕÆ®(segment)ÀÇ ¿ÜÃø¿¡ ÀÖ´Â ¿¬Àå¼±»óÀÇ Á¡Àº ´ÙÀ½ÀÇ 2 °³ÀÇ ¹æ¹ýÀÇ ¾î´ÀÂÊÀ̵çÀ¸·Î ÷°¡ÇÒ ¼ö°¡ ÀÖ½À´Ï´Ù.
Color
C1 ¸¦ °¡Á®, ¼¼±×¸ÕÆ®(segment)ÀÇ P2 ÃøÀÇ Á¡Àº ÀÏÁ¤ÇÑ Color
C2 ¸¦ °¡Áø´Ù
Paint
,
Graphics2D.setPaint(java.awt.Paint)
ÇʵåÀÇ °³¿ä |
ÀÎÅÍÆäÀ̽º java.awt. Transparency ¿¡¼ »ó¼Ó¹ÞÀº Çʵå |
BITMASK , OPAQUE , TRANSLUCENT |
»ý¼ºÀÚÀÇ °³¿ä | |
GradientPaint (float x1,
float y1,
Color color1,
float x2,
float y2,
Color color2)
½ÉÇÃÇÑ ºñ¼øÈ¯½ÄÀÇ GradientPaint ¿ÀºêÁ§Æ®¸¦ ±¸ÃàÇÕ´Ï´Ù. |
|
GradientPaint (float x1,
float y1,
Color color1,
float x2,
float y2,
Color color2,
boolean cyclic)
boolean ÆÄ¶ó¹ÌÅÍ¿¡ ÀÀÇØ, ¼øÈ¯½Ä ¶Ç´Â ºñ¼øÈ¯½ÄÀÇ GradientPaint ¿ÀºêÁ§Æ®¸¦ ±¸ÃàÇÕ´Ï´Ù. |
|
GradientPaint (Point2D pt1,
Color color1,
Point2D pt2,
Color color2)
½ÉÇÃÇÑ ºñ¼øÈ¯½ÄÀÇ GradientPaint ¿ÀºêÁ§Æ®¸¦ ±¸ÃàÇÕ´Ï´Ù. |
|
GradientPaint (Point2D pt1,
Color color1,
Point2D pt2,
Color color2,
boolean cyclic)
boolean ÆÄ¶ó¹ÌÅÍ¿¡ ÀÀÇØ, ¼øÈ¯½Ä ¶Ç´Â ºñ¼øÈ¯½ÄÀÇ GradientPaint ¿ÀºêÁ§Æ®¸¦ ±¸ÃàÇÕ´Ï´Ù. |
¸Þ¼ÒµåÀÇ °³¿ä | |
PaintContext |
createContext (ColorModel cm,
Rectangle deviceBounds,
Rectangle2D userBounds,
AffineTransform xform,
RenderingHints hints)
Ä®¶ó ÆÐÅÏÀ» »ý¼ºÇϱâ À§Çؼ »ç¿ëµÇ´Â ¹®¸ÆÀ» ÀÛ¼ºÇØ µ¹·ÁÁÝ´Ï´Ù. |
Color |
getColor1 ()
Á¡ P1 ¿¡ ÀÇÇØ °íÁ¤µÈ »ö C1 ¸¦ µ¹·ÁÁÝ´Ï´Ù. |
Color |
getColor2 ()
Á¡ P2 ¿¡ ÀÇÇØ °íÁ¤µÈ »ö C2 ¸¦ µ¹·ÁÁÝ´Ï´Ù. |
Point2D |
getPoint1 ()
ÃÖÃÊÀÇ »öÀ» °íÁ¤ÇÏ´Â Á¡ P1 ÀÇ Ä«ÇǸ¦ µ¹·ÁÁÝ´Ï´Ù. |
Point2D |
getPoint2 ()
2 ¹øÂ°ÀÇ »öÀ» °íÁ¤ÇÏ´Â Á¡ P2 ÀÇ Ä«ÇǸ¦ µ¹·ÁÁÝ´Ï´Ù. |
int |
getTransparency ()
ÀÌ GradientPaint ÀÇ Åõ¸íµµ ¸ðµå¸¦ µ¹·ÁÁÝ´Ï´Ù. |
boolean |
isCyclic ()
±×¶óµ¥À̼ÇÀÌ C1 ¿Í C2 ÀÇ 2 »öÀ» ¹Ýº¹ÇØ ¼øÈ¯ÇÏ´Â °æ¿ì¿¡ true ¸¦ µ¹·ÁÁÝ´Ï´Ù. |
Ŭ·¡½º java.lang. Object ¿¡¼ »ó¼Ó¹ÞÀº ¸Þ¼Òµå |
clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait , wait , wait |
»ý¼ºÀÚÀÇ »ó¼¼ |
public GradientPaint(float x1, float y1, Color color1, float x2, float y2, Color color2)
GradientPaint
¿ÀºêÁ§Æ®¸¦ ±¸ÃàÇÕ´Ï´Ù.
color1
- ÃÖÃÊ·Î ÁöÁ¤µÈ Point
ÀÇ Color
color2
- 2 ¹øÂ°·Î ÁöÁ¤µÈ Point
ÀÇ Color
NullPointerException
- ¾î´ÀÂÊÀ̵ç 1 °³ÀÇ Ä®¶ó°¡ null ÀÇ °æ¿ìpublic GradientPaint(Point2D pt1, Color color1, Point2D pt2, Color color2)
GradientPaint
¿ÀºêÁ§Æ®¸¦ ±¸ÃàÇÕ´Ï´Ù.
pt1
- À¯Àú °ø°£¿¡¼ ÃÖÃÊ·Î ÁöÁ¤µÈ Point
color1
- ÃÖÃÊ·Î ÁöÁ¤µÈ Point
ÀÇ Color
pt2
- À¯Àú °ø°£¿¡¼ 2 ¹øÂ°·Î ÁöÁ¤µÈ Point
color2
- 2 ¹øÂ°·Î ÁöÁ¤µÈ Point
ÀÇ Color
NullPointerException
- ¾î´ÀÂÊÀ̵ç 1 °³ÀÇ Ä®¶ó ¶Ç´Â Á¡ÀÌ null ÀÇ °æ¿ìpublic GradientPaint(float x1, float y1, Color color1, float x2, float y2, Color color2, boolean cyclic)
boolean
ÆÄ¶ó¹ÌÅÍ¿¡ ÀÀÇØ, ¼øÈ¯½Ä ¶Ç´Â ºñ¼øÈ¯½ÄÀÇ GradientPaint
¿ÀºêÁ§Æ®¸¦ ±¸ÃàÇÕ´Ï´Ù.
color1
- ÃÖÃÊ·Î ÁöÁ¤µÈ Point
ÀÇ Color
color2
- 2 ¹øÂ°·Î ÁöÁ¤µÈ Point
ÀÇ Color
cyclic
- ±×¶óµ¥ÀÌ¼ÇÆÄźÀÌ 2 °³ÀÇ »öÀ» ¹Ýº¹ÇØ ¼øÈ¯ÇÏ´Â °æ¿ì´Â true
, ±×·¸Áö ¾ÊÀº °æ¿ì´Â false
public GradientPaint(Point2D pt1, Color color1, Point2D pt2, Color color2, boolean cyclic)
boolean
ÆÄ¶ó¹ÌÅÍ¿¡ ÀÀÇØ, ¼øÈ¯½Ä ¶Ç´Â ºñ¼øÈ¯½ÄÀÇ GradientPaint
¿ÀºêÁ§Æ®¸¦ ±¸ÃàÇÕ´Ï´Ù.
pt1
- À¯Àú °ø°£¿¡¼ ÃÖÃÊ·Î ÁöÁ¤µÈ Point
color1
- ÃÖÃÊ·Î ÁöÁ¤µÈ Point
ÀÇ Color
pt2
- À¯Àú °ø°£¿¡¼ 2 ¹øÂ°·Î ÁöÁ¤µÈ Point
color2
- 2 ¹øÂ°·Î ÁöÁ¤µÈ Point
ÀÇ Color
cyclic
- ±×¶óµ¥ÀÌ¼ÇÆÄźÀÌ 2 °³ÀÇ »öÀ» ¹Ýº¹ÇØ ¼øÈ¯ÇÏ´Â °æ¿ì´Â true
, ±×·¸Áö ¾ÊÀº °æ¿ì´Â false
NullPointerException
- ¾î´ÀÂÊÀ̵ç 1 °³ÀÇ Ä®¶ó ¶Ç´Â Á¡ÀÌ null ÀÇ °æ¿ì¸Þ¼ÒµåÀÇ »ó¼¼ |
public Point2D getPoint1()
GradientPaint
ÀÇ ÃÖÃÊÀÇ »öÀ» °íÁ¤ÇÏ´Â Á¡ÀÇ Ä«ÇǸ¦ ³ªÅ¸³»´Â Point2D
¿ÀºêÁ§Æ®public Color getColor1()
Color
¿ÀºêÁ§Æ®public Point2D getPoint2()
GradientPaint
ÀÇ 2 ¹øÂ°ÀÇ »öÀ» °íÁ¤ÇÏ´Â Á¡ÀÇ Ä«ÇǸ¦ ³ªÅ¸³»´Â Point2D
¿ÀºêÁ§Æ®public Color getColor2()
Color
¿ÀºêÁ§Æ®public boolean isCyclic()
true
¸¦ µ¹·ÁÁÝ´Ï´Ù.
true
, ±×·¸Áö ¾ÊÀº °æ¿ì´Â false
public PaintContext createContext(ColorModel cm, Rectangle deviceBounds, Rectangle2D userBounds, AffineTransform xform, RenderingHints hints)
Paint
³»ÀÇ createContext
cm
- Paint
µ¥ÀÌÅ͸¦ ¹Þ´Â ColorModel
. À̰ÍÀº ´ÜÁö ÈùÆ®·Î¼ »ç¿ëµÇ´ÂdeviceBounds
- Ç¥Çö µÇ´Â graphics primitiveÀÇ µð¹ÙÀ̽º °ø°£¿¡¼ÀÇ ¹Ù¿îµò±×º¹½ºuserBounds
- Ç¥Çö µÇ´Â graphics primitiveÀÇ À¯Àú °ø°£¿¡¼ÀÇ ¹Ù¿îµò±×º¹½ºxform
- À¯Àú °ø°£À¸·ÎºÎÅÍ µð¹ÙÀ̽º °ø°£¿¡ÀÇ AffineTransform
hints
- ¹®¸Æ ¿ÀºêÁ§Æ®°¡ Ç¥ÇöÀÇ ¼±ÅûçÇ×À» ¼±ÅÃÇÒ °æ¿ì¿¡ »ç¿ëÇÏ´Â ÈùÆ®
PaintContext
PaintContext
public int getTransparency()
GradientPaint
ÀÇ Åõ¸íµµ ¸ðµå¸¦ µ¹·ÁÁÝ´Ï´Ù.
Transparency
³»ÀÇ getTransparency
GradientPaint
¿ÀºêÁ§Æ®ÀÇ Åõ¸íµµ ¸ðµå¸¦ ³ªÅ¸³»´Â Á¤¼öÄ¡Transparency
|
JavaTM 2 Platform Std. Ed. v1. 4.0 |
||||||||||
ÀüÀÇ Å¬·¡½º ´ÙÀ½ÀÇ Å¬·¡½º | ÇÁ·¹ÀÓ ÀÖ¾î ÇÁ·¹ÀÓ ¾øÀ½ | ||||||||||
°³¿ä: »óÀÚ | Çʵå | constructor | ¸Þ¼Òµå | »ó¼¼: Çʵå | constructor | ¸Þ¼Òµå |
Java, Java 2 D, ¹× JDBC ´Â ¹Ì±¹ ¹× ±× ¿ÜÀÇ ³ª¶ó¿¡ ÀÖ¾î¼ÀÇ ¹Ì±¹ Sun Microsystems, Inc. ÀÇ »óÇ¥ ȤÀº µî·Ï»óÇ¥ÀÔ´Ï´Ù.
Copyright 1993-2002 Sun Microsystems, Inc. 901 San Antonio Road
Palo Alto, California, 94303, U.S.A. All Rights Reserved.