List of usage examples for com.badlogic.gdx.graphics Color BLACK
Color BLACK
To view the source code for com.badlogic.gdx.graphics Color BLACK.
Click Source Link
From source file:me.scarlet.undertailor.gfx.MultiRenderer.java
License:Open Source License
/** * Resets the colors to their default.//from w ww. j a va 2 s.c o m */ public void resetColors() { if (!this.getClearColor().equals(Color.BLACK)) { this.setClearColor(Color.BLACK); } if (!this.getBatchColor().equals(Color.WHITE)) { this.setBatchColor(Color.WHITE); } if (!this.getShapeColor().equals(Color.WHITE)) { this.setShapeColor(Color.WHITE); } }
From source file:me.scarlet.undertailor.util.MultiRenderer.java
License:Open Source License
public MultiRenderer() { this.clearColor = Color.BLACK; this.batch = new SpriteBatch(); this.renderer = new ShapeRenderer(); }
From source file:me.scarlet.undertailor.util.MultiRenderer.java
License:Open Source License
public void setClearColor(Color color) { this.clearColor = (color == null ? Color.BLACK : color); }
From source file:mobi.shad.s3lib.gfx.effect.Copper.java
License:Apache License
/** * Generate color bar on the bitmap//from w w w .ja v a 2s. com * * @param colorOutside * @param colorInside * @param texPerRow * @param tex_per_column * @param index * @param localPixmap * @param localSizeX * @param localSizeY */ private void calculateCopperBarTexture2D(Color colorOutside, Color colorInside, Color colorInside2, Color colorOutside2, int texPerRow, int tex_per_column, int index, Pixmap localPixmap, int localSizeX, int localSizeY) { float xStep = (float) localSizeX / texPerRow; float yStep = (float) localSizeY / tex_per_column; float x = index % texPerRow; float y = index / texPerRow; float xMin = (x * xStep); float xMax = xMin + (xStep); float yMin = (y * yStep); float yMax = yMin + (yStep); Color color = Color.BLACK; for (int py = (int) yMin; py <= (int) yMax; py++) { float procent = (py - yMin) / yStep; switch (mode) { default: color = GradientUtil.linearGradientColor(colorOutside, colorInside, colorOutside, procent); break; case 1: color = GradientUtil.linearGradientColor(colorInside, colorOutside, procent); break; case 2: color = GradientUtil.linearGradientColor(colorOutside, colorInside, colorOutside2, procent); break; case 3: color = GradientUtil.linearGradientColor(colorOutside, colorInside, colorInside2, colorOutside2, procent); break; case 4: if (index % 4 == 0) { color = GradientUtil.linearGradientColor(Color.BLACK, colorOutside, Color.BLACK, procent); } else if (index % 4 == 1) { color = GradientUtil.linearGradientColor(Color.BLACK, colorInside, Color.BLACK, procent); } else if (index % 4 == 2) { color = GradientUtil.linearGradientColor(Color.BLACK, colorInside2, Color.BLACK, procent); } else { color = GradientUtil.linearGradientColor(Color.BLACK, colorOutside2, Color.BLACK, procent); } break; case 5: color = GradientUtil.getColorPallete(procent, (int) (colorOutside.a * 42)); break; case 6: if (procent < 0.5f) { color = GradientUtil.getColorPallete(procent * 0.5f, (int) (colorOutside.a * 42)); } else { color = GradientUtil.getColorPallete(1f - procent * 0.5f, (int) (colorOutside.a * 42)); } break; case 7: if (index % 2 == 0) { color = GradientUtil.getColorPallete(procent, (int) (colorOutside.a * 42)); } else if (index % 2 == 1) { color = GradientUtil.getColorPallete(procent, (int) (colorOutside.a * 42) + 2); } break; case 8: if (index % 4 == 0) { color = GradientUtil.getColorPallete(procent, (int) (colorOutside.a * 42)); } else if (index % 4 == 1) { color = GradientUtil.getColorPallete(procent, (int) (colorOutside.a * 42) + 1); } else if (index % 4 == 2) { color = GradientUtil.getColorPallete(procent, (int) (colorOutside.a * 42) + 2); } else if (index % 4 == 3) { color = GradientUtil.getColorPallete(procent, (int) (colorOutside.a * 42) + 3); } break; } int pixelColor = Color.rgba8888(color.r, color.g, color.b, color.a); for (int px = (int) xMin; px <= (int) xMax; px++) { localPixmap.drawPixel(px, py, pixelColor); } } }
From source file:mobi.shad.s3lib.gfx.node.pixmap.anim.FxJuliaAnim.java
License:Apache License
@Override protected void updateLocal(float effectTime, float sceneTime, float endTime, float procent, boolean isPause) { if (isPause) { return;//w w w. j a va2s .com } if (data.pixmap == null) { data.pixmap = new Pixmap(S3Constans.proceduralTextureSize, S3Constans.proceduralTextureSize, Pixmap.Format.RGBA8888); data.pixmap.setColor(Color.BLACK); data.pixmap.fill(); data.texture = null; } data.type = Data.Type.EFFECT_2D; data.textureChange = true; xIterations = xIterations + addXIterations * S3.osDeltaTime; yIterations = yIterations + addYIterations * S3.osDeltaTime; if (xIterations > maxXIterations || xIterations < minXIterations) { addXIterations = -addXIterations; } if (yIterations > maxYIterations || yIterations < minYIterations) { addYIterations = -addYIterations; } Julia.generate(data.pixmap, xCenter, yCenter, xSize, ySize, xIterations, yIterations, iterations); }
From source file:mobi.shad.s3lib.gfx.node.pixmap.anim.FxManderbrotAnim.java
License:Apache License
@Override protected void updateLocal(float effectTime, float sceneTime, float endTime, float procent, boolean isPause) { if (isPause) { return;/*from ww w .j a v a 2s . c om*/ } if (data.pixmap == null) { data.pixmap = new Pixmap(S3Constans.proceduralTextureSize, S3Constans.proceduralTextureSize, Pixmap.Format.RGBA8888); data.pixmap.setColor(Color.BLACK); data.pixmap.fill(); data.texture = null; } data.type = Data.Type.EFFECT_2D; xSize = xSize + addXSize * S3.osDeltaTime; ySize = ySize + addYSize * S3.osDeltaTime; if (xSize > maxXSize || xSize < minXSize) { addXSize = -addXSize; } if (ySize > maxYSize || ySize < minYSize) { addYSize = -addYSize; } switch (fractalType) { default: Mandelbrot.generate(data.pixmap, xCenter, yCenter, xSize, ySize, iterations); break; case 1: Mandelbrot2.generate(data.pixmap, xCenter, yCenter, xSize, ySize, iterations); break; case 2: Mandelbrot3.generate(data.pixmap, xCenter, yCenter, xSize, ySize, iterations); break; case 3: Mandelbrot4.generate(data.pixmap, xCenter, yCenter, xSize, ySize, iterations); break; case 4: Mandelbrot5.generate(data.pixmap, xCenter, yCenter, xSize, ySize, iterations); break; } data.textureChange = true; }
From source file:mobi.shad.s3lib.gfx.node.pixmap.anim.FxPlasma.java
License:Apache License
/** * *///w w w.j a v a2 s.c o m @Override protected void processLocal() { if (formGui != null) { plasmaSpeed = formGui.getInt("FxPlasma_plasmaSpeed"); plasmaScrollSpeed = formGui.getInt("FxPlasma_plasmaScrollSpeed"); cellSizeX = formGui.getInt("FxPlasma_cellSizeX"); cellSizeY = formGui.getInt("FxPlasma_cellSizeY"); } if (data.pixmap == null) { data.pixmap = new Pixmap(S3Constans.proceduralTextureSize, S3Constans.proceduralTextureSize, Pixmap.Format.RGBA8888); data.pixmap.setColor(Color.BLACK); data.pixmap.fill(); data.texture = null; } data.type = Data.Type.EFFECT_2D; Plasma.generate(data.pixmap, plasmaSpeed, plasmaScrollSpeed, cellSizeX, cellSizeY); data.textureChange = true; }
From source file:mobi.shad.s3lib.gfx.node.pixmap.procedural.FxCell.java
License:Apache License
/** * */// w w w .j a v a 2 s . c o m @Override protected void processLocal() { if (formGui != null) { regularity = formGui.getInt("FxCellRegularity"); density = formGui.getInt("FxCellDensity"); seed = formGui.getInt("FxCellSeed"); color = formGui.getColor("FxCellColor"); chessboard = formGui.getInt("FxCellChessboard"); pattern = formGui.getInt("FxCellPattern"); } if (data.pixmap == null) { data.pixmap = new Pixmap(S3Constans.proceduralTextureSizeHight, S3Constans.proceduralTextureSizeHight, Pixmap.Format.RGBA8888); data.pixmap.setColor(Color.BLACK); data.pixmap.fill(); data.texture = null; } data.type = Data.Type.EFFECT_2D; Cell.setSeed(seed); Cell.generate(data.pixmap, regularity, density, color, pattern, chessboard); data.textureChange = true; }
From source file:mobi.shad.s3lib.gfx.node.pixmap.procedural.FxJulia.java
License:Apache License
/** * *//*from w ww .ja v a2s . c om*/ @Override protected void processLocal() { if (formGui != null) { xCenter = formGui.getFloat("FxJuliaXCenter"); yCenter = formGui.getFloat("FxJuliaYCenter"); xSize = formGui.getFloat("FxJuliaXSize"); ySize = formGui.getFloat("FxJuliaYSize"); xIterations = formGui.getFloat("FxJuliaXIterations"); yIterations = formGui.getFloat("FxJuliaYIterations"); iterations = formGui.getInt("FxJuliaIterations"); } if (data.pixmap == null) { data.pixmap = new Pixmap(S3Constans.proceduralTextureSizeHight, S3Constans.proceduralTextureSizeHight, Pixmap.Format.RGBA8888); data.pixmap.setColor(Color.BLACK); data.pixmap.fill(); data.texture = null; } data.type = Data.Type.EFFECT_2D; Julia.generate(data.pixmap, xCenter, yCenter, xSize, ySize, xIterations, yIterations, iterations); data.textureChange = true; }
From source file:mobi.shad.s3lib.gfx.node.pixmap.procedural.FxManderbrot.java
License:Apache License
/** * *///from ww w . j a v a 2 s .co m @Override protected void processLocal() { if (formGui != null) { fractalType = formGui.getInt("FxManderbrotFractalType"); xCenter = formGui.getFloat("FxManderbrotXCenter"); yCenter = formGui.getFloat("FxManderbrotYCenter"); xSize = formGui.getFloat("FxManderbrotXSize"); ySize = formGui.getFloat("FxManderbrotYSize"); iterations = formGui.getInt("FxManderbrotIterations"); } if (data.pixmap == null) { data.pixmap = new Pixmap(S3Constans.proceduralTextureSizeHight, S3Constans.proceduralTextureSizeHight, Pixmap.Format.RGBA8888); data.pixmap.setColor(Color.BLACK); data.pixmap.fill(); data.texture = null; } data.type = Data.Type.EFFECT_2D; switch (fractalType) { default: Mandelbrot.generate(data.pixmap, xCenter, yCenter, xSize, ySize, iterations); break; case 1: Mandelbrot2.generate(data.pixmap, xCenter, yCenter, xSize, ySize, iterations); break; case 2: Mandelbrot3.generate(data.pixmap, xCenter, yCenter, xSize, ySize, iterations); break; case 3: Mandelbrot4.generate(data.pixmap, xCenter, yCenter, xSize, ySize, iterations); break; case 4: Mandelbrot5.generate(data.pixmap, xCenter, yCenter, xSize, ySize, iterations); break; } data.textureChange = true; }