PDShadingType6.java (pdfbox-2.0.23-src) | : | PDShadingType6.java (pdfbox-2.0.24-src) | ||
---|---|---|---|---|
skipping to change at line 20 | skipping to change at line 20 | |||
* | * | |||
* Unless required by applicable law or agreed to in writing, software | * Unless required by applicable law or agreed to in writing, software | |||
* distributed under the License is distributed on an "AS IS" BASIS, | * distributed under the License is distributed on an "AS IS" BASIS, | |||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |||
* See the License for the specific language governing permissions and | * See the License for the specific language governing permissions and | |||
* limitations under the License. | * limitations under the License. | |||
*/ | */ | |||
package org.apache.pdfbox.pdmodel.graphics.shading; | package org.apache.pdfbox.pdmodel.graphics.shading; | |||
import java.awt.Paint; | import java.awt.Paint; | |||
import java.awt.geom.AffineTransform; | ||||
import java.awt.geom.Point2D; | ||||
import java.awt.geom.Rectangle2D; | ||||
import java.io.IOException; | ||||
import org.apache.pdfbox.cos.COSDictionary; | import org.apache.pdfbox.cos.COSDictionary; | |||
import org.apache.pdfbox.util.Matrix; | import org.apache.pdfbox.util.Matrix; | |||
/** | /** | |||
* Resources for a shading type 6 (Coons Patch Mesh). | * Resources for a shading type 6 (Coons Patch Mesh). | |||
*/ | */ | |||
public class PDShadingType6 extends PDShadingType4 | public class PDShadingType6 extends PDMeshBasedShadingType | |||
{ | { | |||
/** | /** | |||
* Constructor using the given shading dictionary. | * Constructor using the given shading dictionary. | |||
* | * | |||
* @param shadingDictionary the dictionary for this shading | * @param shadingDictionary the dictionary for this shading | |||
*/ | */ | |||
public PDShadingType6(COSDictionary shadingDictionary) | public PDShadingType6(COSDictionary shadingDictionary) | |||
{ | { | |||
super(shadingDictionary); | super(shadingDictionary); | |||
} | } | |||
skipping to change at line 50 | skipping to change at line 54 | |||
public int getShadingType() | public int getShadingType() | |||
{ | { | |||
return PDShading.SHADING_TYPE6; | return PDShading.SHADING_TYPE6; | |||
} | } | |||
@Override | @Override | |||
public Paint toPaint(Matrix matrix) | public Paint toPaint(Matrix matrix) | |||
{ | { | |||
return new Type6ShadingPaint(this, matrix); | return new Type6ShadingPaint(this, matrix); | |||
} | } | |||
@Override | ||||
protected Patch generatePatch(Point2D[] points, float[][] color) | ||||
{ | ||||
return new CoonsPatch(points, color); | ||||
} | ||||
@Override | ||||
public Rectangle2D getBounds(AffineTransform xform, Matrix matrix) throws IO | ||||
Exception | ||||
{ | ||||
return getBounds(xform, matrix, 12); | ||||
} | ||||
} | } | |||
End of changes. 3 change blocks. | ||||
1 lines changed or deleted | 18 lines changed or added |