Changeset 1163 for trunk/src/org/expeditee/gio
- Timestamp:
- 09/27/18 16:54:16 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/expeditee/gio/GraphicsSurfaceStack.java
r1142 r1163 5 5 import org.expeditee.core.Clip; 6 6 import org.expeditee.core.EnforcedClipStack; 7 import org.expeditee.core.EnforcedClipStack.EnforcedClipKey; 7 8 import org.expeditee.core.Image; 8 import org.expeditee.core.EnforcedClipStack.EnforcedClipKey;9 9 10 10 /** … … 63 63 */ 64 64 public void push(Image image) { 65 if (image == null) 65 if (image == null) { 66 66 return; 67 67 } 68 68 69 _currentSurface = getSurfaceFromImage(image); 69 70 _currentImage = image; … … 72 73 _imageStack.push(image); 73 74 _clipStackStack.push(_currentClipStack); 75 74 76 } 75 77 … … 79 81 */ 80 82 public Image pop() { 81 if (_surfaceStack.isEmpty()) 83 if (_surfaceStack.isEmpty()) { 82 84 return null; 85 } 83 86 84 87 Image oldTop = _imageStack.pop(); … … 115 118 public EnforcedClipKey pushClip(Clip clip) { 116 119 EnforcedClipKey key = _currentClipStack.push(clip); 117 if (key != null) 120 if (key != null) { 118 121 ensureClip(); 122 } 119 123 return key; 120 124 } … … 125 129 public Clip popClip(EnforcedClipKey key) { 126 130 Clip clip = _currentClipStack.pop(key); 127 if (clip != null) 131 if (clip != null) { 128 132 ensureClip(); 133 } 129 134 return clip; 130 135 } … … 142 147 /** Updates the root surface. Does not affect any stacked image surfaces. */ 143 148 public void setRootSurface(T rootSurface) { 144 if (_currentSurface == _rootSurface) 149 if (_currentSurface == _rootSurface) { 145 150 _currentSurface = rootSurface; 151 } 146 152 _rootSurface = rootSurface; 147 153
Note:
See TracChangeset
for help on using the changeset viewer.