Android Open Source - RadaeePDF-B4A H Writing






From Project

Back to project page RadaeePDF-B4A.

License

The source code is released under:

Apache License

If you think the Android project RadaeePDF-B4A listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.radaee.pdf;
/*w  w w.j av a  2  s  .  co m*/
import android.graphics.Bitmap;
import android.graphics.Bitmap.Config;

/**
class for hand-writing ink.<br/>
not same to Ink class, this class has max line width and min line width.<br/>
so the line in HWriting will not in same width.
@author Radaee
@version 1.1
*/
public class HWriting
{
  protected int hand = 0;
  private Bitmap m_bmp;
  private static native int create( int w, int h, float min_w, float max_w, int clr_r, int clr_g, int clr_b );
  private static native void onDown( int hand, float x, float y );
  private static native void onMove( int hand, float x, float y );
  private static native void onUp( int hand, float x, float y );
  private static native void onDraw( int hand, int bmp );
  private static native void destroy( int hand );
  /**
   * constructor for hand-writing.
   * @param w width of cache.
   * @param h height of cache.
   * @param min_w min-width for ink width.
   * @param max_w max-width for ink width.
   * @param clr_r r values of ink color [0-255]
   * @param clr_g g values of ink color [0-255]
   * @param clr_b b values of ink color [0-255]
   */
  public HWriting( int w, int h, float min_w, float max_w, int clr_r, int clr_g, int clr_b )
  {
    hand = create( w, h, min_w, max_w, clr_r, clr_g, clr_b );
    m_bmp = Bitmap.createBitmap(w, h, Config.ARGB_8888);
  }
  /**
   * destroy and free memory.
   */
  public void Destroy()
  {
    destroy( hand );
    hand = 0;
    m_bmp.recycle();
  }
  /**
   * call when click down
   * @param x x value of point in this object.
   * @param y y value of point in this object.
   */
  public void OnDown( float x, float y )
  {
    onDown( hand, x, y );
  }
  /**
   * call when moving
   * @param x x value of point in this object.
   * @param y y value of point in this object.
   */
  public void OnMove( float x, float y )
  {
    onMove( hand, x, y );
  }
  /**
   * call when click up
   * @param x x value of point in this object.
   * @param y y value of point in this object.
   */
  public void OnUp( float x, float y )
  {
    onUp( hand, x, y );
  }
  /**
   * draw to locked bitmap handle.
   * @param bmp, obtained by Global.lockBitmap()
   */
  public void OnDraw( int bmp )
  {
    onDraw( hand, bmp );
  }
}




Java Source Code List

com.example.pdfhttpdemo.MainActivity.java
com.example.pdfhttpdemo.ReaderController.java
com.radaee.pdf.BMDatabase.java
com.radaee.pdf.BMDatabase.java
com.radaee.pdf.BMDatabase.java
com.radaee.pdf.Document.java
com.radaee.pdf.Document.java
com.radaee.pdf.Document.java
com.radaee.pdf.Global.java
com.radaee.pdf.Global.java
com.radaee.pdf.Global.java
com.radaee.pdf.HWriting.java
com.radaee.pdf.HWriting.java
com.radaee.pdf.HWriting.java
com.radaee.pdf.Ink.java
com.radaee.pdf.Ink.java
com.radaee.pdf.Ink.java
com.radaee.pdf.Matrix.java
com.radaee.pdf.Matrix.java
com.radaee.pdf.Matrix.java
com.radaee.pdf.PDFHttpStream.java
com.radaee.pdf.PageContent.java
com.radaee.pdf.PageContent.java
com.radaee.pdf.PageContent.java
com.radaee.pdf.Page.java
com.radaee.pdf.Page.java
com.radaee.pdf.Page.java
com.radaee.pdf.Path.java
com.radaee.pdf.Path.java
com.radaee.pdf.Path.java
com.radaee.reader.PDFCropAct.java
com.radaee.reader.PDFCrop.java
com.radaee.reader.PDFEncAct.java
com.radaee.reader.PDFInkAct.java
com.radaee.reader.PDFInk.java
com.radaee.reader.PDFReaderAct.java
com.radaee.reader.PDFReaderOldAct.java
com.radaee.reader.PDFReaderOld.java
com.radaee.reader.PDFReader.java
com.radaee.reader.PDFSimpleAct.java
com.radaee.reader.PDFSimple.java
com.radaee.reader.PDFTestAct.java
com.radaee.reader.ReaderActivity.java
com.radaee.reader.ReaderController.java
com.radaee.reader.ReaderController.java
com.radaee.util.ComboListAdt.java
com.radaee.util.ComboList.java
com.radaee.util.PDFAESEnc.java
com.radaee.util.PDFAESEnc.java
com.radaee.util.PDFAESStream.java
com.radaee.util.PDFAESStream.java
com.radaee.util.PDFAssetStream.java
com.radaee.util.PDFAssetStream.java
com.radaee.util.PDFFileStream.java
com.radaee.util.PDFFileStream.java
com.radaee.util.PDFGridAdt.java
com.radaee.util.PDFGridItem.java
com.radaee.util.PDFGridThread.java
com.radaee.util.PDFGridView.java
com.radaee.util.PDFHttpStream.java
com.radaee.util.PDFHttpStream.java
com.radaee.util.PDFMemStream.java
com.radaee.util.PDFMemStream.java
com.radaee.util.PDFThumbView.java
com.radaee.util.SnatchAdt.java
com.radaee.util.SnatchView.java
com.rootsoft.pdfviewer.main.java
com.rootsoft.pdfviewer.readercontroller.java
com.rootsoft.rspdfviewer.pdf.RSPDFAnnotation.java
com.rootsoft.rspdfviewer.pdf.RSPDFBMDatabase.java
com.rootsoft.rspdfviewer.pdf.RSPDFDocument.java
com.rootsoft.rspdfviewer.pdf.RSPDFGlobal.java
com.rootsoft.rspdfviewer.pdf.RSPDFHWriting.java
com.rootsoft.rspdfviewer.pdf.RSPDFInk.java
com.rootsoft.rspdfviewer.pdf.RSPDFMatrix.java
com.rootsoft.rspdfviewer.pdf.RSPDFPageContent.java
com.rootsoft.rspdfviewer.pdf.RSPDFPage.java
com.rootsoft.rspdfviewer.pdf.RSPDFPath.java
com.rootsoft.rspdfviewer.pdf.RSPDFTemplate.java
com.rootsoft.rspdfviewer.pdf.RSPDFVPage.java
com.rootsoft.rspdfviewer.pdf.RSPDFViewCurl.java
com.rootsoft.rspdfviewer.pdf.RSPDFViewDual.java
com.rootsoft.rspdfviewer.pdf.RSPDFViewHorz.java
com.rootsoft.rspdfviewer.pdf.RSPDFViewThumb.java
com.rootsoft.rspdfviewer.pdf.RSPDFViewVert.java
com.rootsoft.rspdfviewer.pdf.RSPDFView.java
com.rootsoft.rspdfviewer.pdf.RSReaderView.java