public static CodePiece CombineVertical(CodePiece top, CodePiece bottom) { CodePiece cT = top.Copy(); CodePiece cB = bottom.Copy(); cT.NormalizeY(); cB.NormalizeY(); cT.AppendBottom(cB); return(cT); }
private void AppendTopDirect(CodePiece top) { top.NormalizeY(); int offset = MinY - top.MaxY; for (int x = top.MinX; x < top.MaxX; x++) { for (int y = top.MinY; y < top.MaxY; y++) { this[x, offset + y] = top[x, y]; } } }
private void AppendBottomDirect(CodePiece bot) { bot.NormalizeY(); int offset = MaxY; for (int x = bot.MinX; x < bot.MaxX; x++) { for (int y = bot.MinY; y < bot.MaxY; y++) { this[x, offset + y] = bot[x, y]; } } }