Commit graph

71 commits

Author SHA1 Message Date
adroitwhiz
cca0832f0d Fix zero-width-outline logic
- Set the stroke color to "null" when the width is set to 0
- Properly set the stroke color state when the width is increased from 0
2020-07-28 08:39:49 -04:00
adroitwhiz
6094953ef4 Wire up stroke gradient controls
* Abstract FillColorIndicator and StrokeColorIndicator to ColorIndicator
* Replace stroke color reducer with stroke style reducer
* Add color style proptype
* Clear stroke gradient in line mode
2020-07-23 05:57:52 -04:00
adroitwhiz
1ecab99cfb Make style-path helpers generic over fill & stroke 2020-07-23 05:54:57 -04:00
adroitwhiz
1017911fd4 color -> style, move selection gradient into it
A "style" refers to something that can fill/stroke a shape.
Currently that's either a solid color or a gradient of some orientation.
The selection gradient type reducer has been removed and folded into the
"fill style" reducer.
2020-07-09 17:52:08 -04:00
adroitwhiz
7bab4d5ed8 Abstract color reducer into reducer-generator 2020-07-09 17:13:41 -04:00
adroitwhiz
018958ce7b Combine fill-color and fill-color-2 reducers 2020-07-09 17:13:41 -04:00
adroitwhiz
604b450b5d Simplify fill-color-2 reducer logic
why my brain hurt???
2020-07-09 16:06:04 -04:00
DD Liu
1a8178808a
Limit stroke width to 100 (#796) 2018-12-14 10:46:15 -05:00
Florrie
934b756032 Make mouse cursor react to what it's hovered over (#762) 2018-12-10 17:42:29 -05:00
DD Liu
c6fb28a69c
Make stroke width 0 when transparent (#695) 2018-09-26 13:08:47 -04:00
DD Liu
4b658c294f
Bitmap select state (#678) 2018-09-17 13:38:16 -04:00
DD Liu
516f6eb714
Zoom to fit (#629)
Note do not merge without GUI change
2018-08-31 12:07:17 -04:00
chrisgarrity
97f669423a
Make PaintEditor component rtl aware (#617)
* Make PaintEditor component rtl aware

Fixes the color-picker and any other popover elements.

Adds an RTL prop to the PaintEditor that initializes the `layout` state in redux. Any other components that need to know the layout refer to the state in redux.

I debated whether the state should just be a boolean (true for RTL), or ‘rtl’, ‘ltr’. I went with the latter, but could be convinced that boolean would be better.

I did not add `dir=“rtl”` to the font picker dropdown as all the names are in LTR languages.

Question: Should the sliders reverse direction, and if so, is it worth doing right now when the layout of the color picker may change.

Adding the rtl prop and the `dir=…` to the PaintEditorComponent fixes layout issues in the playground.

* Don’t reverse gradient swatches: the fill colors (and swatch preview) should represent the way the left-right colors will blend when filling a shape.
2018-08-23 19:08:56 -04:00
DD Liu
50de05cee4
Scrollbars (#602) 2018-08-16 16:49:43 -04:00
DD Liu
4ba79cacbb
Vector gradient (#558) 2018-07-17 16:37:03 -04:00
DD Liu
4e4bb396a6
Draw oval and rectangle outlines in bitmap (#550) 2018-07-12 15:48:30 -04:00
DD Liu
4cadcb3da3
Bitmap eraser tool (#507) 2018-06-14 10:35:02 -04:00
DD Liu
0240abcfe3
Font tool (#443)
Add font picker
2018-05-17 10:37:02 -04:00
DD Liu
3d99044ccf
Import and export bitmaps (#404)
* Rename svg to image

* Import/export bitmap

* Fix playground and readme

* Fix lint

* Assume strings are svgs
2018-04-26 18:45:50 -04:00
DD Liu
b93f902827 double defaults 2018-04-20 11:17:42 -04:00
DD
87d9386906 Allow odd numbers for very small brush sizes for detail 2018-04-17 14:51:34 -04:00
DD
420e1013cf Use a separate state to track the size of the bitmap brush tool from the brush tool 2018-04-12 16:56:54 -04:00
DD
40871b1c0f Rename undo formats, and make format change on costume change skip convert 2018-04-10 18:02:30 -04:00
DD
a6e7fb4251 update button state when undoing between modes, hide vector tools 2018-04-09 20:10:53 -04:00
DD
2b8c291765 Add format reducer 2018-04-05 18:06:37 -04:00
DD
3782d5ad6e Add missing file 2018-03-22 16:22:38 -04:00
DD
baf628c5c9 Detect view bounds changes and update the edit text matrix in response 2018-03-22 15:23:51 -04:00
DD
8d61a7b060 Move the text edit target to the state and make fill work 2018-03-16 11:39:09 -04:00
DD
b93ce53694 Add an undo stack size limit to paint 2018-02-27 10:59:30 -05:00
DD
a0c89642d8 Make state change even when select items dont change so that handle changes work. Make the edge code pick the normal in a more well defined way 2017-12-21 15:38:24 -05:00
DD
07b30aa55b Handle pointed and curved 2017-12-21 15:38:24 -05:00
Matthew Taylor
c8094af69e don’t change modes when activate eye dropper
It works well to keep track of the previously active tool in redux, and reactivate that tool when the eye dropper is finished. This takes `eye-dropper` out of the mode tool reducer too, which is nice.
2017-12-13 13:12:33 -05:00
Matthew Taylor
2183dc759f Implement eye dropper for paint editor 2017-12-08 16:52:37 -05:00
Matthew Taylor
95099d6e90 move modes to lib 2017-11-07 14:02:39 -05:00
DD
a5a60b0884 Offset the pasted item from the original when on the same costume 2017-11-01 18:10:03 -04:00
DD
7e1e8d96ac add copy/paste 2017-11-01 17:05:37 -04:00
DD
0d0cdfa757 Force a color state when switching to shape tools 2017-10-30 18:23:41 -04:00
DD
7c8c9aa23d change default color to looks purple 2017-10-26 16:41:01 -04:00
DD
ad28e1ff16 Change default fill color to motion blue 2017-10-26 15:58:02 -04:00
Paul Kaplan
4d0f3e8311 Update default mode in reducer 2017-10-24 15:52:39 -04:00
Paul Kaplan
e2e4823642 Fix with feedback from DD 2017-10-13 14:24:07 -04:00
Paul Kaplan
3eaf8047aa Initial prototype of color picker 2017-10-13 13:34:25 -04:00
DD
28464b237b call undo 2017-10-12 11:23:35 -04:00
DD
8baf731328 add undo reducer 2017-10-12 11:22:40 -04:00
DD
720f83605d add tests 2017-10-03 15:04:53 -04:00
DD
b87c17523a Selection sets and gets fill/stroke color/width 2017-10-03 12:07:56 -04:00
DD
7e1375d855 Switch state to track hover item ID instead of item itself 2017-09-22 13:48:48 -04:00
DD
25478a87fb add tests 2017-09-14 11:56:12 -04:00
DD
0e91439edd Get move working 2017-09-13 15:17:59 -04:00
DD
448ff9bfe4 Add more selection files 2017-09-12 17:39:25 -04:00