Compute the current sheet.

@param colors The colors data.
@param sheet The sheet number.
979237
private void computeSheet(Map<TileRef, ColorRgba> colors, Integer sheet)
    {
        final SpriteTiled tiles = map.getSheet(sheet);
        final ImageBuffer tilesSurface = tiles.getSurface();
        final int tw = map.getTileWidth();
        final int th = map.getTileHeight();

        int number = 0;
        for (int i = 0; i < tilesSurface.getWidth(); i += tw)
        {
            for (int j = 0; j < tilesSurface.getHeight(); j += th)
            {
                final int h = number * tw % tiles.getWidth();
                final int v = number / tiles.getTilesHorizontal() * th;
                final ColorRgba color = UtilColor.getWeightedColor(tilesSurface, h, v, tw, th);

                if (!(NO_TILE.equals(color) || color.getAlpha() == 0))
                {
                    colors.put(new TileRef(sheet, number), color);
                }
                number++;
            }
        }
    }
174824
public void setAverageColor(final Color COLOR) {
        if (null == averageColor) {
            _averageColor = COLOR;
            fireUpdateEvent(REDRAW_EVENT);
        } else {
            averageColor.set(COLOR);
        }
    }
956387
public static void removeOtherSheets(Sheet sheet) {
        val wb = sheet.getWorkbook();

        List<String> deletedNames = Lists.newArrayList();
        for (int i = 0; i < wb.getNumberOfSheets(); ++i) {
            val sheetName = wb.getSheetName(i);
            if (!sheetName.equals(sheet.getSheetName())) {
                deletedNames.add(sheetName);
            }
        }

        deletedNames.forEach(x -> wb.removeSheetAt(wb.getSheetIndex(x)));
    }
104989
public final void addAllHelperTextColors(@NonNull final Collection<Integer> colors) {
        Condition.INSTANCE.ensureNotNull(colors, "The collection may not be null");

        for (int color : colors) {
            addHelperTextColor(color);
        }
    }
1141984
def __set_style_sheet(self):
        

        colors = map(
            lambda x: "rgb({0}, {1}, {2}, {3})".format(x.red(), x.green(), x.blue(), int(self.__opacity * 255)),
            (self.__color, self.__background_color, self.__border_color))
        self.setStyleSheet(self.__style.format(*colors))
111729
public void printString(Color color, final PrintWriter writer) {
        color._switch(new ColorSwitchBlock() {            
            @Override
            public void _case(Red x) {
                writer.print("red");
            }
            
            @Override
            public void _case(Green x) {
                writer.print("green");                
            }
            
            @Override
            public void _case(Blue x) {
                writer.print("blue");
            }           
        });
    }
1270095
public void setStylesheet(FileResource stylesheet) {
        this.log("Setting custom stylesheet " + stylesheet.toString(), LogLevel.DEBUG.getLevel());
        this.stylesheet = stylesheet;
    }
337605
private void copyArrays(final float[] FRACTIONS, final Color[] colors) {
        fractions = new float[FRACTIONS.length];
        System.arraycopy(FRACTIONS, 0, fractions, 0, FRACTIONS.length);
        this.colors = colors.clone();
    }
1364735
@SuppressWarnings("unused")
    public void setCancelColor(@ColorInt int color) {
        mCancelColor = Color.argb(255, Color.red(color), Color.green(color), Color.blue(color));
    }
576129
function(sheets) {
		var sheet = sheets.shift();
		if (sheet) {
			w(sheet);
			var isLess = (sheet.slice(-4) == "less");
			if (isLess && (opt.less !== undefined)) {
				sheet = sheet.slice(0, sheet.length-4) + "css";
				isLess = false;
				w(" (Substituting CSS: " + sheet + ")");
			}
			var code = fs.readFileSync(sheet, "utf8");
			if (isLess) {
				var parser = new(less.Parser)({filename:sheet, paths:[path.dirname(sheet)]});
				parser.parse(code, function (err, tree) {
					if (err) {
						console.error(err);
					} else {
						addToBlob(sheet, tree.toCSS());
					}
					readAndParse(sheets);
				});
			} else {
				addToBlob(sheet, code);
				readAndParse(sheets);
			}
		} else {
			doneCB(blob);
		}
	}
1061033
public void setTickLabelColor(final Color COLOR) {
        if (null == tickLabelColor) {
            _tickLabelColor = COLOR;
            fireUpdateEvent(REDRAW_EVENT);
        } else {
            tickLabelColor.set(COLOR);
        }
    }
815720
public void setColoringEnable(boolean coloring)
  {
    m_enableColoring = coloring;
    if (m_enableColoring)
      m_refresher.redrawTune();
    else
    {
        ((DefaultStyledDocument)getDocument()).setCharacterAttributes(
    0,getDocument().getEndPosition().getOffset(),m_defaultStyle, true);
      //setSelectedTextColor(SELECTION_FOREGROUND_COLOR);
      //setSelectionColor(SELECTION_BACKGROUND_COLOR);
    }
  }
85507
public void setEdgeColor(ColorSet colorSet) {
        if (edgeColor == null) edgeColor = new RGBColor(0.0, 0.0, 0.0);
        setGradation(true);
        this.edgeColor = RGBColor.color(colorSet);
    }
325952
public void setColor(final Color COLOR) {
        if (null == color) {
            _color = COLOR;
        } else {
            color.set(COLOR);
        }
        fireMarkerEvent(COLOR_CHANGED_EVENT);
    }
521634
public DataRange color(String... colors) {
        if (colors == null || colors.length == 0) {
            return this;
        }
        this.color().addAll(Arrays.asList(colors));
        return this;
    }
1098913
public void setColorRange(int firstIndex, int lastIndex, int color) {
		for (int i = firstIndex; i <= lastIndex; i++)
			map[i] = color;
	}
1210200
public final void setColor(@ColorInt final int color) {
        if (this.color != color) {
            this.color = color;
            persistInt(color);
            notifyChanged();
            adaptPreviewView();
        }
    }