iOS Question Shadow inside canvas

Discussion in 'iOS Questions' started by Semen Matusovskiy, Jun 5, 2019.

  1. Semen Matusovskiy

    Semen Matusovskiy Well-Known Member Licensed User

    Hi, guys --

    Is it possible to draw the same shadow as in UIView ?
    I need this for customview. The object, which I want to shadow, takes a part of panel only.
     
    Last edited: Jun 5, 2019
  2. Star-Dust

    Star-Dust Expert Licensed User

    “If You Can Dream It, You Can Do It”. Walt Disney
     
  3. Erel

    Erel Administrator Staff Member Licensed User

    You can draw the shadow yourself. It should be similar to how you draw the "real" view.
     
  4. Semen Matusovskiy

    Semen Matusovskiy Well-Known Member Licensed User

    Erel --

    To draw with offset is not a problem.
    But, unlike MS-DOS, a shadow looks like complex combination of light/dark pixels. Meanwhile I see a possibility to use solid color only.
     
  5. Semen Matusovskiy

    Semen Matusovskiy Well-Known Member Licensed User

    Walt Disney was right. Surprise: GetBase.SetShadow works fine in CustomView. Each "object", created by
    canvas.DrawRectRounded, canvas.DrawCircle etc. has a shadow (exactly this I wanted). Meanwhile base panel is unchanged.


    1.PNG
     
  6. Star-Dust

    Star-Dust Expert Licensed User

    not for nothing that Disney has existed for 96 years
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice