Closed cciccole closed 3 years ago
Hi @cciccole, I think you may want to use save and restore method. In your case:
gc.Save()
// move the current affine transformation
gc.Translate(x, y)
Draw(gc)
gc.Restore()
// the context before is restored
// the current transformation is part of this context https://github.com/llgcode/draw2d/blob/b96d8208fcfc2e89752f31231b6ca7e31f9e2bb7/draw2dbase/stack_gc.go#L22
@llgcode I'm not sure if this is a feature request or simply something I don't know how to do.
I have a use case where I make many individual
GraphicContext
(gc) objects. I then want to arrange them into a figure.Ideally, I could just have a gc that represents the figure and then place the individual gc objects into it at the correct locations. Is it possible?