Add a ShadowedRectangle item
Summary:
This adds a ShadowedRectangle item, which is a rectangle with a shadow.
It uses a custom shader that draws the rectangle and the shadow below it
using distance fields, which has significantly better performance compared
to the DropShadow effect. It also supports rounded corners, which the
current Card code does not.
This is a first step to moving more of AbstractCard and related items to
C++ code. Other bits will include a ShadowedImage item and moving actual
card code to C++.
Test Plan:
Screenshot of test program showing ShadowedRectangle, Rectangle with DropShadow effect and empty Kirigami Card.
Rounded corners.
Performance comparison:
The video at top is using Rectangle with DropShadow, the one below that ShadowedRectangle.
Reviewers: Kirigami, mart
Reviewed By: Kirigami, mart
Subscribers: mart, cblack, zzag, plasma-devel
Tags: Kirigami
Differential Revision: https://phabricator.kde.org/D27984