The xor button facilitates inverting the polarity of layers, and is available only in physical mode. The operation is similar to the box command, however all previously existing boxes, polygons, and wires on the same layer which overlap the created box become holes in the new box. Only boxes, polygons, and wires are inverted, other structures are covered. When a wire is partially xor'ed, the part of the wire outside of the xor region becomes a polygon. The !layer command can also be used to invert layer polarity, and is recommended when an entire cell is to be inverted.
While the command is active in physical mode, the cursor will snap to horizontal or vertical edges of existing objects in the layout if the edge is on-grid, when within two pixels. When snapped, a small dotted highlight box is displayed. This makes it much easier to create abutting objects when the grid snap spacing is very fine compared with the display scaling. This feature can be disabled by setting the NoSnapToEdges variable.