Added methods for rotating and inverting the pattern.