Closed patrickas closed 1 year ago
once again, quite simply and concisely implemented and seems to do exactly what it does on the tin; it doesn't seem to have any unintended ill effects that i noticed so far but i've been known to be an inobservant idiot :)
i'm not sure i'm in love with completely removing the expando side buttons? maybe it's just an "i fear change" thing, idunno, for some reason my gut feeling is "no, there's an edge case that needs them" but i mean if this can be easily added to stamp/paste actions then i can't imagine what that'd be...
@seijihariki, what say you?
Hm... If we remove the buttons we will need full infinite canvasing support (stamp tool, select, and brushes). The current implementation is too restrictive in options to expand the canvas to actually merge. You are kind of forced to dream something in order to expand the canvas.
We can accept the pull to a temporary branch for infinite canvas implementation, and work from there. Also, if we are accepting dreaming/editing outside the current canvas, the checkerboard pattern should also extend infinitely (though in a slightly different hue to differentiate available area and expand area).
and brushes
see that's not even an edge case, that's just me being thoughtless :| yeah, aright, can't lose the expando buttons quite yet, but i really do like the auto-expansion as a very nice convenience buff
Oh, one implementation detail that would need to be considered (for stamp and select tools) is that image preview will not show when outside of the current canvas area. The overlaying implementation would have to be reworked to allow for preview of selection outside the canvas. The brush... could cause some problems.
Sorry for breaking so many things. It does make sense to have an infinite canvas branch and slowly work from there.
Or if no one has time to work on it any time soon we could just keep the expand buttons and accept other two changes This wat the previous functionality is completely maintained annd we just added a possibility to dream outside the borders for now.
Oh, you didn't break anything at all! Now that we have a simple function to perform resizing, it should not be too hard to do the same for the other tools.
Brush tool refactoring you can leave to me. I will think of a way to properly support this. If you want you can try refactoring the other tools to display outside the current canvas. (Will need to replace ovCtx and ovCanvas by temporary custom sized layers, probably).
Will be merging pull request into actual-infinity
branch.
This pull request should give us an infinite canvas for all intents and purposes.
The user never has to think about the size of the canvas, they just dream images inside or outside or on the boundary without thinking about it and the canvas adjusts as needed.
Not sure if I horribly broke something but it seems to work fine.
PS: It might be a good idea to call auto_expand_to_fit in other places too (maybe when pasting, stamping...) but I don't have strong opinions on the matter