import type { Node } from '../main'; import type { Texture2D } from '../resources'; import type { Element2DProperties } from './element'; import { Transform2D } from 'modern-path2d'; import { Element2D } from './element'; /** 纹理子区域(图集 sub-rect),单位为纹理像素。设置后只绘制该矩形区域,用于精灵图集 / 骨骼插槽。 */ export interface TextureRect2DRegion { x: number; y: number; width: number; height: number; } export interface TextureRect2DProperties extends Element2DProperties { /** 纹理子区域(像素)。省略则绘制整张纹理。 */ region?: TextureRect2DRegion; } export declare class TextureRect2D extends Element2D { texture?: T; /** 纹理子区域(像素)。省略则绘制整张纹理。 */ region?: TextureRect2DRegion; constructor(properties?: Partial, children?: Node[]); /** 把节点显示尺寸坐标(0..size)映射到纹理 UV(0..1)的变换;有 region 时映射到子矩形。 */ protected _uvTransform(): Transform2D; protected _drawContent(): void; }