Added id() function to graphical primitives