Charge manipulation and fabrication of stable domain patterns in ferroelectric materials by scanning probe microscopy open up broad avenues for the development of tunable electronics. Harnessing the polarization energy and electrostatic forces with specific geometry of the system enables producing the nanoscale domains by-design. Along with that, domain engineering requires mastery of underlying physical mechanisms that govern the domain formation. Here, we present a theoretical description of the domain formation by a scanning probe microscopy tip in a ferroelectric film with strong in-plane anisotropy of polarization. We demonstrate that local charge injection produces wedge-shaped domains that propagate along the anisotropy axis, whereas the tip-written lines of charge generate a comb-like domain structure. The results of our calculations agree with earlier experimental observations and allow for the optimization of the targeted domain structures.