Commit graph

75 commits

Author SHA1 Message Date
Thomas Friedel
efafa0f6f7 fixed a problem with miter joints if the lines are parallel 2018-02-22 14:19:47 +01:00
Thomas Friedel
5175b1ba73 images and fonts can now be optionally named for later access; DrawImage and SetFont can now accept file names directly and will cache using the path 2018-02-15 10:12:32 +01:00
Thomas Friedel
31c2eb204e fixed the line intersection calculation; splitting polygons at self-intersections now works 2018-02-12 10:30:49 +01:00
Thomas Friedel
a7c6f10541 added some code to cut the intersections in self-intersecting polygons, but didn't activate it yet since it doesn't seem to work 2018-02-11 17:28:41 +01:00
Thomas Friedel
a3fc5eba89 small improvements and fixes 2018-02-11 16:50:50 +01:00
Thomas Friedel
4569cd00e1 applied fill and stroke styles to all the path functions 2018-02-09 11:48:44 +01:00
Thomas Friedel
ac8adda421 made stroke and fill style code more generic 2018-02-09 11:41:57 +01:00
Thomas Friedel
2de2dd26a4 moved the canvas to gl coordinate transformation to the shaders; fixed some bugs along the way 2018-02-08 11:53:32 +01:00
Thomas Friedel
9ed7a36cbc changed gl color from four floats to a struct type 2018-02-07 11:37:08 +01:00
Thomas Friedel
9c1845211a added safer lower limit for circle steps 2018-02-06 17:06:59 +01:00
Thomas Friedel
5e6a33f77e added arcTo 2018-02-06 11:35:46 +01:00
Thomas Friedel
9b5004d6b9 fixed a bug with anticlockwise arcs 2018-02-06 11:33:20 +01:00
Thomas Friedel
e5bdee1d67 calculate circle steps dynamically 2018-02-06 10:57:02 +01:00
Thomas Friedel
0bd060ae1b path points are now transformed by the transformation matrix as they are added 2018-02-05 19:53:10 +01:00
Thomas Friedel
3ead983efa clipping is now saved and restored 2018-02-05 12:27:34 +01:00
Thomas Friedel
ad4fee68ef fixed a bug with the way the stencil buffer was used 2018-02-05 11:11:08 +01:00
Thomas Friedel
46c68ca5ad added dashed lines 2018-02-05 11:10:50 +01:00
Thomas Friedel
d9854d540e added line end styles 2018-01-31 21:37:47 +01:00
Thomas Friedel
f46b60da65 added different line joint styles 2018-01-31 18:38:09 +01:00
Thomas Friedel
a8db8886c7 added miter joints for stroked paths 2018-01-31 16:50:36 +01:00
Thomas Friedel
20674e7f7a polygons should only be defined by the path since the last moveTo 2018-01-31 12:12:42 +01:00
Thomas Friedel
4a0b551a93 added a clip function to clip to a polygon (doesn't work with save/restore yet) 2018-01-30 18:32:39 +01:00
Thomas Friedel
6480345a60 added save and restore functions for draw state 2018-01-29 15:32:17 +01:00
Thomas Friedel
79bf4f6b5f arc function implemented 2018-01-25 16:24:32 +01:00
Thomas Friedel
0715639ad2 rearranged things a bit 2018-01-25 15:50:05 +01:00