개정판 7ad417d8
issue #000: TextControl - Thickness 적용, view setting 값 그대로 적용
Change-Id: Ic75e25bf8dad1961e94b305faf3de8cdfcd936e9
KCOM/Views/MainMenu.xaml.cs | ||
---|---|---|
4125 | 4125 |
{ |
4126 | 4126 |
System.Diagnostics.Debug.WriteLine(ex.ToString()); |
4127 | 4127 |
} |
4128 |
|
|
4128 |
(currentControl as ArrowTextControl).ArcLength = ViewerDataModel.Instance.ArcLength; |
|
4129 | 4129 |
(currentControl as ArrowTextControl).Base_TextBox.IsHitTestVisible = false; |
4130 | 4130 |
(currentControl as ArrowTextControl).EnableEditing = false; |
4131 | 4131 |
(currentControl as ArrowTextControl).IsNew = false; |
... | ... | |
4374 | 4374 |
(currentControl as ArrowTextControl).SetFontFamily((this.ParentOfType<MainWindow>().dzTopMenu.comboFontFamily.SelectedValue as Markus.Fonts.MarkusFont).FontFamily); |
4375 | 4375 |
//20180903 LJY 회전된 방향으로 화면에 출력되지 않는 문제 수정 |
4376 | 4376 |
(currentControl as ArrowTextControl).CommentAngle -= rotate.Angle; |
4377 |
|
|
4377 |
(currentControl as ArrowTextControl).ArcLength = ViewerDataModel.Instance.ArcLength; |
|
4378 | 4378 |
(currentControl as ArrowTextControl).ApplyTemplate(); |
4379 | 4379 |
(currentControl as ArrowTextControl).Base_TextBox.Focus(); |
4380 | 4380 |
ViewerDataModel.Instance.SetAngleVisible(Visibility.Visible); |
... | ... | |
4425 | 4425 |
|
4426 | 4426 |
//20180903 LJY 회전된 방향으로 화면에 출력되지 않는 문제 수정 |
4427 | 4427 |
(currentControl as ArrowTextControl).CommentAngle -= rotate.Angle; |
4428 |
(currentControl as ArrowTextControl).ArcLength = ViewerDataModel.Instance.ArcLength; |
|
4428 | 4429 |
(currentControl as ArrowTextControl).SetFontFamily(this.ParentOfType<MainWindow>().dzTopMenu.GetFontFamily().FontFamily); |
4429 | 4430 |
(currentControl as ArrowTextControl).ApplyTemplate(); |
4430 | 4431 |
(currentControl as ArrowTextControl).Base_TextBox.Focus(); |
MarkupToPDF/Controls/Text/ArrowTextControl.cs | ||
---|---|---|
1490 | 1490 |
{ |
1491 | 1491 |
//20180906 LJY Textbox guide |
1492 | 1492 |
string angle = Math.Abs(this.PageAngle).ToString(); |
1493 |
//방지 |
|
1494 |
if (this.ArcLength == 0) this.ArcLength = 10; |
|
1493 | 1495 |
if (angle == "180") |
1494 | 1496 |
{ |
1495 | 1497 |
List<Point> pCloud = new List<Point>() |
... | ... | |
1520 | 1522 |
new Point(Canvas.GetLeft(Base_TextBox), Canvas.GetTop(Base_TextBox)), //위 |
1521 | 1523 |
|
1522 | 1524 |
#else |
1523 |
new Point(Canvas.GetLeft(Base_TextBox), Canvas.GetTop(Base_TextBox)), //위
|
|
1524 |
new Point(Canvas.GetLeft(Base_TextBox), Canvas.GetTop(Base_TextBox)+ BoxHeight), //왼쪽 아래
|
|
1525 |
new Point(Canvas.GetLeft(Base_TextBox)+ boxWidth, Canvas.GetTop(Base_TextBox) + BoxHeight),
|
|
1526 |
new Point(Canvas.GetLeft(Base_TextBox) + boxWidth, Canvas.GetTop(Base_TextBox)),
|
|
1527 |
new Point(Canvas.GetLeft(Base_TextBox), Canvas.GetTop(Base_TextBox)), //위
|
|
1525 |
new Point(Canvas.GetLeft(Base_TextBox)-(this.LineSize ), Canvas.GetTop(Base_TextBox) -(this.LineSize)), //위
|
|
1526 |
new Point(Canvas.GetLeft(Base_TextBox)-(this.LineSize ), Canvas.GetTop(Base_TextBox)+ BoxHeight+(this.LineSize)), //왼쪽 아래
|
|
1527 |
new Point(Canvas.GetLeft(Base_TextBox)+ boxWidth+(this.LineSize ), Canvas.GetTop(Base_TextBox) + BoxHeight+(this.LineSize)),
|
|
1528 |
new Point(Canvas.GetLeft(Base_TextBox) + boxWidth+(this.LineSize ), Canvas.GetTop(Base_TextBox)-(this.LineSize)),
|
|
1529 |
new Point(Canvas.GetLeft(Base_TextBox)-(this.LineSize), Canvas.GetTop(Base_TextBox)-(this.LineSize)), //위
|
|
1528 | 1530 |
|
1529 | 1531 |
//new Point(Canvas.GetLeft(Base_TextBox), Canvas.GetTop(Base_TextBox)), //위 |
1530 | 1532 |
//new Point(Canvas.GetLeft(Base_TextBox), Canvas.GetTop(Base_TextBox)+ BoxHeight-4), //왼쪽 아래 |
... | ... | |
1931 | 1933 |
///Memo 추가 |
1932 | 1934 |
STemp.Memo = this.Memo; |
1933 | 1935 |
STemp.BorderSize = this.BorderSize; |
1936 |
STemp.ArcLength = this.ArcLength; |
|
1934 | 1937 |
return "|DZ|" + JsonSerializerHelper.CompressString((STemp.JsonSerialize())); |
1935 | 1938 |
}; |
1936 | 1939 |
} |
... | ... | |
1981 | 1984 |
instance.TextStyle = StringToFont.ConFontStyle(s.fontConfig[1]); |
1982 | 1985 |
instance.TextWeight = StringToFont.ConFontWeight(s.fontConfig[2]); |
1983 | 1986 |
instance.TextSize = Convert.ToDouble(s.fontConfig[3]); |
1984 |
|
|
1987 |
instance.ArcLength = s.ArcLength; |
|
1985 | 1988 |
if (s.fontConfig.Count() == 5) |
1986 | 1989 |
{ |
1987 | 1990 |
instance.UnderLine = TextDecorations.Underline; |
MarkupToPDF/Controls/Text/TextControl.cs | ||
---|---|---|
142 | 142 |
this.Base_TextBox.LostFocus += new RoutedEventHandler(Base_TextBox_LostFocus); |
143 | 143 |
this.Base_TextBox.SelectionChanged += (sender, e) => MoveCustomCaret(); |
144 | 144 |
|
145 |
if (Base_TextPath != null) |
|
146 |
{ |
|
147 |
Base_TextPath.StrokeThickness = LineSize.Left; |
|
148 |
} |
|
149 |
|
|
150 |
//if (string.IsNullOrEmpty(this.Base_TextBox.Text)) |
|
151 |
//{ |
|
152 |
// Base_TextPath.StrokeThickness = 20; |
|
153 |
// LineSize = new Thickness(20, 20, 20, 20); |
|
154 |
// //if (Base_TextPath != null) |
|
155 |
// //{ |
|
156 |
// // Base_TextPath.StrokeThickness = LineSize.Left; |
|
157 |
// //} |
|
158 |
//} |
|
159 |
//else |
|
160 |
//{ |
|
161 |
// Base_TextPath.StrokeThickness = LineSize.Left; |
|
162 |
//} |
|
163 |
|
|
164 | 145 |
SetText(); |
165 | 146 |
DrawingCloud(); |
166 | 147 |
} |
... | ... | |
328 | 309 |
this.BackColor = new SolidColorBrush(Color.FromArgb(Convert.ToByte(255 * 0.1), |
329 | 310 |
Colors.White.R, Colors.White.G, Colors.White.B)); |
330 | 311 |
} |
331 |
//if (Base_TextPath != null) |
|
332 |
//{ |
|
333 |
// Base_TextPath.StrokeThickness = LineSize.Left; |
|
334 |
//} |
|
312 |
|
|
313 |
if (Base_TextPath != null) |
|
314 |
{ |
|
315 |
Base_TextPath.StrokeThickness = LineSize.Left; |
|
316 |
} |
|
317 |
|
|
335 | 318 |
} |
336 | 319 |
|
337 | 320 |
public void DrawingCloud() |
... | ... | |
365 | 348 |
{ |
366 | 349 |
List<Point> pCloud2 = new List<Point> |
367 | 350 |
{ |
368 |
new Point(-LineSize.Left* 2 , -LineSize.Left* 2 ),
|
|
369 |
new Point(-LineSize.Left* 2 , BoxHeight + LineSize.Left * 2 ),
|
|
370 |
new Point(BoxWidth + LineSize.Left* 2 , BoxHeight + LineSize.Left * 2 ),
|
|
371 |
new Point(BoxWidth + LineSize.Left* 2 ,-LineSize.Left* 2 )
|
|
351 |
new Point(-LineSize.Left , -LineSize.Left ),
|
|
352 |
new Point(-LineSize.Left , BoxHeight + LineSize.Left ),
|
|
353 |
new Point(BoxWidth + LineSize.Left , BoxHeight + LineSize.Left ),
|
|
354 |
new Point(BoxWidth + LineSize.Left ,-LineSize.Left)
|
|
372 | 355 |
}; |
373 |
PathData = (Generate(pCloud, this.ArcLength, this.LineSize.Left)); |
|
356 |
PathData = (Generate(pCloud2, this.ArcLength, this.LineSize.Left));
|
|
374 | 357 |
PathDataInner = (GenerateInner(pCloud)); |
375 | 358 |
} |
376 | 359 |
break; |
MarkupToPDF/Serialize/S_Control/Detail/S_TextControl.cs | ||
---|---|---|
75 | 75 |
public string SizeSet { get; set; } // "LineSize|" |
76 | 76 |
[DataMember] |
77 | 77 |
public List<String> fontConfig { get; set; } // Style , Familly , Weight, Decoration |
78 |
|
|
78 |
public double ArcLength { get; set; } // 호의 높이 |
|
79 | 79 |
public void Dispose() |
80 | 80 |
{ |
81 | 81 |
//GC.Collect(0, GCCollectionMode.Forced); |
내보내기 Unified diff