Drawing shadow around Rounded Rectangle

115 views
Skip to first unread message

Orenge

unread,
Aug 8, 2022, 5:58:30 PM8/8/22
to Kivy users support
Hello, 

Is there a way to draw a shadow effect around a rounded rectangle with canvas Instructions? (Meaning garyish/black/slightly transparent pixels around this rounded rectangle, to be placed on a white screen)

class surface(Widget):
    def __init__(self, **kwargs):
        super().__init__(**kwargs)
        self.r = RoundedRectangle(size=self.size,pos=self.pos, radius=[18])
        with self.canvas:
            Color(1,0,0)
            self.r

Elliot Garbus

unread,
Aug 8, 2022, 8:56:55 PM8/8/22
to kivy-...@googlegroups.com

--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/dce43497-0c36-41db-b453-4ca83aa14dd3n%40googlegroups.com.

 

Reply all
Reply to author
Forward
0 new messages