Need help with painting routines



  • I could need some help with this problem I have
    I've made a meny panel in the form of a circle, everything works fine, it will update the number of slices depending on how many items I want to have in the menu.
    So my problem is that only a portion of the panel is occupied of the circle and I don't want the "not occupied" areas to be visible in the GUI.
    So I have to have the "opaque" setting disabled.
    The problem is that my background in the GUI will show through the panel, I just can't figure out how to make only the slices opaque.

    this is how it looks like when opaque is enabled, so everything outside the "Menu" circle is visible, which I don't want it to be
    Skärmavbild 2020-01-21 kl. 23.45.20.png

    and this is how it looks like when opaque is disabled,
    Skärmavbild 2020-01-21 kl. 23.45.41.png

    If anybody knows what I'm doing wrong here, I would be grateful for some tips 🙂

    this is the snippet

    HiseSnippet 2347.3ocwY01aaibDlxw5Psa806.JtOuPeHfxwRlR9c33qNwubwnwItw47U.CiCqIWIsvTb4QtxRpAFEn+xxOo9OnclcIEWRQY631fRDyHN6ry9LuryN6tmEIbYwwhHqJK7wwgLqJ+gpmONP16fdTdf0IGZUYopGvib8YjSYACrd83PZbLyypRkm8SHKUVXdK0y+5O+ZpOMvkkQxx5BA2k8VdetLi5Y6+W399GS8Xej22f602+DWQvABew..NOqpiUH08FZW16nHayU0px2bjGWJhNWRkrXqJy+Zg23y6IFFn4+BdL+ZeF9QKqyAAoIerv2CQLR05fdbeuyRU6XKPJmkYDdl1H7mpdJ2iOgdlw36TMPx5go8nxb2G7ZYBOmGO7pX.u40v66qdtaDOTl0Bhsee0SBjrnNTvEXBKMuVy8W+gpGH.NBjM6SugcbD7wjdXuoiyJjMbbpu6RKtzh.iwBeVSvuSir0zVcUBIITnODJP5HhHqQjBRq1jXevOGSHMlwyRKBt1XI4VZThLvnIxdjTD0kIOPzOTD.eXWKikZoiMfoIDa5Qkzl2R8Gv.Q7o61c5F6ItkEAM5Lq1NIviMBXnQqIJ24ZkvUCoYqLFZUl9vkr9wf7tr1EB+A8Y0VgT6nQgQf+gKBvu9.CF1qweohgN3.7mWv7Etb43ZWofQAnPC55il07XQOrIsAi3UEbOJSaHMf4SNCBbkePLPxCX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POV398UOiKc6UNdmqD7ByA9Zi2j6TaopG0oCyUlA14qd7e6q+EnYou2htPEhQbH9t56Fz+bHvvkAHI.lEf4sf.BrqpucvuQKy4v9NUefS9RZrE9ckjFak1nUepaj3Wc04kvas62on.XJPc4kKT8T7aRqzjQUqB6Z1pO2i+qttnonAf8x6S6mPeV6Izm0eB8YimPe17IzmsdB8Y66sO3cv8pARQe8zDfvYGoVTnRkiBvaxQEQZ8e.QJQ.8A
    


  • @ulrik so basically you need to not draw the background, then draw each segment. grey for the selected one and black for the unselected ones.



  • @Lindon Ok, I see what you mean, however I have set it up to draw triangles and then I mask the triangels outside of the circle, I thought that should work as well..hm....



  • @ulrik can you not just draw them as very wide arcs?



  • @Lindon could you post an example?



  • @ulrik the vector knob from the documentation shows you how to draw an arc I think.



  • @Lindon Yeah, that's right, thank you, I guess I have to redo it then if that's the only way to go.



  • @ulrik dunno if there are other ways - but that's where I would start.





  • @Lindon There was another way, I just had to change this

    g.beginLayer(true);
    

    to

    g.beginLayer(false);
    

    and then it works as I want 🙂

    HiseSnippet 2350.3ocwY8taaiiDWJsdQStK2sKvg8yD9CExswNxNNoIHM6l17msAWSaPS1rGPZvBFIZahJKZHQGaeEA3dttOcOD2Cx8Fr2LjRVTxxIo4thUHVQjb3veye3vgjmDI7XwwhHK6EOax.lk8erxoSBk81qGkGZcz9V1KWYOdjW.ibLKbn0qmLfFGy7srsezOgjXu3isTO+me70z.ZnGKqJKqyEbO1a484xrZOY2+JOH3PpO6LdeCpau6Qdhv8DAhg.bdTEWqATuOQ6xdGEIagJV1eyA9boH5TIUxhsre7qE9SNsmXTnl9y4w7qBXXglVmBLRW8gh.eDwXsV60iG3eRpXGaAb4jLkvizJg+Rki497o0moL9VUCjrdXpOrW31fWSS34d+gmsA7drFdeWkS8h3CjYsfX6OT4nPIKpCELAlvRSq0BO46qrm.nHT1nO8SrCifBS6gyFttqPV20s11KuzxKADFKBXM.6NMxQW2pqRHItB8AWARGQDYMhTPZ1hDG.14XBo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VXDlqHnwr+21VV8ToFhk9mPorsigf9ie7i+F1AiMogUuxJqnp1x.UKeuTGYX5eb1tFX586lfojJ9WQ6lhqrZhoWCqrdRDCbf0lJv8ULJ0IFTe+4JuJHfjUQdoA3hB1Y6FDQW6Va0dqMdQqsV2J6vQxP1y1McqIHKbbbJSg7l27FsBY1q43aqbrvGSsI+MvfW6TRCf2dtq5.uNivXtbh40R8U4ZYtuv86pbBW50qb7tPI3E7t+Zi2jK4Z4JGzoCySlA1GW4v+1W+azxReQBcgb+h3fWck2Mr+of6fGCPRH36iQjrW.minK6hkQMyovNJUEvnAIM1DKamzXyzFs5S8hD+pmNhCdMZOQUCfoP0sItXkiwxjlogYpTA1QrUetO+W87PUQc.6k2mVOf9r1CnOse.8Y8GPe13AzmW7.5yl2ZevKE6UCkh95oIPEmbfJbus8Ag3Uqn7Hs9u.EES5fC
    

    CircleMenu.gif



  • @ulrik great! - nice looking UI object by the way..



  • @Lindon thank you!


Log in to reply
 

10
Online

590
Users

2.3k
Topics

18.2k
Posts