프로젝트

일반

사용자정보

개정판 91efe37a

ID91efe37a3e77ce6c2dcbf9b588a9731060346c4d
상위 bbccdd30
하위 077896be

백흠경이(가) 5년 이상 전에 추가함

issue #534: Add ItemRect property to all of controls

Change-Id: Id0d640b9fd9959615758b5e55b499f97d6f38dae

차이점 보기:

MarkupToPDF/Controls/Text/TextControl.cs
1140 1140
        }
1141 1141

  
1142 1142
        /// <summary>
1143
        /// Serialize this
1143
        /// return textcontrols' area
1144 1144
        /// </summary>
1145
        /// <param name="sUserId"></param>
1146
        /// <returns></returns>
1147
        public override string Serialize()
1145
        public override Rect ItemRect
1146
        {
1147
            get
1148
            {
1149
                Point start = new Point();
1150
                start.X = this.CanvasX;
1151
                start.Y = this.CanvasY;
1152

  
1153
                Point length = new Point();
1154
                double angle = this.Angle * Math.PI / 180;
1155

  
1156
                length.X = this.BoxWidth * Math.Cos(angle) - this.BoxHeight * Math.Sin(angle);
1157
                length.Y = this.BoxWidth * Math.Sin(angle) + this.BoxHeight * Math.Cos(angle);
1158

  
1159
                Point end = new Point(start.X + length.X, start.Y + length.Y);
1160
                return new Rect(start, end);
1161
            }
1162
        }
1163

  
1164
    /// <summary>
1165
    /// Serialize this
1166
    /// </summary>
1167
    /// <param name="sUserId"></param>
1168
    /// <returns></returns>
1169
    public override string Serialize()
1148 1170
        {
1149 1171
            using (S_TextControl STemp = new S_TextControl())
1150 1172
            {

내보내기 Unified diff

클립보드 이미지 추가 (최대 크기: 500 MB)