# File lib/gd2/canvas.rb, line 273
    def affine_transform(a, b, c, d, tx, ty)
      old_matrix = @transformation_matrix
      begin
        @transformation_matrix = Matrix[[a, b, 0], [c, d, 0], [tx, ty, 1]] *
          @transformation_matrix
        yield
      ensure
        @transformation_matrix = old_matrix
      end
    end