MCPcopy Create free account
hub / github.com/Card-Forge/forge / drawGrayTransitionImage

Method drawGrayTransitionImage

forge-gui-mobile/src/forge/Graphics.java:882–897  ·  view source on GitHub ↗
(FImage image, float x, float y, float w, float h, float percentage)

Source from the content-addressed store, hash-verified

880 }
881
882 public void drawGrayTransitionImage(FImage image, float x, float y, float w, float h, float percentage) {
883 if (image == null)
884 return;
885 batch.end();
886 shaderGrayscale.bind();
887 shaderGrayscale.setUniformf("u_grayness", percentage);
888 shaderGrayscale.setUniformf("u_bias", 0.6f);
889 batch.setShader(shaderGrayscale);
890 batch.begin();
891 //draw gray
892 image.draw(this, x, y, w, h);
893 //reset
894 batch.end();
895 batch.setShader(null);
896 batch.begin();
897 }
898
899 public void drawGrayTransitionImage(Texture image, float x, float y, float w, float h, boolean withDarkOverlay, float percentage) {
900 batch.end();

Callers 4

drawBackgroundMethod · 0.80
drawBackgroundMethod · 0.80
drawTransitionMethod · 0.80
drawBackgroundMethod · 0.80

Calls 3

drawMethod · 0.65
endMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected