An electro-optic device based on field-controlled anchoring of nematic liquid crystal