Commit Graph
100 Commits
Author SHA1 Message Date
Josh Holtrop f6b2b30910 add snap points for just-drawn shapes 2011-07-28 18:06:18 -04:00
Josh Holtrop aebf7df80f add PointRef class, convert snap points to PointRef instances 2011-07-28 18:01:16 -04:00
Josh Holtrop de69e966cb clear hover snap point when drawing a circle 2011-07-28 13:15:59 -04:00
Josh Holtrop fdcb07003c snap lines to shape handles while drawing 2011-07-28 10:28:57 -04:00
Josh Holtrop c75fbc50ab add Connect constraints for sequentially drawn lines 2011-07-28 09:19:19 -04:00
Josh Holtrop b5080f14dd change drawingConstraints to a hash for easier updating 2011-07-28 00:43:43 -04:00
Josh Holtrop ada889ab5e increase snap dist, store snap_dist^2 2011-07-28 00:00:23 -04:00
Josh Holtrop 6c91677c11 draw hover snap point 2011-07-27 23:57:32 -04:00
Josh Holtrop a0fe5aa6aa move glColor() out of individual draw routines 2011-07-27 23:17:35 -04:00
Josh Holtrop 03754f3cec call do_*_motion() regardless of drawing status 2011-07-27 22:58:55 -04:00
Josh Holtrop 4a7e677bf3 added cancel_drawing_shape() 2011-07-27 22:42:36 -04:00
Josh Holtrop 47ac5cb3fd clear drawingShape/drawingConstraints on new mode 2011-07-27 22:40:16 -04:00
Josh Holtrop 895fa54ed7 change cursor for drawing modes 2011-07-27 22:26:09 -04:00
Josh Holtrop cd1deb3c8b add snap points, update on viewport changes 2011-07-27 22:14:48 -04:00
Josh Holtrop ea43216f16 rename snap_dist to hv_snap_dist 2011-07-27 21:41:01 -04:00
Josh Holtrop 409783d01f Sketch.solve() returns solve result as integer 2011-07-27 18:27:11 -04:00
Josh Holtrop b95e8e8789 complete circle drawing 2011-07-27 18:03:32 -04:00
Josh Holtrop 4ec320ff5d implement setRadius()/setPt() for Circle 2011-07-27 18:03:09 -04:00
Josh Holtrop 5c790ae79f create merge_in_drawing_shape() 2011-07-27 17:14:57 -04:00
Josh Holtrop 57d166dfc7 comment 2011-07-27 17:13:37 -04:00
Josh Holtrop 8d9144581c switch drawingLine/drawingCircle to generic drawingShape 2011-07-27 17:12:00 -04:00
Josh Holtrop eb28222f23 add initial do_circle_*_click() 2011-07-27 16:57:48 -04:00
Josh Holtrop 999561a4ab queue redraw when exiting line/circle mode 2011-07-27 16:53:07 -04:00
Josh Holtrop 8b89a5975f break out 'line' mode actions into separate functions 2011-07-27 16:52:23 -04:00
Josh Holtrop 1564fbbb74 mode buttons change SketchWidget mode 2011-07-27 16:40:39 -04:00
Josh Holtrop 99129c60e1 rework buttons into mode_buttons 2011-07-27 16:35:35 -04:00
Josh Holtrop 5f2436f3b7 initially assign focus to SketchWidget 2011-07-27 16:29:34 -04:00
Josh Holtrop 8c3193bbec clean up ToggleToolButton handling; add Circle button 2011-07-27 16:18:03 -04:00
Josh Holtrop 21896bea8e minor code reformatting 2011-07-27 15:42:14 -04:00
Josh Holtrop f07f5b23bc add toggled_event() callback 2011-07-25 23:49:46 -04:00
Josh Holtrop 55dadd2240 add a toolbar 2011-07-25 23:35:31 -04:00
Josh Holtrop edd8fd6107 add SampleSketch class 2011-07-25 23:13:25 -04:00
Josh Holtrop e398a6e6c8 moved shapes and constraints into module directories 2011-06-17 12:21:12 -04:00
Josh Holtrop 4e70df40e3 add status bar to window 2011-04-24 11:50:02 -04:00
Josh Holtrop 2b690763d2 pressing Escape quits the program for now 2011-04-24 11:44:07 -04:00
Josh Holtrop 8c76ce3155 SketchWidget takes window parameter 2011-04-24 11:31:20 -04:00
Josh Holtrop b34ba613b2 snap within angle and distance 2011-04-23 22:35:27 -04:00
Josh Holtrop 6a6e635902 fix screenDistToDist() bug 2011-04-23 22:34:52 -04:00
Josh Holtrop 9e8c5ac5d6 Sketch: only attempt to solve if #vars == #equs 2011-04-23 22:23:07 -04:00
Josh Holtrop 4758cb9c3f add horizontal/vertical constraint on newly drawn lines 2011-04-23 21:55:05 -04:00
Josh Holtrop c7885bc0d6 individual constraint drawing routines responsible for setting color 2011-04-23 21:52:29 -04:00
Josh Holtrop 65f80774a1 draw horizontal/vertical constraint on drawLine 2011-04-23 21:51:42 -04:00
Josh Holtrop 854df86eaf snap lines to horizontal/vertical within snap_angle degrees 2011-04-23 21:48:42 -04:00
Josh Holtrop 02db7d629d draw horizontal and vertical constraints 2011-04-23 21:06:56 -04:00
Josh Holtrop 0401d89bb4 map screen to pixels 1:1 2011-04-23 17:18:34 -04:00
Josh Holtrop 5f02703ecd tweak default colors 2011-04-05 17:25:40 -04:00
Josh Holtrop c05ea0a4b0 filled out drawConnect(), tweak colors 2011-04-04 14:04:26 -04:00
Josh Holtrop 7dc35f67bb add Circle.getPt() 2011-04-04 13:53:15 -04:00
Josh Holtrop 40fa3cbc3b Line: getPt(2) defined 2011-04-04 13:53:03 -04:00
Josh Holtrop abfe98a221 set color in individual draw*() routines 2011-04-04 11:46:14 -04:00
Josh Holtrop 73a6e5cf92 add drawConnect() stub 2011-04-04 09:11:20 -04:00
Josh Holtrop 5ef8b73b29 SketchWidget: remove size param from draw*() 2011-04-03 20:11:26 -04:00
Josh Holtrop f2fdf19079 SketchWidget: refactor drawing of shapes/constraints 2011-04-03 20:09:56 -04:00
Josh Holtrop 15f020e93a add constraints package for constraint classes 2011-04-03 12:15:55 -04:00
Josh Holtrop 2094ab8df8 add 'shapes' package to collect shape classes 2011-04-03 12:14:16 -04:00
Josh Holtrop 72c1865cf6 add configuration parameters for colors 2011-04-03 12:10:22 -04:00
Josh Holtrop f6cc39914b SketchWidget: s/redraw()/queue_redraw()/ 2011-04-03 12:00:51 -04:00
Josh Holtrop f20726e571 add crude line drawing 2011-04-03 11:50:44 -04:00
Josh Holtrop 204f4591e9 add Line.setPt() 2011-04-03 11:50:28 -04:00
Josh Holtrop 764012a889 much more user-friendly zooming 2011-04-02 00:32:15 -04:00
Josh Holtrop 21d969b5cb a very non-user-friendly zoom 2011-04-02 00:20:29 -04:00
Josh Holtrop e1011b83ba fix panning 2011-04-02 00:13:49 -04:00
Josh Holtrop aaf857d071 fix up panning code, now backwards 2011-04-02 00:09:23 -04:00
Josh Holtrop 18d25c3713 signal a redraw while panning 2011-04-01 23:58:57 -04:00
Josh Holtrop 10549ff7ae initial attempt at panning, need to redraw 2011-04-01 23:49:09 -04:00
Josh Holtrop e3dc55efc7 handle scroll events and motion events 2011-04-01 23:08:02 -04:00
Josh Holtrop 147a6bb3a5 capture mouse button presses/releases 2011-04-01 22:38:59 -04:00
Josh Holtrop 3a7255bbae fix projection matrix so widget resizes properly 2011-04-01 21:15:59 -04:00
Josh Holtrop 594a5c5359 make axis length configurable 2011-04-01 20:57:14 -04:00
Josh Holtrop 3d002eebf8 break out configurable sizes of things 2011-04-01 20:55:44 -04:00
Josh Holtrop bfe8d2a267 draw axes 2011-04-01 16:09:32 -04:00
Josh Holtrop edbfce91d2 increase circle resolution when zoomed in 2011-04-01 15:58:45 -04:00
Josh Holtrop bcb47a4825 fix Y scaling error in ptToScreenPt() 2011-04-01 15:47:51 -04:00
Josh Holtrop 6e2e19d1a5 initial view scaling 2011-04-01 15:45:50 -04:00
Josh Holtrop 5678df7dbb add accessor methods in shapes to get vars 2011-04-01 09:59:44 -04:00
Josh Holtrop 0ce01c7b58 add antialiasing code 2011-03-31 22:46:02 -04:00
Josh Holtrop 4cc7901c2d disable lighting and depth test 2011-03-31 22:39:05 -04:00
Josh Holtrop dd8bd07d1e optimize drawing routines slightly 2011-03-31 22:30:58 -04:00
Josh Holtrop 03f3245721 draw thick circle as well 2011-03-31 22:13:03 -04:00
Josh Holtrop 7fb5a06088 add drawFilledCircle() and cap lines 2011-03-31 22:08:25 -04:00
Josh Holtrop e9735e03bf SketchWidget: optimize drawFilledLine() slightly 2011-03-31 21:49:10 -04:00
Josh Holtrop 1203478a33 SketchWidget: add drawFilledLine() 2011-03-31 21:42:13 -04:00
Josh Holtrop 87348d3605 SketchWidget: break out draw{Line,Circle}() 2011-03-31 20:18:45 -04:00
Josh Holtrop b562718db6 fix expected equ value for [XY]Fix 2011-03-31 19:45:37 -04:00
Josh Holtrop 01d97b5604 update test sketch using a line midpoint 2011-03-31 19:38:19 -04:00
Josh Holtrop 979bf7ee47 add midpoint to Line (pt 2) 2011-03-31 19:38:06 -04:00
Josh Holtrop 999a4da50d use Horizontal instead of YDistance of 0 2011-03-31 19:31:01 -04:00
Josh Holtrop e0a0dffd88 more complicated test sketch working! 2011-03-30 17:34:59 -04:00
Josh Holtrop bee46a4407 more debug info 2011-03-30 17:34:43 -04:00
Josh Holtrop af99d8646a detect when FuncDesigner does not return a solution 2011-03-30 17:22:15 -04:00
Josh Holtrop 95c11d0c23 first attempt at using FuncDesigner 2011-03-30 17:17:11 -04:00
Josh Holtrop 2d24e7a920 add Shape.getVar() 2011-03-30 16:46:34 -04:00
Josh Holtrop 2200460b56 split Fix into XFix/YFix constraints 2011-03-30 15:51:45 -04:00
Josh Holtrop 5dd89c2cc9 add Fix constraint to fix a coordinate to a value 2011-03-30 15:48:27 -04:00
Josh Holtrop 9c2bb94603 add more debug, SLE solver not working? 2011-03-29 20:42:04 -04:00
Josh Holtrop a36e4f6d08 more debug routines 2011-03-29 19:32:59 -04:00
Josh Holtrop aa19e77187 add missing horizontal and vertical constraints 2011-03-29 19:27:19 -04:00
Josh Holtrop 38cf7aeb8b Merge branch 'master' into square-matrix 2011-03-29 19:24:17 -04:00
Josh Holtrop eb65d9f653 syntax error - duh 2011-03-29 19:23:51 -04:00
Josh Holtrop d18b45cff7 Merge branch 'master' into square-matrix 2011-03-29 19:21:13 -04:00