获取颜色像素点
(Color color)
| 1621 | * 获取颜色像素点 |
| 1622 | */ |
| 1623 | @SuppressWarnings("static-access") |
| 1624 | public Texture getColorPointTexture(Color color) { |
| 1625 | Texture colorPoint = textures.get("color" + color.toString()); |
| 1626 | if (colorPoint == null) { |
| 1627 | Pixmap pixmap = new Pixmap(1, 1, Format.RGBA8888); |
| 1628 | pixmap.setColor(color); |
| 1629 | pixmap.fill(); |
| 1630 | colorPoint = new Texture(pixmap); |
| 1631 | colorPoint.setFilter(filter, filter); |
| 1632 | textures.put("color" + color.toString(), colorPoint); |
| 1633 | colorPoint.setAssetManager(assets); |
| 1634 | pixmap.dispose(); |
| 1635 | } |
| 1636 | return colorPoint; |
| 1637 | } |
| 1638 | |
| 1639 | public Texture getCircleTexture(int radius) { |
| 1640 | return getCircleColorTexture(radius, Color.WHITE); |