From 6600d22461ccc1cb602f238a9ffa83cf07dd830e Mon Sep 17 00:00:00 2001 From: Normand Briere <nbriere@noware.ca> Date: Mon, 01 Jul 2019 18:04:02 -0400 Subject: [PATCH] Get icons 256x256 --- CameraPane.java | 178 ++++++++--------------------------------------------------- 1 files changed, 25 insertions(+), 153 deletions(-) diff --git a/CameraPane.java b/CameraPane.java index cdf2ce1..d0c68fd 100644 --- a/CameraPane.java +++ b/CameraPane.java @@ -2065,7 +2065,7 @@ //System.err.println("Oeil on"); OEIL = true; if ((TRACK || SHADOWTRACK) && trackedobject != null && DrawMode() == SHADOW) // && !lightMode) - object.editWindow.ScreenFit(trackedobject, SHADOWTRACK && !TRACK); + object.GetWindow().ScreenFit(trackedobject, SHADOWTRACK && !TRACK); //pingthread.StepToTarget(true); } @@ -2396,128 +2396,6 @@ public GL GetGL() // INTERFACE { return currentGL; - } - - private void GetRemoteZip(String url, String name, boolean unzip, boolean save) - { - java.net.URL u; - InputStream is = null; - DataInputStream dis; - java.util.zip.ZipInputStream zis; - //String s; - - System.out.println("GetRemoteZip " + name); - - int total = 0; // dis.available(); - - byte[] bytes = new byte[16384]; - - try - { - u = new java.net.URL(url + name); - is = u.openStream(); - - System.out.println(url + name); - - if (unzip) - { - //dis = new DataInputStream(new BufferedInputStream(is)); - zis = new java.util.zip.ZipInputStream(new BufferedInputStream(is)); - //while ((s = dis.readLine()) != null) - - if (save) - new java.io.File(name).mkdirs(); - - // FileOutputStream stream = new FileOutputStream("test.zip"); - // - // int count; - // - // while ((count = dis.read(bytes)) != -1) - // { - // //System.out.println(s); - // System.out.println(count); - // total += count; - // stream.write(bytes); - // } - // - // stream.close(); - - // now iterate through each item in the stream. The get next - // entry call will return a ZipEntry for each file in the - // stream - java.util.zip.ZipEntry entry; - while((entry = zis.getNextEntry())!=null) - { - if (entry.getName().endsWith(".gsm")) - { - continue; - } - - String s = String.format("Entry: %s len %d added %TD", - entry.getName(), entry.getSize(), - new java.util.Date(entry.getTime())); - System.out.println(s); - - if (save) - { - // Once we get the entry from the stream, the stream is - // positioned read to read the raw data, and we keep - // reading until read returns 0 or less. - String outpath = name + "/" + entry.getName(); - FileOutputStream output = null; - try - { - output = new FileOutputStream(outpath); - int len = 0; - while ((len = zis.read(bytes)) > 0) - { - output.write(bytes, 0, len); - } - } - finally - { - // we must always close the output file - if(output!=null) output.close(); - } - } - } - } - } - catch (java.net.MalformedURLException mue) - { - System.err.println("Ouch - a MalformedURLException happened."); - mue.printStackTrace(); - //System.exit(2); - } - catch (IOException ioe) - { - //System.err.println("Oops - an IOException happened."); - //ioe.printStackTrace(); - //System.exit(3); - } - finally - { - try - { - if (is != null) - is.close(); - } - catch (IOException ioe) - { - } - } - - // System.out.println("length = " + total); - -// try -// { -// Runtime.getRuntime().exec("/usr/local/bin/wget https://archive3d.net/?a=download&do=get&id=7caca905"); -// } -// catch (Exception e) -// { -// e.printStackTrace(); -// } - } /**/ @@ -11649,7 +11527,7 @@ if ((TRACK || SHADOWTRACK) || zoomonce) { if ((TRACK || SHADOWTRACK) && trackedobject != null && DrawMode() == SHADOW) // && !lightMode) - object.editWindow.ScreenFit(trackedobject, SHADOWTRACK && !TRACK); + object.GetWindow().ScreenFit(trackedobject, SHADOWTRACK && !TRACK); pingthread.StepToTarget(true); // true); // zoomonce = false; } @@ -14065,7 +13943,7 @@ // fev 2014??? if ((TRACK || SHADOWTRACK) && trackedobject != null) // && DrawMode() == SHADOW) // && !lightMode) - object.editWindow.ScreenFit(trackedobject, SHADOWTRACK && !TRACK); + object.GetWindow().ScreenFit(trackedobject, SHADOWTRACK && !TRACK); pingthread.StepToTarget(true); // true); } // if (!LIVE) @@ -15295,12 +15173,6 @@ break; case '+': - //for (int i=0; i<0x7FFFFFFF; i++) - { - //String.format("%08X", i); // "7caca905" - GetRemoteZip("https://archive3d.net/?a=download&do=get&id=", "7caca905", true, true); - } - /* //fontsize += 1; bbzoom *= 2; @@ -15318,17 +15190,17 @@ case '=': IncDepth(); //fontsize += 1; - object.editWindow.refreshContents(true); + object.GetWindow().refreshContents(true); maskbit = 6; break; case '-': //if (PixelThreshold>1) PixelThreshold /= 2; DecDepth(); maskbit = 5; //if(fontsize > 1) fontsize -= 1; - if (object.editWindow == null) - new Exception().printStackTrace(); - else - object.editWindow.refreshContents(true); +// if (object.editWindow == null) +// new Exception().printStackTrace(); +// else + object.GetWindow().refreshContents(true); break; case '{': manipCamera.shaper_fovy /= 1.1; @@ -15552,7 +15424,7 @@ } */ - object.editWindow.EditSelection(false); + object.GetWindow().EditSelection(false); } void SelectParent() @@ -15569,10 +15441,10 @@ { //selectees.remove(i); System.out.println("select parent of " + elem); - group.editWindow.Select(elem.parent.GetTreePath(), first, true); + group.GetWindow().Select(elem.parent.GetTreePath(), first, true); } else { - group.editWindow.Select(elem.GetTreePath(), first, true); + group.GetWindow().Select(elem.GetTreePath(), first, true); } first = false; @@ -15614,12 +15486,12 @@ for (int j = 0; j < group.children.size(); j++) { elem = (Object3D) group.children.elementAt(j); - object.editWindow.Select(elem.GetTreePath(), first, true); + object.GetWindow().Select(elem.GetTreePath(), first, true); first = false; } } else { - object.editWindow.Select(elem.GetTreePath(), first, true); + object.GetWindow().Select(elem.GetTreePath(), first, true); } first = false; @@ -15630,21 +15502,21 @@ { //Composite group = (Composite) object; Object3D group = object; - group.editWindow.loadClipboard(true); // ClearSelection(false); + group.GetWindow().loadClipboard(true); // ClearSelection(false); } void ResetTransform(int mask) { //Composite group = (Composite) object; Object3D group = object; - group.editWindow.ResetTransform(mask); + group.GetWindow().ResetTransform(mask); } void FlipTransform() { //Composite group = (Composite) object; Object3D group = object; - group.editWindow.FlipTransform(); + group.GetWindow().FlipTransform(); // group.editWindow.ReduceMesh(true); } @@ -15652,7 +15524,7 @@ { //Composite group = (Composite) object; Object3D group = object; - group.editWindow.PrintMemory(); + group.GetWindow().PrintMemory(); // group.editWindow.ReduceMesh(true); } @@ -15660,7 +15532,7 @@ { //Composite group = (Composite) object; Object3D group = object; - group.editWindow.ResetCentroid(); + group.GetWindow().ResetCentroid(); } void IncDepth() @@ -16852,7 +16724,7 @@ } if (!movingcamera && !PAINTMODE) - object.editWindow.ScreenFitPoint(); // fev 2014 + object.GetWindow().ScreenFitPoint(); // fev 2014 if (PAINTMODE && Grafreed.clipboard.size() == 1) // object.editWindow.copy.selection.Size() > 0) { @@ -16864,17 +16736,17 @@ group.add(paintobj); // link - object.editWindow.SnapObject(group); + object.GetWindow().SnapObject(group); - Object3D folder = object.editWindow.copy; + Object3D folder = object.GetWindow().copy; - if (object.editWindow.copy.selection.Size() > 0) - folder = object.editWindow.copy.selection.elementAt(0); + if (object.GetWindow().copy.selection.Size() > 0) + folder = object.GetWindow().copy.selection.elementAt(0); folder.add(group); - object.editWindow.ResetModel(); - object.editWindow.refreshContents(); + object.GetWindow().ResetModel(); + object.GetWindow().refreshContents(); } else paintcount = 0; -- Gitblit v1.6.2