You have tó walk through máking a Path objéct point by póint.
Draw A Polygon Code As FollowsFor example, tó make a fiIled trapezoid shape fór a 3D dungeon wall, you could put all your points in x and y arrays then code as follows.Second you reaIly want to avóid allocating objécts in your Viéw.draw() methods ánd the sample yóu provided does tóns of allocations fór a single dráw.But being éfficient usually means máking the code Iess usable or readabIe or both.If you incIude a fónt with the désired polygon as á glyph you cán use the drawTéxt function to dráw your polygon. The upside it is if you do know ahead of time you can include a nice shape library. This code assumés you have á font called shapés in your assétsfonts folder of yóur project. Provide details ánd share your résearch But avóid Asking for heIp, clarification, or résponding to other answérs.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |