aboutsummaryrefslogtreecommitdiffstats
path: root/poi-scratchpad/src
diff options
context:
space:
mode:
authorAndreas Beeker <kiwiwings@apache.org>2022-01-10 22:06:26 +0000
committerAndreas Beeker <kiwiwings@apache.org>2022-01-10 22:06:26 +0000
commitff6984df00f3376a29aeb89da7b04dde3f5ee1a3 (patch)
treebd1c59af48164761229b91c4cb16f9aeab2c7936 /poi-scratchpad/src
parent78f7decf00a5a3b8f075222464879aa6d8b9ce48 (diff)
downloadpoi-ff6984df00f3376a29aeb89da7b04dde3f5ee1a3.tar.gz
poi-ff6984df00f3376a29aeb89da7b04dde3f5ee1a3.zip
remove and prevent links to stackoverflow
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1896899 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'poi-scratchpad/src')
-rw-r--r--poi-scratchpad/src/main/java/org/apache/poi/hemf/record/emfplus/HemfPlusBrush.java31
-rw-r--r--poi-scratchpad/src/main/java/org/apache/poi/hwmf/draw/HwmfGraphics.java2
2 files changed, 0 insertions, 33 deletions
diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hemf/record/emfplus/HemfPlusBrush.java b/poi-scratchpad/src/main/java/org/apache/poi/hemf/record/emfplus/HemfPlusBrush.java
index 0e02d12e8e..e713254e9e 100644
--- a/poi-scratchpad/src/main/java/org/apache/poi/hemf/record/emfplus/HemfPlusBrush.java
+++ b/poi-scratchpad/src/main/java/org/apache/poi/hemf/record/emfplus/HemfPlusBrush.java
@@ -677,37 +677,6 @@ public class HemfPlusBrush {
Color inter = DrawPaint.SCRGB2RGB(r,g,b);
return new Color(inter.getRed(), inter.getGreen(), inter.getBlue(), a);
}
-
- /*
- private Color interpolateColorsHSL(final double factor) {
- final double[] hslStart = DrawPaint.RGB2HSL(startColor);
- final double[] hslStop = DrawPaint.RGB2HSL(endColor);
-
- BiFunction<Number,Number,Double> linearInter = (start, stop) ->
- start.doubleValue()+(stop.doubleValue()-start.doubleValue())*factor;
-
- double alpha = linearInter.apply(startColor.getAlpha(),endColor.getAlpha());
- double sat = linearInter.apply(hslStart[1],hslStop[1]);
- double lum = linearInter.apply(hslStart[2],hslStop[2]);
-
- // find closest match - decide if need to go clockwise or counter-clockwise
- // https://stackoverflow.com/questions/1416560/hsl-interpolation
- double hueMidCW = (hslStart[0]+hslStop[0])/2.;
- double hueMidCCW = (hslStart[0]+hslStop[0]+360.)/2.;
-
- Function<Double,Double> hueDelta = (hue) ->
- Math.min(Math.abs(hslStart[0]-hue), Math.abs(hslStop[0]-hue));
-
- double hslDiff;
- if (hueDelta.apply(hueMidCW) > hueDelta.apply(hueMidCCW)) {
- hslDiff = (hslStart[0] < hslStop[0]) ? hslStop[0]-hslStart[0] : (360-hslStart[0])+hslStop[0];
- } else {
- hslDiff = (hslStart[0] < hslStop[0]) ? -hslStart[0]-(360-hslStop[0]) : -(hslStart[0]-hslStop[0]);
- }
- double hue = (hslStart[0]+hslDiff*factor)%360.;
-
- return DrawPaint.HSL2RGB(hue, sat, lum, alpha/255.);
- } */
}
/** The EmfPlusPathGradientBrushData object specifies a path gradient for a graphics brush. */
diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hwmf/draw/HwmfGraphics.java b/poi-scratchpad/src/main/java/org/apache/poi/hwmf/draw/HwmfGraphics.java
index 701ab2d54e..ecfe21f544 100644
--- a/poi-scratchpad/src/main/java/org/apache/poi/hwmf/draw/HwmfGraphics.java
+++ b/poi-scratchpad/src/main/java/org/apache/poi/hwmf/draw/HwmfGraphics.java
@@ -619,8 +619,6 @@ public class HwmfGraphics implements HwmfCharsetAware {
// TODO: fix font height calculation
// the height is given as font size + ascent + descent
// as an approximation we reduce the height by a static factor
- //
- // see https://stackoverflow.com/a/26564924/2066598 on to get the font size from the cell height
return fontHeight*3/4;
}
}