rectangular triangle?



  • How can I use the Paint routine "fillTriangle" to create this triangle "A" (rectangular).
    I only get this to "B" (isosceles)?

    Bildschirmfoto 2021-06-05 um 20.19.33.png



  • You have two options:

    1. Rotate the canvas before calling the method, then make sure that the third point makes Pythagoras happy
    2. Create a path and build the triangle yourself.


  • Door number 3: Use an SVG



  • Well - simply anyone can 🙂

    Thanks guys



  • @MikeB
    Is This What You Want?

    HiseSnippet 928.3ocsV00aaaCEkxIpn1sYXEn+.H7Sx.ttTYMoEnXXN1IdvnMoF0dEcnXnfQh1hHRjBTzM0nn+21Oo8zdc6RQIKkFujTCLZCae+3Pc3k7dnmnjArrLoB4zb1pTFx4gtSWIzQCinbAZ7wHmev8TZllovVWCVkRyxXgHGmc9UiCml6hxG+0uLfFSEArJWHz6j7.1q4Ibck2I8eEONdDMjMimTK6m0ebfTLTFKWB7YGWBJkFbAcA6LpIsFtHm6cRHWKUS0TMKC4r6.Y3poQxKE17eGOiedLyX3ilBSj08HYbngwFungQ73vIkq6LDLKSppB6XqBO18TdHes+ppwOlG.Wgnd8vowMQO+amdjMQOmZzaWK8dj6z.EOUWEwvsG3NV.aTyovVPcZYyE03ua3NTBYHz8RnWvFo.i0H7NjP5hOfP57x8ZYdAaEYZ7mnJ7DpfE6i+YbI5EL8PYRpT.FdssgaWhy7x5pWFSOAJb52JWp4Bl27kh.MWJ7VzYuVeAaxDCiElDsa6d1ux5cIWGcTbZD0i79QEitX+dDBti4IYv8zmhmISwyTbpXQLqbxlCGtJ848AXQAu22r37Ij+n6oTcTOs7szPHiLO+WPf4CudBGH0ZYxsOm9jZebsYkrli0+71Wmj7w2tNywMRZp0GAbHtMrdNzVtKKCbcLKqL6PE8xih4KDrvYrOaP0t6G1Gl1m77RRuugz31AvFnhE1t5IcMrC.r.fCO3+BY913W67xxMWrTblTydivqSquzpYqu1B+sglOeiwLGuTx3XlZigMhEpaBnmXYx4LUW3Pa7R15Dgtlq1Vdu6VaYf8zdsDkhwBt9MorB6aVWAUzt.+52FeLUSM8xE9f7RYJM2PGmiYeBDIsc1McOlkcgVllmaQOFPYcdz8J66M8WHN7nuuqsWC8405n8k8Ws13OOu+k7PcTkJ6u2OhwWDUSOl2GccIFPnSFtLlpup5mQxuH.T6uhLiQJQjw0qpekv2gjH4NqXeWo6ibmv0AQaluM1.egcn+u4awEL64dx74r.cEY20cz621aS9NnhUKdAHXo3vYF2yVlLEThBX.SDvII3A45zvb50ZSL1lJyTlHL23efQQPeisSQP+xfnDZfR9w.aWo4Jr6m6A3jH+l7lveo.rw9n7NU.mKoGAk.2r9wf.So3I.22Ll82BL+zVf4YaAlC1BLGtEXd9Vf4E2HFyep4nkvMe11DvwjSxkrbbNQPgSY4mHQ+K+cgrFB
    
    


  • @Natan said in rectangular triangle?:

    after 5 hours in front of the computer you can't even think of such simple things anymore
    I'm getting too old for this shi... 🙂

    thank you very much Natan



  • @MikeB No Problem 👏 Glad To Help
    Learn To Use Svg Paths, With That You Can Do All Your Shape Ideas From Adobe Illustrator To Hise, Easily.

    Have a Great Day Sir. 👏



  • @Natan
    Now I have to bother you again

    I try to create a MouseCallback that colors my white triangle on mouse click in green
    and execute a function.

    I can only find complicated multistate examples here

    Do you have a small hint?



  • @MikeB Made from @Natan's snippet:

    Toggle version:

    HiseSnippet 1132.3ocsV0uaaaCDmJIZq1adXEXO.b9elLPppbVSZwJFpisiGL1RhQcVPGJJJXjnsHBMofHcbMBx61dF1SxdC1NJJYo74J7PjsLLOd+N9i2G73nTYHUojoHmZmrLghb9Z2wKE53dwDl.MrOx4abOjnzzTrUT2kIDkhFgbb17WLBbpsEJ64ueSWBmHBokhPnSkrP5uwlwzkRG04WYb9.RD8D1rJZ+hNCCkhdRtbNvmMcCPIjvyISoGQLpsgKx4KNHhokoi0DMUgb1pqLZ43X4BgU+SYJ1YbpYPazXvPVwCj7HCiMRQ8hY7nQE6aEBrxnRuvlVuv24dHKhsRdo23ayl.Whnp+vYiGhdsqRufOe54TgdaYo2ScGGlxRzkyX31W4NT.ApIDH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bZXlhYKS5lGNMyv4wU75quddJ9J3y8eJfq5LmdySbeBssFZAW5Xog9ZQPd9r9U0weppgCuUcEFiSU2pZaqE08ALPLY7YTUYjqbhvYrW+Pb+69P7E6wD6hJKLQo3PAy75Lp3tNZGUDJg+81C2mXH1S6KjAyKipLLKE71mdAzF0c1eM+8o5yMxr74VD+QdeoIWaixNC1.NhAm++HeWvG8w4cZ6H6La9f+5rNSYIlzp9v+QmTJaT5BcrYcfTobZYBUa6ClWgnwaf+U4ETEzU+FcofdkxjIbh45MPs2ZnPAjPtVmJa2HglYls3sJ9rzU8gR2G62mYhSuc9txsvWHE94luE2Qog+ACGRiMUjcM+du6y+ERPt14iftUJFTT4e7jwCflNwTfIBnTytowaEa4sabjcrMxLfJRxG7OvSgx11wdEJaWpDMlDqjeH1sU0dKnGkKA3jH+xf0fakBiwsQ4aeAb9QgQnwvky9PbrMT7Df62NlsVBL+3Rf4YKAlsWBL6rDXd9Rf4E2KF68h2cBbsG21DPP+CxOSyy6.AApxxqHQ+KH1gioF
    


  • @ustk Great - many thanks for this
    This helps me a lot 👍


Log in to reply
 

6
Online

1.3k
Users

4.1k
Topics

36.5k
Posts