Codota Logo
LineMetrics.getStrikethroughThickness
Code IndexAdd Codota to your IDE (free)

How to use
getStrikethroughThickness
method
in
java.awt.font.LineMetrics

Best Java code snippets using java.awt.font.LineMetrics.getStrikethroughThickness (Showing top 15 results out of 315)

  • Common ways to obtain LineMetrics
private void myMethod () {
LineMetrics l =
  • Codota IconFont font;String text;FontRenderContext frc;font.getLineMetrics(text, frc)
  • Codota IconFont font;String str;Graphics2D graphics2D;font.getLineMetrics(str, graphics2D.getFontRenderContext())
  • Codota IconGraphics2D graphics2D;String str;FontRenderContext fontRenderContext;graphics2D.getFont().getLineMetrics(str, fontRenderContext)
  • Smart code suggestions by Codota
}
origin: geotools/geotools

/**
 * Helper method that will draw the underline of a curved label using the context of the cursor.
 */
private void drawCurvedStrikethrough(
    LineInfo line,
    LineStringCursor cursor,
    double startOrdinate,
    boolean drawingHalo,
    LineMetrics metrics) {
  final float lineOffset = metrics.getStrikethroughOffset();
  final float lineThickness = metrics.getStrikethroughThickness();
  drawCurvedLine(line, cursor, startOrdinate, drawingHalo, lineOffset, lineThickness);
}
origin: geotools/geotools

/**
 * Draws a line under the text with the same color of the text and with the same width using the
 * provided thickness and offset.
 */
private void drawStraightLabelStrikethroughIfNeeded(
    java.awt.Shape outline, LineMetrics metrics, boolean drawingHalo) {
  // let's see if text strikethrough is enabled for this label or we have something to draw
  if (!labelItem.isTextStrikethrough()) {
    // text strikethrough not enabled or nothing to draw
    return;
  }
  // get needed metrics values
  float thickness = metrics.getStrikethroughThickness();
  float offset = metrics.getStrikethroughOffset();
  drawStraightLabelLine(outline, drawingHalo, thickness, offset);
}
origin: org.docx4j/xhtmlrenderer

public float getStrikethroughThickness() {
  return _lineMetrics.getStrikethroughThickness();
}
origin: org.xhtmlrenderer/core-renderer

public float getStrikethroughThickness() {
  return _lineMetrics.getStrikethroughThickness();
}
origin: com.google.code.maven-play-plugin.org.xhtmlrenderer/core-renderer

public float getStrikethroughThickness() {
  return _lineMetrics.getStrikethroughThickness();
}
origin: danfickle/openhtmltopdf

public float getStrikethroughThickness() {
  float max = -Float.MAX_VALUE;
  
  for (LineMetrics met : _lineMetrics) {
    max = Math.max(max, met.getStrikethroughThickness());
  }
  
  return max;
}
origin: apache/fop

public int getStrikeoutThickness(String family, int style, int size) {
  setFont(family, style, size);
  return Math.round(lineMetrics.getStrikethroughThickness());
}
origin: net.java.abeille/abeille

private synchronized void initStrikethrough(Graphics g) {
  LineMetrics lm = font.getLineMetrics("aAyY", ((Graphics2D) g).getFontRenderContext());
  strikethroughOffset = lm.getStrikethroughOffset();
  strikethroughThickness = lm.getStrikethroughThickness();
  inited |= ST_INITED;
}
origin: net.sf.squirrel-sql.thirdparty-non-maven/org-netbeans-modules-editor-lib

private synchronized void initStrikethrough(Graphics g) {
  LineMetrics lm = font.getLineMetrics("aAyY", ((Graphics2D)g).getFontRenderContext()); // NOI18N
  strikethroughOffset = lm.getStrikethroughOffset();
  strikethroughThickness = lm.getStrikethroughThickness();
  inited |= ST_INITED;
}
origin: fr.avianey.apache-xmlgraphics/batik

/**
 * Constructs a GVTLineMetrics object based on the specified line metrics.
 *
 * @param lineMetrics The lineMetrics object that this metrics object will
 * be based upon.
 */
public GVTLineMetrics(LineMetrics lineMetrics) {
  this.ascent = lineMetrics.getAscent();
  this.baselineIndex = lineMetrics.getBaselineIndex();
  this.baselineOffsets = lineMetrics.getBaselineOffsets();
  this.descent = lineMetrics.getDescent();
  this.height = lineMetrics.getHeight();
  this.leading = lineMetrics.getLeading();
  this.numChars = lineMetrics.getNumChars();
  this.strikethroughOffset = lineMetrics.getStrikethroughOffset();
  this.strikethroughThickness = lineMetrics.getStrikethroughThickness();
  this.underlineOffset = lineMetrics.getUnderlineOffset();
  this.underlineThickness = lineMetrics.getUnderlineThickness();
  this.overlineOffset = -this.ascent;
  this.overlineThickness = this.underlineThickness;
}
origin: apache/batik

/**
 * Constructs a GVTLineMetrics object based on the specified line metrics.
 *
 * @param lineMetrics The lineMetrics object that this metrics object will
 * be based upon.
 */
public GVTLineMetrics(LineMetrics lineMetrics) {
  this.ascent = lineMetrics.getAscent();
  this.baselineIndex = lineMetrics.getBaselineIndex();
  this.baselineOffsets = lineMetrics.getBaselineOffsets();
  this.descent = lineMetrics.getDescent();
  this.height = lineMetrics.getHeight();
  this.leading = lineMetrics.getLeading();
  this.numChars = lineMetrics.getNumChars();
  this.strikethroughOffset = lineMetrics.getStrikethroughOffset();
  this.strikethroughThickness = lineMetrics.getStrikethroughThickness();
  this.underlineOffset = lineMetrics.getUnderlineOffset();
  this.underlineThickness = lineMetrics.getUnderlineThickness();
  this.overlineOffset = -this.ascent;
  this.overlineThickness = this.underlineThickness;
}
origin: org.apache.xmlgraphics/batik-gvt

/**
 * Constructs a GVTLineMetrics object based on the specified line metrics.
 *
 * @param lineMetrics The lineMetrics object that this metrics object will
 * be based upon.
 */
public GVTLineMetrics(LineMetrics lineMetrics) {
  this.ascent = lineMetrics.getAscent();
  this.baselineIndex = lineMetrics.getBaselineIndex();
  this.baselineOffsets = lineMetrics.getBaselineOffsets();
  this.descent = lineMetrics.getDescent();
  this.height = lineMetrics.getHeight();
  this.leading = lineMetrics.getLeading();
  this.numChars = lineMetrics.getNumChars();
  this.strikethroughOffset = lineMetrics.getStrikethroughOffset();
  this.strikethroughThickness = lineMetrics.getStrikethroughThickness();
  this.underlineOffset = lineMetrics.getUnderlineOffset();
  this.underlineThickness = lineMetrics.getUnderlineThickness();
  this.overlineOffset = -this.ascent;
  this.overlineThickness = this.underlineThickness;
}
origin: apache/batik

/**
 * Constructs a GVTLineMetrics object based on the specified line metrics
 * with a scale factor applied.
 *
 * @param lineMetrics The lineMetrics object that this metrics object will
 * be based upon.
 * @param scaleFactor The scale factor to apply to all metrics.
 */
public GVTLineMetrics(LineMetrics lineMetrics, float scaleFactor) {
  this.ascent = lineMetrics.getAscent() * scaleFactor;
  this.baselineIndex = lineMetrics.getBaselineIndex();
  this.baselineOffsets = lineMetrics.getBaselineOffsets();
  for (int i=0; i<baselineOffsets.length; i++) {
    this.baselineOffsets[i] *= scaleFactor;
  }
  this.descent = lineMetrics.getDescent() * scaleFactor;
  this.height = lineMetrics.getHeight() * scaleFactor;
  this.leading = lineMetrics.getLeading();
  this.numChars = lineMetrics.getNumChars();
  this.strikethroughOffset = 
    lineMetrics.getStrikethroughOffset() * scaleFactor;
  this.strikethroughThickness = 
    lineMetrics.getStrikethroughThickness() * scaleFactor;
  this.underlineOffset = lineMetrics.getUnderlineOffset() * scaleFactor;
  this.underlineThickness = 
    lineMetrics.getUnderlineThickness() * scaleFactor;
  this.overlineOffset = -this.ascent;
  this.overlineThickness = this.underlineThickness;
}
origin: org.apache.xmlgraphics/batik-gvt

/**
 * Constructs a GVTLineMetrics object based on the specified line metrics
 * with a scale factor applied.
 *
 * @param lineMetrics The lineMetrics object that this metrics object will
 * be based upon.
 * @param scaleFactor The scale factor to apply to all metrics.
 */
public GVTLineMetrics(LineMetrics lineMetrics, float scaleFactor) {
  this.ascent = lineMetrics.getAscent() * scaleFactor;
  this.baselineIndex = lineMetrics.getBaselineIndex();
  this.baselineOffsets = lineMetrics.getBaselineOffsets();
  for (int i=0; i<baselineOffsets.length; i++) {
    this.baselineOffsets[i] *= scaleFactor;
  }
  this.descent = lineMetrics.getDescent() * scaleFactor;
  this.height = lineMetrics.getHeight() * scaleFactor;
  this.leading = lineMetrics.getLeading();
  this.numChars = lineMetrics.getNumChars();
  this.strikethroughOffset = 
    lineMetrics.getStrikethroughOffset() * scaleFactor;
  this.strikethroughThickness = 
    lineMetrics.getStrikethroughThickness() * scaleFactor;
  this.underlineOffset = lineMetrics.getUnderlineOffset() * scaleFactor;
  this.underlineThickness = 
    lineMetrics.getUnderlineThickness() * scaleFactor;
  this.overlineOffset = -this.ascent;
  this.overlineThickness = this.underlineThickness;
}
origin: fr.avianey.apache-xmlgraphics/batik

/**
 * Constructs a GVTLineMetrics object based on the specified line metrics
 * with a scale factor applied.
 *
 * @param lineMetrics The lineMetrics object that this metrics object will
 * be based upon.
 * @param scaleFactor The scale factor to apply to all metrics.
 */
public GVTLineMetrics(LineMetrics lineMetrics, float scaleFactor) {
  this.ascent = lineMetrics.getAscent() * scaleFactor;
  this.baselineIndex = lineMetrics.getBaselineIndex();
  this.baselineOffsets = lineMetrics.getBaselineOffsets();
  for (int i=0; i<baselineOffsets.length; i++) {
    this.baselineOffsets[i] *= scaleFactor;
  }
  this.descent = lineMetrics.getDescent() * scaleFactor;
  this.height = lineMetrics.getHeight() * scaleFactor;
  this.leading = lineMetrics.getLeading();
  this.numChars = lineMetrics.getNumChars();
  this.strikethroughOffset = 
    lineMetrics.getStrikethroughOffset() * scaleFactor;
  this.strikethroughThickness = 
    lineMetrics.getStrikethroughThickness() * scaleFactor;
  this.underlineOffset = lineMetrics.getUnderlineOffset() * scaleFactor;
  this.underlineThickness = 
    lineMetrics.getUnderlineThickness() * scaleFactor;
  this.overlineOffset = -this.ascent;
  this.overlineThickness = this.underlineThickness;
}
java.awt.fontLineMetricsgetStrikethroughThickness

Popular methods of LineMetrics

  • getAscent
  • getDescent
  • getHeight
  • getLeading
  • getStrikethroughOffset
  • getUnderlineOffset
  • getUnderlineThickness
  • getBaselineIndex
  • getBaselineOffsets
  • getNumChars

Popular in Java

  • Running tasks concurrently on multiple threads
  • requestLocationUpdates (LocationManager)
  • compareTo (BigDecimal)
    Compares this BigDecimal with the specified BigDecimal. Two BigDecimal objects that are equal in val
  • getSystemService (Context)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • String (java.lang)
  • PriorityQueue (java.util)
    An unbounded priority Queue based on a priority heap. The elements of the priority queue are ordered
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • JList (javax.swing)
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now