You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pdfbox.apache.org by ti...@apache.org on 2015/02/25 18:21:31 UTC
svn commit: r1662279 -
/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/blend/BlendMode.java
Author: tilman
Date: Wed Feb 25 17:21:31 2015
New Revision: 1662279
URL: http://svn.apache.org/r1662279
Log:
PDFBOX-2576: variable start with lowercase
Modified:
pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/blend/BlendMode.java
Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/blend/BlendMode.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/blend/BlendMode.java?rev=1662279&r1=1662278&r2=1662279&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/blend/BlendMode.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/blend/BlendMode.java Wed Feb 25 17:21:31 2015
@@ -65,6 +65,7 @@ public abstract class BlendMode
public static final SeparableBlendMode NORMAL = new SeparableBlendMode()
{
+ @Override
public float blendChannel(float srcValue, float dstValue)
{
return srcValue;
@@ -75,6 +76,7 @@ public abstract class BlendMode
public static final SeparableBlendMode MULTIPLY = new SeparableBlendMode()
{
+ @Override
public float blendChannel(float srcValue, float dstValue)
{
return srcValue * dstValue;
@@ -83,6 +85,7 @@ public abstract class BlendMode
public static final SeparableBlendMode SCREEN = new SeparableBlendMode()
{
+ @Override
public float blendChannel(float srcValue, float dstValue)
{
return srcValue + dstValue - srcValue * dstValue;
@@ -91,6 +94,7 @@ public abstract class BlendMode
public static final SeparableBlendMode OVERLAY = new SeparableBlendMode()
{
+ @Override
public float blendChannel(float srcValue, float dstValue)
{
return (dstValue <= 0.5) ? 2 * dstValue * srcValue : 2 * (srcValue + dstValue - srcValue
@@ -100,6 +104,7 @@ public abstract class BlendMode
public static final SeparableBlendMode DARKEN = new SeparableBlendMode()
{
+ @Override
public float blendChannel(float srcValue, float dstValue)
{
return Math.min(srcValue, dstValue);
@@ -108,6 +113,7 @@ public abstract class BlendMode
public static final SeparableBlendMode LIGHTEN = new SeparableBlendMode()
{
+ @Override
public float blendChannel(float srcValue, float dstValue)
{
return Math.max(srcValue, dstValue);
@@ -116,6 +122,7 @@ public abstract class BlendMode
public static final SeparableBlendMode COLOR_DODGE = new SeparableBlendMode()
{
+ @Override
public float blendChannel(float srcValue, float dstValue)
{
return (srcValue < 1) ? Math.min(1, dstValue / (1 - srcValue)) : 1;
@@ -124,6 +131,7 @@ public abstract class BlendMode
public static final SeparableBlendMode COLOR_BURN = new SeparableBlendMode()
{
+ @Override
public float blendChannel(float srcValue, float dstValue)
{
return (srcValue > 0) ? 1 - Math.min(1, (1 - dstValue) / srcValue) : 0;
@@ -132,6 +140,7 @@ public abstract class BlendMode
public static final SeparableBlendMode HARD_LIGHT = new SeparableBlendMode()
{
+ @Override
public float blendChannel(float srcValue, float dstValue)
{
return (srcValue <= 0.5) ? 2 * dstValue * srcValue :
@@ -141,6 +150,7 @@ public abstract class BlendMode
public static final SeparableBlendMode SOFT_LIGHT = new SeparableBlendMode()
{
+ @Override
public float blendChannel(float srcValue, float dstValue)
{
if (srcValue <= 0.5)
@@ -149,15 +159,16 @@ public abstract class BlendMode
}
else
{
- float D = (dstValue <= 0.25) ? ((16 * dstValue - 12) * dstValue + 4) * dstValue
+ float d = (dstValue <= 0.25) ? ((16 * dstValue - 12) * dstValue + 4) * dstValue
: (float) Math .sqrt(dstValue);
- return dstValue + (2 * srcValue - 1) * (D - dstValue);
+ return dstValue + (2 * srcValue - 1) * (d - dstValue);
}
}
};
public static final SeparableBlendMode DIFFERENCE = new SeparableBlendMode()
{
+ @Override
public float blendChannel(float srcValue, float dstValue)
{
return Math.abs(dstValue - srcValue);
@@ -166,6 +177,7 @@ public abstract class BlendMode
public static final SeparableBlendMode EXCLUSION = new SeparableBlendMode()
{
+ @Override
public float blendChannel(float srcValue, float dstValue)
{
return dstValue + srcValue - 2 * dstValue * srcValue;