* sync #5447 - fixed graphics square cap * sync #6474 - support graphics antialiasing * sync #5168 * revert unused code