File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2963,12 +2963,16 @@ public boolean isClosed() {
29632963 */
29642964 public boolean contains (float x , float y ) {
29652965 if (family == PATH ) {
2966- // apply the inverse transformation matrix to the point coordinates
2967- PMatrix inverseCoords = matrix .get ();
2968- inverseCoords .invert (); // maybe cache this?
2969- inverseCoords .invert (); // maybe cache this?
2970- PVector p = new PVector ();
2971- inverseCoords .mult (new PVector (x ,y ),p );
2966+ PVector p = new PVector (x , y );
2967+ if (matrix != null ) {
2968+ // apply the inverse transformation matrix to the point coordinates
2969+ PMatrix inverseCoords = matrix .get ();
2970+ // TODO why is this called twice? [fry 190724]
2971+ // commit was https://github.com/processing/processing/commit/027fc7a4f8e8d0a435366eae754304eea282512a
2972+ inverseCoords .invert (); // maybe cache this?
2973+ inverseCoords .invert (); // maybe cache this?
2974+ inverseCoords .mult (new PVector (x , y ), p );
2975+ }
29722976
29732977 // http://www.ecse.rpi.edu/Homepages/wrf/Research/Short_Notes/pnpoly.html
29742978 boolean c = false ;
You can’t perform that action at this time.
0 commit comments