Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | a more radical attempt at ignoring nil y's | Kartik K. Agaram | 2022-07-13 | 1 | -4/+0 |
| | |||||
* | no, bring back that defense | Kartik K. Agaram | 2022-07-13 | 1 | -0/+4 |
| | | | | | | | | | Scenario where I ran into it: start a stroke inside a drawing press 'o' to switch to circle mode (but any mode switch will do) The problem is that Text.textinput unconditionally blows away all .y values. Sometimes we have to wait for a draw() to fill them back in. | ||||
* | a bug I've never run into | Kartik K. Agaram | 2022-07-13 | 1 | -3/+0 |
| | | | | | | The previous commit was failing inside a test that I can't reproduce manually. Perhaps it's something about how often draw/update run in practice. Anyways, it's definitely uncovered a real issue. | ||||
* | hoist couple of variables out | Kartik K. Agaram | 2022-07-13 | 1 | -3/+6 |
| | | | | This seems to uncover a corner case I'd never run into until now. | ||||
* | use available variables | Kartik K. Agaram | 2022-07-13 | 1 | -1/+1 |
| | |||||
* | more idiomatic variable names | Kartik K. Agaram | 2022-07-13 | 1 | -5/+5 |
| | |||||
* | chunking by simple local variable | Kartik K. Agaram | 2022-07-13 | 1 | -4/+6 |
| | |||||
* | make local functions look different | Kartik K. Agaram | 2022-07-13 | 1 | -6/+6 |
| | |||||
* | more chunks, same approach | Kartik K. Agaram | 2022-07-13 | 1 | -3/+6 |
| | |||||
* | chunk up some long lines | Kartik K. Agaram | 2022-07-13 | 1 | -32/+32 |
| | | | | | Hopefully this is more approachable. Though now I'm creating two new temporary functions on every draw. Whether I need them or not. | ||||
* | drop final mention of state global beyond main.lua | Kartik K. Agaram | 2022-07-12 | 1 | -29/+28 |
| | | | | | | | | | | This is all unfortunate in several ways - lots of functions have extra args - table lookups where we used to have a simple variable - program initialization is a lot more delicate Let's see if it was worthwhile. Can we now actually build around the editor component in forks? | ||||
* | replace globals with args in a few functions | Kartik K. Agaram | 2022-07-12 | 1 | -71/+74 |
| | | | | | | | | | - Drawing.draw_shape - Drawing.draw_pending_shape - Drawing.in_drawing - Drawing.find_or_insert_point - Drawing.near - Drawing.pixels | ||||
* | correct a mis-named threshold | Kartik K. Agaram | 2022-07-12 | 1 | -2/+2 |
| | |||||
* | drop heavyweight near check on file load/store | Kartik K. Agaram | 2022-07-12 | 1 | -19/+25 |
| | |||||
* | left/right margin -> left/right coordinates | Kartik K. Agaram | 2022-07-12 | 1 | -34/+34 |
| | | | | | Editor state initialization now depends on window dimensions, so we have to more carefully orchestrate startup. | ||||
* | add state arg to a few functions | Kartik K. Agaram | 2022-07-12 | 1 | -25/+25 |
| | | | | | | | - Drawing.current_drawing - Drawing.select_shape_at_mouse - Drawing.select_point_at_mouse - Drawing.select_drawing_at_mouse | ||||
* | add state arg to few functions | Kartik K. Agaram | 2022-07-12 | 1 | -2/+2 |
| | | | | | | - draw_help_without_mouse_pressed - draw_help_with_mouse_pressed - current_shape | ||||
* | add state arg to Drawing.update | Kartik K. Agaram | 2022-07-12 | 1 | -7/+7 |
| | |||||
* | add state arg to Drawing.draw | Kartik K. Agaram | 2022-07-12 | 1 | -15/+15 |
| | |||||
* | add state arg to Drawing.mouse_released | Kartik K. Agaram | 2022-07-12 | 1 | -20/+20 |
| | |||||
* | add state arg to Drawing.keychord_pressed | Kartik K. Agaram | 2022-07-12 | 1 | -32/+32 |
| | |||||
* | add state arg to Drawing.mouse_pressed | Kartik K. Agaram | 2022-07-12 | 1 | -15/+15 |
| | |||||
* | group all editor globals | Kartik K. Agaram | 2022-07-12 | 1 | -94/+94 |
| | | | | We're still accessing them through a global. But we'll change that next. | ||||
* | make colors easier to edit | Kartik K. Agaram | 2022-07-11 | 1 | -7/+7 |
| | |||||
* | stop pretending globals are local | Kartik K. Agaram | 2022-07-11 | 1 | -4/+0 |
| | | | | | One advantage of this approach: we don't end up with multiple lexical scopes containing duplicates of the same modules. | ||||
* | make freehand drawings smoother | Kartik K. Agaram | 2022-07-05 | 1 | -1/+17 |
| | | | | | | | | | | | | Now I might actually use them more, and maybe I can start considering taking out some shapes. Do I really need circles if I don't provide ellipses? Thanks Ivan Reese for the feedback. "What drawings does your tool encourage?" Minor note: taking out the deepcopy creates a cute little string like effect, where the curve grows tighter the slower you draw it. | ||||
* | bugfix: 'escape' to cancel a stroke | Kartik K. Agaram | 2022-07-05 | 1 | -1/+6 |
| | | | | | | This has been broken since commit b544e8c357 on May 17 :/ I'm just undoing that commit, which turns out to be completely unnecessary. And adding a test. | ||||
* | right margin | Kartik K. Agaram | 2022-06-30 | 1 | -7/+7 |
| | |||||
* | rip out notion of Line_width | Kartik K. Agaram | 2022-06-30 | 1 | -7/+7 |
| | |||||
* | keep drawings within the line width slider as well | Kartik K. Agaram | 2022-06-22 | 1 | -7/+7 |
| | |||||
* | clean up | Kartik K. Agaram | 2022-06-17 | 1 | -17/+0 |
| | |||||
* | more precise shape selection | Kartik K. Agaram | 2022-06-17 | 1 | -0/+17 |
| | | | | | | | It's important that the error be additive rather than multiplicative, otherwise the area grows asymmetrically along a line. Hopefully freehand drawings will work more intuitively now. | ||||
* | correct commit f3abc2cbf2 | Kartik K. Agaram | 2022-06-17 | 1 | -7/+22 |
| | | | | | | I can't be trusted to do anything without a test. This should fix #5. Please reopen if it doesn't. | ||||
* | better handle moving points | Kartik K. Agaram | 2022-06-17 | 1 | -0/+5 |
| | | | | | This should hopefully address #5. I'm removing some constraints from manhattan lines, rectangles and squares. | ||||
* | dead code | Kartik K. Agaram | 2022-06-15 | 1 | -45/+0 |
| | |||||
* | move | Kartik K. Agaram | 2022-06-15 | 1 | -28/+28 |
| | |||||
* | . | Kartik K. Agaram | 2022-06-15 | 1 | -6/+3 |
| | |||||
* | stop recording points for arcs | Kartik K. Agaram | 2022-06-15 | 1 | -1/+0 |
| | | | | | | It was kinda weird that we were recording the start but not the end. And moving the start point didn't actually affect the arc. Let's see if we actually ever need it. | ||||
* | move current mode indicator slightly | Kartik K. Agaram | 2022-06-15 | 1 | -2/+2 |
| | |||||
* | standardize on ordering of cases | Kartik K. Agaram | 2022-06-15 | 1 | -9/+9 |
| | |||||
* | test: moving a point | Kartik K. Agaram | 2022-06-14 | 1 | -13/+4 |
| | | | | | I found some code in the process that seems unreachable. Some chance of a regression here.. | ||||
* | tests for drawing polygons | Kartik K. Agaram | 2022-06-14 | 1 | -1/+9 |
| | |||||
* | start writing some tests for drawings | Kartik K. Agaram | 2022-06-14 | 1 | -1/+3 |
| | |||||
* | . | Kartik K. Agaram | 2022-06-14 | 1 | -2/+2 |
| | |||||
* | extract variable Margin_left | Kartik K. Agaram | 2022-06-14 | 1 | -30/+30 |
| | |||||
* | mouse buttons are integers, not strings | Kartik K. Agaram | 2022-06-14 | 1 | -23/+23 |
| | | | | | | Not sure where that idiom comes from or why strings work in some places (auto-coercion?). I picked it up off some example apps. But https://love2d.org/wiki/love.mouse.isDown says it should be an integer. | ||||
* | override mouse state lookups in tests | Kartik K. Agaram | 2022-06-12 | 1 | -41/+41 |
| | | | | | | | If I'd had this stuff in my test harness earlier, two recent commits would have failed tests and given me early warning: ff88238ff1 ff88a2a927 | ||||
* | set current_drawing_index with current_drawing | Kartik K. Agaram | 2022-06-10 | 1 | -3/+6 |
| | |||||
* | include drawing index in a few places | Kartik K. Agaram | 2022-06-10 | 1 | -15/+15 |
| | |||||
* | stop saving the entire file when modifying drawings | Kartik K. Agaram | 2022-06-10 | 1 | -7/+0 |
| | | | | Now we just disallow that entirely. |