// Create a new pattern paint from a scaled-down image filevariable tPatternputpatternwithimagefromfile"images/pattern.png" scaled by [0.5] into tPattern// Get the current transformvariable tTransformputthe transform of tPattern into tTransform// Modify the transform by rotationrotate tTransform by tDegrees// Set the pattern to the modified transformsetthe transform of tPattern to tTransform