Package org.newdawn.slick.fills

Examples of org.newdawn.slick.fills.GradientFill


    gameContainer.getGraphics().setColor(convertToSlickColor(color));
    gameContainer.getGraphics().fillRect(x, y, width, height);
  }

  public void renderQuad(final int x, final int y, final int width, final int height, final Color topLeft, final Color topRight, final Color bottomRight, final Color bottomLeft) {
    GradientFill gradient = null;
    if (sameColor(topLeft, topRight)) {
      gradient = new GradientFill(x, y, convertToSlickColor(topLeft), x, y + height, convertToSlickColor(bottomLeft));
    } else {
      gradient = new GradientFill(x, y, convertToSlickColor(topLeft), x + width, y, convertToSlickColor(bottomRight));
    }
    Rectangle rect = new Rectangle(x, y, width, height);
    gameContainer.getGraphics().fill(rect, gradient);
  }
View Full Code Here


  Color scolor = new Color(0, 200, 0);

  @Override
  public void init() {
    v = new IsometricViewPort(2, this, 0, 0) {
      GradientFill gr = new GradientFill(0, 0, Color.red, 60, 60,
          Color.blue);

      @Override
      public void paintCell(Graphics g, int tx, int ty, Shape r,
          SpriteCell cell) {
View Full Code Here

    poly.addPoint(550,320);
    poly.addPoint(600,380);
    poly.addPoint(620,450);
    poly.addPoint(500,450);
   
    gradient = new GradientFill(0,-75,Color.red,0,75,Color.yellow);
    gradient2 = new GradientFill(0,-75,Color.blue,0,75,Color.white);
    gradient4 = new GradientFill(-50,-40,Color.green,50,40,Color.cyan);
  }
View Full Code Here

    poly.addPoint(550,320);
    poly.addPoint(600,380);
    poly.addPoint(620,450);
    poly.addPoint(500,450);
   
    gradient = new GradientFill(0,-75,Color.red,0,75,Color.yellow);
    gradient2 = new GradientFill(0,-75,Color.blue,0,75,Color.white);
    gradient4 = new GradientFill(-50,-40,Color.green,50,40,Color.cyan);
  }
View Full Code Here

    this.container = container;
   
    image1 = new Image("testdata/grass.png");
    image2 = new Image("testdata/rocks.png");
   
    fill = new GradientFill(-64,0,new Color(1,1,1,1f),64,0,new Color(0,0,0,0));
    shape = new Rectangle(336,236,128,128);
      poly = new Polygon();
    poly.addPoint(320,220);
    poly.addPoint(350,200);
    poly.addPoint(450,200);
View Full Code Here

    poly.addPoint(550,320);
    poly.addPoint(600,380);
    poly.addPoint(620,450);
    poly.addPoint(500,450);
   
    gradient = new GradientFill(0,-75,Color.red,0,75,Color.yellow,true);
    gradient2 = new GradientFill(0,-75,Color.blue,0,75,Color.white,true);
    gradient4 = new GradientFill(-50,-40,Color.green,50,40,Color.cyan,true);
  }
View Full Code Here

TOP

Related Classes of org.newdawn.slick.fills.GradientFill

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.