|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
| ÀÌÀü Ŭ·¡½º ´ÙÀ½ Ŭ·¡½º | ÇÁ·¹ÀÓÀ¸·Î ÇÁ·¹ÀÓ ¾øÀÌ | |||||||||
| °³¿ä: NESTED | Çʵå | constructor | ¸Þ¼µå | »ó¼¼: Çʵå | »ý¼ºÀÚ | ¸Þ¼µå | |||||||||
java.lang.Objectjava.awt.GradientPaint
public class 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 °´Ã¼¸¦ ±¸ÃàÇÕ´Ï´Ù.
x1 - »ç¿ëÀÚ
°ø°£¿¡¼ ÃÖÃÊ·Î ÁöÁ¤µÈ Point
x ÁÂÇ¥y1 - »ç¿ëÀÚ
°ø°£¿¡¼ ÃÖÃÊ·Î ÁöÁ¤µÈ Point
y ÁÂÇ¥color1 - ÃÖÃÊ·Î ÁöÁ¤µÈ Point
Colorx2 - »ç¿ëÀÚ
°ø°£¿¡¼ 2¹øÂ°·Î ÁöÁ¤µÈ Point
x ÁÂÇ¥y2 - »ç¿ëÀÚ
°ø°£¿¡¼ 2¹øÂ°·Î ÁöÁ¤µÈ Point
y ÁÂÇ¥color2 - 2¹øÂ°·Î ÁöÁ¤µÈ Point
Color
NullPointerException - ¾î´ÀÂÊÀ̵ç 1°³ÀÇ Ä÷¯°¡ nullÀÎ °æ¿ì
public GradientPaint(Point2D pt1,
Color color1,
Point2D pt2,
Color color2)
GradientPaint °´Ã¼¸¦ ±¸ÃàÇÕ´Ï´Ù.
pt1 - »ç¿ëÀÚ
°ø°£¿¡¼ ÃÖÃÊ·Î ÁöÁ¤µÈ Pointcolor1 - ÃÖÃÊ·Î ÁöÁ¤µÈ Point
Colorpt2 - »ç¿ëÀÚ
°ø°£¿¡¼ 2¹øÂ°·Î ÁöÁ¤µÈ Pointcolor2 - 2¹øÂ°·Î ÁöÁ¤µÈ Point
Color
NullPointerException - ¾î´ÀÂÊÀ̵ç 1°³ÀÇ Ä÷¯ ¶Ç´Â Á¡ÀÌ nullÀÎ °æ¿ì
public GradientPaint(float x1,
float y1,
Color color1,
float x2,
float y2,
Color color2,
boolean cyclic)
boolean ÆÄ¶ó¹ÌÅÍ¿¡ ÀÀÇØ, ¼øÈ¯½Ä ¶Ç´Â ºñ¼øÈ¯½ÄÀÇ GradientPaint °´Ã¼¸¦ ±¸ÃàÇÕ´Ï´Ù.
x1 - »ç¿ëÀÚ
°ø°£¿¡¼ ÃÖÃÊ·Î ÁöÁ¤µÈ Point
x ÁÂÇ¥y1 - »ç¿ëÀÚ
°ø°£¿¡¼ ÃÖÃÊ·Î ÁöÁ¤µÈ Point
y ÁÂÇ¥color1 - ÃÖÃÊ·Î ÁöÁ¤µÈ Point
Colorx2 - »ç¿ëÀÚ
°ø°£¿¡¼ 2¹øÂ°·Î ÁöÁ¤µÈ Point
x ÁÂÇ¥y2 - »ç¿ëÀÚ
°ø°£¿¡¼ 2¹øÂ°·Î ÁöÁ¤µÈ Point
y ÁÂÇ¥color2 - 2¹øÂ°·Î ÁöÁ¤µÈ Point
Colorcyclic - ±×¶óµ¥ÀÌ¼ÇÆÄźÀÌ 2°³ÀÇ »öÀ» ¹Ýº¹ÇØ ¼øÈ¯ÇÏ´Â °æ¿ì´Â true, ±×·¸Áö ¾ÊÀº °æ¿ì´Â false
public GradientPaint(Point2D pt1,
Color color1,
Point2D pt2,
Color color2,
boolean cyclic)
boolean ÆÄ¶ó¹ÌÅÍ¿¡ ÀÀÇØ, ¼øÈ¯½Ä ¶Ç´Â ºñ¼øÈ¯½ÄÀÇ GradientPaint °´Ã¼¸¦ ±¸ÃàÇÕ´Ï´Ù.
pt1 - »ç¿ëÀÚ
°ø°£¿¡¼ ÃÖÃÊ·Î ÁöÁ¤µÈ Pointcolor1 - ÃÖÃÊ·Î ÁöÁ¤µÈ Point
Colorpt2 - »ç¿ëÀÚ
°ø°£¿¡¼ 2¹øÂ°·Î ÁöÁ¤µÈ Pointcolor2 - 2¹øÂ°·Î ÁöÁ¤µÈ Point
Colorcyclic - ±×¶óµ¥ÀÌ¼ÇÆÄźÀÌ 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 Standard Ed. 5.0 |
|||||||||
| ÀÌÀü Ŭ·¡½º ´ÙÀ½ Ŭ·¡½º | ÇÁ·¹ÀÓÀ¸·Î ÇÁ·¹ÀÓ ¾øÀÌ | |||||||||
| °³¿ä: NESTED | Çʵå | constructor | ¸Þ¼µå | »ó¼¼: Çʵå | »ý¼ºÀÚ | ¸Þ¼µå | |||||||||
Copyright 2004 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms . Documentation Redistribution Policy µµ ÂüÁ¶ÇϽʽÿÀ.