void Table::RectLines(int zoom, Draw& w, int x, int y, int i, const Vector<Line>& line, Vector<ValueRect>& vr) const { for(int j = line.GetCount() - 1; j >= 0; j--) { y -= line[j].height; RectLine(zoom, w, x, y, i + j, line[j], vr); } }
void FPaperExtractSpritesViewportClient::DrawRectangle(FCanvas* Canvas, const FLinearColor& Color, const FIntRect& Rect) { FVector2D TopLeft(-ZoomPos.X * ZoomAmount + Rect.Min.X * ZoomAmount, -ZoomPos.Y * ZoomAmount + Rect.Min.Y * ZoomAmount); FVector2D BottomRight(-ZoomPos.X * ZoomAmount + Rect.Max.X * ZoomAmount, -ZoomPos.Y * ZoomAmount + Rect.Max.Y * ZoomAmount); FVector2D RectVertices[4]; RectVertices[0] = FVector2D(TopLeft.X, TopLeft.Y); RectVertices[1] = FVector2D(BottomRight.X, TopLeft.Y); RectVertices[2] = FVector2D(BottomRight.X, BottomRight.Y); RectVertices[3] = FVector2D(TopLeft.X, BottomRight.Y); for (int32 RectVertexIndex = 0; RectVertexIndex < 4; ++RectVertexIndex) { const int32 NextVertexIndex = (RectVertexIndex + 1) % 4; FCanvasLineItem RectLine(RectVertices[RectVertexIndex], RectVertices[NextVertexIndex]); RectLine.SetColor(Color); Canvas->DrawItem(RectLine); } }