Commit Graph

26 Commits

Author SHA1 Message Date
Kartik K. Agaram 95d88a8298 use editor state font for width calculations 2024-01-12 05:23:06 -08:00
Kartik K. Agaram 4ab901c92e get rid of to_text
I've been misunderstanding what Text objects are. They can render a lot
of text with a given line height, word wrap, colors in various places.
And I've been creating one for every word 🤦

Unwinding this will take some time. This is just a first baby step for
ad hoc text objects. Turns out I don't need to convert to Text to get
something's rendered width, just the Font can do that.

Thanks to the LÖVE Discord for educating me:
  https://discord.com/channels/329400828920070144/330089431379869708/1091535487333826580
2023-04-01 16:12:55 -07:00
Kartik K. Agaram ce31b74b10 infrastructure for caching LÖVE text objects 2022-08-24 13:27:04 -07:00
Kartik K. Agaram b7a67ab1e9 bugfix: online help
Broken in the commit before last.
2022-07-22 02:29:23 -07:00
Kartik K. Agaram 70a15b3bc9 replace globals with args in a few functions
- Drawing.draw_shape
  - Drawing.draw_pending_shape
  - Drawing.in_drawing
  - Drawing.find_or_insert_point
  - Drawing.near
  - Drawing.pixels
2022-07-12 21:58:46 -07:00
Kartik K. Agaram 3b36093553 left/right margin -> left/right coordinates
Editor state initialization now depends on window dimensions, so we have
to more carefully orchestrate startup.
2022-07-12 20:54:50 -07:00
Kartik K. Agaram 674d571576 add state arg to few functions
- draw_help_without_mouse_pressed
  - draw_help_with_mouse_pressed
  - current_shape
2022-07-12 17:05:21 -07:00
Kartik K. Agaram 8bbc1ffe34 group all editor globals
We're still accessing them through a global. But we'll change that next.
2022-07-12 15:24:56 -07:00
Kartik K. Agaram 3850fbac35 make colors easier to edit 2022-07-11 23:18:26 -07:00
Kartik K. Agaram 18aa21d0c0 keep online help inside of drawing 2022-07-04 22:01:57 -07:00
Kartik K. Agaram 8c7bea8f76 rip out notion of Line_width 2022-06-30 19:50:27 -07:00
Kartik K. Agaram b6fa2aae6e typos 2022-06-19 02:40:02 -07:00
Kartik K. Agaram 8d4d00d1e1 fix help for rectangles and squares
Thanks John Blommers (https://github.com/akkartik/lines.love/issues/1#issuecomment-1159582457)
2022-06-18 17:01:44 -07:00
Kartik K. Agaram 4a5747d7a6 bugfix: alignment of help screen 2022-06-15 13:28:34 -07:00
Kartik K. Agaram 778bc78416 make online help fit within a drawing 2022-06-04 21:58:06 -07:00
Kartik K. Agaram 7d1671051f yet another key conflict 2022-06-04 21:48:35 -07:00
Kartik K. Agaram db8b5b5062 switch circles to 'o' to avoid conflicting with copy 2022-06-04 20:35:31 -07:00
Kartik K. Agaram bfaa3fd95b bugfix in help 2022-06-04 20:25:48 -07:00
Kartik K. Agaram 03499f7449 switch freehand hotkey to eliminate conflict with search
I'm now following Inkscape, and the mnemonic is 'pencil'.
2022-06-02 23:55:17 -07:00
Kartik K. Agaram 9bbfc2be13 crisp font rendering 2022-06-02 23:36:07 -07:00
Kartik K. Agaram a70d9a81dc help tweak 2022-05-21 14:20:16 -07:00
Kartik K. Agaram bb9e23a638 support for naming points
There's still an absence of affordance showing when you're in naming mode.
2022-05-21 14:03:06 -07:00
Kartik K. Agaram 95e17dac2f bugfix: missed rename in one file 2022-05-21 08:10:11 -07:00
Kartik K. Agaram 21f166689a a few more integer coordinates 2022-05-19 16:35:52 -07:00
Kartik K. Agaram e27165cb9f rectangle and square shapes 2022-05-18 15:29:18 -07:00
Kartik K. Agaram de495ae0f1 several more modules
This is probably not ideal; let's see how it goes..
2022-05-17 21:34:55 -07:00