DescriptionCompute outline mid-line in way that works with negative start-values
Since the expression (x1+x2)/2 will always "round" towards zero, if one
of the points (usually x1) is negative, the wrong "mid-line" will be
computed, and as a result part of the outline will shift right/down.
Instead compute the mid-line as x1+(x2-x1)/2 (or x1+thickness/2) i.e
perform the division on something that is known to be non-negative and
then offset from the starting point. (Similar reasoning for the other
dimension.)
BUG=529010
Committed: https://crrev.com/c6cb6e422ed0508bf1a283f31175bbd65e098178
git-svn-id: svn://svn.chromium.org/blink/trunk@202205 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Patch Set 1 #
Messages
Total messages: 7 (2 generated)
|