2011-02-25 4 views

답변

5

당신의 GraphicsPath더 큰, 개인적으로는 그래픽 변환을 사용하는 것이 표시하기 :

using (Graphics graphics = /* ... */) 
{ 
    var matrix = new Matrix(); 
    matrix.Translate(/* ... */); // put the mid-point of the figure here 
    matrix.Scale(1.5f, 1.5f);  // makes it 50% bigger 
    matrix.Translate(/* ... */); // put the same mid-point here, but negative 
    graphics.Transform = matrix; 
    graphics.FillPath(/* ... */); // or DrawPath 

    // Use this to reset the transform if you still need the Graphics object 
    graphics.Transform = new Matrix(); 
} 
+1

덧붙여서 GraphicsPath의 바운딩 직사각형 중간 점을 사용하여 중간 점의 근사를 얻을 수 있습니다. –

1

글쎄, GraphicsPath.Widen이 있지만, 정확히 Rectangle.Inflate과 같지 않습니다.

기본적으로, 지정된 펜을 사용하여 GraphicsPath개요을 그립니다, 그리고 당신에게 이렇게 그려진 영역을 나타내는 GraphicsPath를 반환합니다.

확대 된 그림을 화면에 그리려면, 먼저 "확장 된"경로 다음에 원래의 "채우기"경로를 모두 그릴 수 있습니다. 당신이 나타내는 그림을 원한다면하지만 다시, 당신은 단지 같은 펜을 사용하여 원래 경로의 윤곽을 그릴 수 ...

관련 문제