Commit graph

423 commits

Author SHA1 Message Date
Ryan Oldenburg ca023c1a08 arc flag parse fix + another icon set 2021-02-23 16:22:29 -06:00
Ryan Oldenburg 987531b018 basic css, ionicons looking much better 2021-02-23 14:46:04 -06:00
Ryan Oldenburg dc0246814e path parse bugfix 2021-02-23 14:09:15 -06:00
Ryan Oldenburg 404b0504ab path commands to shapes bugfix 2021-02-23 13:46:47 -06:00
Ryan Oldenburg aa19910380 merge into test_paths.nim 2021-02-23 13:26:59 -06:00
Ryan Oldenburg cda6dabf60 f 2021-02-23 13:26:59 -06:00
Ryan Oldenburg bdbaaa33cb f 2021-02-23 02:00:34 -06:00
Ryan Oldenburg dcf0a3fd60 more icon sets, couple fixes 2021-02-23 01:54:51 -06:00
treeform e41b8434eb
Compute pixel scale based on matrix max scale before doing the fill or storke. (#124) 2021-02-22 23:53:26 -08:00
Ryan Oldenburg fc2dc50c39 sweep flag fix for svg icons 2021-02-23 00:24:27 -06:00
Ryan Oldenburg 7b02ca4dd5 remove code 2021-02-22 23:20:05 -06:00
Ryan Oldenburg 5fa35c7852 default svg load 2021-02-22 22:35:08 -06:00
Ryan Oldenburg 40afb8e4c4 bootstrap icons svg megatest + parse fixes 2021-02-22 22:14:06 -06:00
Ryan Oldenburg 8cf6c5cd2f move comment 2021-02-22 18:42:44 -06:00
Ryan Oldenburg 6cb2491825 f 2021-02-22 18:39:27 -06:00
Ryan Oldenburg 7b0bd8753f strokes always wrNonZero 2021-02-22 16:30:28 -06:00
Ryan Oldenburg bca5119e8b linecap, linejoin 2021-02-20 13:31:25 -06:00
Ryan Oldenburg 34b3f09e43 fill and stroke helpers 2021-02-19 12:06:16 -06:00
Ryan Oldenburg b4edd635d5 support rect rx and ry for svg 2021-02-19 01:40:19 -06:00
Ryan Oldenburg 203a657c8a drawPolygon 2021-02-18 16:45:56 -06:00
Ryan Oldenburg 0362d03b0b drawEllipse, drawCircle 2021-02-18 16:33:41 -06:00
Ryan Oldenburg 318d90e509 drawRoundedRect + updated example 2021-02-18 16:23:54 -06:00
Ryan Oldenburg 3016790e8a drawSegment + updated examples 2021-02-18 14:03:08 -06:00
Ryan Oldenburg 505e2ff2d9 drawRect image, mask 2021-02-18 13:35:08 -06:00
Ryan Oldenburg 76ed801aa7 remove windingrule param from stroke proc 2021-02-18 12:16:01 -06:00
Ryan Oldenburg 445db73f00 small improvements 2021-02-17 23:23:19 -06:00
Ryan Oldenburg d1a5f22b1f f 2021-02-17 13:21:28 -06:00
Ryan Oldenburg 962cc4aa7e faster paths fill 2021-02-17 03:21:11 -06:00
Ryan Oldenburg 52e65f9d73 small change 2021-02-17 01:18:30 -06:00
treeform f641b46049 put gradients back 2021-02-15 23:31:10 -08:00
Ryan Oldenburg f2b3c67d4b morepretty 2021-02-16 00:35:36 -06:00
Ryan Oldenburg 68e2522074 performance improvements 2021-02-16 00:35:08 -06:00
treeform 955d813a27 Add offBounds to blur so that we can shadow from the edge. 2021-02-15 18:24:53 -08:00
treeform 219dc23bf9 Gradient rotation fix. 2021-02-15 18:23:31 -08:00
treeform 344062fda2 Add gradients. 2021-02-14 21:32:31 -08:00
treeform 39b0446d60 Add roundedRect based on splines. 2021-02-14 09:52:41 -08:00
treeform 7ff64d0ec8 small comment 2021-02-13 20:14:10 -08:00
Ryan Oldenburg fc23bda80f blends exports 2021-02-13 20:57:58 -06:00
Ryan Oldenburg 28f831249f better segment partitioning, faster svg path fill 2021-02-13 20:52:53 -06:00
Ryan Oldenburg b800c77ab5 cleaner + faster simd 2021-02-13 20:52:53 -06:00
Ryan Oldenburg 4a9c26d4ff mask+mask bugfix 2021-02-13 16:03:15 -06:00
Ryan Oldenburg 64e5016df6 draw mask.image simd 2021-02-11 22:37:40 -06:00
Ryan Oldenburg debceb255a image + (image|mask) works 2021-02-11 22:12:30 -06:00
Ryan Oldenburg 243f9a3ba1 better names 2021-02-11 22:12:12 -06:00
Ryan Oldenburg 70ab79b607 draw uber takes Image | Mask + works w/o simd so far 2021-02-11 15:29:11 -06:00
Ryan Oldenburg abbcc717cd fix 2021-02-11 14:40:30 -06:00
Ryan Oldenburg 50a4687d67 move 2021-02-11 14:08:09 -06:00
Ryan Oldenburg d0294ebec7 move to bottom of file now 2021-02-11 14:05:37 -06:00
Ryan Oldenburg 01f6248522 simd image blend when possible 2021-02-11 13:57:19 -06:00
Ryan Oldenburg b6b1d3a44c sharpen -> ceil 2021-02-11 13:14:06 -06:00
Ryan Oldenburg 7e06625c27 y min, max when drawing optimization 2021-02-11 12:45:52 -06:00
Ryan Oldenburg a40683920d sharpen masks + simd, blend masks 2021-02-11 02:38:27 -06:00
Ryan Oldenburg e17d0c742d roundedRect clockwise vs counter 2021-02-11 01:44:46 -06:00
Ryan Oldenburg d8b01fa885 comment out blends not avail in figma 2021-02-10 22:21:56 -06:00
Ryan Oldenburg b3bc1225d4 f 2021-02-10 16:31:12 -06:00
Ryan Oldenburg 55051f944c premul alpha version of many blends, ~4x faster for each 2021-02-10 15:59:08 -06:00
Ryan Oldenburg cc63165c9b rest of blends work by converting back to straight alpha first (except 2 missing tests) 2021-02-10 14:37:15 -06:00
Ryan Oldenburg 0cdb84407b unused 2021-02-10 13:48:18 -06:00
Ryan Oldenburg 0cf0c95791 fix exclusion blend 2021-02-10 13:46:58 -06:00
Ryan Oldenburg 81dbfacdda blendExclusion 50% faster 2021-02-09 23:34:49 -06:00
Ryan Oldenburg 59b186b535 group float timings (to easily disable, they are going away) 2021-02-09 23:32:13 -06:00
Ryan Oldenburg d9fcf71f43 blendExclusion passes tests 2021-02-09 23:28:56 -06:00
Ryan Oldenburg 3ec1710e2e blurs 2021-02-09 22:25:15 -06:00
Ryan Oldenburg b074e9bfc7 mask blends 2021-02-09 16:37:07 -06:00
Ryan Oldenburg 264b30b118 image.newMask 35% faster with simd 2021-02-09 16:08:08 -06:00
Ryan Oldenburg c95df08cbe remove old 2021-02-09 15:28:47 -06:00
Ryan Oldenburg 29047d6a46 blends, blurs, masks checkpoint 2021-02-09 15:22:37 -06:00
Ryan Oldenburg 913c7e9498 more premul blends 2021-02-09 15:22:37 -06:00
Ryan Oldenburg 8231583429 updated exmaples, bugfix 2021-02-08 23:07:46 -06:00
Ryan Oldenburg ad11eac936 unused 2021-02-08 22:42:55 -06:00
Ryan Oldenburg 7b012e23bb fix comments 2021-02-08 22:39:28 -06:00
Ryan Oldenburg 3e096792c0 move 2021-02-08 22:39:28 -06:00
Ryan Oldenburg 1ed4077249 invert for mask, premul alpha image 2021-02-08 22:27:00 -06:00
Ryan Oldenburg d0cb2bf7bb unused 2021-02-08 22:27:00 -06:00
Ryan Oldenburg 29f424fe4c applyOpacity simd for image too, 10x faster as well 2021-02-08 21:44:17 -06:00
Ryan Oldenburg 6fd7df9b23 shortcut 2021-02-08 21:44:17 -06:00
Ryan Oldenburg 6c5fa78ed9 mask applyOpacity 10x faster 2021-02-08 21:12:28 -06:00
Ryan Oldenburg 788b5a0821 consistent versions arcoss all combos 2021-02-08 20:06:07 -06:00
Ryan Oldenburg 33479e5612 draw image into mask 2021-02-08 19:59:46 -06:00
Ryan Oldenburg 33b032550c draw mask on mask 2021-02-08 19:52:54 -06:00
Ryan Oldenburg 7cfaff1824 fix 2021-02-08 17:58:42 -06:00
Ryan Oldenburg 2807cce15f f 2021-02-08 17:41:21 -06:00
Ryan Oldenburg 5e536c5d67 starting transition of draw / images.nim to premul alpha 2021-02-08 17:26:48 -06:00
Ryan Oldenburg 4cf9c46a79 merged drawCorrect 2021-02-08 17:12:34 -06:00
Ryan Oldenburg 662c79e0fb draw mask 2021-02-08 16:43:22 -06:00
Ryan Oldenburg 191b89b50c mask applyOpacity 2021-02-08 16:39:24 -06:00
Ryan Oldenburg bbe207baa0 image masking 2021-02-08 14:31:26 -06:00
Ryan Oldenburg d3ab965f0f blend mode after winding rule 2021-02-08 12:50:24 -06:00
Ryan Oldenburg c5ce1a8029 bugfix for minifyBy2 power > 1 2021-02-08 12:47:01 -06:00
Ryan Oldenburg 46fe96569e shorter 2021-02-07 21:10:57 -06:00
Ryan Oldenburg de1b1b95ca faster minifyBy2 2021-02-07 20:52:33 -06:00
Ryan Oldenburg 6df03ed1d1 paths fill takes blendMode param 2021-02-07 20:42:39 -06:00
Ryan Oldenburg 8a933e051e mask minifyBy2 2021-02-07 20:37:35 -06:00
Ryan Oldenburg 369066e04d masks + paths 2021-02-06 21:51:13 -06:00
Ryan Oldenburg 5afd784b20 move, rm unused param 2021-02-06 17:52:04 -06:00
Ryan Oldenburg 264801c9f8 >= 0 for image dimensions 2021-01-30 20:45:39 -06:00
Ryan Oldenburg 7c2014ee88 faster superImage + tests 2021-01-30 20:42:08 -06:00
Ryan Oldenburg 90a88e4393 Revert "unused"
This reverts commit 8aab927127.
2021-01-30 16:25:57 -06:00
Ryan Oldenburg a801e9d359 Revert "premultiplied blends for most"
This reverts commit 052e114db1.
2021-01-30 16:25:38 -06:00
Ryan Oldenburg fd59b20e7d Revert "for non simd for now"
This reverts commit a16315a9cf.
2021-01-30 16:25:21 -06:00
Ryan Oldenburg f05354dc79 Revert "working int impl"
This reverts commit 74fcf2a9f2.
2021-01-30 16:25:02 -06:00
Ryan Oldenburg 3a40f7680c Revert "triple blend when needed"
This reverts commit 014413b627.
2021-01-30 16:24:35 -06:00
treeform 1126f28ea7 add back superImage 2021-01-30 13:38:18 -08:00
Ryan Oldenburg 014413b627 triple blend when needed 2021-01-29 21:48:52 -06:00
Ryan Oldenburg c65acc6cd7 f 2021-01-29 14:10:36 -06:00
Ryan Oldenburg 74fcf2a9f2 working int impl 2021-01-29 14:07:26 -06:00
Ryan Oldenburg a16315a9cf for non simd for now 2021-01-29 13:00:35 -06:00
Ryan Oldenburg 052e114db1 premultiplied blends for most 2021-01-28 23:45:44 -06:00
Ryan Oldenburg 8aab927127 unused 2021-01-28 22:46:12 -06:00
Ryan Oldenburg 01fd4eed6d actually much faster 2021-01-28 22:36:38 -06:00
Ryan Oldenburg 9ea66864b1 consistent 2021-01-28 22:30:24 -06:00
Ryan Oldenburg 03dcd05969 rename to blender 2021-01-28 22:28:05 -06:00
Ryan Oldenburg dad7440e04 just move 2021-01-28 22:26:56 -06:00
Ryan Oldenburg 718a8707f3 f 2021-01-28 20:59:37 -06:00
Ryan Oldenburg bd18a9868a simpler 2021-01-28 20:55:47 -06:00
Ryan Oldenburg cb14a09367 public 2021-01-28 20:25:24 -06:00
Ryan Oldenburg 35ad210ec5 tiger 20% faster 2021-01-28 17:00:30 -06:00
Ryan Oldenburg c0ac9fd2f8 not public, maybe becomes part of masks.nim 2021-01-27 17:16:43 -06:00
Ryan Oldenburg c37dcd4a56 dont mutate shadow mask param 2021-01-27 17:13:30 -06:00
Ryan Oldenburg fe1cfc41a6 resize remove +1 2021-01-27 16:45:56 -06:00
Ryan Oldenburg a6103ac444 more clear docs i think + bufix 2021-01-27 16:43:33 -06:00
Ryan Oldenburg 2cd3c35fc1 bit faster 2021-01-27 15:15:51 -06:00
Ryan Oldenburg bb7ec44fce store winding as int directly 2021-01-27 03:47:03 -06:00
Ryan Oldenburg eb360887ab repeat into proc 2021-01-27 03:16:27 -06:00
Ryan Oldenburg c4abba5d8a - assert, + exception 2021-01-27 03:11:37 -06:00
Ryan Oldenburg 8668f355f1 little speedups 2021-01-27 03:07:17 -06:00
Ryan Oldenburg e85ab1f3fe f 2021-01-27 02:49:49 -06:00
Ryan Oldenburg 4fad39c5bd rm forward declare 2021-01-27 02:45:07 -06:00
Ryan Oldenburg c8b78800a6 f 2021-01-26 19:54:49 -06:00
Ryan Oldenburg 7389c9257b better name 2021-01-26 18:23:15 -06:00
Ryan Oldenburg 1af7f5ca7c simpler 2021-01-26 18:23:15 -06:00
Ryan Oldenburg f49564b167 corrected 2021-01-26 17:14:21 -06:00
Ryan Oldenburg b232a3a8c2 simpler 2021-01-26 17:03:24 -06:00
Ryan Oldenburg 4cdb9db0f6 2x faster lol 2021-01-26 16:55:33 -06:00
Ryan Oldenburg be6bebf553 a few little things + uint8 coverage 2021-01-26 16:34:07 -06:00
Ryan Oldenburg e1c98b0822 small 2021-01-26 16:31:24 -06:00
Ryan Oldenburg 65afc67792 tests stuff 2021-01-25 11:49:29 -06:00
Ryan Oldenburg a63bc4d1be decodeSvg returns straight alpha 2021-01-25 11:17:34 -06:00
Ryan Oldenburg 2c7694896f paths.nim expects and returns premultiplied alpha 2021-01-25 11:08:32 -06:00
Ryan Oldenburg 584d48c2ee 0.0.20 seq[seq[Vec2]] 2021-01-25 10:24:23 -06:00
Ryan Oldenburg b25daa0de7 remove break 2021-01-25 10:15:42 -06:00
Ryan Oldenburg 09cd7f959d 0.0.19 new scanline+fill 2021-01-24 23:34:31 -06:00
Ryan Oldenburg 505434e04e start+stop bounds = faster fill 2021-01-24 22:31:56 -06:00
Ryan Oldenburg 0cb7b5ea3d 0.0.18 more paths.nim stuff 2021-01-24 22:02:45 -06:00
Ryan Oldenburg f0f2e5b4c6 0.0.17 paths stuff 2021-01-24 20:49:57 -06:00
Ryan Oldenburg d73aff17ee path not ref 2021-01-24 20:15:11 -06:00
Ryan Oldenburg e95f78038d small 2021-01-24 19:53:21 -06:00
Ryan Oldenburg 9e834ce8e4 explicit names instead of alphy shorthand 2021-01-24 18:40:26 -06:00
Ryan Oldenburg 45fe8bd9ea integer lerp, integer premultiply and straighten alpha 2021-01-24 18:20:46 -06:00
Ryan Oldenburg f6864b109e 2x faster convert to straight alpha 2021-01-24 16:20:10 -06:00