Package dev.avelar.mapnik
Class ImageFilters
java.lang.Object
dev.avelar.mapnik.ImageFilters
Builds the text for
Image.filter(String...), the same syntax as the image-filters
style attribute. Filters run in the order given: Image.filter(ImageFilters.blur(), ImageFilters.gray()).-
Method Summary
Modifier and TypeMethodDescriptionstatic Stringblur()static Stringstatic Stringstatic Stringstatic StringcolorToAlpha(Color color) static StringcolorToAlpha(String color) Make this colour transparent.static Stringstatic Stringemboss()static Stringgray()Greyscale.static Stringinvert()Invert the colours, keeping alpha.static StringscaleHsla(double h0, double h1, double s0, double s1, double l0, double l1, double a0, double a1) Shift hue, saturation, lightness and alpha.static Stringsharpen()static Stringsobel()static StringstackBlur(int radiusX, int radiusY) A smoother blur; radii are in pixels.static Stringstatic String
-
Method Details
-
blur
-
stackBlur
A smoother blur; radii are in pixels. -
sharpen
-
emboss
-
edgeDetect
-
sobel
-
xGradient
-
yGradient
-
gray
Greyscale. -
invert
Invert the colours, keeping alpha. -
colorBlindProtanope
-
colorBlindDeuteranope
-
colorBlindTritanope
-
colorToAlpha
Make this colour transparent. Accepts any colour string. -
colorToAlpha
-
scaleHsla
public static String scaleHsla(double h0, double h1, double s0, double s1, double l0, double l1, double a0, double a1) Shift hue, saturation, lightness and alpha. Each pair is the range the channel is mapped to, from 0 to 1, for examplescaleHsla(0, 1, 0, 0.5, 0, 1, 0, 1)halves the saturation.
-