Closed aimerneige closed 2 years ago
Hello! I am trying to generate a flipped SVG file for the black player.
I write code like this:
board := pos.Board() if pos.Turn() == chess.Black { board = board.Flip(chess.UpDown).Flip(chess.LeftRight) } if err := image.SVG(f, board); err != nil { log.Fatal(err) }
But I got this, where the a1 should be at the left top
What should I do to generate a correct SVG file? Or is this a bug?
Thanks for the visualization. Yeah chess/image will likely need to be updated to support "from black" view. Flipping flips the pieces, not the board.
Fixed in #109
Hello! I am trying to generate a flipped SVG file for the black player.
I write code like this:
But I got this, where the a1 should be at the left top
What should I do to generate a correct SVG file? Or is this a bug?