about summary refs log tree commit diff stats
path: root/drawing.lua
Commit message (Collapse)AuthorAgeFilesLines
* add state arg to Drawing.drawKartik K. Agaram2022-07-121-15/+15
|
* add state arg to Drawing.mouse_releasedKartik K. Agaram2022-07-121-20/+20
|
* add state arg to Drawing.keychord_pressedKartik K. Agaram2022-07-121-32/+32
|
* add state arg to Drawing.mouse_pressedKartik K. Agaram2022-07-121-15/+15
|
* group all editor globalsKartik K. Agaram2022-07-121-94/+94
| | | | We're still accessing them through a global. But we'll change that next.
* make colors easier to editKartik K. Agaram2022-07-111-7/+7
|
* stop pretending globals are localKartik K. Agaram2022-07-111-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 smootherKartik K. Agaram2022-07-051-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 strokeKartik K. Agaram2022-07-051-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 marginKartik K. Agaram2022-06-301-7/+7
|
* rip out notion of Line_widthKartik K. Agaram2022-06-301-7/+7
|
* keep drawings within the line width slider as wellKartik K. Agaram2022-06-221-7/+7
|
* clean upKartik K. Agaram2022-06-171-17/+0
|
* more precise shape selectionKartik K. Agaram2022-06-171-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 f3abc2cbf2Kartik K. Agaram2022-06-171-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 pointsKartik K. Agaram2022-06-171-0/+5
| | | | | This should hopefully address #5. I'm removing some constraints from manhattan lines, rectangles and squares.
* dead codeKartik K. Agaram2022-06-151-45/+0
|
* moveKartik K. Agaram2022-06-151-28/+28
|
* .Kartik K. Agaram2022-06-151-6/+3
|
* stop recording points for arcsKartik K. Agaram2022-06-151-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 slightlyKartik K. Agaram2022-06-151-2/+2
|
* standardize on ordering of casesKartik K. Agaram2022-06-151-9/+9
|
* test: moving a pointKartik K. Agaram2022-06-141-13/+4
| | | | | I found some code in the process that seems unreachable. Some chance of a regression here..
* tests for drawing polygonsKartik K. Agaram2022-06-141-1/+9
|
* start writing some tests for drawingsKartik K. Agaram2022-06-141-1/+3
|
* .Kartik K. Agaram2022-06-141-2/+2
|
* extract variable Margin_leftKartik K. Agaram2022-06-141-30/+30
|
* mouse buttons are integers, not stringsKartik K. Agaram2022-06-141-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 testsKartik K. Agaram2022-06-121-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_drawingKartik K. Agaram2022-06-101-3/+6
|
* include drawing index in a few placesKartik K. Agaram2022-06-101-15/+15
|
* stop saving the entire file when modifying drawingsKartik K. Agaram2022-06-101-7/+0
| | | | Now we just disallow that entirely.
* yet another key conflictKartik K. Agaram2022-06-041-1/+1
|
* switch circles to 'o' to avoid conflicting with copyKartik K. Agaram2022-06-041-2/+2
|
* try to maintain a reasonable line widthKartik K. Agaram2022-06-041-1/+1
|
* renameKartik K. Agaram2022-06-031-10/+10
|
* local varKartik K. Agaram2022-06-031-60/+61
|
* switch freehand hotkey to eliminate conflict with searchKartik K. Agaram2022-06-021-1/+1
| | | | I'm now following Inkscape, and the mnemonic is 'pencil'.
* crisp font renderingKartik K. Agaram2022-06-021-15/+3
|
* renameKartik K. Agaram2022-06-021-2/+2
|
* bugfix: undo drawing creationKartik K. Agaram2022-06-021-1/+4
| | | | | Also clean up drawing state to make sure we don't get into hard-to-debug situations.
* after much struggle, a brute-force undoKartik K. Agaram2022-06-021-0/+2
| | | | | | | | | Incredibly inefficient, but I don't yet know how to efficiently encode undo mutations that can span multiple lines. There seems to be one bug related to creating new drawings; they're not spawning events and undoing past drawing creation has some weird artifacts. Redo seems to consistently work, though.
* missing temporary modes in a couple more placesKartik K. Agaram2022-05-301-2/+4
|
* missing shape modes in a couple more placesKartik K. Agaram2022-05-301-1/+1
|
* more robust transitions to temporary modesKartik K. Agaram2022-05-301-3/+10
| | | | | | I seem to often accidentally press C-n twice to go into name mode. Now doing so overrides the previous temporary mode (name/move/delete point) without clobbering the real shape-drawing mode.
* experiment: give up on changing shape modeKartik K. Agaram2022-05-301-9/+1
| | | | | | | | I often find myself accidentally hovering over some shape or other when switching modes. One additional reason to do this: I never included it in the help. So it hasn't been very high-priority.
* bugfix: function namesKartik K. Agaram2022-05-301-3/+3
|
* ignore 'name' mode in a few placesKartik K. Agaram2022-05-301-0/+4
|
* go through App in a couple more placesKartik K. Agaram2022-05-291-3/+3
|
* few more transitions between shapesKartik K. Agaram2022-05-251-2/+10
|