Class: DropShadow

OM.visualfilter. DropShadow


new DropShadow(config)

This class represents a drop shadow that can be applied to vector layers.

Parameters:
Name Type Description
config Object

Configuration for drop shadow. It can have these
attributes:


  • angle {int} The direction toward which the shadow is cast
    (in degrees: [0, 360], clockwise). The default value is 45.

  • color {String} The color of the shadow. The string format is "#RRGGBB"

  • knockout {Boolean} If knockout is true, then the object to which the shadow
    effect is applied knocks out the shadow where it overlaps, allowing the
    background to show through.

  • offset {float} The offset between the casted shadow and the object (in pixels).
    The value should be a positive value. Default value is 2.

  • opacity {float} The opacity of the shadow. A number between 0 and 1.
    Default value is 0.5

  • radius {float} Defines how hazy, or how blurry, the drop shadow is.
    Default value is 2.

  • applyToLayer {boolean} When true, the filter is applied to the layer as a
    whole. When false, the filter is applied to the individual features. Default is true.

Returns:

An instance of OM.effect.DropShadow

Type
OM.effect.DropShadow

Extends