142143144145146147148149150151152
flipH = false; flipV = false; } // Saves the global state for each cell canvas.save(); // Adds rotation and horizontal/vertical flipping rotation = rotation % 360; if (rotation != 0 || flipH || flipV)