첨부 실행 코드는 나눔고딕코딩 폰트를 사용합니다.
728x90
반응형
728x170
using System.Windows;

#region 확대/축소하기 - Scale(sourcePoint, scaleX, scaleY, centerX, centerY)

/// <summary>
/// 확대/축소하기
/// </summary>
/// <param name="sourcePoint">소스 포인트</param>
/// <param name="scaleX">스케일 X</param>
/// <param name="scaleY">스케일 Y</param>
/// <param name="centerX">중심 X</param>
/// <param name="centerY">중심 Y</param>
/// <returns>확대/축소 포인트</returns>
public Point Scale(Point sourcePoint, double scaleX, double scaleY, double centerX, double centerY)
{
    double targetX = scaleX * (sourcePoint.X - centerX) + centerX;
    double targetY = scaleY * (sourcePoint.Y - centerY) + centerY;

    return new Point(targetX, targetY);
}

#endregion
728x90
반응형
그리드형(광고전용)
Posted by icodebroker

댓글을 달아 주세요