The drawing of legislative district boundary lines to obtain partisan or factional advantage. A district is said to be gerrymandered when its shape is manipulated by the dominant party in the state legislature to maximize electoral strength at the expense of the minority party.