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

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: desktop

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 &nbsp;
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 &nbsp;
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 &nbsp;
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 &nbsp;

Inherited Variables

Function Summary

public impl_getImpl() : com.sun.scenario.effect.Effect
Returns
Effect
&nbsp;

Inherited Functions

javafx.scene.effect.Effect

public getAccelType(config: java.lang.Object) : java.lang.String

Returns a String representing the type of hardware acceleration, if any, that is used when applying this Effect on the given GraphicsConfiguration.

Returns a String representing the type of hardware acceleration, if any, that is used when applying this Effect on the given GraphicsConfiguration. This method is intended for informational or debugging purposes only.

Parameters
config
Returns
String
&nbsp;
public impl_add(node: Node) : Void
Parameters
node
&nbsp;
public abstract impl_getImpl() : com.sun.scenario.effect.Effect
Returns
Effect
&nbsp;
public impl_remove(node: Node) : Void
Parameters
node
&nbsp;



Spec-Zone.ru - all specs in one place