You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xmlgraphics.apache.org by je...@apache.org on 2007/12/19 16:28:06 UTC
svn commit: r605580 -
/xmlgraphics/commons/branches/TempNewImagePackage/examples/java/image/loader/ImageViewer.java
Author: jeremias
Date: Wed Dec 19 07:28:05 2007
New Revision: 605580
URL: http://svn.apache.org/viewvc?rev=605580&view=rev
Log:
No separate variable for the ImageContext.
Modified:
xmlgraphics/commons/branches/TempNewImagePackage/examples/java/image/loader/ImageViewer.java
Modified: xmlgraphics/commons/branches/TempNewImagePackage/examples/java/image/loader/ImageViewer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/branches/TempNewImagePackage/examples/java/image/loader/ImageViewer.java?rev=605580&r1=605579&r2=605580&view=diff
==============================================================================
--- xmlgraphics/commons/branches/TempNewImagePackage/examples/java/image/loader/ImageViewer.java (original)
+++ xmlgraphics/commons/branches/TempNewImagePackage/examples/java/image/loader/ImageViewer.java Wed Dec 19 07:28:05 2007
@@ -27,7 +27,6 @@
import java.io.File;
import java.io.IOException;
-import org.apache.xmlgraphics.image.loader.ImageContext;
import org.apache.xmlgraphics.image.loader.ImageException;
import org.apache.xmlgraphics.image.loader.ImageFlavor;
import org.apache.xmlgraphics.image.loader.ImageInfo;
@@ -44,19 +43,17 @@
*/
public class ImageViewer {
- private ImageContext imageContext;
private ImageManager imageManager;
public ImageViewer() {
//These two are set up for the whole application
- this.imageContext = new DefaultImageContext();
- this.imageManager = new ImageManager(this.imageContext);
+ this.imageManager = new ImageManager(new DefaultImageContext());
}
public void display(File f) throws IOException {
//The ImageSessionContext might for each processing run
ImageSessionContext sessionContext = new DefaultImageSessionContext(
- this.imageContext, null);
+ this.imageManager.getImageContext(), null);
//Construct URI from filename
String uri = f.toURI().toASCIIString();
@@ -114,7 +111,7 @@
ImageSize size = new ImageSize();
size.setSizeInMillipoints(dim.width, dim.height);
- size.setResolution(imageContext.getSourceResolution());
+ size.setResolution(imageManager.getImageContext().getSourceResolution());
size.calcPixelsFromSize();
ImageInfo info = new ImageInfo(null, null);
---------------------------------------------------------------------
Apache XML Graphics Project URL: http://xmlgraphics.apache.org/
To unsubscribe, e-mail: commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: commits-help@xmlgraphics.apache.org