Commit graph

60 commits

Author SHA1 Message Date
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
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
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
eadf67572c added some more transform methods 2018-02-05 11:53:15 +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