func (c Canvas) selectionUnusedTilePositions(startTS tileSelection, endC, endR int) []tile.Position {
	if endR < 0 || c.draw.numRows <= endR {
		return nil
	}
	tilePositions := make([]tile.Position, 0, len(c.selection.tiles))
	y := tile.Y(endR)
	for _, ts := range c.selection.tiles {
		deltaIdx := ts.index - startTS.index
		col := endC + deltaIdx
		switch {
		case col < 0, c.draw.numCols <= col:
			return nil
		}
		tilePositions = append(tilePositions, tile.Position{
			Tile: ts.tile,
			X:    tile.X(col),
			Y:    y,
		})
	}
	return tilePositions
}
// selectionUsedTilePositions computes the unused tile positions of the selection.
selectionUsedTilePositions computes the unused tile positions of the selection.
// selectionUsedTilePositions computes the unused tile positions of the selection .
func (c Canvas) selectionUnusedTilePositions(startTS tileSelection, endC, endR int) []tile.Position {
	if endR < 0 || c.draw.numRows <= endR {
		return nil
	}
	tilePositions := make([]tile.Position, 0, len(c.selection.tiles))
	y := tile.Y(endR)
	for _, ts := range c.selection.tiles {
		deltaIdx := ts.index - startTS.index
		col := endC + deltaIdx
		switch {
		case col < 0, c.draw.numCols <= col:
			return nil
		}
		tilePositions = append(tilePositions, tile.Position{
			Tile: ts.tile,
			X:    tile.X(col),
			Y:    y,
		})
	}
	return tilePositions
}
func ( c Canvas ) selectionUnusedTilePositions ( startTS tileSelection , endC , endR int ) [ ] tile . Position { if endR < 0 || c . draw . numRows <= endR { return nil } tilePositions := make ( [ ] tile . Position , 0 , len ( c . selection . tiles ) ) y := tile . Y ( endR ) for _ , ts := range c . selection . tiles { deltaIdx := ts . index - startTS . index col := endC + deltaIdx switch { case col < 0 , c . draw . numCols <= col : return nil } tilePositions = append ( tilePositions , tile . Position { Tile : ts . tile , X : tile . X ( col ) , Y : y , } ) } return tilePositions }
selectionUsedTilePositions computes the unused tile positions of the selection.
selectionUsedTilePositions computes the unused tile positions of the selection .