Changeset 1163


Ignore:
Timestamp:
09/27/18 16:54:16 (6 years ago)
Author:
bln4
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/expeditee/gio/GraphicsSurfaceStack.java

    r1142 r1163  
    55import org.expeditee.core.Clip;
    66import org.expeditee.core.EnforcedClipStack;
     7import org.expeditee.core.EnforcedClipStack.EnforcedClipKey;
    78import org.expeditee.core.Image;
    8 import org.expeditee.core.EnforcedClipStack.EnforcedClipKey;
    99
    1010/**
     
    6363         */
    6464        public void push(Image image) {
    65                 if (image == null)
     65                if (image == null) {
    6666                        return;
    67 
     67                }
     68               
    6869                _currentSurface = getSurfaceFromImage(image);
    6970                _currentImage = image;
     
    7273                _imageStack.push(image);
    7374                _clipStackStack.push(_currentClipStack);
     75               
    7476        }
    7577
     
    7981         */
    8082        public Image pop() {
    81                 if (_surfaceStack.isEmpty())
     83                if (_surfaceStack.isEmpty()) {
    8284                        return null;
     85                }
    8386
    8487                Image oldTop = _imageStack.pop();
     
    115118        public EnforcedClipKey pushClip(Clip clip) {
    116119                EnforcedClipKey key = _currentClipStack.push(clip);
    117                 if (key != null)
     120                if (key != null) {
    118121                        ensureClip();
     122                }
    119123                return key;
    120124        }
     
    125129        public Clip popClip(EnforcedClipKey key) {
    126130                Clip clip = _currentClipStack.pop(key);
    127                 if (clip != null)
     131                if (clip != null) {
    128132                        ensureClip();
     133                }
    129134                return clip;
    130135        }
     
    142147        /** Updates the root surface. Does not affect any stacked image surfaces. */
    143148        public void setRootSurface(T rootSurface) {
    144                 if (_currentSurface == _rootSurface)
     149                if (_currentSurface == _rootSurface) {
    145150                        _currentSurface = rootSurface;
     151                }
    146152                _rootSurface = rootSurface;
    147153
Note: See TracChangeset for help on using the changeset viewer.