graphic: update makefile
graphic: refactor code, merge files, rename import name
graphic: use dlib/logger
graphic: add doc comments