Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (101)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (309)
Collections:
Other Resources:
What Is poi-scratchpad-5.2.3.jar?
What Is poi-scratchpad-5.2.3.jar?
✍: FYIcenter.com
poi-scratchpad-5.2.3.jar is one of the JAR files for Apache POI 5.2.3, which provides an API for Microsoft document files of Word, Excel, PowerPoint, and Visio.
poi-scratchpad-5.2.3.jar provides support for older versions of Microsoft document files like Word 97, Excel 97, PowerPoint 97, etc.
poi-scratchpad-5.2.3.jar is distributed as part of the poi-bin-5.2.3-20220909.zip download file.
JAR File Size and Download Location:
JAR name: poi-scratchpad-5.2.3.jar Target JDK version: 9 Dependency: poi.jar File name: poi-scratchpad.jar, poi-scratchpad-5.2.3.jar File size: 1897121 bytes Release date: 09-09-2022 Download: Apache POI Website
Here are Java Source Code files for poi-scratchpad-5.2.3.jar:
⏎ org/apache/poi/hwmf/draw/HwmfROP3Composite.java
/* ==================================================================== Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ package org.apache.poi.hwmf.draw; import java.awt.Color; import java.awt.Composite; import java.awt.CompositeContext; import java.awt.RenderingHints; import java.awt.Shape; import java.awt.geom.AffineTransform; import java.awt.geom.Point2D; import java.awt.geom.Rectangle2D; import java.awt.image.BufferedImage; import java.awt.image.ColorModel; import java.awt.image.Raster; import java.awt.image.WritableRaster; import java.util.ArrayDeque; import java.util.Deque; import org.apache.poi.hwmf.record.HwmfTernaryRasterOp; /** * HWMFs Raster Operation for Ternary arguments (Source / Destination / Pattern) */ public class HwmfROP3Composite implements Composite { private final HwmfTernaryRasterOp rop3; private final byte[] mask; private final int mask_width; private final int mask_height; private final int foreground; private final int background; private final Point2D startPnt; private final boolean hasPattern; public HwmfROP3Composite(AffineTransform at, Shape shape, HwmfTernaryRasterOp rop3, BufferedImage bitmap, Color background, Color foreground) { this.rop3 = rop3; if (bitmap == null) { mask_width = 1; mask_height = 1; mask = new byte[]{1}; } else { mask_width = bitmap.getWidth(); mask_height = bitmap.getHeight(); mask = new byte[mask_width * mask_height]; bitmap.getRaster().getDataElements(0, 0, mask_width, mask_height, mask); } this.background = background.getRGB(); this.foreground = foreground.getRGB(); Rectangle2D bnds = at.createTransformedShape(shape.getBounds2D()).getBounds2D(); startPnt = new Point2D.Double(bnds.getMinX(),bnds.getMinY()); hasPattern = rop3.calcCmd().contains("P"); } @Override public CompositeContext createContext(ColorModel srcColorModel, ColorModel dstColorModel, RenderingHints hints) { return new Rop3Context(); } private class Rop3Context implements CompositeContext { private final Deque<int[]> stack = new ArrayDeque<>(); // private Integer origOffsetX, origOffsetY; @Override public void compose(Raster src, Raster dstIn, WritableRaster dstOut) { int w = Math.min(src.getWidth(), dstIn.getWidth()); int h = Math.min(src.getHeight(), dstIn.getHeight()); int startX = (int)startPnt.getX(); int startY = (int)startPnt.getY(); int offsetY = dstIn.getSampleModelTranslateY(); int offsetX = dstIn.getSampleModelTranslateX(); final int[] srcPixels = new int[w]; final int[] dstPixels = new int[w]; final int[] patPixels = hasPattern ? new int[w] : null; for (int y = 0; y < h; y++) { dstIn.getDataElements(0, y, w, 1, dstPixels); src.getDataElements(0, y, w, 1, srcPixels); fillPattern(patPixels, y, startX, startY, offsetX, offsetY); rop3.process(stack, dstPixels, srcPixels, patPixels); assert(stack.size() == 1); int[] dstOutPixels = stack.pop(); dstOut.setDataElements(0, y, w, 1, dstOutPixels); } } private void fillPattern(int[] patPixels, int y, int startX, int startY, int offsetX, int offsetY) { if (patPixels != null) { int offY2 = (startY+y+offsetY) % mask_height; offY2 = (offY2 < 0) ? mask_height + offY2 : offY2; int maskBase = offY2 * mask_width; for (int i=0; i<patPixels.length; i++) { int offX2 = (startX+i+offsetX) % mask_width; offX2 = (offX2 < 0) ? mask_width + offX2 : offX2; patPixels[i] = mask[maskBase + offX2] == 0 ? background : foreground; } } } @Override public void dispose() { } } }
⏎ org/apache/poi/hwmf/draw/HwmfROP3Composite.java
Or download all of them as a single archive file:
File name: poi-scratchpad-5.2.3-src.zip File size: 1238744 bytes Release date: 2022-09-09 Download
⇒ What Is poi-examples-5.2.3.jar?
⇐ What Is poi-excelant-5.2.3.jar?
2017-03-22, 24571👍, 0💬
Popular Posts:
How to read XML document from socket connections with the socket\DelayedInput.java provided in the A...
Xalan-Java, Version 2.7.1, is an XSLT processor for transforming XML documents into HTML, text, or o...
How to run "jarsigner" command from JDK tools.jar file? "jarsigner" command allows you to digitally ...
io.jar is a component in iText Java library to provide input/output functionalities. iText Java libr...
JRE 8 rt.jar is the JAR file for JRE 8 RT (Runtime) libraries. JRE (Java Runtime) 8 is the runtime e...