Color, Radius, Offset, Spread

Melatonin Blur comes with a test suite that verifies compatibility with design programs like Figma and CSS.

It’s not pixel-to-pixel accurate to each program (Figma and Adobe XD use cheaper blurs than CSS), but the feature set and behavior should be the same.

You can specify the color, radius, offset and spread of each blur, constructing them in that order:

auto color = juce::Colours::black;
int radius = 8;
juce::Point<int> offset = { 4, 4 };
int spread = 10;
melatonin::DropShadow shadow = { color, radius, offset, spread };

Or simply:

melatonin::DropShadow shadow = { juce::Colours::black, 8, { 4,4 }, 10 };

Leave a Reply

Your email address will not be published. Required fields are marked *