golly.getselrect() - bug or feature?

Has something gone haywire? Let us know about it!
Post Reply
User avatar
codeholic
Moderator
Posts: 1147
Joined: September 13th, 2011, 8:23 am
Location: Hamburg, Germany

golly.getselrect() - bug or feature?

Post by codeholic » December 30th, 2014, 9:09 pm

When I call golly.getselrect(), it returns the bounding box of live cells. But I'd like to get the real selection, because it matters. If it is a feature, is there a workaround for what I'm up to?
Ivan Fomichev

flipper77
Posts: 197
Joined: October 24th, 2010, 3:25 am
Location: Spokane, WA

Re: golly.getselrect() - bug or feature?

Post by flipper77 » December 31st, 2014, 2:06 am

Strange, when I call g.getrect(), I get the appropriate bounding box, and when I call g.getselrect(), I get the proper selection. I'm running 64-bit version of Golly 2.6 on 64-bit Windows 7 computer.

Here is very straightforward test script:

Code: Select all

import golly as g

r = g.getrect()
sr = g.getselrect()

g.show("Bounding box: %s Selection: %s" % (r, sr))
Draw a random pattern, select an arbitrary region, run the code, and anyone who runs the code should know if their functions work the right way. I'm guessing it may be platform-specific, but I don't know for sure.

User avatar
codeholic
Moderator
Posts: 1147
Joined: September 13th, 2011, 8:23 am
Location: Hamburg, Germany

Re: golly.getselrect() - bug or feature?

Post by codeholic » January 3rd, 2015, 10:39 am

Okay, I think that was my fault. I think I called g.getrect() instead of g.getselrect() :oops:
Ivan Fomichev

Post Reply