Examples of Colour


Examples of engine.classes.Colour

        direction.normalise();
       
        // calculate state
        if (mouse.isDown(Button.MB_LEFT)) {
            state = State.ATTRACT;
            colour = new Colour(0, 255, 0, 128);
        } else if (mouse.isDown(Button.MB_RIGHT)) {
            state = State.REPEL;
            colour = new Colour(255, 0, 0, 128);
        } else {
            if (keyboard.isDown(Key.VK_SPACE)) {
                if (power < 30) {
                    power += 0.5;
                }
            } else {
                power = 0;
            }
            state = State.OFF;
            colour = new Colour(0, 0, 255, 128);
            return; // don't do MagRay calculations if it is unactivated
        }
       
        // calculate bounding box
        direction.multiply(RADIUS);
View Full Code Here

Examples of engine.classes.Colour

    @Override
    public void onDraw(final RenderTarget target) {
        target.transformPush();
        target.transformIdentity();
        target.fillRectangle(SCREEN, new Colour(0, 0, 0, alpha));
        target.transformPop();
    }
View Full Code Here

Examples of engine.classes.Colour

        return new Circle(dynamic.getPolygon().getMid(), 40); // TODO: use the correct size
    }
   
    @Override
    protected void onDraw(RenderTarget target) {
        target.fillCircle(getCircle(), new Colour(255, 0, 0, 64)); // TODO: remove once debugged
    }
View Full Code Here

Examples of engine.classes.Colour

        int r1 = (int) Math.max(0, Math.floor(viewY / Block.HEIGHT));
        int r2 = (int) Math.min(blocks.length - 1, Math.ceil((viewY + 480) / Block.HEIGHT));
        int c1 = (int) Math.max(0, Math.floor(viewX / Block.WIDTH));
        int c2 = (int) Math.min(blocks[0].length - 1, Math.ceil((viewX + 640) / Block.WIDTH));

        Colour grey = new Colour(128, 128, 128, 128);
        for (int r = r1; r <= r2; r++) {
            for (int c = c1; c <= c2; c++) {
                if (blocks[r][c].getPolygon() != null) {
                    target.fillPolygon(blocks[r][c].getPolygon(), grey);
                }
View Full Code Here

Examples of jxl.format.Colour

        && borderStyle[BOTTOM] == BorderLineStyle.NONE
        && borderStyle[RIGHT] == BorderLineStyle.NONE
        )
      {
        BorderLineStyle style = getBorderLineStyle(pen);
        Colour colour = getWorkbookColour(pen.getLineColor());

        borderStyle[TOP] = style;
        borderStyle[LEFT] = style;
        borderStyle[BOTTOM] = style;
        borderStyle[RIGHT] = style;
View Full Code Here

Examples of jxl.format.Colour

  protected void initCustomPalette()
  {
    //mark "fixed" colours as always used
    for (int i = 0; i < FIXED_COLOURS.length; i++)
    {
      Colour colour = FIXED_COLOURS[i];
      setColourUsed(colour);
    }
  }
View Full Code Here

Examples of jxl.format.Colour

    sheet.removeColumn(col);
  }

  protected void addBlankCell(JRExporterGridCell gridCell, int colIndex, int rowIndex) throws JRException
  {
    Colour forecolor = BLACK;
    if (gridCell.getForecolor() != null)
    {
      forecolor = getWorkbookColour(gridCell.getForecolor());
    }

    Pattern mode = backgroundMode;
    Colour backcolor = WHITE;
   
    if (!isIgnoreCellBackground && gridCell.getCellBackcolor() != null)
    {
      mode = Pattern.SOLID;
      backcolor = getWorkbookColour(gridCell.getCellBackcolor(), true);
View Full Code Here

Examples of jxl.format.Colour

  protected void exportLine(JRPrintLine line, JRExporterGridCell gridCell, int col, int row) throws JRException
  {
    addMergeRegion(gridCell, col, row);

    Colour forecolor2 = getWorkbookColour(line.getLinePen().getLineColor());
    WritableFont cellFont2 = getLoadedFont(getDefaultFont(), forecolor2.getValue(), getLocale());
   
    Colour backcolor = WHITE;
    Pattern mode = this.backgroundMode;

    if (!isIgnoreCellBackground && gridCell.getCellBackcolor() != null)
    {
      mode = Pattern.SOLID;
View Full Code Here

Examples of jxl.format.Colour

  protected void exportRectangle(JRPrintGraphicElement element, JRExporterGridCell gridCell, int col, int row) throws JRException
  {
    addMergeRegion(gridCell, col, row);

    Colour backcolor = WHITE;
    Pattern mode = this.backgroundMode;

    if (!isIgnoreCellBackground && gridCell.getCellBackcolor() != null)
    {
      mode = Pattern.SOLID;
      backcolor = getWorkbookColour(gridCell.getCellBackcolor(), true);
    }

    Colour forecolor = getWorkbookColour(element.getLinePen().getLineColor());
    WritableFont cellFont2 = getLoadedFont(getDefaultFont(), forecolor.getValue(), getLocale());
    WritableCellFormat cellStyle2 =
      getLoadedCellStyle(
        mode,
        backcolor,
        cellFont2,
View Full Code Here

Examples of jxl.format.Colour

    JRStyledText styledText = getStyledText(text);

    if (styledText != null)
    {
      Colour forecolor = getWorkbookColour(text.getForecolor());
      WritableFont cellFont = this.getLoadedFont(text, forecolor.getValue(), getTextLocale(text));

      TextAlignHolder alignment = getTextAlignHolder(text);
      int horizontalAlignment = getHorizontalAlignment(alignment);
      int verticalAlignment = getVerticalAlignment(alignment);
      int rotation = getRotation(alignment);

      Pattern mode = this.backgroundMode;
      Colour backcolor = WHITE;

      if (!isIgnoreCellBackground && gridCell.getCellBackcolor() != null)
      {
        mode = Pattern.SOLID;
        backcolor = getWorkbookColour(gridCell.getCellBackcolor(), true);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.