moved border drawing to happen after 3D effect. Fixed aliasing issue with 3D effect, visible when borderWidth = 0.