llgcode/draw2d

Scale/Rotate transformations with graphics context for pdf files

Handzo opened this issue · 1 comments

Hello, scale and rotate transformations does not work. What am I doing wrong?
Outputs graphics context without rotate and scale transformations.

	dest := draw2dpdf.NewPdf("P", "mm", "A4")
	gc := draw2dpdf.NewGraphicContext(dest)
        
        ...

	dest.TransformBegin()
	gc.Rotate(math.Pi/4)
	gc.Scale(2, 2)
	dest.TransformEnd()

	if err := draw2dpdf.SaveToPdfFile("hello.pdf", dest); err != nil {
		panic(err)
	}

Hi,
https://github.com/llgcode/draw2d/wiki/Samples#test-transform
Don't use TransformBegin and TranformEnd, rotate translate or transform before drawing something not after