JavaFX: Bringing Rich Experiences To All the Screens Of Your Life

expand all

Profile: desktop, common

Overview

A blur effect using a simple box filter kernel, with separately configurable sizes in both dimensions, and an iteration parameter that contols the quality of the resulting blur.

the code:

import javafx.scene.*;
import javafx.scene.text.*;
import javafx.scene.paint.*;
import javafx.scene.effect.*;

Text {
effect: BoxBlur { width: 15 height: 15 iterations: 3 }
cache: true
x: 10 y: 40
content: "Blurry Text"
fill: Color.RED
font: Font.font(null, FontWeight.BOLD, 36);
}

produces:

Profile: common conditional effect

Variable Summary

accessnametypeCan ReadCan InitCan WriteDefault Valuedescription
publicheightNumber5.0

The vertical dimension of the blur effect.

The vertical dimension of the blur effect. The color information for a given pixel will be spread across a Box of the indicated height centered over the pixel. Values less than or equal to 1 will not spread the color data beyond the pixel where it originated from and so will have no effect.

       Min:   0.0
       Max: 255.0
   Default:   5.0
  Identity:  <1.0
 

5.0  
publicinputEffectnull

The input for this Effect.

The input for this Effect. If set to null, or left unspecified, a graphical image of the Node to which the Effect is attached will be used as the input.

null  
publiciterationsInteger1

The number of times to iterate the blur effect to improve its "quality" or "smoothness".

The number of times to iterate the blur effect to improve its "quality" or "smoothness". Iterating the effect 3 times approximates the quality of a Gaussian Blur to within 3%.

       Min:   0
       Max:   3
   Default:   1
  Identity:   0
 

1  
publicwidthNumber5.0

The horizontal dimension of the blur effect.

The horizontal dimension of the blur effect. The color information for a given pixel will be spread across a Box of the indicated width centered over the pixel. Values less than or equal to 1 will not spread the color data beyond the pixel where it originated from and so will have no effect.

       Min:   0.0
       Max: 255.0
   Default:   5.0
  Identity:  <1.0
 

5.0  

Inherited Variables

Function Summary

Inherited Functions

javafx.scene.effect.Effect




Spec-Zone.ru - all specs in one place