pathfinder icon indicating copy to clipboard operation
pathfinder copied to clipboard

Implement more filter effects

Open Herschel opened this issue 4 years ago • 3 comments

Currently Pathfinder only supports blur. Pathfinder could support more of the filters from the SVG spec: https://www.w3.org/TR/SVG11/filters.html

Additionally, it'd be useful to support multiple filters simultaneously; currently Pattern only allows for a single filter. As a separate use case, Flash content allows for a color transform to be applied to any shape (mult * inColor + add) as well as various filter effects, such as blur and drop shadow. Multiple filters can be applied to a single object.

Herschel avatar Jul 16 '20 21:07 Herschel

Which filters does Flash need that aren't already implemented?

pcwalton avatar Jul 16 '20 21:07 pcwalton

Here's a list of all the filter effects Flash supports, along with the SVG counterpart:

  • BlurFilter (feGaussianBlur)
  • ColorMatrixFilter (feColorMatrix)
  • ConvolutionFilter (feConvolveMatrix)
  • DisplacementMapFilter (feDisplacementMap)
  • DropShadowFilter (feOffset, feGaussianBlur and friends)
  • GlowFilter (feGaussianBlur and friends)
  • BevelFilter (feDiffuseLighting and friends?)
  • GradientBevelFilter
  • GradientGlowFilter (source: https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/filters/package-detail.html) Blur, drop shadow, and glow are the most common. Some of the above would require a combination of several SVG effects.

The most important are color transforms, which were not technically a filter in Flash land and exist in most Flash content. These could be implemented using feColorMatrix.

Herschel avatar Jul 16 '20 22:07 Herschel

536cb4c0936cac9d3dcb03bee22335d8b5df257d implements color matrix.

pcwalton avatar Jul 28 '20 17:07 pcwalton