Changeset 181 for trunk/src/org/expeditee/gui/FrameGraphics.java
- Timestamp:
- 08/01/08 16:38:58 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/expeditee/gui/FrameGraphics.java
r176 r181 250 250 251 251 private static Image Paint(Frame toPaint, Area clip) { 252 return Paint(toPaint, clip, true );252 return Paint(toPaint, clip, true, true); 253 253 } 254 254 … … 261 261 * @return 262 262 */ 263 private static Image Paint(Frame toPaint, Area clip, boolean isActualFrame ) {263 private static Image Paint(Frame toPaint, Area clip, boolean isActualFrame, boolean createVolitile) { 264 264 if (toPaint == null) 265 265 return null; … … 271 271 GraphicsEnvironment ge = GraphicsEnvironment 272 272 .getLocalGraphicsEnvironment(); 273 if (!isActualFrame) { 273 if (createVolitile) { 274 buffer = ge.getDefaultScreenDevice() 275 .getDefaultConfiguration() 276 .createCompatibleVolatileImage(_MaxSize.width, 277 _MaxSize.height); 278 } else { 274 279 buffer = new BufferedImage(_MaxSize.width, _MaxSize.height, 275 280 BufferedImage.TYPE_INT_ARGB); 276 } else {277 buffer = ge.getDefaultScreenDevice()278 .getDefaultConfiguration()279 .createCompatibleVolatileImage(_MaxSize.width,280 _MaxSize.height);281 281 } 282 282 toPaint.setBuffer(buffer); … … 297 297 Color backgroundColor = null; 298 298 // Need to allow transparency for frameImages 299 if (!isActualFrame) { 299 if (createVolitile) { 300 backgroundColor = toPaint.getPaintBackgroundColor(); 301 }else{ 300 302 backgroundColor = toPaint.getBackgroundColor(); 301 303 if (backgroundColor == null) 302 304 backgroundColor = Item.TRANSPARENT; 303 } else {304 backgroundColor = toPaint.getPaintBackgroundColor();305 305 } 306 306 … … 399 399 paintedFillsAndLines); 400 400 // TODO if we can get transparency with FreeItems.getInstance()... 401 // then text can 402 // be done before freeItems 401 // then text can be done before freeItems 403 402 PaintNonLinesNonPicture(bg, paintItems); 404 403 … … 732 731 */ 733 732 734 public static void UpdateBuffer(Frame toUpdate, boolean paintOverlays) { 733 public static void UpdateBuffer(Frame toUpdate, boolean paintOverlays, boolean useVolitile) { 734 toUpdate.setBuffer(getBuffer(toUpdate, paintOverlays, useVolitile)); 735 } 736 737 public static Image getBuffer(Frame toUpdate, boolean paintOverlays, boolean useVolitile){ 735 738 if (toUpdate == null) 736 return; 737 738 Image vi = Paint(toUpdate, null, paintOverlays); 739 toUpdate.setBuffer(vi); 739 return null; 740 741 return Paint(toUpdate, null, paintOverlays, useVolitile); 740 742 } 741 743
Note:
See TracChangeset
for help on using the changeset viewer.