mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-07-06 12:19:39 +00:00
gnujpdf gradient fills
This commit is contained in:
21
libsrc/gnujpdf/src/gnu/jpdf/MyDoubleRect.java
Normal file
21
libsrc/gnujpdf/src/gnu/jpdf/MyDoubleRect.java
Normal file
@@ -0,0 +1,21 @@
|
||||
package gnu.jpdf;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author JPEXS
|
||||
*/
|
||||
public class MyDoubleRect {
|
||||
|
||||
public double xMin;
|
||||
public double yMin;
|
||||
public double xMax;
|
||||
public double yMax;
|
||||
|
||||
public MyDoubleRect(double xMin, double yMin, double xMax, double yMax) {
|
||||
this.xMin = xMin;
|
||||
this.yMin = yMin;
|
||||
this.xMax = xMax;
|
||||
this.yMax = yMax;
|
||||
}
|
||||
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -91,6 +91,10 @@ public class PDFPage extends PDFObject implements Serializable {
|
||||
// JM
|
||||
protected Vector<String> imageResources;
|
||||
|
||||
protected Vector<String> patternResources;
|
||||
|
||||
protected Vector<String> shadingResources;
|
||||
|
||||
/**
|
||||
* The fonts associated with this page
|
||||
*/
|
||||
@@ -128,6 +132,8 @@ public class PDFPage extends PDFObject implements Serializable {
|
||||
resources = new Vector<String>();
|
||||
// JM
|
||||
imageResources = new Vector<String>();
|
||||
patternResources = new Vector<>();
|
||||
shadingResources = new Vector<>();
|
||||
fonts = new Vector<PDFFont>();
|
||||
procset = null;
|
||||
}
|
||||
@@ -436,6 +442,14 @@ public class PDFPage extends PDFObject implements Serializable {
|
||||
imageResources.addElement(resource);
|
||||
}
|
||||
|
||||
public void addPatternResource(String resource) {
|
||||
patternResources.add(resource);
|
||||
}
|
||||
|
||||
public void addShadingResource(String resource) {
|
||||
shadingResources.add(resource);
|
||||
}
|
||||
|
||||
/**
|
||||
* This adds an object that describes a thumbnail for this page.
|
||||
* <p>
|
||||
@@ -557,6 +571,25 @@ public class PDFPage extends PDFObject implements Serializable {
|
||||
}
|
||||
os.write(" >> ".getBytes());
|
||||
}
|
||||
|
||||
if (patternResources.size() > 0) {
|
||||
os.write("/Pattern << ".getBytes());
|
||||
for (String str : patternResources) {
|
||||
os.write(str.getBytes());
|
||||
os.write(" ".getBytes());
|
||||
}
|
||||
os.write(" >> ".getBytes());
|
||||
}
|
||||
|
||||
if (shadingResources.size() > 0) {
|
||||
os.write("/Shading << ".getBytes());
|
||||
for (String str : shadingResources) {
|
||||
os.write(str.getBytes());
|
||||
os.write(" ".getBytes());
|
||||
}
|
||||
os.write(" >> ".getBytes());
|
||||
}
|
||||
|
||||
os.write(">>\n".getBytes());
|
||||
|
||||
// The thumbnail
|
||||
|
||||
Reference in New Issue
Block a user