Is it legal to cross a street diagonally?

I have seen some intersections where diagonal crosswalks have been painted in intersections. But they are fairly rare.