简体   繁体   English

更改多边形的边框颜色

[英]Changing the border color in polygon

Using Polygon class, I have created a triangle. 使用Polygon类,我创建了一个三角形。

By using setStroke(Color.AQUA) , I have changed the border color of that polygon. 通过使用setStroke(Color.AQUA) ,我更改了该多边形的边框颜色。 Triangle has 3 borders. 三角形有3个边界。 How to set different color for every border? 如何为每个边框设置不同的颜色?

There is no predefined method in Polygon for giving each border an individual color. Polygon ,没有预定义的方法可以为每个边框赋予单独的颜色。 You have to implement your own class or use a combination of 3 independent lines to make triangle. 您必须实现自己的类,或结合使用3条独立的线来制作三角形。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM