im interested i just finished writing a program and one of the functions that has been implemented is drawing a line with a triangle at the end (forming an arrow). How would i go about filling the inside of the triangle?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Take a look at the fillPolygon method of the
Graphicsclass. There’s also a version that doesn’t require you to make a Polygon, instead accepting arrays with the coordinates. If you’ve been drawing the lines separately until now instead of as a polygon, it shouldn’t be too hard to switch to one of these methods. Just use the endpoint coordinates you’ve already got.