Commit graph

173 commits

Author SHA1 Message Date
Thomas Friedel
13127f2816 added MeasureText method 2018-03-28 12:42:50 +02:00
Thomas Friedel
5f3b74834b added BSD license 2018-03-28 11:33:15 +02:00
Thomas Friedel
1703c1a8fd added documentation; added input event functions 2018-03-28 11:30:46 +02:00
tfriedel6
95e59ccb5f
Update README.md 2018-03-27 16:16:25 +02:00
Thomas Friedel
df650c6113 deduplicated some code 2018-03-27 16:03:02 +02:00
Thomas Friedel
37767fa86f more documentation; renamed W/H to Width/Height on Image type 2018-03-27 15:57:01 +02:00
Thomas Friedel
a9aa15d1d6 nested clipping now works with save/restore 2018-03-25 15:48:26 +02:00
Thomas Friedel
649cffa1e3 clipping fixed 2018-03-25 15:42:23 +02:00
Thomas Friedel
f57765cdc5 split main loop for manual main loop support 2018-03-24 19:20:30 +01:00
Thomas Friedel
385a230aa6 removed commented lines since they otherwise appear as documentation 2018-03-22 17:47:58 +01:00
Thomas Friedel
ff4fba4c33 reduced the opengl interface to only the used functions 2018-03-22 17:45:52 +01:00
Thomas Friedel
72a7cbd2ed renamed the W and H function; added documentation 2018-03-22 17:27:23 +01:00
Thomas Friedel
888c667a36 miter line join fix 2018-03-21 16:04:52 +01:00
Thomas Friedel
dfba64a1fd fixed some bugs from the float32->float64 conversion 2018-03-21 15:51:07 +01:00
Thomas Friedel
e138d853c6 stencil buffer usage bugfix 2018-03-21 15:45:19 +01:00
Thomas Friedel
26d11865b5 switched from float32 to float64 for better compatibility with the default go math package; moved vector and matrix code into package 2018-03-21 12:45:32 +01:00
Thomas Friedel
d0dc6c1f5c removed log message 2018-03-21 12:09:10 +01:00
Thomas Friedel
075abc4f03 bugfix for an edge case 2018-03-14 15:37:01 +01:00
tfriedel6
b7af1ad3a4
Create README.md 2018-03-12 12:42:41 +01:00
Thomas Friedel
caa356aa12 added quadratic and bezier curves 2018-03-08 16:42:16 +01:00
Thomas Friedel
21d14699ec font rendering fix 2018-02-26 16:53:34 +01:00
Thomas Friedel
da6538b1e3 shaders are now in their own file; text fill now uses font rendering more directly and supports fill styles 2018-02-26 15:40:48 +01:00
Thomas Friedel
d509a6f86d gradients and texture patterns are now transformed according to the current matrix 2018-02-26 12:29:21 +01:00
Thomas Friedel
efafa0f6f7 fixed a problem with miter joints if the lines are parallel 2018-02-22 14:19:47 +01:00
Thomas Friedel
2da1a4363a bugfix, uninitialized uniform 2018-02-15 10:33:51 +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
59033ea55b added canvas size methods; transformations now apply in reverse order 2018-02-12 18:53:05 +01:00
Thomas Friedel
d6b0dc454b improved triangulation so that empty triangles can get removed, which can happen with self-intersecting polygons 2018-02-12 10:32:38 +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
be6bd3a506 ignore more test files 2018-02-11 16:48:23 +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
91e8935866 added a generic function to initialize the correct shader for any fill operation 2018-02-09 11:35:32 +01:00
Thomas Friedel
3710a446b5 added image patterns 2018-02-09 11:21:27 +01:00
Thomas Friedel
bed6cdc50a radial gradient works now 2018-02-08 16:03:35 +01:00
Thomas Friedel
9c7a01b8b8 prepared radial gradients, but they don't work yet 2018-02-08 13:00:16 +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
7edac03910 added linear gradients 2018-02-07 12:53:46 +01:00
Thomas Friedel
49eb9de8e6 bugfix for alpha in hex color strings 2018-02-07 12:53:14 +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
d3dc4cc3b7 added a way to delete images; images are now also deleted automatically in the finalizer 2018-02-07 11:27:46 +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
56f9d04c91 added image data functions 2018-02-05 12:19:42 +01:00