MCPcopy Create free account
hub / github.com/Var3D/var3dframe / getColorPointTexture

Method getColorPointTexture

core/src/core/java/var3d/net/center/VGame.java:1623–1637  ·  view source on GitHub ↗

获取颜色像素点

(Color color)

Source from the content-addressed store, hash-verified

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);

Callers 2

getPointTextureMethod · 0.95
getRectColorDrawableMethod · 0.95

Calls 5

getMethod · 0.45
toStringMethod · 0.45
setColorMethod · 0.45
putMethod · 0.45
disposeMethod · 0.45

Tested by

no test coverage detected