examples/histogram.js
function buildSolidBrush(color, alpha) {
	let component;

	component = (color >> 16) & 0xff;
	const R = component / 255;
	component = (color >> 8) & 0xff;
	const G = component / 255;
	component = color & 0xff;
	const B = component / 255;
	const A = alpha;

	const brush = new libui.DrawBrush();
	brush.color = new libui.Color(R, G, B, A);
	brush.type = libui.brushType.solid;

	return brush;
}
function buildSolidBrush(color, alpha) {
	let component;

	component = (color >> 16) & 0xff;
	const R = component / 255;
	component = (color >> 8) & 0xff;
	const G = component / 255;
	component = color & 0xff;
	const B = component / 255;
	const A = alpha;

	const brush = new libui.DrawBrush();
	brush.color = new libui.Color(R, G, B, A);
	brush.type = libui.brushType.solid;

	return brush;
}
function buildSolidBrush ( color , alpha ) { let component ; component = ( color >> 16 ) & 0xff ; const R = component / 255 ; component = ( color >> 8 ) & 0xff ; const G = component / 255 ; component = color & 0xff ; const B = component / 255 ; const A = alpha ; const brush = new libui . DrawBrush ( ) ; brush . color = new libui . Color ( R , G , B , A ) ; brush . type = libui . brushType . solid ; return brush ; }
Helper to quickly set a brush color
Helper to quickly set a brush color