- Timestamp:
- 08/26/08 17:43:55 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/expeditee/gui/FrameGraphics.java
r278 r281 769 769 // Damaged areas pending to render. Accessessed by multiple threads 770 770 private static HashSet<Rectangle> damagedAreas = new HashSet<Rectangle>(); 771 772 /** The clip used while paiting */ 773 private static Area currentClip; 774 775 /** 776 * The current clip that is used for painting at this instant. 777 * 778 * Intention: for extra clipping within an items paint method - the clip is 779 * lost in the graphics object for which can be regained via this method. 780 * 781 * @return 782 * The current clip. Null if no clip (e.g. full screen render). 783 */ 784 public static Area getCurrentClip() { 785 return (currentClip != null) ? (Area)currentClip.clone() : null; 786 } 771 787 772 788 /** … … 832 848 return; 833 849 834 Area clip = null;850 currentClip = null; 835 851 if (useInvalidation) { // build clip 836 852 … … 839 855 840 856 for (Rectangle r : damagedAreas) { 841 if (c lip == null)842 c lip = new Area(r);857 if (currentClip == null) 858 currentClip = new Area(r); 843 859 else 844 c lip.add(new Area(r));860 currentClip.add(new Area(r)); 845 861 } 846 862 damagedAreas.clear(); … … 863 879 864 880 Frame[] toPaint = DisplayIO.getFrames(); 865 Image left = Paint(toPaint[0], c lip);866 Image right = Paint(toPaint[1], c lip);881 Image left = Paint(toPaint[0], currentClip); 882 Image right = Paint(toPaint[1], currentClip); 867 883 868 884 Graphics dg = _DisplayGraphics.create();
Note:
See TracChangeset
for help on using the changeset viewer.