import store from '../store'

export default ({ position, scale = [1, 1], angle = 0, children }) => {
	const ctx = store.ctx

	ctx.save()
	ctx.scale(scale[0], scale[1])
	ctx.translate(position.x, position.y)
	ctx.rotate(angle)
	children()
	ctx.restore()
}
