Skip to content
Commit bffe8faa authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

[libbreezecommon] Add box shadow helper

Summary:
Box shadow helper is a helper which draws box shadows, similar to CSS box-shadow property. The only thing it's missing is the spread property but we don't need it pretty much.

Demo

Let's draw a box shadow for the rect QRect(300, 200, 200, 200) with the following params:
* blur radius: 96
* vertical offset: 50
* color: black

```lang=cpp
Breeze::BoxShadowHelper::boxShadow(
    &painter,
    QRect(300, 200, 200, 200),
    QPoint(0, 50),
    96,
    QColor(0, 0, 0));
```
// the size of the canvas is QSize(800, 600) //

{F5754369, layout=center, size=full}

Reviewers: #breeze, #vdg, hpereiradacosta

Reviewed By: #vdg, hpereiradacosta

Subscribers: ngraham, broulik, abetts, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D11198
parent 50f176b2
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment