Commit graph

67 commits

Author SHA1 Message Date
Thomas Friedel
be6d1db04f fixed that restoring after calling clip didn't always restore properly 2018-10-27 15:02:17 +02:00
Thomas Friedel
091db17ac0 DrawImage can now take image.Image values; added error messages if the automatic image and font loading doesn't work 2018-10-06 18:20:20 +02:00
Thomas Friedel
b73d093683 implemented line dash offset 2018-09-18 15:17:04 +02:00
Thomas Friedel
3d82ce6998 completed the gl implementations 2018-09-18 15:00:50 +02:00
Thomas Friedel
34c01f47d4 added checks that LoadGL is called before anything else is done 2018-09-18 14:20:08 +02:00
Thomas Friedel
56995ff396 line dash is now only applied when calling stroke 2018-09-01 16:42:07 +02:00
Thomas Friedel
b6c22b9374 line dash bugfix, implemented getLineDash, added a test 2018-07-30 14:56:19 +02:00
Thomas Friedel
afad74f7b2 vary the gaussian shader kernel size depending on the blur radius for better performance 2018-07-27 15:58:38 +02:00
Thomas Friedel
f2225e857a implemented shadowBlur (wip) 2018-07-27 14:11:53 +02:00
Thomas Friedel
0cb030619e added a function to switch to an offscreen framebuffer 2018-07-24 12:50:18 +02:00
Thomas Friedel
aabe03b003 added support for miter limit 2018-07-19 18:05:41 +02:00
Thomas Friedel
5da544d78b performance optimization, avoid use of stencil buffer when drawing with opaque styles 2018-07-19 16:59:22 +02:00
Thomas Friedel
6b4af8f29f added support for shadows (not yet blurred) 2018-06-14 15:03:25 +02:00
Thomas Friedel
1cd53a4e6b added a SetBounds function to replace the SetSize function 2018-05-28 16:04:13 +02:00
Thomas Friedel
447d83e9f0 bugfix, gradient textures were still incorrectly set as 1D textures 2018-05-28 16:01:35 +02:00
Thomas Friedel
0efc4c6d59 line widths now work more like the html5 canvas 2018-05-17 16:24:46 +02:00
Thomas Friedel
50941d3075 clear stencil buffer on activate 2018-05-17 15:08:22 +02:00
Thomas Friedel
87fa8256eb added an iOS GL implementation and example 2018-05-15 18:49:35 +02:00
Thomas Friedel
62eb6793c7 updated doc 2018-05-08 20:58:34 +02:00
Thomas Friedel
baa8b6aed5 more docs 2018-04-30 16:34:50 +02:00
Thomas Friedel
5bd0ccce2e updated docs 2018-04-30 16:30:19 +02:00
Thomas Friedel
0489833474 implemented textAlign; unknown characters now act like a space 2018-04-19 17:02:28 +02:00
Thomas Friedel
e75355ac37 implemented globalAlpha 2018-04-09 17:39:26 +02:00
Thomas Friedel
3fcf95cc86 fixed cache bug 2018-04-05 20:13:17 +02:00
Thomas Friedel
ad16b6fee2 removed the name parameter from LoadFont 2018-04-04 17:27:04 +02:00
Thomas Friedel
db1797c19a the first loaded font is now used as the default font 2018-04-04 17:22:03 +02:00
Thomas Friedel
8502818b6f clipping with the rect function now uses scissor test instead of stencil 2018-04-04 17:10:36 +02:00
Thomas Friedel
d5a4c0b4bb use bit flags instead of booleans for more compact storage 2018-04-04 16:37:46 +02:00
Thomas Friedel
f0d9b83afb moved FillRect into paths.go 2018-04-04 16:15:54 +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
72a7cbd2ed renamed the W and H function; added documentation 2018-03-22 17:27:23 +01:00
Thomas Friedel
dfba64a1fd fixed some bugs from the float32->float64 conversion 2018-03-21 15:51:07 +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
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
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
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
9ed7a36cbc changed gl color from four floats to a struct type 2018-02-07 11:37:08 +01:00