개정판 10df01b4
issue #937: Final시 텍스트가 잘리는 현상 수정
Change-Id: I51be12df2188d7ec9a2df0854a3123c294bd06bc
MarkupToPDF/Controls/Text/TextControl.cs | ||
---|---|---|
297 | 297 |
{ |
298 | 298 |
this.ApplyTemplate(); |
299 | 299 |
|
300 |
//pathGeometry = new PathGeometry(); |
|
301 |
|
|
302 | 300 |
List<Point> pCloud = new List<Point> |
303 | 301 |
{ |
304 |
//new Point(0, 0), |
|
305 |
//new Point(0, 0 + BoxHeight + 2), |
|
306 |
//new Point(0 + BoxWidth + 4, 0 + BoxHeight + 2), |
|
307 |
//new Point(0 + BoxWidth + 4 ,0), |
|
308 |
//new Point(0, 0) |
|
309 |
|
|
310 | 302 |
new Point(0, 0), |
311 | 303 |
new Point(0, 0 + BoxHeight + 0), |
312 | 304 |
new Point(0 + BoxWidth + 2, 0 + BoxHeight + 0), |
313 | 305 |
new Point(0 + BoxWidth + 2 ,0), |
314 |
new Point(0, 0) |
|
315 | 306 |
}; |
316 | 307 |
|
317 | 308 |
if (Base_TextPath != null) |
... | ... | |
327 | 318 |
case 1: |
328 | 319 |
{ |
329 | 320 |
PathData = (Generate_Rect(pCloud)); |
330 |
|
|
331 | 321 |
List<Point> pCloud2 = new List<Point> |
332 | 322 |
{ |
333 |
//new Point(0, 0), |
|
334 |
//new Point(0, 0 + BoxHeight + 2), |
|
335 |
//new Point(0 + BoxWidth + 4, 0 + BoxHeight + 2), |
|
336 |
//new Point(0 + BoxWidth + 4 ,0), |
|
337 |
//new Point(0, 0) |
|
338 |
|
|
339 | 323 |
new Point(0, 0), |
340 | 324 |
new Point(0, 0 + BoxHeight + 0), |
341 | 325 |
new Point(0 + BoxWidth + 10, 0 + BoxHeight + 0), |
342 | 326 |
new Point(0 + BoxWidth + 10 ,0), |
343 |
new Point(0, 0) |
|
344 | 327 |
}; |
345 |
|
|
346 | 328 |
PathDataInner = (GenerateInner(pCloud)); |
347 | 329 |
} |
348 | 330 |
break; |
... | ... | |
373 | 355 |
#region Drawing Cloud Method |
374 | 356 |
public static PathGeometry Generate_Rect(List<Point> pData) |
375 | 357 |
{ |
376 |
//this.StartPoint; |
|
377 |
|
|
378 | 358 |
PathFigure pathFigure = new PathFigure(); |
379 | 359 |
pathFigure.StartPoint = pData[0]; |
380 | 360 |
|
381 |
LineSegment lineSegment0 = new LineSegment(); |
|
382 |
lineSegment0.Point = pData[0]; |
|
383 |
pathFigure.Segments.Add(lineSegment0); |
|
384 |
|
|
385 |
LineSegment lineSegment1 = new LineSegment(); |
|
386 |
lineSegment1.Point = pData[1]; |
|
387 |
pathFigure.Segments.Add(lineSegment1); |
|
388 |
|
|
389 |
LineSegment lineSegment2 = new LineSegment(); |
|
390 |
lineSegment2.Point = pData[2]; |
|
391 |
pathFigure.Segments.Add(lineSegment2); |
|
392 |
|
|
393 |
LineSegment lineSegment3 = new LineSegment(); |
|
394 |
lineSegment3.Point = pData[3]; |
|
395 |
pathFigure.Segments.Add(lineSegment3); |
|
361 |
PolyLineSegment polyline = new PolyLineSegment(pData, true); |
|
362 |
pathFigure.Segments.Add(polyline); |
|
396 | 363 |
|
397 | 364 |
PathGeometry rectPathGeometry = new PathGeometry(); |
398 | 365 |
rectPathGeometry.Figures = new PathFigureCollection(); |
... | ... | |
410 | 377 |
double area = MathSet.AreaOf(pData); |
411 | 378 |
bool reverse = (area > 0); |
412 | 379 |
int count = pData.Count; |
413 |
for (int i = 0; i < (count - 1); i++)
|
|
380 |
for (int i = 0; i < count; i++)
|
|
414 | 381 |
{ |
415 |
PathFigure pathFigure = GenerateLineWithCloud(pData[i], pData[i + 1], 20, reverse);
|
|
382 |
PathFigure pathFigure = GenerateLineWithCloud(pData[i%count], pData[(i + 1)%count], 20, reverse);
|
|
416 | 383 |
pathFigure.IsClosed = false; |
417 | 384 |
pathFigure.IsFilled = true; |
418 | 385 |
_pathGeometry.Figures.Add(pathFigure); |
419 | 386 |
} |
420 | 387 |
|
421 |
// PathFigure pathFigur2= new PathFigure(); |
|
422 |
//pathFigur2.StartPoint = pData[0]; |
|
423 |
|
|
424 |
// LineSegment lineSegment0 = new LineSegment(); |
|
425 |
// lineSegment0.Point = pData[0]; |
|
426 |
//pathFigur2.Segments.Add(lineSegment0); |
|
427 |
|
|
428 |
// LineSegment lineSegment1 = new LineSegment(); |
|
429 |
// lineSegment1.Point = pData[1]; |
|
430 |
//pathFigur2.Segments.Add(lineSegment1); |
|
431 |
|
|
432 |
// LineSegment lineSegment2 = new LineSegment(); |
|
433 |
// lineSegment2.Point = pData[2]; |
|
434 |
//pathFigur2.Segments.Add(lineSegment2); |
|
435 |
|
|
436 |
// LineSegment lineSegment3 = new LineSegment(); |
|
437 |
// lineSegment3.Point = pData[3]; |
|
438 |
//pathFigur2.Segments.Add(lineSegment3); |
|
439 |
|
|
440 |
|
|
441 |
//pathFigur2.IsClosed = true; |
|
442 |
//pathFigur2.IsFilled = true; |
|
443 |
//_pathGeometry.Figures.Add(pathFigur2); |
|
444 |
|
|
445 | 388 |
return _pathGeometry; |
446 | 389 |
} |
447 | 390 |
|
... | ... | |
456 | 399 |
PathFigure pathFigur2 = new PathFigure(); |
457 | 400 |
pathFigur2.StartPoint = pData[0]; |
458 | 401 |
|
459 |
LineSegment lineSegment0 = new LineSegment(); |
|
460 |
lineSegment0.Point = pData[0]; |
|
461 |
pathFigur2.Segments.Add(lineSegment0); |
|
462 |
|
|
463 |
LineSegment lineSegment1 = new LineSegment(); |
|
464 |
lineSegment1.Point = pData[1]; |
|
465 |
pathFigur2.Segments.Add(lineSegment1); |
|
466 |
|
|
467 |
LineSegment lineSegment2 = new LineSegment(); |
|
468 |
lineSegment2.Point = pData[2]; |
|
469 |
pathFigur2.Segments.Add(lineSegment2); |
|
470 |
|
|
471 |
LineSegment lineSegment3 = new LineSegment(); |
|
472 |
lineSegment3.Point = pData[3]; |
|
473 |
pathFigur2.Segments.Add(lineSegment3); |
|
474 |
|
|
402 |
PolyLineSegment polyline = new PolyLineSegment(pData, true); |
|
403 |
pathFigur2.Segments.Add(polyline); |
|
475 | 404 |
|
476 | 405 |
pathFigur2.IsClosed = true; |
477 | 406 |
pathFigur2.IsFilled = true; |
... | ... | |
480 | 409 |
return _pathGeometry; |
481 | 410 |
} |
482 | 411 |
|
483 |
|
|
484 |
|
|
485 | 412 |
public static PathFigure GenerateLineWithCloud(Point p1, Point p2, double _arcLength, bool reverse) |
486 | 413 |
{ |
487 | 414 |
PathFigure pathFigure = new PathFigure(); |
내보내기 Unified diff