Configures the color to which the frame buffer is cleared prior to painting the scene graph.
439449
public void setClearColor (int argb) {
    float red   = ((argb >> 16) & 0xFF) / 255f;
    float green = ((argb >>  8) & 0xFF) / 255f;
    float blue  = ((argb >>  0) & 0xFF) / 255f;
    float alpha = ((argb >> 24) & 0xFF) / 255f;
    setClearColor(red, green, blue, alpha);
  }
235323
private void setBorderInternal(int rawSize,
                                   @ColorInt int color,
                                   boolean invalidate) {
        mBorderWidth = rawSize;
        mBorderColor = color;

        if (null == mBorderPaint) {
            mBorderPaint = new Paint();
            mBorderPaint.setAntiAlias(true);
            mBorderPaint.setStyle(Paint.Style.FILL);
        }

        if (null != mBorderPaint) {
            mBorderPaint.setColor(mBorderColor);
            mBorderPaint.setStrokeWidth(Math.max(0, mBorderWidth)); // in pixels
        }

        // Invalidate the view if asked
        if (invalidate) {
            invalidate();
        }
    }
765522
def setDisabledColor(self, color):
        
        color = QColor(color)
        if self._palette is None:
            self._palette = XNodePalette(self._scenePalette)
        
        self._palette.setColor(self._palette.Disabled,
                               self._palette.NodeBackground,
                               color)
        self._palette.setColor(self._palette.Disabled,
                               self._palette.NodeAlternateBackground,
                               color.darker(105))
        self.setDirty()
842356
public void setNonStrokingColor (final Color color) throws IOException
  {
    final float [] components = new float [] { color.getRed () / 255f,
                                               color.getGreen () / 255f,
                                               color.getBlue () / 255f };
    final PDColor pdColor = new PDColor (components, PDDeviceRGB.INSTANCE);
    setNonStrokingColor (pdColor);
  }
314306
def render_scene(self):
		""
		self.init_gl() # should be a no-op after the first frame is rendered
		SDL_GL_MakeCurrent ( self.window, self.context )
		self.renderer.render_scene()
		# Done rendering
		# SDL_GL_SwapWindow(self.window)
		glFlush()
251930
def set_pixel(framebuf, x, y, color):
        """"""
        index = (y >> 3) * framebuf.stride + x
        offset = y & 0x07
        framebuf.buf[index] = (framebuf.buf[index] & ~(0x01 << offset)) | ((color != 0) << offset)
1353996
public static void optimizeGraphicsQuality(Graphics2D g)
    {
        g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
        g.setRenderingHint(RenderingHints.KEY_ALPHA_INTERPOLATION, RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY);
        g.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING, RenderingHints.VALUE_COLOR_RENDER_QUALITY);
        g.setRenderingHint(RenderingHints.KEY_DITHERING, RenderingHints.VALUE_DITHER_ENABLE);
        g.setRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS, RenderingHints.VALUE_FRACTIONALMETRICS_ON);
        g.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
        g.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_NEAREST_NEIGHBOR);
        g.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
    }
1089301
@Override
    protected void paintComponent(Graphics g) {
        if (!isInitialized()) {
            return;
        }

        final Graphics2D G2 = (Graphics2D) g.create();

        G2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
        G2.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
        //G2.setRenderingHint(RenderingHints.KEY_DITHERING, RenderingHints.VALUE_DITHER_ENABLE);
        //G2.setRenderingHint(RenderingHints.KEY_ALPHA_INTERPOLATION, RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY);
        //G2.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING, RenderingHints.VALUE_COLOR_RENDER_QUALITY);
        G2.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, RenderingHints.VALUE_STROKE_NORMALIZE);
        //G2.setRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS, RenderingHints.VALUE_FRACTIONALMETRICS_ON);
        G2.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);

        G2.translate(getInnerBounds().x, getInnerBounds().y);

        // Draw the frame
        if (isFrameVisible()) {
            G2.drawImage(frameImage, 0, 0, null);
        }

        // Draw the background
        if (isBackgroundVisible()) {
            G2.drawImage(backgroundImage, 0, 0, null);
        }

        // Draw LCD display
        if (isLcdVisible()) {
            int offset = 0;
            if (isFrameVisible()) {
                offset = 18;
            }

            G2.drawImage(lcdImage, offset, offset, null);

            if (getLcdColor() == LcdColor.CUSTOM) {
                G2.setColor(getCustomLcdForeground());
            } else {
                G2.setColor(getLcdColor().TEXT_COLOR);
            }
            G2.setFont(getLcdUnitFont());
            final double UNIT_STRING_WIDTH;
            if (isLcdUnitStringVisible()) {
                unitLayout = new TextLayout(getLcdUnitString(), G2.getFont(), RENDER_CONTEXT);
                UNIT_BOUNDARY.setFrame(unitLayout.getBounds());
                G2.drawString(getLcdUnitString(), (int) ((lcdImage.getWidth() - UNIT_BOUNDARY.getWidth()) - lcdImage.getWidth() * 0.03f) + offset, (int) (lcdImage.getHeight() * 0.76f) + offset);
                UNIT_STRING_WIDTH = UNIT_BOUNDARY.getWidth();
            } else {
                UNIT_STRING_WIDTH = 0;
            }
            G2.setFont(getLcdValueFont());
            valueLayout = new TextLayout(formatLcdValue(getLcdValue()), G2.getFont(), RENDER_CONTEXT);
            VALUE_BOUNDARY.setFrame(valueLayout.getBounds());
            G2.drawString(formatLcdValue(getLcdValue()), (int) ((lcdImage.getWidth() - UNIT_STRING_WIDTH - VALUE_BOUNDARY.getWidth()) - lcdImage.getWidth() * 0.09) + offset, (int) (lcdImage.getHeight() * 0.76f) + offset);
        }

        // Draw the foreground
        if (isForegroundVisible()) {
            G2.drawImage(foregroundImage, 0, 0, null);
        }

        if (!isEnabled()) {
            G2.drawImage(disabledImage, 0, 0, null);
        }

        G2.translate(-getInnerBounds().x, -getInnerBounds().y);

        G2.dispose();
    }
735290
public void setBarGraphColor(final ColorDef BARGRAPH_COLOR) {
        getModel().setValueColor(BARGRAPH_COLOR);
        init(getInnerBounds().width, getInnerBounds().width);
        repaint(getInnerBounds());
    }
616538
private void applyBuffer() {
		if (listMode > 0) {
			return;
		}
		
		if (vertIndex != 0) {
			flushBuffer();
			startBuffer();
		}
		
		super.glColor4f(color[0], color[1], color[2], color[3]);
	}
405356
public static void clearScreen(final float r, final float g, final float b) {
        Gdx.gl.glClearColor(r, g, b, 1f);
        Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
    }
1152037
public static void paintCheckedBackground(Component c, Graphics g, int x, int y, int width, int height) {
		if ( backgroundImage == null ) {
			backgroundImage = new BufferedImage( 64, 64, BufferedImage.TYPE_INT_ARGB );
			Graphics bg = backgroundImage.createGraphics();
			for ( int by = 0; by < 64; by += 8 ) {
				for ( int bx = 0; bx < 64; bx += 8 ) {
					bg.setColor( ((bx^by) & 8) != 0 ? Color.lightGray : Color.white );
					bg.fillRect( bx, by, 8, 8 );
				}
			}
			bg.dispose();
		}

		if ( backgroundImage != null ) {
			Shape saveClip = g.getClip();
			Rectangle r = g.getClipBounds();
			if (r == null)
				r = new Rectangle(c.getSize());
			r = r.intersection(new Rectangle(x, y, width, height));
			g.setClip(r);
			int w = backgroundImage.getWidth();
			int h = backgroundImage.getHeight();
			if (w != -1 && h != -1) {
				int x1 = (r.x / w) * w;
				int y1 = (r.y / h) * h;
				int x2 = ((r.x + r.width + w - 1) / w) * w;
				int y2 = ((r.y + r.height + h - 1) / h) * h;
				for (y = y1; y < y2; y += h)
					for (x = x1; x < x2; x += w)
						g.drawImage(backgroundImage, x, y, c);
			}
			g.setClip(saveClip);
		}
	}
658341
def setBackgroundBrush(self, brush):
        
        if type(brush) == str:
            brush = QBrush(QColor(brush))
        elif type(brush) == QColor:
            brush = QBrush(brush)
        elif type(brush) != QBrush:
            return
        
        # update the palette color
        palette = self.palette()
        palette.setColor(palette.GridBackground, brush.color())
        
        super(XNodeScene, self).setBackgroundBrush(brush)
24477
public void setCustomBarGraphColor(final Color COLOR) {
        getModel().setCustomValueColorObject(new CustomColorDef(COLOR));
        init(getInnerBounds().width, getInnerBounds().width);
        repaint(getInnerBounds());
    }
602006
public void paintPerf (Graphics2D gfx)
    {
        if (_perfRect != null && FrameManager._perfDebug.getValue()) {
            gfx.setClip(null);
            _perfLabel.render(gfx, _perfRect.x, _perfRect.y);
        }
    }
782643
def _repaint(self, drawing_context: DrawingContext.DrawingContext):
        """"""

        # canvas size
        canvas_width = self.canvas_size.width
        canvas_height = self.canvas_size.height

        with drawing_context.saver():
            if self.__color_map_data is not None:
                rgba_image = numpy.empty((4,) + self.__color_map_data.shape[:-1], dtype=numpy.uint32)
                Image.get_rgb_view(rgba_image)[:] = self.__color_map_data[numpy.newaxis, :, :]  # scalar data assigned to each component of rgb view
                Image.get_alpha_view(rgba_image)[:] = 255
                drawing_context.draw_image(rgba_image, 0, 0, canvas_width, canvas_height)
1264794
function LGraphTextureColor() {
            this.addOutput("Texture", "Texture");

            this._tex_color = vec4.create();
            this.properties = {
                color: vec4.create(),
                precision: LGraphTexture.DEFAULT
            };
        }