From 0c85af6e46f48b7425d59fc776b193c06a4a1f52 Mon Sep 17 00:00:00 2001 From: Normand Briere <nbriere@noware.ca> Date: Sun, 04 Aug 2019 12:08:30 -0400 Subject: [PATCH] Material icons --- ObjEditor.java | 174 ++++++++++++++++++++++++++-------- icons/shadericons/shadericon00013.png | 0 icons/shadericons/shadericon00017.jpg | 0 icons/shadericons/shadericon00005.png | 0 icons/shadericons/shadericon00012.png | 0 icons/shadericons/shadericon00008.jpg | 0 icons/shadericons/shadericon00020.png | 0 icons/shadericons/shadericon00014.png | 0 icons/shadericons/shadericon00006.png | 0 CameraPane.java | 8 icons/shadericons/shadericon00016.jpg | 0 icons/shadericons/shadericon00007.jpg | 0 icons/shadericons/shadericon00011.png | 0 icons/shadericons/shadericon00015.png | 0 icons/clear.png | 0 icons/shadericons/shadericon00015.jpg | 0 cLabel.java | 13 ++ icons/shadericons/shadericon00001.jpg | 0 icons/shadericons/shadericon00002.jpg | 0 icons/shadericons/shadericon00014.jpg | 0 icons/shadericons/shadericon00010.png | 0 icons/shadericons/shadericon00003.png | 0 icons/broom.png | 0 icons/shadericons/shadericon00016.png | 0 icons/sphererender.gfd | 0 icons/shadericons/shadericon00000.jpg | 0 icons/shadericons/shadericon00004.png | 0 icons/shadericons/shadericon00013.jpg | 0 icons/shadericons/shadericon00009.jpg | 0 icons/shadericons/shadericon00017.png | 0 icons/shadericons/shadericon00004.jpg | 0 icons/shadericons/shadericon00012.jpg | 0 icons/shadericons/shadericon00009.png | 0 icons/shadericons/shadericon00018.png | 0 icons/shadericons/shadericon00019.png | 0 icons/shadericons/shadericon00011.jpg | 0 icons/shadericons/shadericon00003.jpg | 0 GroupEditor.java | 28 +++-- icons/shadericons/shadericon00020.jpg | 0 icons/shadericons/shadericon00002.png | 0 icons/shadericons/shadericon00007.png | 0 icons/shadericons/shadericon00010.jpg | 0 icons/shadericons/shadericon00019.jpg | 0 icons/shadericons/shadericon00006.jpg | 0 icons/shadericons/shadericon00001.png | 0 icons/shadericons/shadericon00005.jpg | 0 icons/shadericons/shadericon00008.png | 0 icons/shadericons/shadericon00018.jpg | 0 Object3D.java | 30 +++++ icons/shadericons/shadericon00000.png | 0 50 files changed, 190 insertions(+), 63 deletions(-) diff --git a/CameraPane.java b/CameraPane.java index 4e420ff..28e9ff5 100644 --- a/CameraPane.java +++ b/CameraPane.java @@ -14632,9 +14632,9 @@ MODIFIERS |= COMMAND; /**/ if((mod&SHIFT) == SHIFT) - manipCamera.RotatePosition(0, -speed); - else manipCamera.BackForth(0, -speed*delta, 0); // getWidth()); + else + manipCamera.RotatePosition(0, -speed); /**/ if ((mod & SHIFT) == SHIFT) { @@ -14653,9 +14653,9 @@ MODIFIERS |= COMMAND; /**/ if((mod&SHIFT) == SHIFT) - manipCamera.RotatePosition(0, speed); - else manipCamera.BackForth(0, speed*delta, 0); // getWidth()); + else + manipCamera.RotatePosition(0, speed); /**/ if ((mod & SHIFT) == SHIFT) { diff --git a/GroupEditor.java b/GroupEditor.java index e5c5470..0efe0b9 100644 --- a/GroupEditor.java +++ b/GroupEditor.java @@ -356,9 +356,9 @@ this.copy = this.group = group; //selectees = this.group.selectees; - if (copy.versions == null) + if (copy.versionlist == null) { - copy.versions = new Object3D[100]; + copy.versionlist = new Object3D[100]; copy.versionindex = -1; } @@ -383,9 +383,9 @@ ((cRadio)radioPanel.getComponent(0)).SetCamera(cameraView.renderCamera, true); - if (copy.versions == null) + if (copy.versionlist == null) { - copy.versions = new Object3D[100]; + copy.versionlist = new Object3D[100]; copy.versionindex = -1; Save(true); @@ -942,12 +942,12 @@ cGridBag updown = new cGridBag().setVertical(true); updown.add(restoreButton = GetButton("icons/restore.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); - restoreButton.setToolTipText("Restore current version (undo latest change)"); + restoreButton.setToolTipText("Undo (restore current version)"); restoreButton.addActionListener(this); restoreButton.setEnabled(false); updown.add(replaceButton = GetButton("icons/replace.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); - replaceButton.setToolTipText("Replace current version (save latest change)"); + replaceButton.setToolTipText("Save (replace current version)"); replaceButton.addActionListener(this); replaceButton.setEnabled(false); @@ -1110,14 +1110,14 @@ editButton.addActionListener(this); editCommandsPanel.add(uneditButton = GetButton("icons/remove.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); - uneditButton.setToolTipText("Remove selection controls"); + uneditButton.setToolTipText("Unpin and remove selection controls"); uneditButton.addActionListener(this); editCommandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints); allParamsButton.setToolTipText("Show all controle"); allParamsButton.addActionListener(this); - editCommandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); + editCommandsPanel.add(clearPanelButton = GetButton("icons/clear.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); clearPanelButton.setToolTipText("Clear edit panel"); clearPanelButton.addActionListener(this); @@ -2613,11 +2613,13 @@ { // Restore current version Restore(); + restoreButton.setEnabled(false); } else if (source == replaceButton) { // Overwrite current version Replace(); + replaceButton.setEnabled(false); } else if (source == redoButton) { @@ -3820,10 +3822,10 @@ { Object3D child = (Object3D)e.nextElement(); if(child.editWindow != null) - objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit")); child.pinned = false; child.CloseUI(); listUI.remove(child); +// objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit")); //child.editWindow = null; // ??????????? } @@ -3842,6 +3844,7 @@ obj.CloseUI(); } listUI.clear(); + SetPinStates(group.selection.size() > 0); refreshContents(true); } else if (source == allParamsButton) @@ -3928,6 +3931,7 @@ radio.layout.doClick(); ClearUnpinned(); + //Grafreed.Assert(group != null); //Grafreed.Assert(group.selection != null); SetPinStates(group.selection == null || group.selection.size() > 0); @@ -5083,9 +5087,7 @@ freezemodel = false; } - - boolean flashIt = true; - + public void valueChanged(TreeSelectionEvent e) //public boolean handleEvent(Event event) { @@ -5160,6 +5162,8 @@ uneditButton.setEnabled(enabled); unselectButton.setEnabled(enabled); flashSelectionButton.setEnabled(enabled); + + clearPanelButton.setEnabled(!listUI.isEmpty()); } void refreshContents(boolean cp) diff --git a/ObjEditor.java b/ObjEditor.java index 963fa06..4f2f437 100644 --- a/ObjEditor.java +++ b/ObjEditor.java @@ -296,9 +296,9 @@ client = inClient; copy = client; - if (copy.versions == null) + if (copy.versionlist == null) { - copy.versions = new Object3D[100]; + copy.versionlist = new Object3D[100]; copy.versionindex = -1; } @@ -315,9 +315,9 @@ client = inClient; copy = client; - if (copy.versions == null) + if (copy.versionlist == null) { - copy.versions = new Object3D[100]; + copy.versionlist = new Object3D[100]; copy.versionindex = -1; } @@ -353,7 +353,7 @@ copy = localCopy; copy.editWindow = this; - if (copy.versions == null) + if (copy.versionlist == null) { // copy.versions = new byte[100][]; // copy.versionindex = -1; @@ -467,7 +467,7 @@ toolboxPanel = new cGridBag().setVertical(true); //toolboxPanel.setName("Toolbox"); - materialPanel = new cGridBag().setVertical(true); + materialPanel = new cGridBag().setVertical(false); //materialPanel.setName("Material"); /*JTextPane*/ @@ -858,13 +858,13 @@ copy.ExtractBigData(versiontable); // if (copy == client) - Object3D versions[] = copy.versions; - copy.versions = null; + Object3D versions[] = copy.versionlist; + copy.versionlist = null; //byte[] compress = Compress(copy); Object3D compress = (Object3D)Grafreed.clone(copy); - copy.versions = versions; + copy.versionlist = versions; copy.RestoreBigData(versiontable); @@ -994,6 +994,7 @@ { SetupMaterial(materialPanel); } + //SetupName(); //SetupViews(); } @@ -1551,7 +1552,7 @@ //tmp.setName("Edit"); objectPanel.add(materialPanel); objectPanel.setIconAt(0, GetIcon("icons/material.png")); - objectPanel.setToolTipTextAt(0, "Material panel"); + objectPanel.setToolTipTextAt(0, "Material"); // JPanel north = new JPanel(new BorderLayout()); // north.setName("Edit"); @@ -1559,20 +1560,20 @@ // objectPanel.add(north); objectPanel.add(editPanel); objectPanel.setIconAt(1, GetIcon("icons/write.png")); - objectPanel.setToolTipTextAt(1, "Edit panel"); + objectPanel.setToolTipTextAt(1, "Edit controls"); //if (Globals.ADVANCED) objectPanel.add(infoPanel); objectPanel.setIconAt(2, GetIcon("icons/info.png")); - objectPanel.setToolTipTextAt(2, "Info panel"); + objectPanel.setToolTipTextAt(2, "Information"); objectPanel.add(XYZPanel); objectPanel.setIconAt(3, GetIcon("icons/XYZ.png")); - objectPanel.setToolTipTextAt(3, "XYZ/RGB panel"); + objectPanel.setToolTipTextAt(3, "XYZ/RGB transform"); objectPanel.add(toolboxPanel); objectPanel.setIconAt(4, GetIcon("icons/primitives.png")); - objectPanel.setToolTipTextAt(4, "Objects/backgrounds panel"); + objectPanel.setToolTipTextAt(4, "Objects & backgrounds"); /* aConstraints.gridx = 0; @@ -1734,12 +1735,56 @@ ctrlPanel.removeAll(); } - void SetupMaterial(cGridBag panel) + void SetupMaterial(cGridBag materialpanel) { - /* + cGridBag presetpanel = new cGridBag().setVertical(true); + cLabel label = GetLabel("icons/shadericons/shadericon00000.png", !Grafreed.NIMBUSLAF); + label.addMouseListener(new MouseAdapter() + { + public void mouseClicked(MouseEvent e) + { + colorField.setFloat(0); + saturationField.setFloat(1); + materialtouched = true; + applySelf(); + } + }); + presetpanel.add(label); + + presetpanel.add(GetLabel("icons/shadericons/shadericon00001.png", !Grafreed.NIMBUSLAF)); + presetpanel.add(GetLabel("icons/shadericons/shadericon00002.png", !Grafreed.NIMBUSLAF)); + presetpanel.add(GetLabel("icons/shadericons/shadericon00003.png", !Grafreed.NIMBUSLAF)); + presetpanel.add(GetLabel("icons/shadericons/shadericon00004.png", !Grafreed.NIMBUSLAF)); + presetpanel.add(GetLabel("icons/shadericons/shadericon00005.png", !Grafreed.NIMBUSLAF)); + presetpanel.add(GetLabel("icons/shadericons/shadericon00006.png", !Grafreed.NIMBUSLAF)); + presetpanel.add(GetLabel("icons/shadericons/shadericon00007.png", !Grafreed.NIMBUSLAF)); + presetpanel.add(GetLabel("icons/shadericons/shadericon00008.png", !Grafreed.NIMBUSLAF)); + presetpanel.add(GetLabel("icons/shadericons/shadericon00009.png", !Grafreed.NIMBUSLAF)); + presetpanel.add(GetLabel("icons/shadericons/shadericon00010.png", !Grafreed.NIMBUSLAF)); + presetpanel.add(GetLabel("icons/shadericons/shadericon00011.png", !Grafreed.NIMBUSLAF)); + presetpanel.add(GetLabel("icons/shadericons/shadericon00012.png", !Grafreed.NIMBUSLAF)); + presetpanel.add(GetLabel("icons/shadericons/shadericon00013.png", !Grafreed.NIMBUSLAF)); + presetpanel.add(GetLabel("icons/shadericons/shadericon00014.png", !Grafreed.NIMBUSLAF)); + presetpanel.add(GetLabel("icons/shadericons/shadericon00015.png", !Grafreed.NIMBUSLAF)); + presetpanel.add(GetLabel("icons/shadericons/shadericon00016.png", !Grafreed.NIMBUSLAF)); + presetpanel.add(GetLabel("icons/shadericons/shadericon00017.png", !Grafreed.NIMBUSLAF)); + presetpanel.add(GetLabel("icons/shadericons/shadericon00018.png", !Grafreed.NIMBUSLAF)); + presetpanel.add(GetLabel("icons/shadericons/shadericon00019.png", !Grafreed.NIMBUSLAF)); + presetpanel.add(GetLabel("icons/shadericons/shadericon00020.png", !Grafreed.NIMBUSLAF)); + + cGridBag panel = new cGridBag().setVertical(true); + + presetpanel.preferredWidth = 1; + + materialpanel.add(panel); + materialpanel.add(presetpanel); + + panel.preferredWidth = 8; + + /* ctrlPanel.add(materialLabel = new JLabel("MATERIAL : "), aConstraints); materialLabel.setHorizontalAlignment(SwingConstants.TRAILING); - */ + */ cGridBag editBar = new cGridBag().setVertical(false); @@ -1776,7 +1821,9 @@ cGridBag huepanel = new cGridBag(); cGridBag huelabel = new cGridBag(); - huelabel.add(GetLabel("icons/hue.png", false)); + label = GetLabel("icons/hue.png", false); + label.fit = true; + huelabel.add(label); huelabel.preferredWidth = 20; huepanel.add(new cGridBag()); // Label huepanel.add(huelabel); // Field/slider @@ -1797,7 +1844,7 @@ cGridBag modulation = new cGridBag(); modulation.add(modulationLabel = new JLabel("Saturation")); // , aConstraints); modulationLabel.setHorizontalAlignment(SwingConstants.TRAILING); - modulation.add(modulationField = new cNumberSlider(this, 0.001, 1)); // , aConstraints); + modulation.add(saturationField = new cNumberSlider(this, 0.001, 1)); // , aConstraints); colorSection.add(modulation); cGridBag opacity = new cGridBag(); @@ -2990,7 +3037,7 @@ freezematerial = true; colorField.setFloat(mat.color); - modulationField.setFloat(mat.modulation); + saturationField.setFloat(mat.modulation); metalnessField.setFloat(mat.metalness); diffuseField.setFloat(mat.diffuse); specularField.setFloat(mat.specular); @@ -3301,6 +3348,7 @@ } else if (event.getSource() == liveCB) { copy.live ^= true; + objEditor.refreshContents(true); // To show item colors return; } else if (event.getSource() == selectableCB) { @@ -3310,7 +3358,7 @@ { copy.hide ^= true; copy.Touch(); // display list issue - objEditor.refreshContents(); + objEditor.refreshContents(true); // To show item colors return; } else if (event.getSource() == link2masterCB) { @@ -3668,6 +3716,7 @@ { //Save(true); Replace(); + SetUndoStates(); } private boolean Equal(byte[] compress, byte[] name) @@ -3691,6 +3740,7 @@ public boolean Save(boolean user) { System.err.println("Save"); + Replace(); cRadio tab = GetCurrentTab(); @@ -3709,7 +3759,7 @@ //tab.user[tab.versionindex] = user; //boolean increment = true; // tab.graphs[tab.versionindex] == null; - copy.versions[++copy.versionindex] = compress; + copy.versionlist[++copy.versionindex] = compress; // if (increment) // tab.versionindex++; @@ -3719,10 +3769,10 @@ //assert(hashtable.isEmpty()); - for (int i = copy.versionindex+1; i < copy.versions.length; i++) + for (int i = copy.versionindex+1; i < copy.versionlist.length; i++) { //tab.user[i] = false; - copy.versions[i] = null; + copy.versionlist[i] = null; } SetUndoStates(); @@ -3748,6 +3798,38 @@ return !thesame; } + + boolean flashIt = true; + + void RefreshSelection() + { + Object3D selection = new Object3D(); + + for (int i = 0; i < copy.selection.size(); i++) + { + Object3D elem = copy.selection.elementAt(i); + + Object3D obj = copy.GetObject(elem.GetUUID()); + + if (obj == null) + { + copy.selection.remove(i--); + } + else + { + selection.add(obj); + copy.selection.setElementAt(obj, i); + } + } + + flashIt = false; + GetTree().clearSelection(); + for (int i = 0; i < selection.size(); i++) + GetTree().addSelectionPath(selection.elementAt(i).GetTreePath().GetTreePath()); + flashIt = true; + + refreshContents(false); + } void CopyChanged(Object3D obj) { @@ -3772,6 +3854,7 @@ CameraPane.SWITCH = temp; + RefreshSelection(); //assert(hashtable.isEmpty()); copy.Touch(); @@ -3806,9 +3889,9 @@ { int count = 0; - for (int i = copy.versions.length; --i >= 0;) + for (int i = copy.versionlist.length; --i >= 0;) { - if (copy.versions[i] != null) + if (copy.versionlist[i] != null) count++; } @@ -3823,7 +3906,7 @@ replaceButton.setEnabled(copy.versionindex != -1); undoButton.setEnabled(copy.versionindex > 0); - redoButton.setEnabled(copy.versions[copy.versionindex + 1] != null); + redoButton.setEnabled(copy.versionlist[copy.versionindex + 1] != null); muteSlider = true; versionSlider.setMaximum(VersionCount() - 1); @@ -3861,7 +3944,7 @@ copy.versionindex -= 1; - CopyChanged((Object3D)copy.versions[copy.versionindex]); + CopyChanged((Object3D)copy.versionlist[copy.versionindex]); return true; } @@ -3872,14 +3955,14 @@ cRadio tab = GetCurrentTab(); - if (copy.versionindex == -1 || copy.versions[copy.versionindex] == null) + if (copy.versionindex == -1 || copy.versionlist[copy.versionindex] == null) { java.awt.Toolkit.getDefaultToolkit().beep(); return false; } //CopyChanged((Object3D)Uncompress(copy.versions[copy.versionindex])); - CopyChanged(copy.versions[copy.versionindex]); + CopyChanged(copy.versionlist[copy.versionindex]); return true; } @@ -3890,13 +3973,13 @@ cRadio tab = GetCurrentTab(); - if (copy.versionindex == -1 || copy.versions[copy.versionindex] == null) + if (copy.versionindex == -1 || copy.versionlist[copy.versionindex] == null) { // No version yet. OK. java.awt.Toolkit.getDefaultToolkit().beep(); return false; } - copy.versions[copy.versionindex] = CompressCopy(); + copy.versionlist[copy.versionindex] = CompressCopy(); return true; } @@ -3908,7 +3991,7 @@ cRadio tab = GetCurrentTab(); - if (copy.versions[copy.versionindex + 1] == null) + if (copy.versionlist[copy.versionindex + 1] == null) { java.awt.Toolkit.getDefaultToolkit().beep(); return; @@ -3916,7 +3999,7 @@ copy.versionindex += 1; - CopyChanged(copy.versions[copy.versionindex]); + CopyChanged(copy.versionlist[copy.versionindex]); //if (!tab.user[tab.versionindex]) // tab.graphs[tab.versionindex] = null; @@ -4130,7 +4213,7 @@ //copy.material = new cMaterial(copy.GetMaterial()); current.color = (float) colorField.getFloat(); - current.modulation = (float) modulationField.getFloat(); + current.modulation = (float) saturationField.getFloat(); current.metalness = (float) metalnessField.getFloat(); current.diffuse = (float) diffuseField.getFloat(); current.specular = (float) specularField.getFloat(); @@ -4163,7 +4246,7 @@ cMaterial mat = copy.material; colorField.SetToolTipValue((mat.color)); - modulationField.SetToolTipValue((mat.modulation)); + saturationField.SetToolTipValue((mat.modulation)); metalnessField.SetToolTipValue((mat.metalness)); diffuseField.SetToolTipValue((mat.diffuse)); specularField.SetToolTipValue((mat.specular)); @@ -4227,9 +4310,9 @@ int version = versionSlider.getInteger(); - if (copy.versions[version] != null) + if (copy.versionlist[version] != null) { - CopyChanged(copy.versions[copy.versionindex = version]); + CopyChanged(copy.versionlist[copy.versionindex = version]); } return; @@ -4269,6 +4352,12 @@ { //System.out.println("stateChanged = " + this); materialtouched = true; + + if (e.getSource() == colorField && saturationField.getFloat() == 0.001) + { + saturationField.setFloat(1); + } + applySelf(); //System.out.println("this = " + this); //System.out.println("PARENT = " + parent); @@ -4568,6 +4657,7 @@ { if (GetTree() != null) { + GetTree().revalidate(); GetTree().repaint(); } @@ -4959,12 +5049,12 @@ c.addChild(csg); } - copy.versions = readobj.versions; + copy.versionlist = readobj.versionlist; copy.versionindex = readobj.versionindex; - if (copy.versions == null) + if (copy.versionlist == null) { - copy.versions = new Object3D[100]; + copy.versionlist = new Object3D[100]; copy.versionindex = -1; } @@ -5372,7 +5462,7 @@ JLabel colorLabel; cNumberSlider colorField; JLabel modulationLabel; - cNumberSlider modulationField; + cNumberSlider saturationField; JLabel metalnessLabel; cNumberSlider metalnessField; JLabel diffuseLabel; diff --git a/Object3D.java b/Object3D.java index a984e30..4b58659 100644 --- a/Object3D.java +++ b/Object3D.java @@ -22,6 +22,7 @@ //static final long serialVersionUID = -607422624994562685L; static final long serialVersionUID = 5022536242724664900L; + // Use GetUUID for backward compatibility with null. private UUID uuid = UUID.randomUUID(); // TEMPORARY for mocap undo. No need to be transient. @@ -32,7 +33,7 @@ String skyboxname; String skyboxext; - Object3D versions[]; + Object3D versionlist[]; int versionindex = -1; ScriptNode scriptnode; @@ -222,7 +223,7 @@ // o.bRep.support = null; // } o.selection = this.selection; - o.versions = this.versions; + o.versionlist = this.versionlist; o.versionindex = this.versionindex; if (this.support != null) @@ -245,6 +246,29 @@ // this.support = null; // this.fileparent = null; } + +// Object3D GetObject(java.util.UUID uuid) +// { +// if (this.uuid.equals(uuid)) +// return this; +// +// if (blockloop) +// return null; +// +// blockloop = true; +// +// for (int i=0; i<Size(); i++) +// { +// Object3D o = get(i).GetObject(uuid); +// +// if (o != null) +// return o; +// } +// +// blockloop = false; +// +// return null; +// } void RestoreBigData(java.util.Hashtable<java.util.UUID, Object3D> hashtable) { @@ -280,7 +304,7 @@ this.selection = o.selection; - this.versions = o.versions; + this.versionlist = o.versionlist; this.versionindex = o.versionindex; // July 2019 if (this.bRep != null) // this.bRep.support = o.transientrep; diff --git a/cLabel.java b/cLabel.java index 522e537..f7a9dde 100644 --- a/cLabel.java +++ b/cLabel.java @@ -2,6 +2,8 @@ public class cLabel extends javax.swing.JLabel { + boolean fit; + BufferedImage image; cLabel(String name) @@ -55,10 +57,17 @@ } else { - BufferedImage resizedimage = new BufferedImage(getWidth(),getHeight(),java.awt.image.BufferedImage.TYPE_INT_RGB); + BufferedImage resizedimage = new BufferedImage(getWidth(),getHeight(),java.awt.image.BufferedImage.TYPE_INT_ARGB); java.awt.Graphics2D g2 = resizedimage.createGraphics(); g2.setRenderingHint(java.awt.RenderingHints.KEY_INTERPOLATION, java.awt.RenderingHints.VALUE_INTERPOLATION_BILINEAR); - g2.drawImage(image, 0, 0,getWidth(),getHeight(), null); + + if (fit) + g2.drawImage(image, 0, 0, getWidth(), getHeight(), null); + else + { + g2.drawImage(image, getWidth()/2 - image.getWidth()/2, 0, image.getWidth(), image.getHeight(), null); + } + g2.dispose(); g.drawImage(resizedimage, 0, 0,getWidth(),getHeight(), null); diff --git a/icons/broom.png b/icons/broom.png new file mode 100644 index 0000000..3c60038 --- /dev/null +++ b/icons/broom.png Binary files differ diff --git a/icons/clear.png b/icons/clear.png new file mode 100644 index 0000000..c903917 --- /dev/null +++ b/icons/clear.png Binary files differ diff --git a/icons/shadericons/shadericon00000.jpg b/icons/shadericons/shadericon00000.jpg new file mode 100644 index 0000000..803fd8e --- /dev/null +++ b/icons/shadericons/shadericon00000.jpg Binary files differ diff --git a/icons/shadericons/shadericon00000.png b/icons/shadericons/shadericon00000.png new file mode 100644 index 0000000..428b515 --- /dev/null +++ b/icons/shadericons/shadericon00000.png Binary files differ diff --git a/icons/shadericons/shadericon00001.jpg b/icons/shadericons/shadericon00001.jpg new file mode 100644 index 0000000..98b651f --- /dev/null +++ b/icons/shadericons/shadericon00001.jpg Binary files differ diff --git a/icons/shadericons/shadericon00001.png b/icons/shadericons/shadericon00001.png new file mode 100644 index 0000000..1767678 --- /dev/null +++ b/icons/shadericons/shadericon00001.png Binary files differ diff --git a/icons/shadericons/shadericon00002.jpg b/icons/shadericons/shadericon00002.jpg new file mode 100644 index 0000000..bcf8723 --- /dev/null +++ b/icons/shadericons/shadericon00002.jpg Binary files differ diff --git a/icons/shadericons/shadericon00002.png b/icons/shadericons/shadericon00002.png new file mode 100644 index 0000000..7710607 --- /dev/null +++ b/icons/shadericons/shadericon00002.png Binary files differ diff --git a/icons/shadericons/shadericon00003.jpg b/icons/shadericons/shadericon00003.jpg new file mode 100644 index 0000000..8939bba --- /dev/null +++ b/icons/shadericons/shadericon00003.jpg Binary files differ diff --git a/icons/shadericons/shadericon00003.png b/icons/shadericons/shadericon00003.png new file mode 100644 index 0000000..7739235 --- /dev/null +++ b/icons/shadericons/shadericon00003.png Binary files differ diff --git a/icons/shadericons/shadericon00004.jpg b/icons/shadericons/shadericon00004.jpg new file mode 100644 index 0000000..3c76c21 --- /dev/null +++ b/icons/shadericons/shadericon00004.jpg Binary files differ diff --git a/icons/shadericons/shadericon00004.png b/icons/shadericons/shadericon00004.png new file mode 100644 index 0000000..6b1f65a --- /dev/null +++ b/icons/shadericons/shadericon00004.png Binary files differ diff --git a/icons/shadericons/shadericon00005.jpg b/icons/shadericons/shadericon00005.jpg new file mode 100644 index 0000000..f3c3c51 --- /dev/null +++ b/icons/shadericons/shadericon00005.jpg Binary files differ diff --git a/icons/shadericons/shadericon00005.png b/icons/shadericons/shadericon00005.png new file mode 100644 index 0000000..1a65208 --- /dev/null +++ b/icons/shadericons/shadericon00005.png Binary files differ diff --git a/icons/shadericons/shadericon00006.jpg b/icons/shadericons/shadericon00006.jpg new file mode 100644 index 0000000..465bf57 --- /dev/null +++ b/icons/shadericons/shadericon00006.jpg Binary files differ diff --git a/icons/shadericons/shadericon00006.png b/icons/shadericons/shadericon00006.png new file mode 100644 index 0000000..f1e1c2b --- /dev/null +++ b/icons/shadericons/shadericon00006.png Binary files differ diff --git a/icons/shadericons/shadericon00007.jpg b/icons/shadericons/shadericon00007.jpg new file mode 100644 index 0000000..721e23e --- /dev/null +++ b/icons/shadericons/shadericon00007.jpg Binary files differ diff --git a/icons/shadericons/shadericon00007.png b/icons/shadericons/shadericon00007.png new file mode 100644 index 0000000..792bfd1 --- /dev/null +++ b/icons/shadericons/shadericon00007.png Binary files differ diff --git a/icons/shadericons/shadericon00008.jpg b/icons/shadericons/shadericon00008.jpg new file mode 100644 index 0000000..caa4bc2 --- /dev/null +++ b/icons/shadericons/shadericon00008.jpg Binary files differ diff --git a/icons/shadericons/shadericon00008.png b/icons/shadericons/shadericon00008.png new file mode 100644 index 0000000..c54c9c1 --- /dev/null +++ b/icons/shadericons/shadericon00008.png Binary files differ diff --git a/icons/shadericons/shadericon00009.jpg b/icons/shadericons/shadericon00009.jpg new file mode 100644 index 0000000..1eff465 --- /dev/null +++ b/icons/shadericons/shadericon00009.jpg Binary files differ diff --git a/icons/shadericons/shadericon00009.png b/icons/shadericons/shadericon00009.png new file mode 100644 index 0000000..b0f7371 --- /dev/null +++ b/icons/shadericons/shadericon00009.png Binary files differ diff --git a/icons/shadericons/shadericon00010.jpg b/icons/shadericons/shadericon00010.jpg new file mode 100644 index 0000000..b165323 --- /dev/null +++ b/icons/shadericons/shadericon00010.jpg Binary files differ diff --git a/icons/shadericons/shadericon00010.png b/icons/shadericons/shadericon00010.png new file mode 100644 index 0000000..2f3d483 --- /dev/null +++ b/icons/shadericons/shadericon00010.png Binary files differ diff --git a/icons/shadericons/shadericon00011.jpg b/icons/shadericons/shadericon00011.jpg new file mode 100644 index 0000000..cc3337f --- /dev/null +++ b/icons/shadericons/shadericon00011.jpg Binary files differ diff --git a/icons/shadericons/shadericon00011.png b/icons/shadericons/shadericon00011.png new file mode 100644 index 0000000..7c5531c --- /dev/null +++ b/icons/shadericons/shadericon00011.png Binary files differ diff --git a/icons/shadericons/shadericon00012.jpg b/icons/shadericons/shadericon00012.jpg new file mode 100644 index 0000000..062d22b --- /dev/null +++ b/icons/shadericons/shadericon00012.jpg Binary files differ diff --git a/icons/shadericons/shadericon00012.png b/icons/shadericons/shadericon00012.png new file mode 100644 index 0000000..8562556 --- /dev/null +++ b/icons/shadericons/shadericon00012.png Binary files differ diff --git a/icons/shadericons/shadericon00013.jpg b/icons/shadericons/shadericon00013.jpg new file mode 100644 index 0000000..58e5e7a --- /dev/null +++ b/icons/shadericons/shadericon00013.jpg Binary files differ diff --git a/icons/shadericons/shadericon00013.png b/icons/shadericons/shadericon00013.png new file mode 100644 index 0000000..f50dd1c --- /dev/null +++ b/icons/shadericons/shadericon00013.png Binary files differ diff --git a/icons/shadericons/shadericon00014.jpg b/icons/shadericons/shadericon00014.jpg new file mode 100644 index 0000000..c732ddb --- /dev/null +++ b/icons/shadericons/shadericon00014.jpg Binary files differ diff --git a/icons/shadericons/shadericon00014.png b/icons/shadericons/shadericon00014.png new file mode 100644 index 0000000..9e5556b --- /dev/null +++ b/icons/shadericons/shadericon00014.png Binary files differ diff --git a/icons/shadericons/shadericon00015.jpg b/icons/shadericons/shadericon00015.jpg new file mode 100644 index 0000000..660d2ad --- /dev/null +++ b/icons/shadericons/shadericon00015.jpg Binary files differ diff --git a/icons/shadericons/shadericon00015.png b/icons/shadericons/shadericon00015.png new file mode 100644 index 0000000..e8f4741 --- /dev/null +++ b/icons/shadericons/shadericon00015.png Binary files differ diff --git a/icons/shadericons/shadericon00016.jpg b/icons/shadericons/shadericon00016.jpg new file mode 100644 index 0000000..e9d092c --- /dev/null +++ b/icons/shadericons/shadericon00016.jpg Binary files differ diff --git a/icons/shadericons/shadericon00016.png b/icons/shadericons/shadericon00016.png new file mode 100644 index 0000000..adf6078 --- /dev/null +++ b/icons/shadericons/shadericon00016.png Binary files differ diff --git a/icons/shadericons/shadericon00017.jpg b/icons/shadericons/shadericon00017.jpg new file mode 100644 index 0000000..4b5123d --- /dev/null +++ b/icons/shadericons/shadericon00017.jpg Binary files differ diff --git a/icons/shadericons/shadericon00017.png b/icons/shadericons/shadericon00017.png new file mode 100644 index 0000000..e4b8629 --- /dev/null +++ b/icons/shadericons/shadericon00017.png Binary files differ diff --git a/icons/shadericons/shadericon00018.jpg b/icons/shadericons/shadericon00018.jpg new file mode 100644 index 0000000..5c50bba --- /dev/null +++ b/icons/shadericons/shadericon00018.jpg Binary files differ diff --git a/icons/shadericons/shadericon00018.png b/icons/shadericons/shadericon00018.png new file mode 100644 index 0000000..768adf8 --- /dev/null +++ b/icons/shadericons/shadericon00018.png Binary files differ diff --git a/icons/shadericons/shadericon00019.jpg b/icons/shadericons/shadericon00019.jpg new file mode 100644 index 0000000..41fe4d6 --- /dev/null +++ b/icons/shadericons/shadericon00019.jpg Binary files differ diff --git a/icons/shadericons/shadericon00019.png b/icons/shadericons/shadericon00019.png new file mode 100644 index 0000000..e24efbf --- /dev/null +++ b/icons/shadericons/shadericon00019.png Binary files differ diff --git a/icons/shadericons/shadericon00020.jpg b/icons/shadericons/shadericon00020.jpg new file mode 100644 index 0000000..e60f200 --- /dev/null +++ b/icons/shadericons/shadericon00020.jpg Binary files differ diff --git a/icons/shadericons/shadericon00020.png b/icons/shadericons/shadericon00020.png new file mode 100644 index 0000000..6405163 --- /dev/null +++ b/icons/shadericons/shadericon00020.png Binary files differ diff --git a/icons/sphererender.gfd b/icons/sphererender.gfd new file mode 100644 index 0000000..b75eaad --- /dev/null +++ b/icons/sphererender.gfd Binary files differ -- Gitblit v1.6.2