Spec-Zone .ru
спецификации, руководства, описания, API

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

expand all

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: common conditional effect

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

Function Summary

Inherited Functions

javafx.scene.effect.Effect