Example usage for com.badlogic.gdx.graphics Color PINK

List of usage examples for com.badlogic.gdx.graphics Color PINK

Introduction

In this page you can find the example usage for com.badlogic.gdx.graphics Color PINK.

Prototype

Color PINK

To view the source code for com.badlogic.gdx.graphics Color PINK.

Click Source Link

Usage

From source file:mobi.shad.s3lib.gfx.pixmap.filter.Gradient.java

License:Apache License

/**
 * @param pixmap/*  ww w .j a v  a2s . co m*/
 */
@Override
public void filter(final Pixmap pixmap) {
    generate(pixmap, Color.RED, Color.YELLOW, Color.BLUE, Color.PINK, 1.0f);
}

From source file:mobi.shad.s3lib.gfx.pixmap.filter.Gradient.java

License:Apache License

/**
 * @param pixmap/*from ww w.  j  ava 2  s . co m*/
 */
@Override
public void random(final Pixmap pixmap) {
    generate(pixmap, Color.RED, Color.YELLOW, Color.BLUE, Color.PINK, 1.0f);
}

From source file:mobi.shad.s3lib.gui.widget.HtmlView.java

License:Apache License

/**
 * @param node//from  w  w w. j  av  a  2  s .c  o  m
 * @return
 */
private CssStyle parseCssStyle(final Element node) {
    final CssStyle style = new CssStyle();

    //
    // Color
    //
    String color = node.getAttribute("color", "");
    if (color.equalsIgnoreCase("yellow")) {
        style.color = Color.YELLOW;
    } else if (color.equalsIgnoreCase("red")) {
        style.color = Color.RED;
    } else if (color.equalsIgnoreCase("green")) {
        style.color = Color.GREEN;
    } else if (color.equalsIgnoreCase("cyan")) {
        style.color = Color.CYAN;
    } else if (color.equalsIgnoreCase("blue")) {
        style.color = Color.BLUE;
    } else if (color.equalsIgnoreCase("gray")) {
        style.color = Color.GRAY;
    } else if (color.equalsIgnoreCase("light_gray")) {
        style.color = Color.LIGHT_GRAY;
    } else if (color.equalsIgnoreCase("dark_gray")) {
        style.color = Color.DARK_GRAY;
    } else if (color.equalsIgnoreCase("orange")) {
        style.color = Color.ORANGE;
    } else if (color.equalsIgnoreCase("magenta")) {
        style.color = Color.MAGENTA;
    } else if (color.equalsIgnoreCase("pink")) {
        style.color = Color.PINK;
    }

    //
    // Align
    //
    String align = node.getAttribute("align", "");
    if (align.equalsIgnoreCase("right")) {
        style.align = Align.right;
    } else if (align.equalsIgnoreCase("left")) {
        style.align = Align.left;
    } else if (align.equalsIgnoreCase("center")) {
        style.align = Align.center;
    } else {
        style.align = Align.left;
    }

    //
    // Font
    //
    String font = node.getAttribute("font", "");
    //      if (font.equalsIgnoreCase("sans12")){
    //         style.font="sans12";
    //      } else if (font.equalsIgnoreCase("sans13")){
    //         style.font="sans13";
    //      } else if (font.equalsIgnoreCase("sans14")){
    //         style.font="sans14";
    //      } else if (font.equalsIgnoreCase("sans15")){
    //         style.font="sans15";
    //      } else if (font.equalsIgnoreCase("droid14")){
    //         style.font="droid14";
    //      } else if (font.equalsIgnoreCase("droid15")){
    //         style.font="droid15";
    //      } else if (font.equalsIgnoreCase("droid16")){
    //         style.font="droid16";
    //      } else if (font.equalsIgnoreCase("droid17")){
    //         style.font="droid17";
    //      } else if (font.equalsIgnoreCase("droid18")){
    //         style.font="droid18";
    //      } else if (font.equalsIgnoreCase("droid22")){
    //         style.font="droid22";
    //      } else if (font.equalsIgnoreCase("droid24")){
    //         style.font="droid24";
    //      }

    //
    // CollSpan
    //
    int collSpan = node.getIntAttribute("collspan", 1);
    if (collSpan > 1) {
        style.collSpan = collSpan;
    }

    return style;
}

From source file:mobi.shad.s3libTest.G2DTTFFont.java

License:Apache License

@Override
public void initalize() {

    FileHandle orangeJuice = S3File.getFileHandle("font/orange_juice_2.ttf");

    /**/*from  w ww  .j  a v  a2s.  co  m*/
     * Generates the fonts images from the TTF file
     */
    FreeTypeFontGenerator generator = new FreeTypeFontGenerator(orangeJuice);
    orangeJuice40 = generator.generateFont(40);
    orangeJuice80 = generator.generateFont(80);
    orangeJuice80.setColor(Color.PINK);
    generator.dispose();
}

From source file:non.plugins.graphics.java

public Color color(String name) {
    if (name.startsWith("#"))
        return Color.valueOf(name.replace("#", ""));
    if ("clear".equalsIgnoreCase(name))
        return Color.CLEAR;
    else if ("white".equalsIgnoreCase(name))
        return Color.WHITE;
    else if ("black".equalsIgnoreCase(name))
        return Color.BLACK;
    else if ("red".equalsIgnoreCase(name))
        return Color.RED;
    else if ("green".equalsIgnoreCase(name))
        return Color.GREEN;
    else if ("blue".equalsIgnoreCase(name))
        return Color.BLUE;
    else if ("lightgray".equalsIgnoreCase(name))
        return Color.LIGHT_GRAY;
    else if ("gray".equalsIgnoreCase(name))
        return Color.GRAY;
    else if ("darkgray".equalsIgnoreCase(name))
        return Color.DARK_GRAY;
    else if ("pink".equalsIgnoreCase(name))
        return Color.PINK;
    else if ("orange".equalsIgnoreCase(name))
        return Color.ORANGE;
    else if ("yellow".equalsIgnoreCase(name))
        return Color.YELLOW;
    else if ("magenta".equalsIgnoreCase(name))
        return Color.MAGENTA;
    else if ("cyan".equalsIgnoreCase(name))
        return Color.CYAN;
    else if ("olive".equalsIgnoreCase(name))
        return Color.OLIVE;
    else if ("purple".equalsIgnoreCase(name))
        return Color.PURPLE;
    else if ("maroon".equalsIgnoreCase(name))
        return Color.MAROON;
    else if ("teal".equalsIgnoreCase(name))
        return Color.TEAL;
    else if ("navy".equalsIgnoreCase(name))
        return Color.NAVY;
    return Color.CLEAR;
}

From source file:org.ams.testapps.paintandphysics.cardhouse.TurnCircle.java

License:Open Source License

/**
 * A circle that is made to visualize the area one can touch to turn an object.
 *
 * @param camera The camera you draw the world with.
 * @param radius distance from center of circle to the inner part of the colored outline.
 * @param width  the width of the colored outline.
 *///w  w w  .j  a  va  2 s .  c om
public TurnCircle(OrthographicCamera camera, float radius, float width) {
    if (debug)
        Gdx.app.setLogLevel(Application.LOG_DEBUG);

    this.camera = camera;

    setColor(Color.PINK);

    // reasonable size for all densities
    this.radius = radius * (float) Math.pow(Gdx.graphics.getDensity(), 0.25);
    this.width = width * (float) Math.pow(Gdx.graphics.getDensity(), 0.25);

    // create triangles that together form a circle
    Array<Vector2> outer = makeCircle(new Vector2(), this.radius + this.width);
    Array<Vector2> inner = makeCircle(new Vector2(), this.radius);
    Array<Array<Vector2>> holes = new Array<Array<Vector2>>();
    holes.add(inner);
    triangulatedCircle = Util.makeTriangles(outer, holes, false);
}

From source file:tilo.modules.graphics.java

License:Open Source License

public Color color(String name) {
    if (name.startsWith("#"))
        return Color.valueOf(name.replace("#", ""));
    if ("clear".equalsIgnoreCase(name))
        return Color.CLEAR;
    else if ("white".equalsIgnoreCase(name))
        return Color.WHITE;
    else if ("black".equalsIgnoreCase(name))
        return Color.BLACK;
    else if ("red".equalsIgnoreCase(name))
        return Color.RED;
    else if ("green".equalsIgnoreCase(name))
        return Color.GREEN;
    else if ("blue".equalsIgnoreCase(name))
        return Color.BLUE;
    else if ("lightgray".equalsIgnoreCase(name))
        return Color.LIGHT_GRAY;
    else if ("gray".equalsIgnoreCase(name))
        return Color.GRAY;
    else if ("darkgray".equalsIgnoreCase(name))
        return Color.DARK_GRAY;
    else if ("pink".equalsIgnoreCase(name))
        return Color.PINK;
    else if ("orange".equalsIgnoreCase(name))
        return Color.ORANGE;
    else if ("yellow".equalsIgnoreCase(name))
        return Color.YELLOW;
    else if ("magenta".equalsIgnoreCase(name))
        return Color.MAGENTA;
    else if ("cyan".equalsIgnoreCase(name))
        return Color.CYAN;
    return Color.CLEAR;
}

From source file:vault.clockwork.controllers.EditorController.java

License:Open Source License

/**
 * Draw the editor elements.//from w w w .j av a 2s  . co m
 * @param batch
 */
public void draw(SpriteBatch batch) {
    // draw editor simple shapes
    gizmo.begin(ShapeRenderer.ShapeType.Line);

    // draw-up the editor props
    for (PropSerialized prop : propHolder.props) {
        // draw-up the prop bounds
        prop.draw(gizmo);

        // draw the prop indicator
        if (nearly == prop || selected == prop) {
            gizmo.setColor(Color.RED);
        } else {
            gizmo.setColor(Color.PINK);
        }
        gizmo.circle(prop.position.x, prop.position.y, 16.f);
    }
    gizmo.end();

    // draw-up the props names
    batch.setProjectionMatrix(Game.mainCamera.combined);
    batch.begin();
    font.setScale(Game.mainCamera.zoom);
    for (PropSerialized prop : propHolder.props) {
        // fetch for prop name
        String name = prop.getClass().getSimpleName() + ": " + prop.id;

        // layer name
        switch (prop.layer) {
        case 1:
            name += " (ACTION_1)";
            break;
        case 2:
            name += " (ACTION_2)";
            break;
        case 3:
            name += " (ACTION_3)";
            break;
        case 4:
            name += " (FOREGROUND)";
            break;
        case 5:
            name += " (GUI)";
            break;
        case 6:
            name += " (DEBUG)";
            break;
        default:
            name += " (BACKGROUND)";
        }

        // text bounds
        BitmapFont.TextBounds bounds = font.getBounds(name);

        // draw-up the prop name
        if (selected == prop) {
            font.setColor(Color.RED);
        } else {
            font.setColor(Color.WHITE);
        }
        font.draw(batch, name, prop.position.x - bounds.width / 2, prop.position.y + bounds.height + 24.f);
    }
    font.setScale(1);
    batch.end();
}

From source file:vault.clockwork.editor.gui.GUIFieldElement.java

License:Open Source License

/**
 * Draw the field input.//from w  w  w .  j  ava 2  s. c  o m
 * @param shape
 * @param batch 
 */
@Override
public void draw(ShapeRenderer shape, SpriteBatch batch) {
    text = value + (focused && ticks % 20 > 10 ? "|" : "");

    if (focused) {
        ticks++;
    }

    // calculate label text bounds
    Rectangle bounds = getBounds();

    // enable alpha channel usage
    Gdx.gl.glEnable(GL20.GL_BLEND);
    Gdx.gl.glBlendFunc(GL20.GL_SRC_ALPHA, GL20.GL_ONE_MINUS_SRC_ALPHA);

    // draw the shape
    shape.begin(ShapeRenderer.ShapeType.Filled);
    shape.setColor(0, 0, 0, .5f);
    shape.rect(bounds.x - 2, bounds.y - 2, bounds.width + 4, bounds.height + 4);
    shape.end();

    // draw the label
    batch.begin();
    {
        font.setColor(!focused ? (overed ? Color.PINK : Color.WHITE) : Color.RED);
        font.draw(batch, field.getName() + ": " + text, bounds.x, bounds.y + bounds.height);
    }
    batch.end();
}

From source file:vault.clockwork.editor.gui.GUILabelElement.java

License:Open Source License

/**
 * Draw the label./*www  .ja va2s. com*/
 * @param shape
 * @param batch 
 */
@Override
public void draw(ShapeRenderer shape, SpriteBatch batch) {
    // calculate label text bounds
    Rectangle bounds = getBounds();

    // enable alpha channel usage
    Gdx.gl.glEnable(GL20.GL_BLEND);
    Gdx.gl.glBlendFunc(GL20.GL_SRC_ALPHA, GL20.GL_ONE_MINUS_SRC_ALPHA);

    // draw the shape
    shape.begin(ShapeRenderer.ShapeType.Filled);
    shape.setColor(0, 0, 0, .5f);
    shape.rect(bounds.x - 2, bounds.y - 2, bounds.width + 4, bounds.height + 4);
    shape.end();

    // draw the label
    batch.begin();
    {
        font.setColor(!focused ? (overed ? Color.PINK : Color.WHITE) : Color.RED);
        font.draw(batch, text, bounds.x, bounds.y + bounds.height);
    }
    batch.end();
}