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.rootsoft.rspdfviewer.pdf;
//www.java2s.comimport anywheresoftware.b4a.AbsObjectWrapper;
import anywheresoftware.b4a.BA.ShortName;
import com.radaee.pdf.Path;
@ShortName("PDFPath")
publicclass RSPDFPath extends AbsObjectWrapper<Path> {
// Attributes
// Constructors - Initialization
/**
* Initializes the PDFDocument.
*/publicvoid Initialize() {
setObject(new Path());
}
/**
* move to operation
*
* @param x
* @param y
*/publicvoid MoveTo(float x, float y) {
getObject().MoveTo(x, y);
}
/**
* line to operation
*
* @param x
* @param y
*/publicvoid LineTo(float x, float y) {
getObject().LineTo(x, y);
}
publicvoid CurveTo(float x1, float y1, float x2, float y2, float x3, float y3) {
getObject().CurveTo(x1, y1, x2, y2, x3, y3);
}
/**
* close a contour.
*/publicvoid ClosePath() {
getObject().ClosePath();
}
/**
* free memory
*/publicvoid Destroy() {
getObject().Destroy();
}
publicint GetNodeCount() {
return getObject().GetNodeCount();
}
/**
* get each node
*
* @param index
* range [0, GetNodeCount() - 1]
* @param pt
* output value: 2 elements coordinate point
* @return node type:<br/>
* 0: move to<br/>
* 1: line to<br/>
* 3: curve to, index, index + 1, index + 2 are all data<br/>
* 4: close operation<br/>
*/publicint GetNode(int index, float pt[]) {
return getObject().GetNode(index, pt);
}
}