Codota Logo
PdfContentByte.HelperRGB
Code IndexAdd Codota to your IDE (free)

How to use
HelperRGB
method
in
com.itextpdf.text.pdf.PdfContentByte

Best Java code snippets using com.itextpdf.text.pdf.PdfContentByte.HelperRGB (Showing top 8 results out of 315)

  • Common ways to obtain PdfContentByte
private void myMethod () {
PdfContentByte p =
  • Codota IconPdfWriter writer;writer.getDirectContent()
  • Codota IconPdfStamper pdfStamper;pdfStamper.getOverContent(pageNum)
  • Codota IconPdfStamper pdfStamper;pdfStamper.getUnderContent(pageNum)
  • Smart code suggestions by Codota
}
origin: com.itextpdf/itextg

/**
 * Changes the current color for stroking paths (device dependent colors!).
 * <P>
 * Sets the color space to <B>DeviceRGB</B> (or the <B>DefaultRGB</B> color space),
 * and sets the color to use for stroking paths.</P>
 * <P>
 * Following the PDF manual, each operand must be a number between 0 (miniumum intensity) and
 * 1 (maximum intensity).
 *
 * @param   red     the intensity of red. A value between 0 and 1
 * @param   green   the intensity of green. A value between 0 and 1
 * @param   blue    the intensity of blue. A value between 0 and 1
 */
public void setRGBColorStrokeF(final float red, final float green, final float blue) {
  saveColor(new BaseColor(red, green, blue), false);
  HelperRGB(red, green, blue);
  content.append(" RG").append_i(separator);
}
origin: com.itextpdf/itextpdf

/**
 * Changes the current color for filling paths (device dependent colors!).
 * <P>
 * Sets the color space to <B>DeviceRGB</B> (or the <B>DefaultRGB</B> color space),
 * and sets the color to use for filling paths.</P>
 * <P>
 * Following the PDF manual, each operand must be a number between 0 (minimum intensity) and
 * 1 (maximum intensity).</P>
 *
 * @param   red     the intensity of red. A value between 0 and 1
 * @param   green   the intensity of green. A value between 0 and 1
 * @param   blue    the intensity of blue. A value between 0 and 1
 */
public void setRGBColorFillF(final float red, final float green, final float blue) {
  saveColor(new BaseColor(red, green, blue), true);
  HelperRGB(red, green, blue);
  content.append(" rg").append_i(separator);
}
origin: com.itextpdf/itextpdf

/**
 * Changes the current color for stroking paths (device dependent colors!).
 * <P>
 * Sets the color space to <B>DeviceRGB</B> (or the <B>DefaultRGB</B> color space),
 * and sets the color to use for stroking paths.</P>
 * <P>
 * Following the PDF manual, each operand must be a number between 0 (miniumum intensity) and
 * 1 (maximum intensity).
 *
 * @param   red     the intensity of red. A value between 0 and 1
 * @param   green   the intensity of green. A value between 0 and 1
 * @param   blue    the intensity of blue. A value between 0 and 1
 */
public void setRGBColorStrokeF(final float red, final float green, final float blue) {
  saveColor(new BaseColor(red, green, blue), false);
  HelperRGB(red, green, blue);
  content.append(" RG").append_i(separator);
}
origin: com.itextpdf/itextg

/**
 * Changes the current color for filling paths (device dependent colors!).
 * <P>
 * Sets the color space to <B>DeviceRGB</B> (or the <B>DefaultRGB</B> color space),
 * and sets the color to use for filling paths.</P>
 * <P>
 * Following the PDF manual, each operand must be a number between 0 (minimum intensity) and
 * 1 (maximum intensity).</P>
 *
 * @param   red     the intensity of red. A value between 0 and 1
 * @param   green   the intensity of green. A value between 0 and 1
 * @param   blue    the intensity of blue. A value between 0 and 1
 */
public void setRGBColorFillF(final float red, final float green, final float blue) {
  saveColor(new BaseColor(red, green, blue), true);
  HelperRGB(red, green, blue);
  content.append(" rg").append_i(separator);
}
origin: com.itextpdf/itextg

/**
 * Changes the current color for filling paths (device dependent colors!).
 * <P>
 * Sets the color space to <B>DeviceRGB</B> (or the <B>DefaultRGB</B> color space),
 * and sets the color to use for filling paths.</P>
 * <P>
 * This method is described in the 'Portable Document Format Reference Manual version 1.3'
 * section 8.5.2.1 (page 331).</P>
 * <P>
 * Following the PDF manual, each operand must be a number between 0 (minimum intensity) and
 * 1 (maximum intensity). This method however accepts only integers between 0x00 and 0xFF.</P>
 *
 * @param red the intensity of red
 * @param green the intensity of green
 * @param blue the intensity of blue
 */
public void setRGBColorFill(final int red, final int green, final int blue) {
  saveColor(new BaseColor(red, green, blue), true);
  HelperRGB((float) (red & 0xFF) / 0xFF, (float) (green & 0xFF) / 0xFF, (float) (blue & 0xFF) / 0xFF);
  content.append(" rg").append_i(separator);
}
origin: com.itextpdf/itextpdf

/**
 * Changes the current color for stroking paths (device dependent colors!).
 * <P>
 * Sets the color space to <B>DeviceRGB</B> (or the <B>DefaultRGB</B> color space),
 * and sets the color to use for stroking paths.</P>
 * <P>
 * This method is described in the 'Portable Document Format Reference Manual version 1.3'
 * section 8.5.2.1 (page 331).</P>
 * Following the PDF manual, each operand must be a number between 0 (minimum intensity) and
 * 1 (maximum intensity). This method however accepts only integers between 0x00 and 0xFF.
 *
 * @param red the intensity of red
 * @param green the intensity of green
 * @param blue the intensity of blue
 */
public void setRGBColorStroke(final int red, final int green, final int blue) {
  saveColor(new BaseColor(red, green, blue), false);
  HelperRGB((float) (red & 0xFF) / 0xFF, (float) (green & 0xFF) / 0xFF, (float) (blue & 0xFF) / 0xFF);
  content.append(" RG").append_i(separator);
}
origin: com.itextpdf/itextpdf

/**
 * Changes the current color for filling paths (device dependent colors!).
 * <P>
 * Sets the color space to <B>DeviceRGB</B> (or the <B>DefaultRGB</B> color space),
 * and sets the color to use for filling paths.</P>
 * <P>
 * This method is described in the 'Portable Document Format Reference Manual version 1.3'
 * section 8.5.2.1 (page 331).</P>
 * <P>
 * Following the PDF manual, each operand must be a number between 0 (minimum intensity) and
 * 1 (maximum intensity). This method however accepts only integers between 0x00 and 0xFF.</P>
 *
 * @param red the intensity of red
 * @param green the intensity of green
 * @param blue the intensity of blue
 */
public void setRGBColorFill(final int red, final int green, final int blue) {
  saveColor(new BaseColor(red, green, blue), true);
  HelperRGB((float) (red & 0xFF) / 0xFF, (float) (green & 0xFF) / 0xFF, (float) (blue & 0xFF) / 0xFF);
  content.append(" rg").append_i(separator);
}
origin: com.itextpdf/itextg

/**
 * Changes the current color for stroking paths (device dependent colors!).
 * <P>
 * Sets the color space to <B>DeviceRGB</B> (or the <B>DefaultRGB</B> color space),
 * and sets the color to use for stroking paths.</P>
 * <P>
 * This method is described in the 'Portable Document Format Reference Manual version 1.3'
 * section 8.5.2.1 (page 331).</P>
 * Following the PDF manual, each operand must be a number between 0 (minimum intensity) and
 * 1 (maximum intensity). This method however accepts only integers between 0x00 and 0xFF.
 *
 * @param red the intensity of red
 * @param green the intensity of green
 * @param blue the intensity of blue
 */
public void setRGBColorStroke(final int red, final int green, final int blue) {
  saveColor(new BaseColor(red, green, blue), false);
  HelperRGB((float) (red & 0xFF) / 0xFF, (float) (green & 0xFF) / 0xFF, (float) (blue & 0xFF) / 0xFF);
  content.append(" RG").append_i(separator);
}
com.itextpdf.text.pdfPdfContentByteHelperRGB

Javadoc

Helper to validate and write the RGB color components

Popular methods of PdfContentByte

  • addTemplate
    adds a template with the given matrix.
  • createTemplate
  • beginText
    Starts the writing of text.
  • endText
    Ends the writing of text and makes the current font invalid.
  • lineTo
    Appends a straight line segment from the current point (x, y). The new current point is (x, y).
  • moveTo
    Move the current point (x, y), omitting any connecting line segment.
  • restoreState
    Restores the graphic state. saveState andrestoreState must be balanced.
  • saveState
    Saves the graphic state. saveState andrestoreState must be balanced.
  • setFontAndSize
    Set the font and the size for the subsequent text writing.
  • setLineWidth
    Changes the line width. The line width specifies the thickness of the line used to stroke a path and
  • stroke
    Strokes the path.
  • addImage
    Adds an Image to the page. The Image must have absolute positioning. The image can be placed inline.
  • stroke,
  • addImage,
  • setTextMatrix,
  • showText,
  • fill,
  • rectangle,
  • setColorFill,
  • setColorStroke,
  • setGState,
  • beginLayer

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getApplicationContext (Context)
  • onRequestPermissionsResult (Fragment)
  • getSystemService (Context)
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • InetAddress (java.net)
    This class represents an Internet Protocol (IP) address. An IP address is either a 32-bit or 128-bit
  • Locale (java.util)
    A Locale object represents a specific geographical, political, or cultural region. An operation that
  • StringTokenizer (java.util)
    The string tokenizer class allows an application to break a string into tokens. The tokenization met
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