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/hemf/record/emf/HemfWindowing.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.hemf.record.emf; import static org.apache.poi.hemf.record.emf.HemfDraw.readDimensionInt; import static org.apache.poi.hemf.record.emf.HemfDraw.readPointL; import static org.apache.poi.hwmf.record.HwmfDraw.normalizeBounds; import java.awt.geom.Dimension2D; import java.awt.geom.Rectangle2D; import java.io.IOException; import java.util.Map; import java.util.function.Supplier; import org.apache.poi.hemf.draw.HemfDrawProperties; import org.apache.poi.hemf.draw.HemfGraphics; import org.apache.poi.hwmf.record.HwmfRegionMode; import org.apache.poi.hwmf.record.HwmfWindowing; import org.apache.poi.util.GenericRecordJsonWriter; import org.apache.poi.util.GenericRecordUtil; import org.apache.poi.util.LittleEndianConsts; import org.apache.poi.util.LittleEndianInputStream; @SuppressWarnings("WeakerAccess") public class HemfWindowing { /** * The EMR_SETWINDOWEXTEX record defines the window extent. */ public static class EmfSetWindowExtEx extends HwmfWindowing.WmfSetWindowExt implements HemfRecord { @Override public HemfRecordType getEmfRecordType() { return HemfRecordType.setWindowExtEx; } @Override public long init(LittleEndianInputStream leis, long recordSize, long recordId) throws IOException { return readDimensionInt(leis, size); } @Override public HemfRecordType getGenericRecordType() { return getEmfRecordType(); } @Override public void calcBounds(RenderBounds holder) { Rectangle2D window = holder.getWindow(); double x = window.getX(); double y = window.getY(); window.setRect(x,y,size.getWidth(),size.getHeight()); } } /** * The EMR_SETWINDOWORGEX record defines the window origin. */ public static class EmfSetWindowOrgEx extends HwmfWindowing.WmfSetWindowOrg implements HemfRecord { @Override public HemfRecordType getEmfRecordType() { return HemfRecordType.setWindowOrgEx; } @Override public long init(LittleEndianInputStream leis, long recordSize, long recordId) throws IOException { return readPointL(leis, origin); } @Override public HemfRecordType getGenericRecordType() { return getEmfRecordType(); } @Override public void calcBounds(RenderBounds holder) { Rectangle2D window = holder.getWindow(); double w = window.getWidth(); double h = window.getHeight(); window.setRect(origin.getX(),origin.getY(),w,h); } } /** * The EMR_SETVIEWPORTEXTEX record defines the viewport extent. */ public static class EmfSetViewportExtEx extends HwmfWindowing.WmfSetViewportExt implements HemfRecord { @Override public HemfRecordType getEmfRecordType() { return HemfRecordType.setViewportExtEx; } @Override public long init(LittleEndianInputStream leis, long recordSize, long recordId) throws IOException { return readDimensionInt(leis, extents); } @Override public HemfRecordType getGenericRecordType() { return getEmfRecordType(); } @Override public void calcBounds(RenderBounds holder) { Rectangle2D viewport = holder.getViewport(); double x = viewport.getX(); double y = viewport.getY(); viewport.setRect(x,y,extents.getWidth(),extents.getHeight()); } } /** * The EMR_SETVIEWPORTORGEX record defines the viewport origin. */ public static class EmfSetViewportOrgEx extends HwmfWindowing.WmfSetViewportOrg implements HemfRecord { @Override public HemfRecordType getEmfRecordType() { return HemfRecordType.setViewportOrgEx; } @Override public long init(LittleEndianInputStream leis, long recordSize, long recordId) throws IOException { return readPointL(leis, origin); } @Override public HemfRecordType getGenericRecordType() { return getEmfRecordType(); } @Override public void calcBounds(RenderBounds holder) { Rectangle2D viewport = holder.getViewport(); double w = viewport.getWidth(); double h = viewport.getHeight(); viewport.setRect(origin.getX(), origin.getY(), w, h); } } /** * The EMR_OFFSETCLIPRGN record moves the current clipping region in the playback device context * by the specified offsets. */ public static class EmfSetOffsetClipRgn extends HwmfWindowing.WmfOffsetClipRgn implements HemfRecord { @Override public HemfRecordType getEmfRecordType() { return HemfRecordType.setOffsetClipRgn; } @Override public long init(LittleEndianInputStream leis, long recordSize, long recordId) throws IOException { return readPointL(leis, offset); } @Override public HemfRecordType getGenericRecordType() { return getEmfRecordType(); } } /** * The EMR_EXCLUDECLIPRECT record specifies a new clipping region that consists of the existing * clipping region minus the specified rectangle. */ public static class EmfSetExcludeClipRect extends HwmfWindowing.WmfExcludeClipRect implements HemfRecord { @Override public HemfRecordType getEmfRecordType() { return HemfRecordType.setExcludeClipRect; } @Override public long init(LittleEndianInputStream leis, long recordSize, long recordId) throws IOException { return HemfDraw.readRectL(leis, bounds); } @Override public HemfRecordType getGenericRecordType() { return getEmfRecordType(); } } /** * The EMR_INTERSECTCLIPRECT record specifies a new clipping region from the intersection of the * current clipping region and the specified rectangle. */ public static class EmfSetIntersectClipRect extends HwmfWindowing.WmfIntersectClipRect implements HemfRecord { @Override public HemfRecordType getEmfRecordType() { return HemfRecordType.setIntersectClipRect; } @Override public long init(LittleEndianInputStream leis, long recordSize, long recordId) throws IOException { return HemfDraw.readRectL(leis, normalizeBounds(bounds)); } @Override public HemfRecordType getGenericRecordType() { return getEmfRecordType(); } @Override public void calcBounds(RenderBounds holder) { Rectangle2D b = holder.getBounds(); if (b.isEmpty()) { b.setRect(bounds); } else { b.add(bounds); } } } /** * The EMR_SCALEVIEWPORTEXTEX record respecifies the viewport for a device context by using the * ratios formed by the specified multiplicands and divisors. */ public static class EmfScaleViewportExtEx extends HwmfWindowing.WmfScaleViewportExt implements HemfRecord { @Override public HemfRecordType getEmfRecordType() { return HemfRecordType.scaleViewportExtEx; } @Override public long init(LittleEndianInputStream leis, long recordSize, long recordId) throws IOException { return readScale(leis, scale); } @Override public HemfRecordType getGenericRecordType() { return getEmfRecordType(); } @Override public void calcBounds(RenderBounds holder) { Rectangle2D viewport = holder.getViewport(); double x = viewport.getX(); double y = viewport.getY(); double w = viewport.getWidth(); double h = viewport.getHeight(); viewport.setRect(x,y,w * scale.getWidth(),h * scale.getHeight()); } } /** * The EMR_SCALEWINDOWEXTEX record respecifies the window for a playback device context by * using the ratios formed by the specified multiplicands and divisors. */ public static class EmfScaleWindowExtEx extends HwmfWindowing.WmfScaleWindowExt implements HemfRecord { @Override public HemfRecordType getEmfRecordType() { return HemfRecordType.scaleWindowExtEx; } @Override public long init(LittleEndianInputStream leis, long recordSize, long recordId) throws IOException { return readScale(leis, scale); } @Override public HemfRecordType getGenericRecordType() { return getEmfRecordType(); } @Override public void calcBounds(RenderBounds holder) { Rectangle2D window = holder.getWindow(); double x = window.getX(); double y = window.getY(); double w = window.getWidth(); double h = window.getHeight(); window.setRect(x,y,w * scale.getWidth(),h * scale.getHeight()); } } /** * The EMR_SELECTCLIPPATH record specifies the current path as a clipping region for a playback * device context, combining the new region with any existing clipping region using the specified mode. */ public static class EmfSelectClipPath implements HemfRecord { protected HwmfRegionMode regionMode; @Override public HemfRecordType getEmfRecordType() { return HemfRecordType.selectClipPath; } @Override public long init(LittleEndianInputStream leis, long recordSize, long recordId) throws IOException { // A 32-bit unsigned integer that specifies the way to use the path. // The value MUST be in the RegionMode enumeration regionMode = HwmfRegionMode.valueOf(leis.readInt()); return LittleEndianConsts.INT_SIZE; } @Override public void draw(HemfGraphics ctx) { HemfDrawProperties prop = ctx.getProperties(); ctx.setClip(prop.getPath(), regionMode, false); } @Override public String toString() { return GenericRecordJsonWriter.marshal(this); } public HwmfRegionMode getRegionMode() { return regionMode; } @Override public Map<String, Supplier<?>> getGenericProperties() { return GenericRecordUtil.getGenericProperties("regionMode", this::getRegionMode); } } private static int readScale(LittleEndianInputStream leis, Dimension2D scale) { double xNum = leis.readInt(); double xDenom = leis.readInt(); double yNum = leis.readInt(); double yDenom = leis.readInt(); scale.setSize(xNum / xDenom, yNum / yDenom); return 4*LittleEndianConsts.INT_SIZE; } }
⏎ org/apache/poi/hemf/record/emf/HemfWindowing.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, 34333👍, 0💬
Popular Posts:
JDK 11 java.naming.jmod is the JMOD file for JDK 11 Naming module. JDK 11 Naming module compiled cla...
What Is mail.jar of JavaMail 1.4? I got the JAR file from javamail-1_4.zip. mail.jar in javamail-1_4...
JDK 8 tools.jar is the JAR file for JDK 8 tools. It contains Java classes to support different JDK t...
Apache Log4j Core Implementation provides the functional components of the logging system. Users are...
Saxon is an open source product available under the Mozilla Public License. It provides implementati...