Closed luciusmagn closed 4 years ago
Awesome, thanks! I think the approach is right overall, with a clever use of the paste buffer :ok_hand:
I'm going to comb :eyes: through it as soon as I have some time.
thanks! I was considering doing rotations as well, but I'm unsure about changing the dimensions of a selection and have yet to figure out a eloquent solution, but I haven't had the need to rotate anything in my five days of using rx
so it's not a priority.
Here are some other ideas that I'm considering trying, though:
rx
, which would just be the entire state of the editor dumped into a file, so I can get back to work with the palette loaded in, undo/redo history, layers, views, frames etc. preserved and ready.
if you think any of these is a particulary good idea, I can prioritize it, or if you have any tips what to watch out for, it would be awesome :D
- own file format for
rx
, which would just be the entire state of the editor dumped into a file, so I can get back to work with the palette loaded in, undo/redo history, layers, views, frames etc. preserved and ready.
Yes, I'd love to have something like this. Actually, part of this is already implemented via the "archive" format (.rxa
) which I had to implement for layers functionality.
The other part exists via the .rxrc
support, which is loaded when you start rx
from a directory with an .rxrc
file. Combining those would involve having .rxrc
files inside .rxa
archives, that would be auto-loaded when you open an archive, plus a way to create a .rxrc
from an rx session. Palette writing already exists via p/write
, but in the archive case, you could just write the colors to the .rxrc
..
- color replace function for when I'm a dingus (probably allow to replace foreground w/ background or the other way around?)
I also want this. The way I was thinking is to just replace the current bg
with the current fg
. So you would do:
pick
command?):colors/replace
with no arguments to replace the first color selected (bg) with the second (fg).The command could also take arguments, in case the color isn't in your session, then you would do :colors/replace <old> <new>
Yes, I'd love to have something like this. Actually, part of this is already implemented via the "archive" format (
.rxa
) which I had to implement for layers functionality.The other part exists via the
.rxrc
support, which is loaded when you startrx
from a directory with an.rxrc
file. Combining those would involve having.rxrc
files inside.rxa
archives, that would be auto-loaded when you open an archive, plus a way to create a.rxrc
from an rx session. Palette writing already exists viap/write
, but in the archive case, you could just write the colors to the.rxrc
..
Oh, that's great, I hadn't known about ˙.rxa, I'll look into it! Using them in conjunction with
.rxrc` sounds like a good idea, yea!
I also want this. The way I was thinking is to just replace the current
bg
with the currentfg
. So you would do:1. Pick two colors with the sampler (or via a new `pick` command?) 2. Call `:colors/replace` with no arguments to replace the first color selected (bg) with the second (fg).
The command could also take arguments, in case the color isn't in your session, then you would do
:colors/replace <old> <new>
Yea, that's pretty much what I thought I'd try. The colorpicking command might a great addition to, especially in reference to #22 .
the :colors/replace <old> <new>
could possibly work with not just arbitrary colors but indexes in palette too, although the utility might not be as high unless one can tell a color's number easily (perhaps with a optional index number?)
the
:colors/replace <old> <new>
could possibly work with not just arbitrary colors but indexes in palette too, although the utility might not be as high unless one can tell a color's number easily (perhaps with a optional index number?)
Note that a semi-hidden feature is that you can use the color sampler while in command mode, and the hex code is added to the command line. This is a lot easier if you're picking from the palette.
Note that a semi-hidden feature is that you can use the color sampler while in command mode, and the hex code is added to the command line. This is a lot easier if you're picking from the palette.
Oh, I didn't know that! Yea, that invalidates my concern completely, haha
@luciusmagn do you want to finish this?
Yea, I do. Sorry, I was graduating which kinda temporarily brought my programming endeavors to a screeching halt. I resolved most of the issues already, I will commit them asap!
Thanks for this contribution!
Hi, this is my humble attempt at implementing the functionality to flip a selection. It was once again a pleasant experience as I really like the structure of the code, but I'm not sure if I'm doing it "idiomatically".
Here is a demonstration of how it looks:
(yea, the colors are screwed because it's a gif, here's a webm for more pleasant viewing -> flip.webm)
This is what I did for these changes:
selection/flip
which takes one argument of direction, valid values areh
orhorizontal
andv
orvertical
.ViewOp
for flip and went togl/mod.rs
to create an implementation. It's pretty much a yank, which also takes direction as an argument and then flips the pixels accordinglyI'm really unsure if this is the correct way to do it, so I am sorry if I did something wrong, haha :sweat_smile: