Package com.badlogic.gdx.graphics

Examples of com.badlogic.gdx.graphics.Color


  @Override
  public void draw (SpriteBatch batch, float parentAlpha) {
    final BitmapFont font = style.font;
    final NinePatch selectedPatch = style.selectedPatch;
    final Color fontColorSelected = style.fontColorSelected;
    final Color fontColorUnselected = style.fontColorUnselected;

    batch.setColor(color.r, color.g, color.b, color.a * parentAlpha);

    float posY = height;
    for (int i = 0; i < items.length; i++) {
View Full Code Here


  }

  public void draw (SpriteBatch batch, float parentAlpha) {
    final NinePatch backgroundPatch = style.background;
    final BitmapFont titleFont = style.titleFont;
    final Color titleFontColor = style.titleFontColor;

    layout();
    applyTransform(batch);
    calculateBoundsAndScissors(batch.getTransformMatrix());
View Full Code Here

  @Override
  public void draw (SpriteBatch batch, float parentAlpha) {
    final NinePatch background = style.background;
    final BitmapFont font = style.font;
    final Color fontColor = style.fontColor;

    batch.setColor(color.r, color.g, color.b, color.a * parentAlpha);
    background.draw(batch, x, y, width, height);
    if (items.length > 0) {
      float availableWidth = width - background.getLeftWidth() - background.getRightWidth();
View Full Code Here

    @Override
    public void draw (SpriteBatch batch, float parentAlpha) {
      final NinePatch listBackground = style.listBackground;
      final NinePatch listSelection = style.listSelection;
      final BitmapFont font = style.font;
      final Color fontColor = style.fontColor;

      batch.setColor(color.r, color.g, color.b, color.a * parentAlpha);
      listBackground.draw(batch, x, y, width, height);
      float posY = height;
      for (int i = 0; i < items.length; i++) {
View Full Code Here

  }

  @Override
  public void draw (SpriteBatch batch, float parentAlpha) {
    final BitmapFont font = style.font;
    final Color fontColor = style.fontColor;
    final NinePatch background = style.background;
    final TextureRegion selection = style.selection;
    final NinePatch cursorPatch = style.cursor;

    batch.setColor(color.r, color.g, color.b, color.a * parentAlpha);
 
View Full Code Here

  public void draw (SpriteBatch spriteBatch) {
    spriteBatch.draw(texture, getVertices(), 0, SPRITE_SIZE);
  }

  public void draw (SpriteBatch spriteBatch, float alphaModulation) {
    Color color = getColor();
    float oldAlpha = color.a;
    color.a *= alphaModulation;
    setColor(color);
    draw(spriteBatch);
    color.a = oldAlpha;
View Full Code Here

  /** Returns the color of this sprite. Changing the returned color will have no affect, {@link #setColor(Color)} or
   * {@link #setColor(float, float, float, float)} must be used. */
  public Color getColor () {
    float floatBits = vertices[C1];
    int intBits = NumberUtils.floatToRawIntBits(vertices[C1]);
    Color color = this.color;
    color.r = (intBits & 0xff) / 255f;
    color.g = ((intBits >>> 8) & 0xff) / 255f;
    color.b = ((intBits >>> 16) & 0xff) / 255f;
    color.a = ((intBits >>> 24) & 0xff) / 255f;
    return color;
View Full Code Here

  /** Returns the color of this font. Changing the returned color will have no affect, {@link #setColor(Color)} or
   * {@link #setColor(float, float, float, float)} must be used. */
  public Color getColor () {
    int intBits = NumberUtils.floatToRawIntBits(color);
    Color color = this.tempColor;
    color.r = (intBits & 0xff) / 255f;
    color.g = ((intBits >>> 8) & 0xff) / 255f;
    color.b = ((intBits >>> 16) & 0xff) / 255f;
    color.a = ((intBits >>> 24) & 0xff) / 255f;
    return color;
View Full Code Here

  }

  /** @return the rendering color of this SpriteBatch. Manipulating the returned instance has no effect. */
  public Color getColor () {
    int intBits = NumberUtils.floatToRawIntBits(color);
    Color color = this.tempColor;
    color.r = (intBits & 0xff) / 255f;
    color.g = ((intBits >>> 8) & 0xff) / 255f;
    color.b = ((intBits >>> 16) & 0xff) / 255f;
    color.a = ((intBits >>> 24) & 0xff) / 255f;
    return color;
View Full Code Here

  /** Called to draw the background, before clipping is applied (if enabled). Default implementation draws the background
   * drawable. */
  protected void drawBackground (Batch batch, float parentAlpha, float x, float y) {
    if (background == null) return;
    Color color = getColor();
    batch.setColor(color.r, color.g, color.b, color.a * parentAlpha);
    background.draw(batch, x, y, getWidth(), getHeight());
  }
View Full Code Here

TOP

Related Classes of com.badlogic.gdx.graphics.Color

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.