xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Caron, Michael R" <michael.r.ca...@lmco.com>
Subject RE: Opening an SVG image to a certain scale
Date Mon, 24 Jan 2005 20:38:36 GMT
Each tile is a separate JSVGCanvas, not loading them as <image>
elements.
 
Output is a JPanel:
 
//...
private void init() {
        addListeners();
        setLayout(new BorderLayout());
 
        // status is a JLabel
        status.setFont(new Font(PANEL_FONT_NAME,PANEL_FONT_STYLE,
                PANEL_FONT_SIZE));
        status.setText("svg");
        status.setHorizontalAlignment(SwingConstants.CENTER);
        
        // stick the SVG into an etched pane to make it look nice
        JPanel borderedPanel = new JPanel(new
FlowLayout(FlowLayout.CENTER,
                0,0));
        borderedPanel.setBorder(BorderFactory.createEtchedBorder());
        
        // svgThumbnail is a JSVGCanvas
        svgThumbnail.setPreferredSize(new Dimension(ICON_HEIGHT,
ICON_WIDTH));
        borderedPanel.add(svgThumbnail);
        
        // add the SVG
        add(borderedPanel, BorderLayout.CENTER);
        
        // add the status line
        add(status, BorderLayout.SOUTH);
 
    }
//...
 
Mike

  _____  

From: Andres Toussaint [mailto:andres@onemileup.com] 
Sent: Monday, January 24, 2005 2:34 PM
To: Batik Users
Subject: Re: Opening an SVG image to a certain scale


Is each of your SVG tiles a separate JSVGCanvas? 

Or are you loading your SVG Tiles as <image> elements? 

What is your output? A Java Swing window, a raster image, a web page? 



On Jan 24, 2005, at 2:55 PM, Caron, Michael R wrote: 


	Hi all, 

	I'd like to open an SVG file to certain dimensions. Essentially,
create a thumbnail, but forget about the original sizes. I've tried to
go with the code example from the Squiggle app, but I can't seem to get
any output. I've looked at the transcoding option, but that doesn't do
what I want. What I want is to load up a bunch of svgs into a grid of
svg tiles no bigger than 40px x 40px. I figured I could do a transform
after the GVTTree was built, but that just gave me some null pointers. 

	Any ideas? 

	L 
	Michael Caron 
	Software Development 
	IR&D - PCES Program 

	x4889 


Mime
View raw message