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

#region 기울이기 - Skew(sourcePoint, angleX, angleY, centerX, centerY)

/// <summary>
/// 기울이기
/// </summary>
/// <param name="sourcePoint">소스 포인트</param>
/// <param name="angleX">각도 X</param>
/// <param name="angleY">각도 Y</param>
/// <param name="centerX">중심 X</param>
/// <param name="centerY">중심 Y</param>
/// <returns>기울이기 포인트</returns>
public Point Skew(Point sourcePoint, double angleX, double angleY, double centerX, double centerY)
{
    double targetX = sourcePoint.X + Math.Tan(angleX * (Math.PI / 180d)) * (sourcePoint.Y - centerX);
    double targetY = sourcePoint.Y + Math.Tan(angleY * (Math.PI / 180d)) * (sourcePoint.X - centerY);

    return new Point(targetX, targetY);
}

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

댓글을 달아 주세요