modules/graphics/src/main/java/javafx/scene/effect/BoxBlur.java

Print this page




 259                 @Override
 260                 public void invalidated() {
 261                     markDirty(EffectDirtyBits.EFFECT_DIRTY);
 262                     effectBoundsChanged();
 263                 }
 264 
 265                 @Override
 266                 public Object getBean() {
 267                     return BoxBlur.this;
 268                 }
 269 
 270                 @Override
 271                 public String getName() {
 272                     return "iterations";
 273                 }
 274             };
 275         }
 276         return iterations;
 277     }
 278 
 279     private int getClampedWidth() {
 280         return Utils.clamp(0, (int) getWidth(), 255);
 281     }
 282 
 283     private int getClampedHeight() {
 284         return Utils.clamp(0, (int) getHeight(), 255);
 285     }
 286 
 287     private int getClampedIterations() {
 288         return Utils.clamp(0, getIterations(), 3);
 289     }
 290 
 291     @Override
 292     void impl_update() {
 293         Effect localInput = getInput();
 294         if (localInput != null) {
 295             localInput.impl_sync();
 296         }
 297 
 298         com.sun.scenario.effect.BoxBlur peer =
 299                 (com.sun.scenario.effect.BoxBlur) impl_getImpl();
 300         peer.setInput(localInput == null ? null : localInput.impl_getImpl());
 301         peer.setHorizontalSize(getClampedWidth());
 302         peer.setVerticalSize(getClampedHeight());
 303         peer.setPasses(getClampedIterations());
 304     }




 259                 @Override
 260                 public void invalidated() {
 261                     markDirty(EffectDirtyBits.EFFECT_DIRTY);
 262                     effectBoundsChanged();
 263                 }
 264 
 265                 @Override
 266                 public Object getBean() {
 267                     return BoxBlur.this;
 268                 }
 269 
 270                 @Override
 271                 public String getName() {
 272                     return "iterations";
 273                 }
 274             };
 275         }
 276         return iterations;
 277     }
 278 
 279     private float getClampedWidth() {
 280         return (float) Utils.clamp(0, getWidth(), 255);
 281     }
 282 
 283     private float getClampedHeight() {
 284         return (float) Utils.clamp(0, getHeight(), 255);
 285     }
 286 
 287     private int getClampedIterations() {
 288         return Utils.clamp(0, getIterations(), 3);
 289     }
 290 
 291     @Override
 292     void impl_update() {
 293         Effect localInput = getInput();
 294         if (localInput != null) {
 295             localInput.impl_sync();
 296         }
 297 
 298         com.sun.scenario.effect.BoxBlur peer =
 299                 (com.sun.scenario.effect.BoxBlur) impl_getImpl();
 300         peer.setInput(localInput == null ? null : localInput.impl_getImpl());
 301         peer.setHorizontalSize(getClampedWidth());
 302         peer.setVerticalSize(getClampedHeight());
 303         peer.setPasses(getClampedIterations());
 304     }