add canvas drawing state module