Hi,
When editing patterns in Golly (of a CA with more than two states), is there a way to fill the current selection with the current color?
There is a "clear" that makes it black and a "random fill" that fills it with random colors, but what about just filling it with one non-black color?
Thanks.
Golly: Filling selection with a color
Re: Golly: Filling selection with a color
There is a change-state.py script. It's not very convenient, because one has to switch to the keyboard, but good enough.
Ivan Fomichev
Re: Golly: Filling selection with a color
I see, thanks.
If I could have some suggestions for making the awesome Golly even more awesome, it would be:
-more/improved editing tools:
--fill selection with single color (as mentioned above
) - an alternative is of course simply a rectangle drawing tool
--a FAST floodfill (the python one takes MINUTES to floodfill a small area...)
--draw line (e.g. using the pen tool with shift or ctrl click to draw line from previous point to here)
--a way to lock vertical or horizontal direction, so that you can draw straight lines (wires in wireworld, ...) easily
--pen tool that is larger than 1 pixel
--move selection content by dragging it (ctrl+x then ctrl+v is very awkward, especially because sometimes it mysteriously doesn't work or crashes)
--swap/replace colors in selection
--assign a second color to the right mouse button
-a save function that saves the file without any dialogs. Currently saving is a nightmare: every single time you save, it shows the file dialog, and then asks "do you want to overwrite the file". Normally that is what a "Save As..." does. This program is missing a "Save"
Thanks!
EDIT: not sure if change-state.py does what I want, it looks like it changes from one color to another, so wouldn't fill any rectangle fully with the selected color, but I think I can make my own script
If I could have some suggestions for making the awesome Golly even more awesome, it would be:
-more/improved editing tools:
--fill selection with single color (as mentioned above
--a FAST floodfill (the python one takes MINUTES to floodfill a small area...)
--draw line (e.g. using the pen tool with shift or ctrl click to draw line from previous point to here)
--a way to lock vertical or horizontal direction, so that you can draw straight lines (wires in wireworld, ...) easily
--pen tool that is larger than 1 pixel
--move selection content by dragging it (ctrl+x then ctrl+v is very awkward, especially because sometimes it mysteriously doesn't work or crashes)
--swap/replace colors in selection
--assign a second color to the right mouse button
-a save function that saves the file without any dialogs. Currently saving is a nightmare: every single time you save, it shows the file dialog, and then asks "do you want to overwrite the file". Normally that is what a "Save As..." does. This program is missing a "Save"
Thanks!
EDIT: not sure if change-state.py does what I want, it looks like it changes from one color to another, so wouldn't fill any rectangle fully with the selected color, but I think I can make my own script
Re: Golly: Filling selection with a color
You can select any area, reset it to state 0 by pressing backspace, and then change cell states in the area from 0 to whatever you need. Clumsy, but works.Lode wrote:EDIT: not sure if change-state.py does what I want, it looks like it changes from one color to another, so wouldn't fill any rectangle fully with the selected color, but I think I can make my own script
Ivan Fomichev
- Andrew
- Moderator
- Posts: 1053
- Joined: June 2nd, 2009, 2:08 am
- Location: Melbourne, Australia
- Contact:
Re: Golly: Filling selection with a color
Use fill.py from the Golly Scripts Database (go to Help > Online Archives).Lode wrote:When editing patterns in Golly (of a CA with more than two states), is there a way to fill the current selection with the current color?
Nearly all your later suggestions can be pretty easily implemented via Python scripts, so I'm reluctant to add those capabilities into Golly (but Golly is open source and I'd have no objections if somebody else wanted to add the necessary code).
Re: Golly: Filling selection with a color
Check out draw-lines.py. Its behavior isn't quite the same as standard drawing tools in Paint-type programs, but it works (and can be modified to work differently if you want.)Lode wrote:--draw line (e.g. using the pen tool with shift or ctrl click to draw line from previous point to here)
Again draw-lines.py could be used or modified. There's also a silly little trick that I use a lot: zoom in a bit, put the cell where you want to begin a long line on one edge of the screen, move the mouse to that cell, hold down the mouse button and move off the edge. You get a long guaranteed-straight line as Golly scrolls in that direction.Lode wrote:--a way to lock vertical or horizontal direction, so that you can draw straight lines (wires in wireworld, ...) easily
Try move-selection.py and move-object.py. Again it might not work quite the way you expect, but there's definitely some potential there too...!Lode wrote:--move selection content by dragging it (ctrl+x then ctrl+v is very awkward, especially because sometimes it mysteriously doesn't work or crashes)
I was going to suggest assigning your own keyboard shortcuts to these scripts, but I tend to use a lot of keyboard shortcuts, and have gotten used to ctrl+x and ctrl+v. Maybe a good feature request would be a programmable toolbar that users could assign their own actions and scripts to, and then have them be accessible with the mouse.