129 |
|
|
130 |
// Prepare the texture. |
// Prepare the texture. |
131 |
TexturePaint texture = |
TexturePaint texture = |
132 |
new TexturePaint(pattern2D, new Rectangle2D.Double(0., 0., 4., 2.)); |
new TexturePaint(pattern2D, new Rectangle2D.Double(0., 0., 4., 4.)); |
133 |
g2d.setPaint(texture); |
g2d.setPaint(texture); |
134 |
g2d.fillRect(x, y, w, h); |
g2d.fillRect(x, y, w, h); |
135 |
} |
} |
139 |
*/ |
*/ |
140 |
static void initializePattern(Color light, Color dark) |
static void initializePattern(Color light, Color dark) |
141 |
{ |
{ |
142 |
pattern2D = new BufferedImage(4, 4, BufferedImage.TYPE_INT_RGB); |
pattern2D = new BufferedImage(4, 4, BufferedImage.TYPE_INT_ARGB); |
143 |
lightColor = light; |
lightColor = light; |
144 |
darkColor = dark; |
darkColor = dark; |
145 |
Graphics g = pattern2D.getGraphics(); |
Graphics g = pattern2D.getGraphics(); |