java.awt.Graphics2D.getBackground()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(3.4k)|赞(0)|评价(0)|浏览(183)

本文整理了Java中java.awt.Graphics2D.getBackground()方法的一些代码示例,展示了Graphics2D.getBackground()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Graphics2D.getBackground()方法的具体详情如下:
包路径:java.awt.Graphics2D
类名称:Graphics2D
方法名:getBackground

Graphics2D.getBackground介绍

暂无

代码示例

代码示例来源:origin: pentaho/pentaho-kettle

public void switchForegroundBackgroundColors() {
 Color fg = gc.getColor();
 Color bg = gc.getBackground();
 gc.setColor( bg );
 gc.setBackground( fg );
}

代码示例来源:origin: pentaho/pentaho-kettle

public void switchForegroundBackgroundColors() {
 Color fg = gc.getColor();
 Color bg = gc.getBackground();
 gc.setColor( bg );
 gc.setBackground( fg );
}

代码示例来源:origin: apache/pdfbox

@Override
public Color getBackground()
{
  return groupG2D.getBackground();
}

代码示例来源:origin: geotools/geotools

public Color getBackground() {
  return delegate.getBackground();
}

代码示例来源:origin: stackoverflow.com

g2d.fillRect(0, 0, w, h);
g2d.setComposite(AlphaComposite.Src);
g2d.setPaint(g2d.getBackground());
g2d.fillRect(0, 0, w, h);
renderTime(g2d);

代码示例来源:origin: org.apache.pdfbox/pdfbox

@Override
public Color getBackground()
{
  return groupG2D.getBackground();
}

代码示例来源:origin: pentaho/pentaho-reporting

/**
 * Returns the background color used for clearing a region.
 *
 * @return the current <code>Graphics2D</code> <code>Color</code>, which defines the background color.
 * @see #setBackground
 */
public Color getBackground() {
 return parent.getBackground();
}

代码示例来源:origin: robo-code/robocode

@Override
public Color getBackground() {
  return g.getBackground();
}

代码示例来源:origin: com.samskivert/samskivert

@Override
public Color getBackground ()
{
  return _primary.getBackground();
}

代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/napkinlaf

/** {@inheritDoc} */
@Override
public Color getBackground() {
  return g2d.getBackground();
}

代码示例来源:origin: org.swinglabs.swingx/swingx-graphics

@Override
public Color getBackground() {
  return delegate.getBackground();
}

代码示例来源:origin: us.ihmc/Plotting

public Color getBackground()
{
 return graphics2d.getBackground();
}

代码示例来源:origin: us.ihmc/ihmc-graphics-description

public Color getBackground()
{
 return graphics2d.getBackground();
}

代码示例来源:origin: us.ihmc/IHMCGraphicsDescription

public Color getBackground()
{
 return graphics2d.getBackground();
}

代码示例来源:origin: org.bidib.jbidib.swinglabs.swingx/swingx-graphics

@Override
public Color getBackground() {
  return delegate.getBackground();
}

代码示例来源:origin: org.openmicroscopy/ome-poi

public Color getBackground()
{
  System.out.println( "getBackground():" );
  return g2D.getBackground();
}

代码示例来源:origin: com.haulmont.thirdparty/poi

public Color getBackground()
{
  System.out.println( "getBackground():" );
  return g2D.getBackground();
}

代码示例来源:origin: org.openl.rules/org.openl.lib.poi.dev

public Color getBackground()
{
  System.out.println( "getBackground():" );
  return g2D.getBackground();
}

代码示例来源:origin: ev3dev-lang-java/ev3dev-lang-java

@Override
public void drawString(String str, int x, int y, int anchor, boolean inverted) {
  Color oldFg = g2d.getColor();
  Color oldBg = g2d.getBackground();
  g2d.setColor(inverted ? Color.WHITE : Color.BLACK);
  g2d.setBackground(inverted ? Color.BLACK : Color.WHITE);
  drawString(str, x, y, anchor);
  g2d.setColor(oldFg);
  g2d.setBackground(oldBg);
}

代码示例来源:origin: robo-code/robocode

public void save(Graphics g) {
  Graphics2D g2 = (Graphics2D) g;
  paint = g2.getPaint();
  font = g2.getFont();
  stroke = g2.getStroke();
  transform = g2.getTransform();
  composite = g2.getComposite();
  clip = g2.getClip();
  renderingHints = g2.getRenderingHints();
  color = g2.getColor();
  background = g2.getBackground();
}

相关文章

Graphics2D类方法