Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do unit transform on path elements before DP scale/bias
This is a big commit. It fixes an issue with DP scale/biasing a value that also undergoes temperature unit conversion (non-zero bias!). Prior to this commit, the unit scale and bias were applied via the painter transform. That's not possible for Celsius to Farenheit if DP scaling/biasing. This commit moves the unit transform so that it applies the unit conversion first to the painter path elements and then, later, the DP scale/bias transform is done in the painter transform. Here is an example: let temperature = 100C If DP scales by 2.0 and biases by 10 and sets unit to F: 2*((9/5)*100C + 32) + 10 = 2*212+32 = 434 or y = (9/5)*100C+32 // Unit transform y = 2*y+10 // DP scale y = 2*212+10 = 434 Prior to this fix, the scales and biases were applied like: y != 2*(9/5)*(100C) + (32+10) // scaling and biasing independently != 360+42 = 402 which is wrong wrong wrong!
- Loading branch information