Bill Kendrick
2183c45d72
Filled Polygon: Ensure last point can click on first point
...
It had to be dragged, due to a minor bug. h/t Pere.
2024-06-01 20:35:13 -07:00
Bill Kendrick
b9981d879b
Filled Polygon Magic - allow up to 100 points
...
Up from 17 (which I probably picked since it was a little
fewer than the default number of Undo/Redo levels).
2024-06-01 20:27:30 -07:00
Bill Kendrick
3cf3af76aa
Ran indent.sh
2024-06-01 02:12:00 -07:00
Bill Kendrick
01afb5846c
api->retract_undo() added to Magic API; used by Filled Polygon
...
New API function which rolls back the Undo buffer (which is snapshotted
upon a mousedown event ahead of calling the Magic tool's `_click()`
function.) Dangerous; use sparingly!
Filled Polygon uses this to prevent partially-created (aka unfinished
aka incomplete) polygons -- the preview lines and control points -- from
being recorded and wasting space in the Undo history, or reappearing
upon Redo.
TODO - Other tools (e.g., Clone) would certainly benefit from this.
TODO - Needs more testing to help identify any bugs/issues introduced
by this!
TODO - Magic API docs need updating.
This is probably a sufficient solution that will make
https://sourceforge.net/p/tuxpaint/feature-requests/246/ ,
'"Overlay" surface in Magic API', unnecessary.
2024-06-01 01:35:50 -07:00
Bill Kendrick
b0b3b64022
Filled Polygon: Mention merging. Max pt handling.
...
In instructions, mention that adjacent points may be merged.
When no more space is available for additional points, simply
move the last point to the new location (rather than silently
doing nothing).
h/t Pere for the ideas
2024-05-30 23:50:00 -07:00
Bill Kendrick
277b9e10bf
Filled Polygon "remove" sound effect
...
For when merging points.
Based on CC Attribution 3.0 sound by "stinkhorn"
(see CHANGES.txt & AUTHORS.txt).
2024-05-28 23:59:56 -07:00
Bill Kendrick
c00cf991f9
Filled Polygon "nearby" sound effect
...
When red & green endpoint dots are being dragged near each other,
play a different sound.
Based on CC Attribution 4.0 sound by Eliot Lash
(see CHANGES.txt & AUTHORS.txt).
2024-05-28 23:47:54 -07:00
Bill Kendrick
a2fece280b
Sound effects for Filled Polygon magic tool
...
Based on some CC0 sounds by Kenneth Cooney (see AUTHORS.txt and
CHANGES.txt).
2024-05-28 23:29:57 -07:00
Bill Kendrick
4c42472089
Polyfill: Draw handles 'behind' lines
2024-05-19 23:56:20 -07:00
Bill Kendrick
97c547e9c7
Demoting Specular magic to a WIP
2024-05-19 23:30:12 -07:00
Bill Kendrick
4a79060f26
Ran indent
2024-05-14 23:37:12 -07:00
Bill Kendrick
ca537e2fbb
Color Sep: Correctly abuse default size value
2024-05-14 23:26:00 -07:00
Bill Kendrick
d26b4f28ff
Polyfill - Address compiler warnings, other cleanup
2024-05-14 23:09:18 -07:00
Bill Kendrick
5bdbc2766b
Ran indent.sh to re-indent all source files
2024-05-10 00:26:10 -07:00
Bill Kendrick
fbb46751c6
Cleaned up compiler warnings in dither.c Magic tool
2024-05-10 00:16:17 -07:00
Bill Kendrick
d95e7084df
3D Glasses - Now offers various anaglyph color combos
...
The size option is being misused to allow different
color combinations: Red/Cyan, Red/Blue, Red/Green, and Magenta/Cyan
(there are others we could add, if only someone could figure out the
math :-D)
Note - If Tux Paint is running in "Novice" complexity mode, no choices
will be available; it will use Red/Cyan, as before.
h/t O'Hare The Rabbit for the idea
2024-04-28 18:03:28 -07:00
Bill Kendrick
ae899da68d
Filled polygon: Icon; tweaked on-screen instructions
2024-04-12 09:24:19 -07:00
Bill Kendrick
5139985781
Polygon fill: Be a better citizen
...
Remove our preview if switching out of the tool.
Do not wipe out previous work when switching into the tool
(it seems Tux Paint calls "set_color()" _before_ "switchin()"!?)
2024-04-08 20:55:27 -07:00
Bill Kendrick
ead268de51
Polyfill - Allow clicking first point to end polygon
...
...clicking, followed by dragging prior to releasing,
still works to move the first (green) point.
2024-03-28 00:50:27 -07:00
Bill Kendrick
da837a35a2
Polyfill filling polygons now
...
Scanline polygon fill routine based on public-domain code
by Darel Rex Finley, 2007 <https://alienryderflex.com/polygon_fill/
2024-03-28 00:26:05 -07:00
Bill Kendrick
608564b00f
WIP Filled Polygon Magic tool
...
Currently able to add & adjust points, which forms a polygon.
It is not filled yet.
2024-03-27 23:41:41 -07:00
Bill Kendrick
3bf36f8c07
Dither sound effects
2024-03-19 23:33:31 -07:00
Bill Kendrick
ef3f150a88
Dither magic tools: Add icon
...
Also, less darkening in "Keep Color" variation.
2024-03-19 23:13:02 -07:00
Bill Kendrick
d74b149be8
Specular: Some vertical waves, too
2024-03-02 00:58:02 -08:00
Bill Kendrick
35c12c60fd
Dither: Add a "keep color" variation
2024-02-29 21:41:16 -08:00
Bill Kendrick
53f6064aa0
WIP Dither magic tool
...
For https://sourceforge.net/p/tuxpaint/feature-requests/256/
2024-02-29 01:13:21 -08:00
Bill Kendrick
f21e5f136d
WIP Specular Reflection magic tool
2024-02-28 23:51:28 -08:00
Bill Kendrick
2d043eb33d
Trochoids: Better drag-less shapes
...
If the user just clicks & releases, the shapes that appear
are more interesting/pleasing.
2024-01-26 01:07:39 -08:00
Shinichi TOYAMA
68257973a8
gcc on RHEL7 did not allow to declare valiable in 'for' loop unless use C99 mode option.
2024-01-21 15:24:29 +09:00
Bill Kendrick
2b588773a7
Di, Tri, Oblq select: Ensure click (w/o drag) changes
2024-01-20 15:10:07 -08:00
Bill Kendrick
f8c8b9b6a7
2-Pt Persp. select: Avoid div-by-zero crash
...
h/t Pere
2024-01-20 15:05:46 -08:00
Bill Kendrick
4496e007a1
Trochoids: Mend freeze bug
...
I had updated the guide circle drawing routine to draw points
every 360 / radius steps (so smaller circles had fewer XOR'd points),
but obviously this will cause a divide by zero if either circle's
radius = 360, since I'm using an integer, it will cause a frozen
for()-loop if radius > 360.
h/t Pere for pointing out the freeze!
2024-01-20 11:15:53 -08:00
Bill Kendrick
b8f6ec2bbf
Trochoids: Correct icons, no blank Hypo, better Guides
...
h/t Pere
2024-01-17 23:07:41 -08:00
Bill Kendrick
a9515c351e
Gave ordering to all Painting magic tools
...
All done!
2024-01-16 23:10:08 -08:00
Bill Kendrick
e3cb845426
Gave ordering to all Picture Decorations magic tools
2024-01-16 22:48:41 -08:00
Bill Kendrick
b1bc736f77
Gave ordering to all Color Filter magic tools
2024-01-16 22:45:06 -08:00
Bill Kendrick
4f9112d597
Xor Magic tool: Better description; respond to "order"
2024-01-16 22:43:11 -08:00
Bill Kendrick
9ce4ee8c50
Gave ordering to all Picture Warps magic tools
2024-01-16 22:28:49 -08:00
Bill Kendrick
3abf6f75f4
Gave ordering to all Pattern Painting magic tools
2024-01-16 22:16:14 -08:00
Bill Kendrick
0353c5670d
Gave ordering to all Artistic magic tools
2024-01-16 22:09:22 -08:00
Bill Kendrick
0532b35f31
Gave ordering to all Distorts magic tools
2024-01-16 21:31:07 -08:00
Bill Kendrick
ff9eff4e60
Sort magic tools by ..._get_order() value, when possible
...
Tools in n_pt_persp plugin provide orders. (More coming!)
2024-01-16 20:33:58 -08:00
Bill Kendrick
ab4cd4fdde
Mend Trochoid math
...
h/t Pere for pointing out my mistake!
2024-01-15 22:14:33 -08:00
Pere Pujal i Carabantes
0aac3260be
Make magic n_pt_persp and trochoids filepaths compatible with Android.
2024-01-16 00:53:54 +01:00
Bill Kendrick
08d9e9a8b7
n_pt_persp.c: Disable unused snap_to()
...
Wrap in an #ifdef SNAP_TO, and thus squelch some warnings &
avoid wasting some cycles.
2024-01-14 13:45:14 -08:00
Bill Kendrick
8a76b570b7
n_pt_persp.c: Use ...f() (float) trig funcs, not ...() double
2024-01-14 13:41:33 -08:00
Bill Kendrick
a7d792fa64
n_pt_persp.c: Adding performance output
2024-01-14 12:55:33 -08:00
Bill Kendrick
479cc5450f
Modularize, but disable for now, snapping
...
It needs to be smarter than just snapping to NxN grid on canvas.
2024-01-14 11:50:36 -08:00
Bill Kendrick
474e513dde
n_pt_perse: Use SNAP define instead of hard-coded #
2024-01-14 11:34:27 -08:00
Bill Kendrick
4fbe005003
n_pt_persp: Snap to grid; improved some guides
2024-01-14 11:33:34 -08:00