OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) Research In Motion Limited 2010-2012. All rights reserved. | 2 * Copyright (C) Research In Motion Limited 2010-2012. All rights reserved. |
3 * | 3 * |
4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
8 * | 8 * |
9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
443 advanceToNextLogicalCharacter(logicalMetrics); | 443 advanceToNextLogicalCharacter(logicalMetrics); |
444 m_visualMetricsIterator.next(); | 444 m_visualMetricsIterator.next(); |
445 continue; | 445 continue; |
446 } | 446 } |
447 | 447 |
448 // Stop processing, if the next character lies behind the path. | 448 // Stop processing, if the next character lies behind the path. |
449 if (textPathOffset > m_textPathLength) | 449 if (textPathOffset > m_textPathLength) |
450 break; | 450 break; |
451 | 451 |
452 FloatPoint point; | 452 FloatPoint point; |
453 bool ok = m_textPathCalculator->pointAndNormalAtLength(textPathOffse
t, point, angle); | 453 m_textPathCalculator->pointAndNormalAtLength(textPathOffset, point,
angle); |
454 ASSERT_UNUSED(ok, ok); | |
455 x = point.x(); | 454 x = point.x(); |
456 y = point.y(); | 455 y = point.y(); |
457 | 456 |
458 // For vertical text on path, the actual angle has to be rotated 90
degrees anti-clockwise, not the orientation angle! | 457 // For vertical text on path, the actual angle has to be rotated 90
degrees anti-clockwise, not the orientation angle! |
459 if (m_isVerticalText) | 458 if (m_isVerticalText) |
460 angle -= 90; | 459 angle -= 90; |
461 } else { | 460 } else { |
462 // Apply all previously calculated shift values. | 461 // Apply all previously calculated shift values. |
463 if (m_isVerticalText) | 462 if (m_isVerticalText) |
464 x += baselineShift; | 463 x += baselineShift; |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
536 } | 535 } |
537 | 536 |
538 if (!didStartTextFragment) | 537 if (!didStartTextFragment) |
539 return; | 538 return; |
540 | 539 |
541 // Close last open fragment, if needed. | 540 // Close last open fragment, if needed. |
542 recordTextFragment(textBox); | 541 recordTextFragment(textBox); |
543 } | 542 } |
544 | 543 |
545 } | 544 } |
OLD | NEW |