85 |
private RenderingHints hints; |
private RenderingHints hints; |
86 |
private BufferedImage bimage; |
private BufferedImage bimage; |
87 |
|
|
88 |
|
private Composite comp; |
89 |
|
|
90 |
private Stack stateStack; |
private Stack stateStack; |
91 |
|
|
92 |
native private void initState (GtkComponentPeer component); |
native private void initState (GtkComponentPeer component); |
270 |
private Shape clip; |
private Shape clip; |
271 |
private AffineTransform transform; |
private AffineTransform transform; |
272 |
private Font font; |
private Font font; |
273 |
|
private Composite comp; |
274 |
DrawState (GdkGraphics2D g) |
DrawState (GdkGraphics2D g) |
275 |
{ |
{ |
276 |
this.paint = g.paint; |
this.paint = g.paint; |
281 |
if (g.transform != null) |
if (g.transform != null) |
282 |
this.transform = (AffineTransform) g.transform.clone(); |
this.transform = (AffineTransform) g.transform.clone(); |
283 |
this.font = g.font; |
this.font = g.font; |
284 |
|
this.comp = g.comp; |
285 |
} |
} |
286 |
public void restore(GdkGraphics2D g) |
public void restore(GdkGraphics2D g) |
287 |
{ |
{ |
292 |
g.clip = this.clip; |
g.clip = this.clip; |
293 |
g.transform = this.transform; |
g.transform = this.transform; |
294 |
g.font = this.font; |
g.font = this.font; |
295 |
|
g.comp = this.comp; |
296 |
} |
} |
297 |
} |
} |
298 |
|
|
776 |
|
|
777 |
public void setColor (Color c) |
public void setColor (Color c) |
778 |
{ |
{ |
779 |
|
if (c == null) |
780 |
|
c = Color.BLACK; |
781 |
|
|
782 |
fg = c; |
fg = c; |
783 |
paint = c; |
paint = c; |
784 |
cairoSetRGBColor (fg.getRed() / 255.0, |
cairoSetRGBColor (fg.getRed() / 255.0, |
1267 |
|
|
1268 |
public void setComposite(Composite comp) |
public void setComposite(Composite comp) |
1269 |
{ |
{ |
1270 |
|
this.comp = comp; |
1271 |
|
|
1272 |
if (comp instanceof AlphaComposite) |
if (comp instanceof AlphaComposite) |
1273 |
{ |
{ |
1274 |
AlphaComposite a = (AlphaComposite) comp; |
AlphaComposite a = (AlphaComposite) comp; |
1355 |
|
|
1356 |
public Composite getComposite() |
public Composite getComposite() |
1357 |
{ |
{ |
1358 |
throw new java.lang.UnsupportedOperationException (); |
if (comp == null) |
1359 |
|
return AlphaComposite.SrcOver; |
1360 |
|
else |
1361 |
|
return comp; |
1362 |
} |
} |
1363 |
|
|
1364 |
public FontRenderContext getFontRenderContext () |
public FontRenderContext getFontRenderContext () |