Changeset 1436 for trunk/src/org/expeditee/importer/pdfImporter.java
- Timestamp:
- 11/05/19 16:16:11 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/expeditee/importer/pdfImporter.java
r1242 r1436 24 24 import java.nio.ByteBuffer; 25 25 import java.nio.channels.FileChannel; 26 import java.nio.file.Path; 27 import java.nio.file.Paths; 26 28 27 29 import org.expeditee.core.Colour; … … 37 39 import org.expeditee.gui.FrameIO; 38 40 import org.expeditee.gui.MessageBay; 41 import org.expeditee.gui.management.ResourceManager; 39 42 import org.expeditee.items.Item; 40 43 import org.expeditee.items.Text; … … 45 48 public class pdfImporter implements FileImporter { 46 49 47 public Item importFile(final File f, Point location ) throws IOException {50 public Item importFile(final File f, Point location, boolean attachToFreeItems) throws IOException { 48 51 if (location == null || f == null) { 49 52 return null; … … 63 66 } 64 67 65 final Text link = DragAndDropManager.importString(name, location );68 final Text link = DragAndDropManager.importString(name, location, false); 66 69 link.setLink(name+"1"); 67 70 … … 135 138 g.popDrawingSurface(); 136 139 //save it as a file 137 File out = new File(framesetPath+i+".png"); 140 Path p = Paths.get(framesetPath+i+".png"); 141 p = ResourceManager.relativiseImagePath(p, DisplayController.getCurrentFrame()); 142 File out = p.toFile(); 138 143 bimg.writeToDisk("png", out); 139 144 //generate a frame with that image 140 145 System.out.println(width); 141 System.out.println("@i: "+ framesetPath+i+".png "+width);142 currentFrame.addText(x, y, "@i: "+ framesetPath+i+".png "+width, null);146 System.out.println("@i: "+p.toString()+width); 147 currentFrame.addText(x, y, "@i: "+p.toString()+width, null); 143 148 if(i>1) 144 149 {
Note:
See TracChangeset
for help on using the changeset viewer.