/* 文件名:Canvas.nut 路径:UI/ObjectClass/Canvas.nut 创建日期:2025-10-24 22:00 文件用途:画布类 */ class Canvas extends Actor { function _typeof() { return "Canvas"; } constructor(Width, Height) { C_Object = sq_CreateCanvas(Width, Height); sq_RegisterDestruction(C_Object, this); } function DrawImg(Img, Index, X, Y) { sq_Canvas_DrawImg(C_Object, Img, Index, {x = X, y = Y}); } function DrawImgRect(Img, Index, X, Y, Width, Height) { sq_Canvas_DrawImgRect(C_Object, Img, Index, {x = X, y = Y,w = Width, h = Height}); } }