| 958 | } |
| 959 | |
| 960 | static float getPanningValueForText (String strText) |
| 961 | { |
| 962 | if (strText.compareIgnoreCase ("center") == 0 || strText.compareIgnoreCase ("c") == 0) |
| 963 | return 0.5f; |
| 964 | |
| 965 | strText = strText.trim(); |
| 966 | |
| 967 | if (strText.indexOfIgnoreCase ("%L") != -1) |
| 968 | { |
| 969 | auto percentage = (float) strText.substring (0, strText.indexOf ("%")).getDoubleValue(); |
| 970 | return (100.0f - percentage) / 100.0f * 0.5f; |
| 971 | } |
| 972 | |
| 973 | if (strText.indexOfIgnoreCase ("%R") != -1) |
| 974 | { |
| 975 | auto percentage = (float) strText.substring (0, strText.indexOf ("%")).getDoubleValue(); |
| 976 | return percentage / 100.0f * 0.5f + 0.5f; |
| 977 | } |
| 978 | |
| 979 | return 0.5f; |
| 980 | } |
| 981 | |
| 982 | //============================================================================== |
| 983 | struct DistortionProcessor |
no test coverage detected