Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
From arekusan...@gmail.com on February 12, 2013 13:38:26
What do you need to do? Implement symmetry tool for pencil.
Symmetry painting like in ProMotion. It's quite easy to implement. I can make you a C++ class if you need it. :)
Original issue: http://code.google.com/p/aseprite/issues/detail?id=208
From davidcapello on February 12, 2013 09:19:34
Well, it would be great if only one C++ class is needed, but there are several things that must be done for a symmetry painting mode:
I don't know why you say "it's quite easy to implement". If you have some idea to do it in a simple way (as a fully functional feature completely integrated to current aseprite UI/design) I would love to hear about it.
From arekusan...@gmail.com on February 12, 2013 12:00:36
When I said one class I meant just one class for calculating symmetry points which could easily be incorporated with a pencil tool. I guess I made a mistake since you would need to add UI configuration for symmetry too which would result in more stuff being added since you have 2 types for symmetry painting: circular and mirror mode :)
When it comes to actual drawing on canvas, only thing you would need to modify modify is pixel placement. Let's say you have one pixel position on the screen with X1 and Y1 coordinates. You input those coordinates into symmetry class and it returns an array of X and Y coordinates for mirror/circular reflection points. The only thing which is tricky is when drawing with wider brush (but if you just use pencil method which draws on X, Y for each coordinate I don't think it should be a problem).
Technically speaking you can do even more by implementing drawing mirrored ellipses just by sending X and Y coordinates of each part of Ellipse Rect into symmetry class.
I don't know if you are skilled in Free Pascal Language since I already made a class like that so you can see what I'm talking about :) https://code.google.com/p/pixeller/source/browse/trunk/PixellerLazarus/symmetry.pas There is also a C# version of the class (if that would be more understandable): https://code.google.com/p/pixeller/source/browse/trunk/Pixeller/Pixeller/Tools/Symmetry.cs I made a C++ class file with an example but haven't tested it with real pixel drawing so I'm not sure if it works completely like the pascal version. I guess it could be optimized a bit too, but I'm not that good with C++.
From arekusan...@gmail.com on February 12, 2013 12:43:02
Here is C# painting version as proof. :D
It only draws a pixel or a line of width 1 when mousedown + mousemove event is executed. You can set number of axes and type of symmetry. I set it to max of 360 because I don't see any point of making it bigger.