Top Description Fields Constructors Methods
com.sun.scenario.effect

public abstract Class DelegateEffect

extends Effect
Class Inheritance
Known Direct Subclasses
com.sun.scenario.effect.DropShadow, com.sun.scenario.effect.GeneralShadow, com.sun.scenario.effect.Glow, com.sun.scenario.effect.InnerShadow, com.sun.scenario.effect.Bloom
Imports
com.sun.javafx.geom.Point2D, .BaseBounds, .DirtyRegionContainer, .DirtyRegionPool, .Rectangle, com.sun.javafx.geom.transform.BaseTransform

The implementation base class for Effect subclasses that delegate their operations to a tree of other Effect implementations.

Field Summary

Inherited from com.sun.scenario.effect.Effect:
DefaultInput

Constructor Summary

AccessConstructor and Description
protected
protected
DelegateEffect(Effect input1, Effect input2)

Method Summary

Modifier and TypeMethod and Description
public ImageData
filter(FilterContext fctx, BaseTransform transform, Rectangle outputClip, Object renderHelper, Effect defaultInput)

Implements abstract com.sun.scenario.effect.Effect.filter.

Applies this filter effect to the series of images represented by the input Effects and/or the given defaultInput viewed under the given transform.

public Effect.AccelType
getAccelType(FilterContext fctx)

Implements abstract com.sun.scenario.effect.Effect.getAccelType.

Returns one of the AccelType values, indicating whether this Effect is accelerated in hardware for the given FilterContext.

public BaseBounds
getBounds(BaseTransform transform, Effect defaultInput)

Implements abstract com.sun.scenario.effect.Effect.getBounds.

Returns the bounding box that will be affected by this filter operation when viewed under the specified transform, given its list of input Effects and the specified defaultInput effect.

protected abstract Effect

Returns:

the Effect object to delegate to.
getDelegate
()

Returns the Effect object to delegate all operations to.

public DirtyRegionContainer
getDirtyRegions(Effect defaultInput, DirtyRegionPool regionPool)

Overrides com.sun.scenario.effect.Effect.getDirtyRegions.

Returns the dirty region container containing dirty regions affected by this filter operation.

public boolean
reducesOpaquePixels()

Implements abstract com.sun.scenario.effect.Effect.reducesOpaquePixels.

Whether an opacity for any pixel is different (lower) than the corresponding pixel in the default input.

public Point2D
transform(Point2D p, Effect defaultInput)

Overrides com.sun.scenario.effect.Effect.transform.

Transform the specified point p from the coordinate space of the primary content input to the coordinate space of the effect output.

public Point2D
untransform(Point2D p, Effect defaultInput)

Overrides com.sun.scenario.effect.Effect.untransform.

Transform the specified point p from the coordinate space of the output of the effect into the coordinate space of the primary content input.

Inherited from com.sun.scenario.effect.Effect:
combineBoundscombineBoundscreateCompatibleImageensureTransformgetCompatibleImagegetDefaultedInputgetDefaultedInputgetInputsgetNumInputsgetResultBoundsgetStatereleaseCompatibleImagesetInputtransformBounds

Constructor Detail

DelegateEffectback to summary
protected DelegateEffect(Effect input)
DelegateEffectback to summary
protected DelegateEffect(Effect input1, Effect input2)

Method Detail

filterback to summary
public ImageData filter(FilterContext fctx, BaseTransform transform, Rectangle outputClip, Object renderHelper, Effect defaultInput)

Implements abstract com.sun.scenario.effect.Effect.filter.

Doc from com.sun.scenario.effect.Effect.filter.

Applies this filter effect to the series of images represented by the input Effects and/or the given defaultInput viewed under the given transform. The filter does not need to create pixel data for any pixels that fall outside of the destination device-space (pixel) bounds specified by the outputClip Rectangle.

The filter might be able to use the renderHelper object to render the results directly on its own if the object is not null and implements an interface, such as ImageHelper, that the filter recognizes. If the effect renders itself then it will return a null for the ImageData result.

Note that the ImageData object returned by this method must be validated prior to use with ImageData#validate(com.sun.scenario.effect.FilterContext) method.

      boolean valid;

      do {
          ImageData res = filter(fctx, transform, clip, renderer, defaultInput);
          if (res == null) {
              break;
          }
          if (valid = res.validate(fctx)) {
              // Render res.getImage() to the appropriate destination
              // or use it as an input to another chain of effects.
          }
          res.unref();
      } while (!valid);
      

Annotations
@Override
getAccelTypeback to summary
public Effect.AccelType getAccelType(FilterContext fctx)

Implements abstract com.sun.scenario.effect.Effect.getAccelType.

Doc from com.sun.scenario.effect.Effect.getAccelType.

Returns one of the AccelType values, indicating whether this Effect is accelerated in hardware for the given FilterContext.

Annotations
@Override
getBoundsback to summary
public BaseBounds getBounds(BaseTransform transform, Effect defaultInput)

Implements abstract com.sun.scenario.effect.Effect.getBounds.

Doc from com.sun.scenario.effect.Effect.getBounds.

Returns the bounding box that will be affected by this filter operation when viewed under the specified transform, given its list of input Effects and the specified defaultInput effect. Note that the returned bounds can be smaller or larger than one or more of the inputs.

Annotations
@Override
getDelegateback to summary
protected abstract Effect getDelegate()

Returns the Effect object to delegate all operations to.

Returns:Effect

the Effect object to delegate to.

getDirtyRegionsback to summary
public DirtyRegionContainer getDirtyRegions(Effect defaultInput, DirtyRegionPool regionPool)

Overrides com.sun.scenario.effect.Effect.getDirtyRegions.

Doc from com.sun.scenario.effect.Effect.getDirtyRegions.

Returns the dirty region container containing dirty regions affected by this filter operation.

Annotations
@Override
reducesOpaquePixelsback to summary
public boolean reducesOpaquePixels()

Implements abstract com.sun.scenario.effect.Effect.reducesOpaquePixels.

Doc from com.sun.scenario.effect.Effect.reducesOpaquePixels.

Whether an opacity for any pixel is different (lower) than the corresponding pixel in the default input. It is always safe to return true from this method, though the consequences may be that the caller chooses to not utilize a planned optimization.

Annotations
@Override
transformback to summary
public Point2D transform(Point2D p, Effect defaultInput)

Overrides com.sun.scenario.effect.Effect.transform.

Doc from com.sun.scenario.effect.Effect.transform.

Transform the specified point p from the coordinate space of the primary content input to the coordinate space of the effect output. In essence, this method asks the question "Which output coordinate is most affected by the data at the specified coordinate in the primary source input?"

The definition of which input represents the primary content input and how the coordinate space of that input compares to the coordinate space of the result varies from effect to effect. Note that some effects may have a reasonable definition of how to map source coordinates to destination coordinates, but not the reverse. In particular, effects which map source coordinates discontiguously into the result may have several output coordinates that are affected by a given input coordinate and may choose to return one of many equally valid answers, or an undefined result such as NaN, or some other anomalous value. Most effects perform simple transformations of the color of each pixel and so represent an identity transform and return the point unchanged.

Annotations
@Override
untransformback to summary
public Point2D untransform(Point2D p, Effect defaultInput)

Overrides com.sun.scenario.effect.Effect.untransform.

Doc from com.sun.scenario.effect.Effect.untransform.

Transform the specified point p from the coordinate space of the output of the effect into the coordinate space of the primary content input. In essence, this method asks the question "Which source coordinate contributes most to the definition of the output at the specified coordinate?"

The definition of which input represents the primary content input and how the coordinate space of that input compares to the coordinate space of the result varies from effect to effect. Note that some effects may have a reasonable definition of how to map destination coordinates back to source coordinates, but not the reverse. In particular, effects which produce entirely synthetic results not based on any content input may not be able to give a meaningful result to this query and may return undefined coordinates such as 0, Infinity, or NaN. Most effects perform simple transformations of the color of each pixel and so represent an identity transform and return the point unchanged.

Annotations
@Override