hitTest bug
Recent RSS
hitTest bug
Date:  10. September 2006, 19:28

Gah I just tried to post a bug, attached a file which was larger then 1024kb, and recieved the error: Error in application scriptographer
When this happens you can't go back to see your message..
So here goes another try:

I'm experience some strange exceptions when using hitTest.
It seems that it happens when I hitTest on a point where two paths are close together..

code used:

function onMouseDown(event){
	var type = HitTest.TEST_PAINTABLES;
	var test = activeDocument.hitTest(event.point,type);
	if(test) print(test);

Document to test on:
Try clicking where the vertical line of the b and the bowl of the b are next to each other. Try it a number of times until you get an exception..

Exception recieved:
Wrapped java.lang.IndexOutOfBoundsException: Index: 7, Size: 6 (/Users/synch/Desktop/stuff3/stuff/Code & Research/New Scriptographer scripts/hittest_test.js#3)
org.mozilla.javascript.WrappedException: Wrapped java.lang.IndexOutOfBoundsException: Index: 7, Size: 6 (/Users/synch/Desktop/stuff3/stuff/Code & Research/New Scriptographer scripts/hittest_test.js#3)
at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(
at org.mozilla.javascript.MemberBox.invoke(
at org.mozilla.javascript.Interpreter.interpretLoop(
at script.onMouseDown(/Users/synch/Desktop/stuff3/stuff/Code & Research/New Scriptographer scripts/hittest_test.js:3)
at org.mozilla.javascript.Interpreter.interpret(
at org.mozilla.javascript.ContextFactory.doTopCall(
at org.mozilla.javascript.ScriptRuntime.doTopCall(
at com.scriptographer.js.FunctionHelper.callFunction(
Caused by: java.lang.IndexOutOfBoundsException: Index: 7, Size: 6
at java.util.ArrayList.RangeCheck(
at java.util.ArrayList.get(
at Method)
at sun.reflect.GeneratedMethodAccessor41.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(
at java.lang.reflect.Method.invoke(
at org.mozilla.javascript.MemberBox.invoke(
... 10 more

Re: hitTest bug
From:  Jürg Lehni
Date:  29. September 2006, 21:27

Fixed in the upcoming version 2.0.018.

08.08.14, 15:24
15.05.14, 14:23
02.03.14, 19:16
18.11.13, 14:48
22.03.13, 03:05
22.02.13, 15:45
10.01.17, 16:37
19.02.16, 06:03
19.02.16, 06:00
17.01.16, 11:00
12.01.16, 13:10
25.11.15, 08:19
Script of the Moment
The Allineatorium 15.05.14