개정판 b79d6e7f
Fix: ArrowTextControl, TextControl에 ArcLength 적용
Change-Id: I02e837c6e9e97fc48008ee3753012f8025414ffb
MarkupToPDF/Controls/Text/TextControl.cs | ||
---|---|---|
17 | 17 |
|
18 | 18 |
namespace MarkupToPDF.Controls.Text |
19 | 19 |
{ |
20 |
public class TextControl : CommentUserInfo, IDisposable, INotifyPropertyChanged, IPath, ITextControl, IMarkupControlData
|
|
20 |
public class TextControl : CommentUserInfo, IDisposable, INotifyPropertyChanged, ITextControl, IMarkupControlData |
|
21 | 21 |
{ |
22 | 22 |
public event PropertyChangedEventHandler PropertyChanged; |
23 | 23 |
|
... | ... | |
91 | 91 |
LineSize = item.LineSize; |
92 | 92 |
TextSize = item.TextSize; |
93 | 93 |
StrokeColor = item.StrokeColor; |
94 |
ArcLength = item.ArcLength; |
|
94 | 95 |
FontSize = item.FontSize; |
95 | 96 |
UserID = item.UserID; |
96 | 97 |
IsHighLight = item.IsHighLight; |
... | ... | |
726 | 727 |
} |
727 | 728 |
} |
728 | 729 |
|
729 |
|
|
730 |
|
|
731 | 730 |
public Double TextSize |
732 | 731 |
{ |
733 | 732 |
get { return (Double)GetValue(TextSizeProperty); } |
... | ... | |
1208 | 1207 |
|
1209 | 1208 |
Point length = new Point(); |
1210 | 1209 |
double angle = this.CommentAngle * Math.PI / 180; |
1210 |
double sin = Math.Sin(angle); |
|
1211 |
double cos = Math.Cos(angle); |
|
1211 | 1212 |
|
1212 |
length.X = this.BoxWidth * Math.Cos(angle) - this.BoxHeight * Math.Sin(angle);
|
|
1213 |
length.Y = this.BoxWidth * Math.Sin(angle) + this.BoxHeight * Math.Cos(angle);
|
|
1213 |
length.X = this.BoxWidth * cos - this.BoxHeight * sin;
|
|
1214 |
length.Y = this.BoxWidth * sin + this.BoxHeight * cos;
|
|
1214 | 1215 |
|
1215 | 1216 |
Point end = new Point(start.X + length.X, start.Y + length.Y); |
1216 | 1217 |
return new Rect(start, end); |
... | ... | |
1231 | 1232 |
|
1232 | 1233 |
this.SetValue(TextControl.CanvasXProperty, Canvas.GetLeft(this) + dx); |
1233 | 1234 |
this.SetValue(TextControl.CanvasYProperty, Canvas.GetTop(this) + dy); |
1234 |
|
|
1235 |
|
|
1236 |
|
|
1237 |
|
|
1238 |
//Canvas.SetLeft(this, Canvas.GetLeft(this) + dx); |
|
1239 |
//Canvas.SetTop(this, Canvas.GetTop(this) + dy); |
|
1240 | 1235 |
} |
1241 | 1236 |
|
1242 | 1237 |
/// <summary> |
내보내기 Unified diff