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

Profile: desktop, common

Overview

An effect that blends the two inputs together using one of the pre-defined BlendModes.

the code:

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

Group {
    content: [
        Rectangle {
            x: 0 y: 0 width: 180 height: 100
            fill: LinearGradient {
                startX: 0.0 startY: 0.0 endX: 0.25 endY: 0.25
                cycleMethod: CycleMethod.REFLECT
                stops: [
                    Stop { offset: 0.0 color: Color.RED },
                    Stop { offset: 1.0 color: Color.YELLOW }
                ]
            }
        },
        Text {
            effect: Blend {
                mode: BlendMode.SRC_OUT
                topInput: Flood {
                    paint: Color.BLUE
                    x: 10 y: 10
                    width: 160 height: 80
                }
            }
            x: 25 y: 65
            content: "SrcOut"
            fill: Color.BLUE
            font: Font.font(null, FontWeight.BOLD, FontPosture.ITALIC, 36);
        }
    ]
}

produces:

Profile: desktop

Variable Summary

accessnametypeCan ReadCan InitCan WriteDefault Valuedescription
publicbottomInputEffectnull

The bottom input for this Blend operation.

The bottom input for this Blend operation. 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  
publicmodeBlendModeSRC_OVER

The BlendMode used to blend the two inputs together.

The BlendMode used to blend the two inputs together.

       Min: n/a
       Max: n/a
   Default: BlendMode.SRC_OVER
  Identity: n/a
 

SRC_OVER  
publicopacityNumber1.0

The opacity value, which is modulated with the top input prior to blending.

The opacity value, which is modulated with the top input prior to blending.

       Min: 0.0
       Max: 1.0
   Default: 1.0
  Identity: 1.0
 

1.0  
publictopInputEffectnull

The top input for this Blend operation.

The top input for this Blend operation. 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  

Inherited Variables

Script Function Summary

public impl_getToolkitMode(mode: BlendMode) : com.sun.scenario.effect.Blend.Mode

Used by Group to convert the FX BlendMode enum value into a Decora value.

Used by Group to convert the FX BlendMode enum value into a Decora value.

Parameters
mode
Returns
Mode
 

Function Summary

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

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
 
public impl_add(node: Node) : Void
Parameters
node
 
public abstract impl_getImpl() : com.sun.scenario.effect.Effect
Returns
Effect
 
public impl_remove(node: Node) : Void
Parameters
node
 



Spec-Zone.ru - all specs in one place