matrixRectGetter method
RectGetter
matrixRectGetter(})
进行逻辑坐标系到矩阵坐标系转换
Implementation
RectGetter matrixRectGetter(int xIndex, int yIndex, {int? toXIndex, int? toYIndex, String? named, List<String> extras = const [], Size? sampleSortSize}){
// gameDebug('matrixRectGetter:x:$xIndex,y:$yIndex,toX:$toXIndex,toY:$toYIndex');
if(toXIndex != null || toYIndex != null){
return (Size size)=>matrixRectGetter(xIndex, yIndex, named: named, extras: extras, sampleSortSize: sampleSortSize)(size).expandToInclude(
matrixRectGetter(toXIndex ?? xIndex, toYIndex ?? yIndex, named: named, extras: extras, sampleSortSize: sampleSortSize)(size));
}
return (named != null ? namedMatrix(named: named, extras: extras, sampleSortSize: sampleSortSize) : matrix)[yIndex][xIndex];
}