Patterned carbon dot-based thin films for solid-state devices.