Caps and Join style don't work for image backend
It appears that MiterJoin doesn't do anything at all. From reading the source
code, if the Join style is not RoundJoin or BevelJoin, then the Joiner returned
is the RoundJoiner. Although in my case, RoundJoin doesn't seem to work either
(I always get a bevel).
Original issue reported on code.google.com by [email protected] on 27 Oct 2013 at 10:22
Actually cap styles don't seem to do anything either.
Original comment by [email protected] on 27 Oct 2013 at 10:34
I adapted the title as caps and join styles do work for the pdf backend.
Is there any update on this issue?
@llgcode What's needs to happen to fix this? I've been digging through the code to try to figure it out.
I don't quite understand why Stroke() in ftgc.go doesn't use AddStroke in the ft Rasterizer. There are a lot of abstractions going on.
Yes you found a limitation of AddStroke Rasterizer that don't implements cubic bezier curve, so this is implemented differently in draw2d. https://github.com/golang/freetype/blob/master/raster/stroke.go#L403 I could switch to freetype stroker if it implements cubic bezier curve *and *dasher. Or you could implement it in dr'aw2d stroker here : https://github.com/llgcode/draw2d/blob/master/draw2dbase/stroker.go#L72 Thanks for your help and sorry for the delay.
-- Laurent.
On 17 February 2016 at 21:41, Michael Fogleman [email protected] wrote:
@llgcode https://github.com/llgcode What's needs to happen to fix this? I've been digging through the code to try to figure it out.
I don't quite understand why Stroke() in ftgc.go doesn't use AddStroke in the ft Rasterizer. There are a lot of abstractions going on.
— Reply to this email directly or view it on GitHub https://github.com/llgcode/draw2d/issues/27#issuecomment-185394911.
@llgcode I ended up writing my own graphics package on top of golang/freetype/raster. It supports dashed lines and line caps / joins (and other stuff). Have a look:
https://github.com/fogleman/gg
great!!. Seems to be a serious alternative to draw2d. You've made a great Job. Your project seems to be popular yet in 8 days ! Your implementation seems to be cleaner. Can we share/use a same interface https://github.com/llgcode/draw2d/blob/master/gc.go?
-- Laurent.
On 25 February 2016 at 21:09, Michael Fogleman [email protected] wrote:
@llgcode https://github.com/llgcode I ended up writing my own graphics package on top of golang/freetype/raster. It supports dashed lines and line caps / joins (and other stuff). Have a look:
https://github.com/fogleman/gg
— Reply to this email directly or view it on GitHub https://github.com/llgcode/draw2d/issues/27#issuecomment-188958712.
Line cap can be drawn on every dash https://gist.github.com/llgcode/be814ce3a6df7a6f9f94
Nice!