移植xCairo，基于xC和XClib
cairo base on xC and xClib.
INT_MAX/MIN modify to XINT32_MAX/MIN.
NULL modify to XNULL.