mirror of
https://github.com/processing/processing4.git
synced 2026-05-19 06:32:26 +02:00
trying to clean up copyright info
This commit is contained in:
+4
-3
@@ -1,10 +1,9 @@
|
||||
/* -*- mode: jde; c-basic-offset: 2; indent-tabs-mode: nil -*- */
|
||||
|
||||
/*
|
||||
Base - base class for the main processing application
|
||||
Part of the Processing project - http://processing.org
|
||||
|
||||
Except where noted, code is written by Ben Fry and
|
||||
Copyright (c) 2004-05 Ben Fry and Casey Reas
|
||||
Copyright (c) 2001-04 Massachusetts Institute of Technology
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
@@ -44,6 +43,8 @@ import processing.core.*;
|
||||
|
||||
|
||||
/**
|
||||
* The base class for the main processing application
|
||||
* <P>
|
||||
* Primary role of this class is for platform identification and
|
||||
* general interaction with the system (launching URLs, loading
|
||||
* files and images, etc) that comes from that.
|
||||
@@ -386,7 +387,7 @@ public class Base {
|
||||
} else {
|
||||
// on linux (or elsewhere?) prompt the user for the location
|
||||
JFileChooser fc = new JFileChooser();
|
||||
fc.setDialogTitle("Select the folder where " +
|
||||
fc.setDialogTitle("Select the folder where " +
|
||||
"Processing sketches should be stored...");
|
||||
//fc.setSelectedFile(new File(sketchbookLocationField.getText()));
|
||||
fc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
|
||||
|
||||
+2
-3
@@ -4,9 +4,8 @@
|
||||
Compiler - default compiler class that connects to jikes
|
||||
Part of the Processing project - http://processing.org
|
||||
|
||||
Copyright (c) 2001-03
|
||||
Ben Fry, Massachusetts Institute of Technology and
|
||||
Casey Reas, Interaction Design Institute Ivrea
|
||||
Copyright (c) 2004-05 Ben Fry and Casey Reas
|
||||
Copyright (c) 2001-04 Massachusetts Institute of Technology
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
Editor - main editor panel for the processing development environment
|
||||
Part of the Processing project - http://processing.org
|
||||
|
||||
Except where noted, code is written by Ben Fry and
|
||||
Copyright (c) 2004-05 Ben Fry and Casey Reas
|
||||
Copyright (c) 2001-04 Massachusetts Institute of Technology
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
|
||||
@@ -1,13 +1,10 @@
|
||||
/* -*- mode: jde; c-basic-offset: 2; indent-tabs-mode: nil -*- */
|
||||
|
||||
/*
|
||||
EditorButtons - run/stop/etc buttons for the ide
|
||||
Part of the Processing project - http://processing.org
|
||||
|
||||
Copyright (c) 2004 Ben Fry and the Processing project.
|
||||
|
||||
The original rendition of this code was written by Ben Fry and
|
||||
Copyright (c) 2001-03 Massachusetts Institute of Technology
|
||||
Copyright (c) 2004-05 Ben Fry and Casey Reas
|
||||
Copyright (c) 2001-04 Massachusetts Institute of Technology
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -34,11 +31,13 @@ import javax.swing.*;
|
||||
import javax.swing.event.*;
|
||||
|
||||
|
||||
/**
|
||||
* run/stop/etc buttons for the ide
|
||||
*/
|
||||
public class EditorButtons extends JComponent implements MouseInputListener {
|
||||
|
||||
static final String title[] = {
|
||||
"Run", "Stop", "New", "Open", "Save", "Export"
|
||||
//"run", "stop", "new", "open", "save", "export"
|
||||
};
|
||||
|
||||
static final int BUTTON_COUNT = title.length;
|
||||
|
||||
+10
-9
@@ -1,11 +1,10 @@
|
||||
/* -*- mode: jde; c-basic-offset: 2; indent-tabs-mode: nil -*- */
|
||||
|
||||
/*
|
||||
EditorConsole - message console that sits below the program area
|
||||
Part of the Processing project - http://Proce55ing.net
|
||||
Part of the Processing project - http://processing.org
|
||||
|
||||
Except where noted, code is written by Ben Fry and
|
||||
Copyright (c) 2001-03 Massachusetts Institute of Technology
|
||||
Copyright (c) 2004-05 Ben Fry and Casey Reas
|
||||
Copyright (c) 2001-04 Massachusetts Institute of Technology
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -31,11 +30,13 @@ import javax.swing.*;
|
||||
import javax.swing.text.*;
|
||||
|
||||
|
||||
// debugging this class is tricky.. if it's throwing
|
||||
// exceptions, don't take over System.err, and debug
|
||||
// while watching just System.out
|
||||
// or just write directly to systemOut or systemErr
|
||||
|
||||
/**
|
||||
* Message console that sits below the editing area.
|
||||
* <P>
|
||||
* Debugging this class is tricky... If it's throwing exceptions,
|
||||
* don't take over System.err, and debug while watching just System.out
|
||||
* or just write println() or whatever directly to systemOut or systemErr.
|
||||
*/
|
||||
public class EditorConsole extends JScrollPane {
|
||||
Editor editor;
|
||||
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
/* -*- mode: jde; c-basic-offset: 2; indent-tabs-mode: nil -*- */
|
||||
|
||||
/*
|
||||
EditorHeader - sketch tabs at the top of the screen
|
||||
Part of the Processing project - http://processing.org
|
||||
|
||||
Except where noted, code is written by Ben Fry and
|
||||
Copyright (c) 2004-05 Ben Fry and Casey Reas
|
||||
Copyright (c) 2001-04 Massachusetts Institute of Technology
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
@@ -32,6 +31,9 @@ import javax.swing.*;
|
||||
import javax.swing.event.*;
|
||||
|
||||
|
||||
/**
|
||||
* Sketch tabs at the top of the editor window.
|
||||
*/
|
||||
public class EditorHeader extends JComponent {
|
||||
static Color backgroundColor;
|
||||
static Color textColor[] = new Color[2];
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
/* -*- mode: jde; c-basic-offset: 2; indent-tabs-mode: nil -*- */
|
||||
|
||||
/*
|
||||
EditorLineStatus - li'l status bar fella that shows the line number
|
||||
Part of the Processing project - http://processing.org
|
||||
|
||||
Copyright (c) 2005 Ben Fry and Casey Reas
|
||||
@@ -32,6 +31,9 @@ import javax.swing.*;
|
||||
import javax.swing.event.*;
|
||||
|
||||
|
||||
/**
|
||||
* Li'l status bar fella that shows the line number.
|
||||
*/
|
||||
public class EditorLineStatus extends JComponent {
|
||||
JEditTextArea textarea;
|
||||
int start = -1, stop;
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
/* -*- mode: jde; c-basic-offset: 2; indent-tabs-mode: nil -*- */
|
||||
|
||||
/*
|
||||
EditorListener - filter key events for tab expansion/indent/etc
|
||||
Part of the Processing project - http://processing.org
|
||||
|
||||
Except where noted, code is written by Ben Fry and
|
||||
Copyright (c) 2004-05 Ben Fry and Casey Reas
|
||||
Copyright (c) 2001-04 Massachusetts Institute of Technology
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
@@ -34,6 +33,9 @@ import javax.swing.text.*;
|
||||
import javax.swing.event.*;
|
||||
|
||||
|
||||
/**
|
||||
* Filters key events for tab expansion/indent/etc.
|
||||
*/
|
||||
public class EditorListener {
|
||||
Editor editor;
|
||||
JEditTextArea textarea;
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
/* -*- mode: jde; c-basic-offset: 2; indent-tabs-mode: nil -*- */
|
||||
|
||||
/*
|
||||
EditorStatus - panel containing status messages
|
||||
Part of the Processing project - http://processing.org
|
||||
|
||||
Except where noted, code is written by Ben Fry and
|
||||
Copyright (c) 2001-03 Massachusetts Institute of Technology
|
||||
Copyright (c) 2004-05 Ben Fry and Casey Reas
|
||||
Copyright (c) 2001-04 Massachusetts Institute of Technology
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -28,9 +27,10 @@ import java.awt.*;
|
||||
import java.awt.event.*;
|
||||
import javax.swing.*;
|
||||
|
||||
import sun.awt.AppContext; // from java.awt.Dialog, for blocking
|
||||
|
||||
|
||||
/**
|
||||
* Panel just below the editing area that contains status messages.
|
||||
*/
|
||||
public class EditorStatus extends JPanel implements ActionListener {
|
||||
static Color bgcolor[];
|
||||
static Color fgcolor[];
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
/* -*- mode: jde; c-basic-offset: 2; indent-tabs-mode: nil -*- */
|
||||
|
||||
/*
|
||||
FindReplace - find/replace window for processing
|
||||
Part of the Processing project - http://processing.org
|
||||
|
||||
Except where noted, code is written by Ben Fry and is
|
||||
Copyright (c) 2004-05 Ben Fry and Casey Reas
|
||||
Copyright (c) 2001-04 Massachusetts Institute of Technology
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
@@ -29,6 +28,9 @@ import java.awt.event.*;
|
||||
import javax.swing.*;
|
||||
|
||||
|
||||
/**
|
||||
* Find & Replace window for the processing editor.
|
||||
*/
|
||||
public class FindReplace extends JFrame
|
||||
implements ActionListener, KeyListener {
|
||||
|
||||
|
||||
+15
-12
@@ -1,11 +1,10 @@
|
||||
/* -*- mode: jde; c-basic-offset: 2; indent-tabs-mode: nil -*- */
|
||||
|
||||
/*
|
||||
MessageConsumer - interface for dealing with parser/compiler output
|
||||
Part of the Processing project - http://Proce55ing.net
|
||||
Part of the Processing project - http://processing.org
|
||||
|
||||
Except where noted, code is written by Ben Fry and
|
||||
Copyright (c) 2001-03 Massachusetts Institute of Technology
|
||||
Copyright (c) 2004-05 Ben Fry and Casey Reas
|
||||
Copyright (c) 2001-04 Massachusetts Institute of Technology
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -24,14 +23,18 @@
|
||||
|
||||
package processing.app;
|
||||
|
||||
// Different instances of MessageStream need to do different things with
|
||||
// messages. In particular, a stream instance used for parsing output from
|
||||
// the compiler compiler has to interpret its messages differently than one
|
||||
// parsing output from the runtime.
|
||||
//
|
||||
// Classes which consume messages and do something with them should implement
|
||||
// this interface.
|
||||
//
|
||||
|
||||
/**
|
||||
* Interface for dealing with parser/compiler output
|
||||
* <P>
|
||||
* Different instances of MessageStream need to do different things with
|
||||
* messages. In particular, a stream instance used for parsing output from
|
||||
* the compiler compiler has to interpret its messages differently than one
|
||||
* parsing output from the runtime.
|
||||
* <P>
|
||||
* Classes which consume messages and do something with them
|
||||
* should implement this interface.
|
||||
*/
|
||||
public interface MessageConsumer {
|
||||
|
||||
public void message(String s);
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
/* -*- mode: jde; c-basic-offset: 2; indent-tabs-mode: nil -*- */
|
||||
|
||||
/*
|
||||
MessageSiphon - slurps up messages from compiler
|
||||
Part of the Processing project - http://processing.org
|
||||
|
||||
Earlier portions of this code are Copyright (c) 2001-04 MIT
|
||||
Other parts are Copyright (c) 2004 Ben Fry and Casey Reas
|
||||
Copyright (c) 2004-05 Ben Fry and Casey Reas
|
||||
Copyright (c) 2001-04 Massachusetts Institute of Technology
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -27,6 +26,9 @@ package processing.app;
|
||||
import java.io.*;
|
||||
|
||||
|
||||
/**
|
||||
* Slurps up messages from compiler.
|
||||
*/
|
||||
class MessageSiphon implements Runnable {
|
||||
BufferedReader streamReader;
|
||||
Thread thread;
|
||||
|
||||
+9
-16
@@ -1,11 +1,10 @@
|
||||
/* -*- mode: jde; c-basic-offset: 2; indent-tabs-mode: nil -*- */
|
||||
|
||||
/*
|
||||
MessageStream - outputstream to handle stdout/stderr messages
|
||||
Part of the Processing project - http://Proce55ing.net
|
||||
Part of the Processing project - http://processing.org
|
||||
|
||||
Except where noted, code is written by Ben Fry and
|
||||
Copyright (c) 2001-03 Massachusetts Institute of Technology
|
||||
Copyright (c) 2004-05 Ben Fry and Casey Reas
|
||||
Copyright (c) 2001-04 Massachusetts Institute of Technology
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -28,26 +27,20 @@ import java.io.*;
|
||||
|
||||
|
||||
/**
|
||||
* this is used by Editor, System.err is set to
|
||||
* new PrintStream(new MessageStream())
|
||||
*
|
||||
* it's also used by Compiler
|
||||
* OutputStream to handle stdout/stderr messages.
|
||||
* <P>
|
||||
* This is used by Editor, System.err is set to
|
||||
* new PrintStream(new MessageStream()).
|
||||
* It's also used by Compiler.
|
||||
*/
|
||||
class MessageStream extends OutputStream {
|
||||
|
||||
//Editor editor;
|
||||
MessageConsumer messageConsumer;
|
||||
|
||||
public MessageStream(/*Editor editor,*/
|
||||
MessageConsumer messageConsumer) {
|
||||
//this.editor = editor;
|
||||
public MessageStream(MessageConsumer messageConsumer) {
|
||||
this.messageConsumer = messageConsumer;
|
||||
}
|
||||
|
||||
//public void setMessageConsumer(MessageConsumer messageConsumer) {
|
||||
//this.messageConsumer = messageConsumer;
|
||||
//}
|
||||
|
||||
public void close() { }
|
||||
|
||||
public void flush() { }
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
/* -*- mode: jde; c-basic-offset: 2; indent-tabs-mode: nil -*- */
|
||||
|
||||
/*
|
||||
Preferences - controls user preferences and environment settings
|
||||
Part of the Processing project - http://Processing.org
|
||||
Part of the Processing project - http://processing.org
|
||||
|
||||
Except where noted, code is written by Ben Fry and is
|
||||
Copyright (c) 2004-05 Ben Fry and Casey Reas
|
||||
Copyright (c) 2001-04 Massachusetts Institute of Technology
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
@@ -44,7 +43,7 @@ import processing.core.PApplet;
|
||||
|
||||
|
||||
/**
|
||||
* Preferences storage class.
|
||||
* Storage class for user preferences and environment settings.
|
||||
* <P>
|
||||
* This class no longer uses the Properties class, since
|
||||
* properties files are iso8859-1, which is highly likely to
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
/* -*- mode: jde; c-basic-offset: 2; indent-tabs-mode: nil -*- */
|
||||
|
||||
/*
|
||||
PresentMode - helper class for full-screen presentation mode
|
||||
Part of the Processing project - http://processing.org
|
||||
|
||||
Copyright (c) 2005- Ben Fry and Casey Reas
|
||||
@@ -29,6 +28,9 @@ import java.util.Vector;
|
||||
import javax.swing.*;
|
||||
|
||||
|
||||
/**
|
||||
* Helper class for full-screen presentation mode.
|
||||
*/
|
||||
public class PresentMode {
|
||||
|
||||
static GraphicsDevice devices[];
|
||||
@@ -123,4 +125,4 @@ public class PresentMode {
|
||||
device.setFullScreenWindow(null);
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
+4
-1
@@ -1,7 +1,6 @@
|
||||
/* -*- mode: jde; c-basic-offset: 2; indent-tabs-mode: nil -*- */
|
||||
|
||||
/*
|
||||
Runner - runs a compiled java applet
|
||||
Part of the Processing project - http://processing.org
|
||||
|
||||
Copyright (c) 2004-05 Ben Fry and Casey Reas
|
||||
@@ -34,6 +33,10 @@ import java.lang.reflect.*;
|
||||
import com.oroinc.text.regex.*;
|
||||
|
||||
|
||||
/**
|
||||
* Runs a compiled java applet, whether as an external application
|
||||
* or internally as an applet object in a window.
|
||||
*/
|
||||
public class Runner implements MessageConsumer {
|
||||
|
||||
PApplet applet;
|
||||
|
||||
+32
-131
@@ -1,22 +1,21 @@
|
||||
/* -*- mode: jde; c-basic-offset: 2; indent-tabs-mode: nil -*- */
|
||||
|
||||
/**
|
||||
* Based on Simple1.2ClassLoader.java - simple Java 1.2 class loader
|
||||
* Copyright (c) 1999 Ken McCrary, All Rights Reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software
|
||||
* and its documentation for NON-COMMERCIAL purposes and without
|
||||
* fee is hereby granted provided that this copyright notice
|
||||
* appears in all copies.
|
||||
*
|
||||
* KEN MCCRARY MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE
|
||||
* SUITABILITY OF THE SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING
|
||||
* BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. KEN MCCRARY
|
||||
* SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT
|
||||
* OF USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES.
|
||||
*/
|
||||
/*
|
||||
Based on Simple1.2ClassLoader.java - simple Java 1.2 class loader
|
||||
Copyright (c) 1999 Ken McCrary, All Rights Reserved.
|
||||
|
||||
Permission to use, copy, modify, and distribute this software
|
||||
and its documentation for NON-COMMERCIAL purposes and without
|
||||
fee is hereby granted provided that this copyright notice
|
||||
appears in all copies.
|
||||
|
||||
KEN MCCRARY MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE
|
||||
SUITABILITY OF THE SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING
|
||||
BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. KEN MCCRARY
|
||||
SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT
|
||||
OF USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES.
|
||||
*/
|
||||
package processing.app;
|
||||
|
||||
import java.io.*;
|
||||
@@ -24,71 +23,31 @@ import java.net.*;
|
||||
import java.util.*;
|
||||
import java.util.jar.*;
|
||||
|
||||
|
||||
/**
|
||||
* Simple class loader to illustrate custom Class
|
||||
* loading with new delegation model in Java 1.2.
|
||||
*
|
||||
* Simple class loader adapted for Processing.
|
||||
* <P>
|
||||
* Based on code from Ken McCrary.
|
||||
*/
|
||||
public class RunnerClassLoader extends ClassLoader {
|
||||
String buildFolderPath;
|
||||
|
||||
/*
|
||||
RunnerClassLoader(ClassLoader parent) {
|
||||
super(parent);
|
||||
init();
|
||||
}
|
||||
*/
|
||||
|
||||
RunnerClassLoader() {
|
||||
//super(); // uses system class loader
|
||||
//init();
|
||||
//}
|
||||
|
||||
//private void init() {
|
||||
buildFolderPath = Base.getBuildFolder().getAbsolutePath();
|
||||
|
||||
/*
|
||||
FileInputStream fi = null;
|
||||
|
||||
// Check for a manifest in the store directory
|
||||
try
|
||||
{
|
||||
fi = new FileInputStream("store\\MANIFEST.MF");
|
||||
manifest = new Manifest(fi);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
// No manifest
|
||||
}
|
||||
finally
|
||||
{
|
||||
if ( null != fi )
|
||||
{
|
||||
try
|
||||
{
|
||||
fi.close();
|
||||
}
|
||||
catch (Exception e){}
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* This is the method where the task of class loading
|
||||
* is delegated to our custom loader.
|
||||
* This is the method where the task of class loading
|
||||
* is delegated to our custom loader.
|
||||
*
|
||||
* @param name the name of the class
|
||||
* @return the resulting <code>Class</code> object
|
||||
* @exception ClassNotFoundException if the class could not be found
|
||||
*/
|
||||
protected Class findClass(String name) throws ClassNotFoundException
|
||||
{
|
||||
protected Class findClass(String name) throws ClassNotFoundException {
|
||||
FileInputStream fi = null;
|
||||
|
||||
try {
|
||||
//System.out.println("PCL finding class: " + name);
|
||||
String path =
|
||||
buildFolderPath + File.separator + name.replace('.', '/');
|
||||
//System.out.println("(from " + path + ")");
|
||||
@@ -99,7 +58,7 @@ public class RunnerClassLoader extends ClassLoader {
|
||||
return defineClass(name, classBytes, 0, classBytes.length);
|
||||
|
||||
} catch (Exception e) {
|
||||
// We could not find the class, so indicate the problem with an exception
|
||||
// could not find the class, so indicate the problem with an exception
|
||||
throw new ClassNotFoundException(name);
|
||||
|
||||
} finally {
|
||||
@@ -113,11 +72,11 @@ public class RunnerClassLoader extends ClassLoader {
|
||||
|
||||
|
||||
/**
|
||||
* Identify where to load a resource from, resources for
|
||||
* this simple ClassLoader are in a directory name "store"
|
||||
* Identify where to load a resource from, resources for
|
||||
* this simple ClassLoader are in a directory name "store"
|
||||
*
|
||||
* @param name the resource name
|
||||
* @return URL for resource or null if not found
|
||||
* @param name the resource name
|
||||
* @return URL for resource or null if not found
|
||||
*/
|
||||
protected URL findResource(String name) {
|
||||
String path =
|
||||
@@ -136,12 +95,12 @@ public class RunnerClassLoader extends ClassLoader {
|
||||
|
||||
|
||||
/**
|
||||
* Used for identifying resources from multiple URLS
|
||||
* Since our simple Classloader only has one repository
|
||||
* the returned Enumeration contains 0 to 1 items
|
||||
* Used for identifying resources from multiple URLS
|
||||
* Since our simple Classloader only has one repository
|
||||
* the returned Enumeration contains 0 to 1 items
|
||||
*
|
||||
* @param name the resource name
|
||||
* @return Enumeration of one URL
|
||||
* @param name the resource name
|
||||
* @return Enumeration of one URL
|
||||
*/
|
||||
protected Enumeration findResources(final String name) throws IOException {
|
||||
// Since we only have a single repository we will only have one
|
||||
@@ -166,62 +125,4 @@ public class RunnerClassLoader extends ClassLoader {
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Minimal package definition
|
||||
*
|
||||
*/
|
||||
/*
|
||||
private void definePackage(String className)
|
||||
{
|
||||
// Extract the package name from the class name,
|
||||
String pkgName = className;
|
||||
int index = className.lastIndexOf('.');
|
||||
if (-1 != index)
|
||||
{
|
||||
pkgName = className.substring(0, index);
|
||||
}
|
||||
|
||||
// Pre-conditions - need a manifest and the package
|
||||
// is not previously defined
|
||||
if ( null == manifest ||
|
||||
getPackage(pkgName) != null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
String specTitle,
|
||||
specVersion,
|
||||
specVendor,
|
||||
implTitle,
|
||||
implVersion,
|
||||
implVendor;
|
||||
|
||||
// Look up the versioning information
|
||||
// This should really look for a named attribute
|
||||
Attributes attr = manifest.getMainAttributes();
|
||||
|
||||
if ( null != attr)
|
||||
{
|
||||
specTitle = attr.getValue(Name.SPECIFICATION_TITLE);
|
||||
specVersion = attr.getValue(Name.SPECIFICATION_VERSION);
|
||||
specVendor = attr.getValue(Name.SPECIFICATION_VENDOR);
|
||||
implTitle = attr.getValue(Name.IMPLEMENTATION_TITLE);
|
||||
implVersion = attr.getValue(Name.IMPLEMENTATION_VERSION);
|
||||
implVendor = attr.getValue(Name.IMPLEMENTATION_VENDOR);
|
||||
|
||||
definePackage(pkgName,
|
||||
specTitle,
|
||||
specVersion,
|
||||
specVendor,
|
||||
implTitle,
|
||||
implVersion,
|
||||
implVendor,
|
||||
null); // no sealing for simplicity
|
||||
}
|
||||
}
|
||||
|
||||
private Manifest manifest;
|
||||
*/
|
||||
}
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
/* -*- mode: jde; c-basic-offset: 2; indent-tabs-mode: nil -*- */
|
||||
|
||||
/*
|
||||
RunnerException - an exception with a line number attached
|
||||
Part of the Processing project - http://processing.org
|
||||
|
||||
Except where noted, code is written by Ben Fry and is
|
||||
Copyright (c) 2004-05 Ben Fry and Casey Reas
|
||||
Copyright (c) 2001-04 Massachusetts Institute of Technology
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
@@ -24,6 +23,10 @@
|
||||
|
||||
package processing.app;
|
||||
|
||||
/**
|
||||
* An exception with a line number attached that occurs
|
||||
* during either compile time or run time.
|
||||
*/
|
||||
public class RunnerException extends Exception {
|
||||
public int file = -1;
|
||||
public int line = -1;
|
||||
@@ -58,7 +61,7 @@ public class RunnerException extends Exception {
|
||||
/**
|
||||
* Nix the java.lang crap out of an exception message
|
||||
* because it scares the children.
|
||||
*
|
||||
* <P>
|
||||
* This function must be static to be used with super()
|
||||
* in each of the constructors above.
|
||||
*/
|
||||
|
||||
+4
-2
@@ -1,10 +1,9 @@
|
||||
/* -*- mode: jde; c-basic-offset: 2; indent-tabs-mode: nil -*- */
|
||||
|
||||
/*
|
||||
Sketch - stores information about files in the current sketch
|
||||
Part of the Processing project - http://processing.org
|
||||
|
||||
Except where noted, code is written by Ben Fry
|
||||
Copyright (c) 2004-05 Ben Fry and Casey Reas
|
||||
Copyright (c) 2001-04 Massachusetts Institute of Technology
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
@@ -37,6 +36,9 @@ import javax.swing.JOptionPane;
|
||||
import com.oroinc.text.regex.*;
|
||||
|
||||
|
||||
/**
|
||||
* Stores information about files in the current sketch
|
||||
*/
|
||||
public class Sketch {
|
||||
//static String TEMP_BUILD_PATH = "lib" + File.separator + "build";
|
||||
static File tempBuildFolder;
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
SketchCode - data class for a single file inside a sketch
|
||||
Part of the Processing project - http://processing.org
|
||||
|
||||
Except where noted, code is written by Ben Fry and is
|
||||
Copyright (c) 2004-05 Ben Fry and Casey Reas
|
||||
Copyright (c) 2001-04 Massachusetts Institute of Technology
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
|
||||
+19
-19
@@ -4,8 +4,8 @@
|
||||
SketchHistory - handler for storing history information about a project
|
||||
Part of the Processing project - http://processing.org
|
||||
|
||||
Except where noted, code is written by Ben Fry
|
||||
Copyright (c) 2001-03 Massachusetts Institute of Technology
|
||||
Copyright (c) 2004-05 Ben Fry and Casey Reas
|
||||
Copyright (c) 2001-04 Massachusetts Institute of Technology
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -17,8 +17,8 @@
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
@@ -43,12 +43,12 @@ public class SketchHistory {
|
||||
static final int AUTOSAVE = 7;
|
||||
static final int BEAUTIFY = 8;
|
||||
|
||||
static final String HISTORY_SEPARATOR =
|
||||
static final String HISTORY_SEPARATOR =
|
||||
"#################################################";
|
||||
|
||||
JMenu menu;
|
||||
|
||||
// true if the sketch is read-only,
|
||||
// true if the sketch is read-only,
|
||||
// meaning that no history will be recorded
|
||||
boolean readOnlySketch;
|
||||
|
||||
@@ -95,7 +95,7 @@ public class SketchHistory {
|
||||
}
|
||||
|
||||
|
||||
/// Check to see if history should be recorded.
|
||||
/// Check to see if history should be recorded.
|
||||
/// mode is RUN, SAVE, AUTOSAVE, or BEAUTIFY
|
||||
public void record(String program, int mode) {
|
||||
if (readOnlySketch) return;
|
||||
@@ -133,13 +133,13 @@ public class SketchHistory {
|
||||
noPreviousHistory = true; // rebuild menu
|
||||
}
|
||||
|
||||
OutputStream historyStream =
|
||||
OutputStream historyStream =
|
||||
new GZIPOutputStream(new FileOutputStream(historyFile));
|
||||
|
||||
if (old != null) {
|
||||
historyStream.write(old.toByteArray());
|
||||
}
|
||||
PrintWriter historyWriter =
|
||||
PrintWriter historyWriter =
|
||||
new PrintWriter(new OutputStreamWriter(historyStream));
|
||||
|
||||
historyWriter.println();
|
||||
@@ -149,7 +149,7 @@ public class SketchHistory {
|
||||
// 2002 06 18 11 43 29
|
||||
// when listing, study for descrepancies.. if all are
|
||||
// 2002, then don't list the year and soforth.
|
||||
// for the other end, if all minutes are unique,
|
||||
// for the other end, if all minutes are unique,
|
||||
// then don't show seconds
|
||||
int year = now.get(Calendar.YEAR);
|
||||
int month = now.get(Calendar.MONTH) + 1;
|
||||
@@ -162,13 +162,13 @@ public class SketchHistory {
|
||||
|
||||
String readableDate = now.getTime().toString();
|
||||
|
||||
// increment this so sketchbook won't be mangled
|
||||
// increment this so sketchbook won't be mangled
|
||||
// each time this format has to change
|
||||
String historyVersion = "1";
|
||||
//Date date = new Date();
|
||||
//String datestamp = date.toString();
|
||||
|
||||
historyWriter.println(historyVersion + " " + modeStr + " - " +
|
||||
historyWriter.println(historyVersion + " " + modeStr + " - " +
|
||||
parseDate + " - " + readableDate);
|
||||
historyWriter.println();
|
||||
historyWriter.println(program);
|
||||
@@ -183,7 +183,7 @@ public class SketchHistory {
|
||||
historyWriter.flush();
|
||||
historyWriter.close();
|
||||
|
||||
if (noPreviousHistory) {
|
||||
if (noPreviousHistory) {
|
||||
// to get add the actual menu, to get the 'clear' item in there
|
||||
//rebuildMenu(historyFile.getPath());
|
||||
rebuildMenu();
|
||||
@@ -197,7 +197,7 @@ public class SketchHistory {
|
||||
|
||||
public void retrieve(String selection) {
|
||||
//System.out.println("sel '" + selection + "'");
|
||||
String readableDate =
|
||||
String readableDate =
|
||||
selection.substring(selection.indexOf("-") + 2);
|
||||
|
||||
// make history for the current guy
|
||||
@@ -241,7 +241,7 @@ public class SketchHistory {
|
||||
editor.setSketchModified(false);
|
||||
|
||||
} else {
|
||||
System.err.println("couldn't find history entry for " +
|
||||
System.err.println("couldn't find history entry for " +
|
||||
"'" + readableDate + "'");
|
||||
}
|
||||
} catch (IOException e) {
|
||||
@@ -281,7 +281,7 @@ public class SketchHistory {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
if (!historyFile.delete()) {
|
||||
//System.err.println("couldn't erase history");
|
||||
Base.showWarning("History Problem",
|
||||
Base.showWarning("History Problem",
|
||||
"Could not erase history", null);
|
||||
}
|
||||
rebuildMenu();
|
||||
@@ -307,7 +307,7 @@ public class SketchHistory {
|
||||
if (line.equals(HISTORY_SEPARATOR)) {
|
||||
// next line is the good stuff
|
||||
line = reader.readLine();
|
||||
int version =
|
||||
int version =
|
||||
Integer.parseInt(line.substring(0, line.indexOf(' ')));
|
||||
if (version == 1) {
|
||||
String whysub = line.substring(2); // after "1 "
|
||||
@@ -332,7 +332,7 @@ public class SketchHistory {
|
||||
|
||||
// add the items to the menu in reverse order
|
||||
|
||||
//ActionListener historyMenuListener =
|
||||
//ActionListener historyMenuListener =
|
||||
// new ActionListener() {
|
||||
// public void actionPerformed(ActionEvent e) {
|
||||
// editor.retrieveHistory(e.getActionCommand());
|
||||
@@ -354,4 +354,4 @@ public class SketchHistory {
|
||||
}
|
||||
|
||||
|
||||
*/
|
||||
*/
|
||||
|
||||
+4
-2
@@ -1,10 +1,9 @@
|
||||
/* -*- mode: jde; c-basic-offset: 2; indent-tabs-mode: nil -*- */
|
||||
|
||||
/*
|
||||
Sketchbook - handles sketchbook mechanics for the sketch menu
|
||||
Part of the Processing project - http://processing.org
|
||||
|
||||
Except where noted, code is written by Ben Fry and is
|
||||
Copyright (c) 2004-05 Ben Fry and Casey Reas
|
||||
Copyright (c) 2001-04 Massachusetts Institute of Technology
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
@@ -40,6 +39,9 @@ import javax.swing.undo.*;
|
||||
import com.apple.mrj.*;
|
||||
|
||||
|
||||
/**
|
||||
* Handles sketchbook mechanics for the sketch menu and file I/O.
|
||||
*/
|
||||
public class Sketchbook {
|
||||
Editor editor;
|
||||
|
||||
|
||||
+4
-2
@@ -1,10 +1,9 @@
|
||||
/* -*- mode: jde; c-basic-offset: 2; indent-tabs-mode: nil -*- */
|
||||
|
||||
/*
|
||||
PApplet - applet base class for the bagel engine
|
||||
Part of the Processing project - http://processing.org
|
||||
|
||||
Copyright (c) 2004- Ben Fry and Casey Reas
|
||||
Copyright (c) 2004-05 Ben Fry and Casey Reas
|
||||
Copyright (c) 2001-04 Massachusetts Institute of Technology
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
@@ -37,6 +36,9 @@ import java.util.*;
|
||||
import java.util.zip.*;
|
||||
|
||||
|
||||
/**
|
||||
* Base class for all sketches that use processing.core.
|
||||
*/
|
||||
public class PApplet extends Applet
|
||||
implements PConstants, Runnable,
|
||||
MouseListener, MouseMotionListener, KeyListener, FocusListener
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
/* -*- mode: jde; c-basic-offset: 2; indent-tabs-mode: nil -*- */
|
||||
|
||||
/*
|
||||
PConstants - numbers shared throughout processing.core
|
||||
Part of the Processing project - http://processing.org
|
||||
|
||||
Except where noted, code is written by Ben Fry and
|
||||
Copyright (c) 2004-05 Ben Fry and Casey Reas
|
||||
Copyright (c) 2001-04 Massachusetts Institute of Technology
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
@@ -29,6 +28,9 @@ import java.awt.Cursor;
|
||||
import java.awt.event.KeyEvent;
|
||||
|
||||
|
||||
/**
|
||||
* Numbers shared throughout processing.core.
|
||||
*/
|
||||
public interface PConstants {
|
||||
|
||||
// renderers known to processing.core
|
||||
@@ -357,7 +359,7 @@ public interface PConstants {
|
||||
|
||||
//has this vertex been lit yet
|
||||
static final int BEEN_LIT = 35;
|
||||
|
||||
|
||||
static final int VERTEX_FIELD_COUNT = 36;
|
||||
|
||||
// line & triangle fields (note how these overlap)
|
||||
@@ -372,7 +374,7 @@ public interface PConstants {
|
||||
|
||||
static final int LINE_FIELD_COUNT = 5;
|
||||
static final int TRIANGLE_FIELD_COUNT = 5;
|
||||
|
||||
|
||||
static final int TRI_DIFFUSE_R = 0;
|
||||
static final int TRI_DIFFUSE_G = 1;
|
||||
static final int TRI_DIFFUSE_B = 2;
|
||||
@@ -381,7 +383,7 @@ public interface PConstants {
|
||||
static final int TRI_SPECULAR_G = 5;
|
||||
static final int TRI_SPECULAR_B = 6;
|
||||
static final int TRI_SPECULAR_A = 7;
|
||||
|
||||
|
||||
static final int TRIANGLE_COLOR_COUNT = 8;
|
||||
|
||||
// normal modes for lighting
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
/* -*- mode: jde; c-basic-offset: 2; indent-tabs-mode: nil -*- */
|
||||
|
||||
/*
|
||||
PFont - font object for text rendering
|
||||
Part of the Processing project - http://processing.org
|
||||
|
||||
Copyright (c) 2004-05 Ben Fry & Casey Reas
|
||||
@@ -35,7 +34,6 @@ import java.util.*;
|
||||
* Grayscale bitmap font class used by Processing.
|
||||
* <P>
|
||||
* Awful (and by that, I mean awesome) ascii (non)art for how this works:
|
||||
*
|
||||
* <PRE>
|
||||
* |
|
||||
* | height is the full used height of the image
|
||||
|
||||
+7
-2
@@ -1,7 +1,6 @@
|
||||
/* -*- mode: jde; c-basic-offset: 2; indent-tabs-mode: nil -*- */
|
||||
|
||||
/*
|
||||
PGraphics - main graphics and rendering context
|
||||
Part of the Processing project - http://processing.org
|
||||
|
||||
Copyright (c) 2004-05 Ben Fry and Casey Reas
|
||||
@@ -32,6 +31,12 @@ import java.awt.image.*;
|
||||
import java.io.*;
|
||||
|
||||
|
||||
/**
|
||||
* Main graphics and rendering context, as well as
|
||||
* the base API implementation for processing "core".
|
||||
* <P>
|
||||
* As of beta, this class is semi-disabled.
|
||||
*/
|
||||
public class PGraphics extends PImage implements PConstants {
|
||||
|
||||
/// width minus one (useful for many calculations)
|
||||
@@ -2546,7 +2551,7 @@ public class PGraphics extends PImage implements PConstants {
|
||||
public void ambientLight(float red, float green, float blue) {
|
||||
depthError("ambientLight");
|
||||
}
|
||||
|
||||
|
||||
public void ambientLight(float red, float green, float blue, float x, float y, float z) {
|
||||
depthError("ambientLight");
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
/* -*- mode: jde; c-basic-offset: 2; indent-tabs-mode: nil -*- */
|
||||
|
||||
/*
|
||||
PGraphics2 - graphics engine implemented via java2d
|
||||
Part of the Processing project - http://processing.org
|
||||
|
||||
Copyright (c) 2005 Ben Fry and Casey Reas
|
||||
@@ -29,8 +28,10 @@ import java.awt.geom.*;
|
||||
import java.awt.image.*;
|
||||
|
||||
|
||||
// Graphics, GeneralPath, AffineTransform, BasicStroke, Graphics2D
|
||||
|
||||
/**
|
||||
* Subclass for PGraphics that implements the graphics API
|
||||
* in Java 1.3+ using Java 2D.
|
||||
*/
|
||||
public class PGraphics2 extends PGraphics {
|
||||
|
||||
public Graphics2D g2;
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
/* -*- mode: jde; c-basic-offset: 2; indent-tabs-mode: nil -*- */
|
||||
|
||||
/*
|
||||
PGraphics - main graphics and rendering context
|
||||
Part of the Processing project - http://processing.org
|
||||
|
||||
Copyright (c) 2004-05 Ben Fry and Casey Reas
|
||||
@@ -29,6 +28,9 @@ import java.awt.*;
|
||||
import java.awt.image.*;
|
||||
|
||||
|
||||
/**
|
||||
* Subclass of PGraphics that handles 3D rendering.
|
||||
*/
|
||||
public class PGraphics3 extends PGraphics {
|
||||
|
||||
/** The modelview matrix. */
|
||||
|
||||
+9
-41
@@ -1,13 +1,10 @@
|
||||
/* -*- mode: jde; c-basic-offset: 2; indent-tabs-mode: nil -*- */
|
||||
|
||||
/*
|
||||
PImage - storage class for pixel data
|
||||
Part of the Processing project - http://processing.org
|
||||
|
||||
Copyright (c) 2001-05
|
||||
Ben Fry, Massachusetts Institute of Technology and
|
||||
Casey Reas, Interaction Design Institute Ivrea
|
||||
Additional code contributions from toxi
|
||||
Copyright (c) 2004-05 Ben Fry and Casey Reas
|
||||
Copyright (c) 2001-04 Massachusetts Institute of Technology
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
@@ -34,42 +31,13 @@ import java.io.*;
|
||||
|
||||
|
||||
/**
|
||||
* image class developed by toxi and fry.
|
||||
*
|
||||
* <PRE>[fry 0407XX]
|
||||
* - get() on RGB images sets the high bits to opaque
|
||||
* - modification of naming for functions
|
||||
* - inclusion of Object.clone()
|
||||
* - make get(), copy(), blend() honor imageMode
|
||||
* - lots of moving things around for new megabucket api
|
||||
*
|
||||
* [toxi 030722]
|
||||
* advanced copying/blitting code
|
||||
*
|
||||
* [fry 030918]
|
||||
* integrated and modified to fit p5 spec
|
||||
*
|
||||
* [toxi 030930]
|
||||
* - target pixel buffer doesn't loose alpha channel anymore
|
||||
* with every blitting operation alpha values are increased now
|
||||
* - resizing by large factors (>250%) doesn't yield any rounding errors
|
||||
* anymore, changed to 16bit precision (=65536% max or 0.000015% min)
|
||||
* - replicate() is now only using REPLACE mode to avoid semantic problems
|
||||
* - added blend() methods to use replicate()'s functionality,
|
||||
* but with blend modes
|
||||
*
|
||||
* [toxi 031006]
|
||||
* blit_resize() is now clipping input coordinates to avoid array
|
||||
* exceptions target dimension can be larger than destination image
|
||||
* object, outside pixels will be skipped
|
||||
*
|
||||
* [toxi 031017]
|
||||
* versions of replicate() and blend() methods which use cross-image
|
||||
* blitting are now called in the destination image and expect a source
|
||||
* image object as parameter. this is to provide an easy syntax for cases
|
||||
* where the main pixel buffer is the destination. as those methods are
|
||||
* overloaded in BApplet, users can call those functions directly without
|
||||
* explicitly giving a reference to PGraphics.</PRE>
|
||||
* Storage class for pixel data.
|
||||
* <P>
|
||||
* Code for copying, resizing, scaling, and blending contributed
|
||||
* by <A HREF="http://www.toxi.co.uk">toxi</A>
|
||||
* <P>
|
||||
* Gaussian blur code contributed by
|
||||
* <A HREF="http://incubator.quasimondo.com">Mario Klingemann</A>
|
||||
*/
|
||||
public class PImage implements PConstants, Cloneable {
|
||||
|
||||
|
||||
+22
-18
@@ -1,34 +1,38 @@
|
||||
/* -*- mode: jde; c-basic-offset: 2; indent-tabs-mode: nil -*- */
|
||||
|
||||
/*
|
||||
PLine - code for rendering lines
|
||||
Part of the Processing project - http://processing.org
|
||||
Part of the Processing project - http://processing.org
|
||||
|
||||
Copyright (c) 2001-03
|
||||
Ben Fry, Massachusetts Institute of Technology and
|
||||
Casey Reas, Interaction Design Institute Ivrea
|
||||
Copyright (c) 2004-05 Ben Fry and Casey Reas
|
||||
Copyright (c) 2001-04 Massachusetts Institute of Technology
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General
|
||||
Public License along with this library; if not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||
Boston, MA 02111-1307 USA
|
||||
You should have received a copy of the GNU Lesser General
|
||||
Public License along with this library; if not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||
Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
package processing.core;
|
||||
|
||||
|
||||
/**
|
||||
* Code for rendering lines.
|
||||
* <P>
|
||||
* This code will soon be removed.
|
||||
* Written by Carlos Rocha.
|
||||
*/
|
||||
public class PLine implements PConstants
|
||||
{
|
||||
|
||||
private int[] m_pixels;
|
||||
private float[] m_zbuffer;
|
||||
private int[] m_stencil;
|
||||
|
||||
+32
-34
@@ -1,6 +1,32 @@
|
||||
/* -*- mode: jde; c-basic-offset: 2; indent-tabs-mode: nil -*- */
|
||||
|
||||
/*
|
||||
Part of the Processing project - http://Proce55ing.net
|
||||
|
||||
Copyright (c) 2005 Ben Fry and Casey Reas
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General
|
||||
Public License along with this library; if not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||
Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
package processing.core;
|
||||
|
||||
|
||||
/**
|
||||
* 4x4 matrix implementation.
|
||||
*/
|
||||
public final class PMatrix implements PConstants {
|
||||
|
||||
public float m00, m01, m02, m03;
|
||||
@@ -8,8 +34,6 @@ public final class PMatrix implements PConstants {
|
||||
public float m20, m21, m22, m23;
|
||||
public float m30, m31, m32, m33;
|
||||
|
||||
//float reset[];
|
||||
|
||||
final static int DEFAULT_STACK_DEPTH = 0;
|
||||
int maxStackDepth;
|
||||
int stackPointer = 0;
|
||||
@@ -58,32 +82,6 @@ public final class PMatrix implements PConstants {
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
public void reset() {
|
||||
if (reset == null) {
|
||||
identity();
|
||||
|
||||
} else {
|
||||
set(reset[0], reset[1], reset[2], reset[3],
|
||||
reset[4], reset[5], reset[6], reset[7],
|
||||
reset[8], reset[9], reset[10], reset[11],
|
||||
reset[12], reset[13], reset[14], reset[15]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void storeResetValue() {
|
||||
if (reset == null) {
|
||||
reset = new float[16];
|
||||
}
|
||||
reset[0] = m00; reset[1] = m01; reset[2] = m02; reset[3] = m03;
|
||||
reset[4] = m10; reset[5] = m11; reset[6] = m12; reset[7] = m13;
|
||||
reset[8] = m20; reset[9] = m21; reset[10] = m22; reset[11] = m23;
|
||||
reset[12] = m30; reset[13] = m31; reset[14] = m32; reset[15] = m33;
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
public void clearStack() {
|
||||
stackPointer = 0;
|
||||
}
|
||||
@@ -258,9 +256,9 @@ public final class PMatrix implements PConstants {
|
||||
float t = 1.0f - c;
|
||||
|
||||
apply((t*v0*v0) + c, (t*v0*v1) - (s*v2), (t*v0*v2) + (s*v1), 0,
|
||||
(t*v0*v1) + (s*v2), (t*v1*v1) + c, (t*v1*v2) - (s*v0), 0,
|
||||
(t*v0*v2) - (s*v1), (t*v1*v2) + (s*v0), (t*v2*v2) + c, 0,
|
||||
0, 0, 0, 1);
|
||||
(t*v0*v1) + (s*v2), (t*v1*v1) + c, (t*v1*v2) - (s*v0), 0,
|
||||
(t*v0*v2) - (s*v1), (t*v1*v2) + (s*v0), (t*v2*v2) + c, 0,
|
||||
0, 0, 0, 1);
|
||||
}
|
||||
|
||||
|
||||
@@ -272,9 +270,9 @@ public final class PMatrix implements PConstants {
|
||||
float t = 1.0f - c;
|
||||
|
||||
preApply((t*v0*v0) + c, (t*v0*v1) - (s*v2), (t*v0*v2) + (s*v1), 0,
|
||||
(t*v0*v1) + (s*v2), (t*v1*v1) + c, (t*v1*v2) - (s*v0), 0,
|
||||
(t*v0*v2) - (s*v1), (t*v1*v2) + (s*v0), (t*v2*v2) + c, 0,
|
||||
0, 0, 0, 1);
|
||||
(t*v0*v1) + (s*v2), (t*v1*v1) + c, (t*v1*v2) - (s*v0), 0,
|
||||
(t*v0*v2) - (s*v1), (t*v1*v2) + (s*v0), (t*v2*v2) + c, 0,
|
||||
0, 0, 0, 1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
+8
-6
@@ -1,12 +1,10 @@
|
||||
/* -*- mode: jde; c-basic-offset: 2; indent-tabs-mode: nil -*- */
|
||||
|
||||
/*
|
||||
PPolygon - zbuffer polygon rendering object for BGraphics
|
||||
Part of the Processing project - http://Proce55ing.net
|
||||
Part of the Processing project - http://processing.org
|
||||
|
||||
Copyright (c) 2001-03
|
||||
Ben Fry, Massachusetts Institute of Technology and
|
||||
Casey Reas, Interaction Design Institute Ivrea
|
||||
Copyright (c) 2004-05 Ben Fry and Casey Reas
|
||||
Copyright (c) 2001-04 Massachusetts Institute of Technology
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
@@ -27,6 +25,11 @@
|
||||
package processing.core;
|
||||
|
||||
|
||||
/**
|
||||
* zbuffer polygon rendering object for PGraphics.
|
||||
* <P>
|
||||
* Likely to be removed before 1.0 as it's no longer particularly used.
|
||||
*/
|
||||
public class PPolygon implements PConstants {
|
||||
static final int DEFAULT_SIZE = 64; // this is needed for spheres
|
||||
float vertices[][] = new float[DEFAULT_SIZE][VERTEX_FIELD_COUNT];
|
||||
@@ -54,7 +57,6 @@ public class PPolygon implements PConstants {
|
||||
int rgba;
|
||||
int r2, g2, b2, a2, a2orig;
|
||||
|
||||
//float zbuffer[];
|
||||
boolean noDepthTest;
|
||||
|
||||
PGraphics parent;
|
||||
|
||||
+1
-2
@@ -1,10 +1,9 @@
|
||||
/* -*- mode: jde; c-basic-offset: 2; indent-tabs-mode: nil -*- */
|
||||
|
||||
/*
|
||||
PSound - java 1.1 audio loader and player
|
||||
Part of the Processing project - http://processing.org
|
||||
|
||||
Copyright (c) 2004-05 Ben Fry and Casey Reas
|
||||
Copyright (c) 2005 Ben Fry and Casey Reas
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
|
||||
+1
-2
@@ -1,10 +1,9 @@
|
||||
/* -*- mode: jde; c-basic-offset: 2; indent-tabs-mode: nil -*- */
|
||||
|
||||
/*
|
||||
PSound2 - java 1.3 audio loader and player
|
||||
Part of the Processing project - http://processing.org
|
||||
|
||||
Copyright (c) 2004-05 Ben Fry and Casey Reas
|
||||
Copyright (c) 2005 Ben Fry and Casey Reas
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
|
||||
+18
-20
@@ -1,33 +1,33 @@
|
||||
/* -*- mode: jde; c-basic-offset: 2; indent-tabs-mode: nil -*- */
|
||||
|
||||
/*
|
||||
PTriangle - handler for tesselated triangle rendering
|
||||
Part of the Processing project - http://processing.org
|
||||
Part of the Processing project - http://processing.org
|
||||
|
||||
Copyright (c) 2001-03
|
||||
Ben Fry, Massachusetts Institute of Technology and
|
||||
Casey Reas, Interaction Design Institute Ivrea
|
||||
Copyright (c) 2004-05 Ben Fry and Casey Reas
|
||||
Copyright (c) 2001-04 Massachusetts Institute of Technology
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General
|
||||
Public License along with this library; if not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||
Boston, MA 02111-1307 USA
|
||||
You should have received a copy of the GNU Lesser General
|
||||
Public License along with this library; if not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||
Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
package processing.core;
|
||||
|
||||
/**
|
||||
* written by sami www.sumea.com
|
||||
* Handles rendering of single (tesselated) triangles in 3D.
|
||||
* <P>
|
||||
* Written by sami www.sumea.com
|
||||
*/
|
||||
public class PTriangle implements PConstants
|
||||
{
|
||||
@@ -42,8 +42,6 @@ public class PTriangle implements PConstants
|
||||
private int[] m_stencil;
|
||||
private float[] m_zbuffer;
|
||||
|
||||
//private PImage m_tImage;
|
||||
|
||||
private int SCREEN_WIDTH;
|
||||
private int SCREEN_HEIGHT;
|
||||
private int SCREEN_WIDTH1;
|
||||
|
||||
@@ -53,29 +53,35 @@ X and queue events by registering for draw or whatever they'd like
|
||||
X lib could call queueEvent with the args
|
||||
X then call them inside post()
|
||||
|
||||
saturday evening and sunday morning
|
||||
X scrubbing all the code to include proper license and copyright info
|
||||
|
||||
|
||||
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
|
||||
|
||||
|
||||
pending
|
||||
_ get simon's new lighting code
|
||||
_ rename video.Camera to video.Video ?
|
||||
_ VideoInput VideoOutput, SoundInput, SoundOutput or AudioInput/AudioOutput
|
||||
|
||||
casey tasks
|
||||
_ new bboard? archive the old one, remove bugs sections
|
||||
_ environment reference
|
||||
_ list of changes since rev 69? run through revisions.txt
|
||||
_ casey stuff
|
||||
_ new bboard? archive the old one, remove bugs sections
|
||||
_ environment reference
|
||||
_ list of changes since rev 69? run through revisions.txt
|
||||
|
||||
non-coding tasks
|
||||
_ scrubbing all the code to include proper license and copyright info
|
||||
_ consolidate readme.txt, bugs.txt, info.html (faq)
|
||||
_ document things that will be broken for beta
|
||||
_ opengl set() functions.. though get() probably ok
|
||||
_ stop button with external apps
|
||||
_ java 1.1 support
|
||||
_ code is larger than we'd like, has increased in size
|
||||
_ working to remove and optimize, also make possible to remove un-needed
|
||||
_ setup bugzilla, move legit bugs there, non-bugs to readme
|
||||
|
||||
_ update checker (can be turned off in prefs)
|
||||
_ send unique id, and information about person's java vm/platform
|
||||
_ using timezone would be an interesting method for tracking location
|
||||
|
||||
//
|
||||
|
||||
SAVE AS BUGS
|
||||
@@ -126,10 +132,6 @@ _ doesn't work, try using the class' main() to run it
|
||||
_ println() can hose the app for the first 20-30 frames
|
||||
_ need to figure out threading etc
|
||||
|
||||
_ update checker (can be turned off in prefs)
|
||||
_ send unique id, and information about person's java vm/platform
|
||||
_ using timezone would be an interesting method for tracking location
|
||||
|
||||
_ stop() not working very well
|
||||
_ doesn't seem to actually be stopping things
|
||||
_ closing window w/o first hitting stop() causes freak out
|
||||
@@ -163,6 +165,8 @@ _ static void PApplet.checkScreens() { }
|
||||
_ to run explicitly later
|
||||
_ this seems too complicated.. just make people restart
|
||||
|
||||
_ more javadoc for the stuff inside processing.app
|
||||
|
||||
_ ability to select monitor via preferences panel
|
||||
_ this applies to any applet that's run externally currently (verify)
|
||||
_ make it also work with anything that's run inside of p5 itself
|
||||
@@ -211,10 +215,6 @@ _ ESC should fake a cancel button press
|
||||
_ ENTER should do the default option
|
||||
_ (might be a matter of setting the default action for the window?)
|
||||
|
||||
secondary non-coding tasks (not before beta)
|
||||
_ move to new server
|
||||
_ javadoc everything
|
||||
|
||||
_ when running as external applet, hide the editor text area
|
||||
_ drag & drop implementation to add files to sketch
|
||||
|
||||
|
||||
Reference in New Issue
Block a user