Revision: 13599
http://sourceforge.net/p/foray/code/13599
Author: victormote
Date: 2025-05-04 21:15:45 +0000 (Sun, 04 May 2025)
Log Message:
-----------
Utilize new BitmapGraphic marker interface.
Modified Paths:
--------------
trunk/foray/foray-graphic/src/main/java/org/foray/graphic/BmpGraphic.java
trunk/foray/foray-graphic/src/main/java/org/foray/graphic/GifGraphic.java
trunk/foray/foray-graphic/src/main/java/org/foray/graphic/JpegGraphic.java
trunk/foray/foray-graphic/src/main/java/org/foray/graphic/PdfGraphic.java
trunk/foray/foray-graphic/src/main/java/org/foray/graphic/PngGraphic.java
trunk/foray/foray-graphic/src/main/java/org/foray/graphic/TiffGraphic.java
Added Paths:
-----------
trunk/foray/foray-graphic/src/main/java/org/foray/graphic/BitmapGraphic4a.java
Added: trunk/foray/foray-graphic/src/main/java/org/foray/graphic/BitmapGraphic4a.java
===================================================================
--- trunk/foray/foray-graphic/src/main/java/org/foray/graphic/BitmapGraphic4a.java (rev 0)
+++ trunk/foray/foray-graphic/src/main/java/org/foray/graphic/BitmapGraphic4a.java 2025-05-04 21:15:45 UTC (rev 13599)
@@ -0,0 +1,51 @@
+/*
+ * Copyright 2025 The FOray Project.
+ * http://www.foray.org
+ *
+ * Licensed 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.
+ *
+ * This work is in part derived from the following work(s), used with the
+ * permission of the licensor:
+ * Apache FOP, licensed by the Apache Software Foundation
+ *
+ */
+
+/*
+ * $LastChangedRevision$
+ * $LastChangedDate$
+ * $LastChangedBy$
+ */
+
+package org.foray.graphic;
+
+import org.axsl.graphic.BitmapGraphic;
+
+import java.io.BufferedInputStream;
+import java.net.URL;
+
+/**
+ * Abstract superclass for bitmap graphic implementations.
+ */
+public abstract class BitmapGraphic4a extends Graphic4a implements BitmapGraphic {
+
+ /**
+ * Constructor.
+ * @param server The parent graphic server.
+ * @param url The URL which contains the graphic content.
+ * @param bis The reusable input stream containing the bytes from {@code url}.
+ */
+ public BitmapGraphic4a(final GraphicServer4a server, final URL url, final BufferedInputStream bis) {
+ super(server, url, bis);
+ }
+
+}
Property changes on: trunk/foray/foray-graphic/src/main/java/org/foray/graphic/BitmapGraphic4a.java
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev
\ No newline at end of property
Modified: trunk/foray/foray-graphic/src/main/java/org/foray/graphic/BmpGraphic.java
===================================================================
--- trunk/foray/foray-graphic/src/main/java/org/foray/graphic/BmpGraphic.java 2025-05-04 14:02:24 UTC (rev 13598)
+++ trunk/foray/foray-graphic/src/main/java/org/foray/graphic/BmpGraphic.java 2025-05-04 21:15:45 UTC (rev 13599)
@@ -50,7 +50,7 @@
/**
* A BMP (bitmap) image.
*/
-public class BmpGraphic extends Graphic4a {
+public class BmpGraphic extends BitmapGraphic4a {
/** The length, in bytes, of the headermap. */
private static final int HEADERMAP_LENGTH = 54;
Modified: trunk/foray/foray-graphic/src/main/java/org/foray/graphic/GifGraphic.java
===================================================================
--- trunk/foray/foray-graphic/src/main/java/org/foray/graphic/GifGraphic.java 2025-05-04 14:02:24 UTC (rev 13598)
+++ trunk/foray/foray-graphic/src/main/java/org/foray/graphic/GifGraphic.java 2025-05-04 21:15:45 UTC (rev 13599)
@@ -52,7 +52,7 @@
* @author Modified by Eric Dalquist - 9/14/2001 - ebd...@mt...
* @see Graphic4a
*/
-public class GifGraphic extends Graphic4a {
+public class GifGraphic extends BitmapGraphic4a {
/** The number of bytes that need to be read to get the basic information
* for a GIF file. */
Modified: trunk/foray/foray-graphic/src/main/java/org/foray/graphic/JpegGraphic.java
===================================================================
--- trunk/foray/foray-graphic/src/main/java/org/foray/graphic/JpegGraphic.java 2025-05-04 14:02:24 UTC (rev 13598)
+++ trunk/foray/foray-graphic/src/main/java/org/foray/graphic/JpegGraphic.java 2025-05-04 21:15:45 UTC (rev 13599)
@@ -56,7 +56,7 @@
/**
* A JPEG image, using Java native classes.
*/
-public class JpegGraphic extends Graphic4a {
+public class JpegGraphic extends BitmapGraphic4a {
/** The size, in bytes, of the read buffer that should be used to read a
* JPEG file. */
Modified: trunk/foray/foray-graphic/src/main/java/org/foray/graphic/PdfGraphic.java
===================================================================
--- trunk/foray/foray-graphic/src/main/java/org/foray/graphic/PdfGraphic.java 2025-05-04 14:02:24 UTC (rev 13598)
+++ trunk/foray/foray-graphic/src/main/java/org/foray/graphic/PdfGraphic.java 2025-05-04 21:15:45 UTC (rev 13599)
@@ -44,7 +44,7 @@
/**
* A graphic encapsulated in a PDF document.
*/
-public class PdfGraphic extends Graphic4a {
+public class PdfGraphic extends VectorGraphic4a {
/** The default size, in bytes, of the read buffer to be used when reading
* a PDF file. */
Modified: trunk/foray/foray-graphic/src/main/java/org/foray/graphic/PngGraphic.java
===================================================================
--- trunk/foray/foray-graphic/src/main/java/org/foray/graphic/PngGraphic.java 2025-05-04 14:02:24 UTC (rev 13598)
+++ trunk/foray/foray-graphic/src/main/java/org/foray/graphic/PngGraphic.java 2025-05-04 21:15:45 UTC (rev 13599)
@@ -58,7 +58,7 @@
/**
* A PNG (Portable Network Graphics) images.
*/
-public class PngGraphic extends Graphic4a {
+public class PngGraphic extends BitmapGraphic4a {
/** The number of bytes that need to be read to get the basic information
* for a PNG file. */
Modified: trunk/foray/foray-graphic/src/main/java/org/foray/graphic/TiffGraphic.java
===================================================================
--- trunk/foray/foray-graphic/src/main/java/org/foray/graphic/TiffGraphic.java 2025-05-04 14:02:24 UTC (rev 13598)
+++ trunk/foray/foray-graphic/src/main/java/org/foray/graphic/TiffGraphic.java 2025-05-04 21:15:45 UTC (rev 13599)
@@ -60,7 +60,7 @@
* A TIFF image.
*/
-public class TiffGraphic extends Graphic4a {
+public class TiffGraphic extends BitmapGraphic4a {
/** Constant indicating that the image is uncompressed.
* @see "Graphics File Formats, 2nd Edition, O'Reilly, 1996, p. 891."
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|