com.foxit.gsdk.pdf

Class Renderer

    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static int FLAG_BGRSTRIPE
      Set if device is using BGR LCD stripe.
      static int FLAG_GRAYSCALE
      Gray scale output.
      static int FLAG_LCDTEXT
      Set if it needs text rendering optimized for LCD display.
      static int FLAG_NONATIVETEXT
      Disable native text rendering feature (like GDI+, CGContext).
      static int FLAG_TEXTGAMMA
      Enable gamma support to display small characters.
      static int FLAG_USEANTIALIAS
      Use anti-aliasing to render graphics objects.
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      static Renderer create(Bitmap bitmap)
      Create a Renderer object, from a specific Bitmap object.
      void drawBitmap(java.awt.Point dstPt, Bitmap srcBitmap, Rect srcRect)
      Render a bitmap object.
      long getHandle()
      Get the Renderer handle.
      void release()
      Release the Renderer object.
      void setClipRect(Rect clipRect)
      Set current clipping rectangle into a Renderer object.
      void setFlags(int flags)
      Set flags of a Renderer object.
      static void setGamma(float gamma)
      Set gamma value for rendering text.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • FLAG_LCDTEXT

        public static final int FLAG_LCDTEXT
        Set if it needs text rendering optimized for LCD display.
        See Also:
        Constant Field Values
      • FLAG_BGRSTRIPE

        public static final int FLAG_BGRSTRIPE
        Set if device is using BGR LCD stripe.
        See Also:
        Constant Field Values
      • FLAG_USEANTIALIAS

        public static final int FLAG_USEANTIALIAS
        Use anti-aliasing to render graphics objects.
        See Also:
        Constant Field Values
      • FLAG_GRAYSCALE

        public static final int FLAG_GRAYSCALE
        Gray scale output.
        See Also:
        Constant Field Values
      • FLAG_NONATIVETEXT

        public static final int FLAG_NONATIVETEXT
        Disable native text rendering feature (like GDI+, CGContext).
        See Also:
        Constant Field Values
      • FLAG_TEXTGAMMA

        public static final int FLAG_TEXTGAMMA
        Enable gamma support to display small characters.
        See Also:
        Constant Field Values
    • Method Detail

      • getHandle

        public long getHandle()
        Get the Renderer handle.
        Returns:
        The Renderer handle.
      • setFlags

        public void setFlags(int flags)
                      throws PDFException
        Set flags of a Renderer object.
        Parameters:
        flags - An integer value for renderer flags. All undefined bits are omitted.
        Please refer to constant definitions FLAG_XXX and this can be one or a combination of these constants.
        Throws:
        PDFException - For more exception information please see definitions PDFException.ERRCODE_XXX.
        See Also:
        PDFException
      • setGamma

        public static void setGamma(float gamma)
                             throws PDFException
        Set gamma value for rendering text.

        Gamma value is a collation value of a picture.

        Parameters:
        gamma - Gamma value. It should be greater than 0. Default value is 2.2.
        Throws:
        PDFException - For more exception information please see definitions PDFException.ERRCODE_XXX.
        See Also:
        PDFException
      • setClipRect

        public void setClipRect(Rect clipRect)
                         throws PDFException
        Set current clipping rectangle into a Renderer object.
        Parameters:
        clipRect - A Rect object which specifies a clipping rectangle.
        Throws:
        PDFException - For more exception information please see definitions PDFException.ERRCODE_XXX.
        See Also:
        PDFException
      • drawBitmap

        public void drawBitmap(java.awt.Point dstPt,
                      Bitmap srcBitmap,
                      Rect srcRect)
                        throws PDFException
        Render a bitmap object.
        Parameters:
        dstPt - A Point object that represents the left-top position of the area to render in the destination coordination.
        srcBitmap - A Bitmap object which is to be rendered.
        srcRect - A Rect object which specifies a rectangle of parameter srcBitmap.
        Throws:
        PDFException - For more exception information please see definitions PDFException.ERRCODE_XXX.
        See Also:
        PDFException