mirror of https://github.com/apache/poi.git
Try to avoid error "Start point cannot equalendpoint"
Happened when trying to apply a gradient to an empty text, let's use at least 1 gradient step always to avoid this. git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1885191 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a2fa70b15d
commit
7aa6b06085
|
@ -173,7 +173,9 @@ public class PathGradientPaint implements Paint {
|
|||
lower = mid;
|
||||
}
|
||||
}
|
||||
return upper;
|
||||
|
||||
// always report at least one gradient step
|
||||
return Math.max(upper, 1);
|
||||
}
|
||||
|
||||
public WritableRaster createRaster() {
|
||||
|
|
Loading…
Reference in New Issue