Tabnine Logo
Graphics2D.getRenderingHints
Code IndexAdd Tabnine to your IDE (free)

How to use
getRenderingHints
method
in
java.awt.Graphics2D

Best Java code snippets using java.awt.Graphics2D.getRenderingHints (Showing top 20 results out of 567)

origin: org.apache.poi/poi

public RenderingHints getRenderingHints()
{
  return getG2D().getRenderingHints();
}
origin: org.apache.poi/poi

/**
 * Compute the cumulative height occupied by the text
 *
 * @param oldGraphics the graphics context, which properties are to be copied, may be null
 * @return the height in points
 */
public double getTextHeight(Graphics2D oldGraphics) {
  // dry-run in a 1x1 image and return the vertical advance
  BufferedImage img = new BufferedImage(1, 1, BufferedImage.TYPE_INT_RGB);
  Graphics2D graphics = img.createGraphics();
  if (oldGraphics != null) {
    graphics.addRenderingHints(oldGraphics.getRenderingHints());
    graphics.setTransform(oldGraphics.getTransform());
  }
  DrawFactory.getInstance(graphics).fixFonts(graphics);
  return drawParagraphs(graphics, 0, 0);
}

origin: apache/pdfbox

@Override
public RenderingHints getRenderingHints()
{
  return groupG2D.getRenderingHints();
}
origin: geotools/geotools

public RenderingHints getRenderingHints() {
  return delegate.getRenderingHints();
}
origin: geotools/geotools

/** Call this method before starting to use the graphic for good */
public void init() {
  if (delegate == null) {
    if (master instanceof DelayedBackbufferGraphic) {
      ((DelayedBackbufferGraphic) master).init();
    }
    image =
        master.getDeviceConfiguration()
            .createCompatibleImage(
                screenSize.width, screenSize.height, Transparency.TRANSLUCENT);
    delegate = image.createGraphics();
    delegate.setRenderingHints(master.getRenderingHints());
  }
}
origin: geotools/geotools

  RenderedImage inputImage,
  final RasterSymbolizer symbolizer) {
final RenderingHints oldHints = graphics.getRenderingHints();
graphics.setRenderingHints(this.hints);
origin: org.apache.pdfbox/pdfbox

@Override
public RenderingHints getRenderingHints()
{
  return groupG2D.getRenderingHints();
}
origin: com.samskivert/samskivert

@Override
public RenderingHints getRenderingHints ()
{
  return _primary.getRenderingHints();
}
origin: net.sf.squirrel-sql.thirdparty-non-maven/napkinlaf

/** {@inheritDoc} */
@Override
public RenderingHints getRenderingHints() {
  return g2d.getRenderingHints();
}
origin: us.ihmc/ihmc-graphics-description

public RenderingHints getRenderingHints()
{
 return graphics2d.getRenderingHints();
}
origin: us.ihmc/IHMCGraphicsDescription

public RenderingHints getRenderingHints()
{
 return graphics2d.getRenderingHints();
}
origin: org.openmicroscopy/ome-poi

public RenderingHints getRenderingHints()
{
  System.out.println( "getRenderingHints():" );
  return g2D.getRenderingHints();
}
origin: org.openl.rules/org.openl.lib.poi.dev

public RenderingHints getRenderingHints()
{
  System.out.println( "getRenderingHints():" );
  return g2D.getRenderingHints();
}
origin: com.samskivert/samskivert

public void paintIcon (Component c, Graphics g, int x, int y)
{
  Graphics2D gfx = (Graphics2D) g;
  AffineTransform otrans = gfx.getTransform();
  RenderingHints ohints = gfx.getRenderingHints();
  gfx.setRenderingHint(RenderingHints.KEY_INTERPOLATION,
    RenderingHints.VALUE_INTERPOLATION_BILINEAR);
  gfx.scale(_scale, _scale);
  _icon.paintIcon(c, g, x, y);
  gfx.setTransform(otrans);
  gfx.setRenderingHints(ohints);
}
origin: org.fudaa.framework.ctulu/ctulu-common

public static void setBestQuality(final Graphics2D _g) {
 _g.getRenderingHints().put(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BICUBIC);
 _g.getRenderingHints().put(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
 _g.getRenderingHints().put(RenderingHints.KEY_COLOR_RENDERING, RenderingHints.VALUE_COLOR_RENDER_QUALITY);
 _g.getRenderingHints()
   .put(RenderingHints.KEY_ALPHA_INTERPOLATION, RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY);
 _g.getRenderingHints().put(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
 _g.getRenderingHints().put(RenderingHints.KEY_FRACTIONALMETRICS, RenderingHints.VALUE_FRACTIONALMETRICS_ON);
 _g.getRenderingHints().put(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
}
origin: JetBrains/jediterm

public GraphicsConfig(Graphics g) {
 myG = (Graphics2D)g;
 myHints = (Map)myG.getRenderingHints().clone();
 myComposite = myG.getComposite();
}
origin: org.geotools/gt-render

/**
 * Call this method before starting to use the graphic for good
 */
public void init() {
  if (delegate == null) {
    image = master.getDeviceConfiguration().createCompatibleImage(screenSize.width,
        screenSize.height, Transparency.TRANSLUCENT);
    delegate = image.createGraphics();
    delegate.setRenderingHints(master.getRenderingHints());
  }
}
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();
}
origin: com.numdata/numdata-swing

@Override
protected void paintComponent( final Graphics g )
{
  final Graphics2D g2d = (Graphics2D)g;
  final RenderingHints oldHints = g2d.getRenderingHints();
  g2d.setRenderingHint( RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON );
  super.paintComponent( g );
  g2d.setRenderingHints( oldHints );
}
origin: stackoverflow.com

 Graphics2D g2 = (Graphics2D) g;
RenderingHints rh = g2.getRenderingHints ();
rh.put (RenderingHints.KEY_ANTIALIASING,
    RenderingHints.VALUE_ANTIALIAS_ON);
g2.setRenderingHints (rh);
java.awtGraphics2DgetRenderingHints

Popular methods of Graphics2D

  • setColor
  • dispose
  • drawImage
  • setRenderingHint
  • fillRect
  • drawString
  • setFont
  • setStroke
    Sets the Stroke for the Graphics2D context.
  • fill
  • setPaint
  • drawLine
  • getFontMetrics
  • drawLine,
  • getFontMetrics,
  • draw,
  • setComposite,
  • translate,
  • drawRect,
  • setTransform,
  • getFontRenderContext,
  • getTransform,
  • setClip

Popular in Java

  • Reactive rest calls using spring rest template
  • setContentView (Activity)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • addToBackStack (FragmentTransaction)
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • Option (scala)
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now