Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (102)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (322)
Collections:
Other Resources:
iText kernel.jar Source Code
kernel.jar is a component in iText Java library to provide low-level functionalities.
iText Java library allows you to generate and manage PDF documents.
The Source Code files are provided together with the JAR file in the binary packge like iText7-Core-7.1.4.zip. You can download it at iText 7 Core Download site.
You can compile it to generate your JAR file, using kernel.pom as the build configuration file.
The source code of kernel-7.1.4.jar is provided below:
✍: FYIcenter.com
⏎ com/itextpdf/kernel/geom/Point.java
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* This code was originally part of the Apache Harmony project.
* The Apache Harmony project has been discontinued.
* That's why we imported the code into iText.
*/
/**
* @author Denis M. Kishenko
*/
package com.itextpdf.kernel.geom;
import com.itextpdf.io.util.HashCode;
import java.io.Serializable;
import com.itextpdf.io.util.MessageFormatUtil;
public class Point implements Serializable, Cloneable {
private static final long serialVersionUID = -5276940640259749850L;
public double x;
public double y;
public Point() {
setLocation(0, 0);
}
public Point(int x, int y) {
setLocation(x, y);
}
public Point(double x, double y) {
setLocation(x, y);
}
public Point(Point p) {
setLocation(p.x, p.y);
}
@Override
public boolean equals(Object obj) {
if (obj == this) {
return true;
}
if (obj instanceof Point) {
Point p = (Point)obj;
return x == p.x && y == p.y;
}
return false;
}
@Override
public String toString() {
return MessageFormatUtil.format("Point: [x={0},y={1}]", x, y); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
public double getX() {
return x;
}
public double getY() {
return y;
}
public Point getLocation() {
return new Point(x, y);
}
public void setLocation(Point p) {
setLocation(p.x, p.y);
}
public void setLocation(int x, int y) {
setLocation((double)x, (double)y);
}
public void setLocation(double x, double y) {
this.x = x;
this.y = y;
}
public void move(double x, double y) {
setLocation(x, y);
}
public void translate(double dx, double dy) {
x += dx;
y += dy;
}
@Override
public int hashCode() {
HashCode hash = new HashCode();
hash.append(getX());
hash.append(getY());
return hash.hashCode();
}
public static double distanceSq(double x1, double y1, double x2, double y2) {
x2 -= x1;
y2 -= y1;
return x2 * x2 + y2 * y2;
}
public double distanceSq(double px, double py) {
return distanceSq(getX(), getY(), px, py);
}
public double distanceSq(Point p) {
return distanceSq(getX(), getY(), p.getX(), p.getY());
}
public static double distance(double x1, double y1, double x2, double y2) {
return Math.sqrt(distanceSq(x1, y1, x2, y2));
}
public double distance(double px, double py) {
return Math.sqrt(distanceSq(px, py));
}
public double distance(Point p) {
return Math.sqrt(distanceSq(p));
}
@SuppressWarnings("CloneDoesntCallSuperClone")
@Override
public Object clone() {
return new Point(x, y);
}
}
⏎ com/itextpdf/kernel/geom/Point.java
Or download all of them as a single archive file:
File name: kernel-7.1.4-sources.jar File size: 1201221 bytes Release date: 2018-10-09 Download
⇐ Download and Install iText7-Core-7.1.4.zip
2010-02-18, ≈222🔥, 0💬
Popular Posts:
JRE 5 sunjce_provider.jar is the JAR file for JRE 5 Sun JCE Provider, which provides implementations...
jlGui is a music player for the Java platform. It is based on Java Sound 1.0 (i.e. JDK 1.3+). It sup...
Apache Commons CLI Source Code Files are provided in the source package file commons-cli-1.5.0-sourc. ..
jlGui is a music player for the Java platform. It is based on Java Sound 1.0 (i.e. JDK 1.3+). It sup...
Smack is an Open Source XMPP (Jabber) client library for instant messaging and presence. A pure Java...