yes, I can directly draw to the BufferedImage, but I want a scalable image. So I decide to use the feature of the SVGGraphics2D. First I draw to the SVGGraphics2D, then may through renderer to get a bufferedImage. I am not sure how to do it. --- Cameron McCormack <[EMAIL PROTECTED]> wrote:
> Hi Lucy. > > lucy chui: > > I have a technical problem and want to get help. > > > > My problem is : > > In order to get a scalable image, I have an image > > drawed to SVGGraphics2D. But I want to get an > object > > of BufferedImage from the SVGGraphics2D. I know I > can > > not directly do it. Can any one tell me how I can > do > > it. > > The purpose of Batikâs SVGGraphics2D is to provide > a Graphics2D object > on which you can draw, that will generate SVG from > the drawing commands. > If you want a BufferedImage, you should just draw to > it and not involve > the SVGGraphics2D, e.g.: > > BufferedImage bi = > new BufferedImage(400, 300, > BufferedImage.TYPE_INT_ARGB); > Graphics2D g2d = (Graphics2D) bi.getGraphics(); > // ... drawn on g2d ... > > -- > Cameron McCormack, http://mcc.id.au/ > xmpp:[EMAIL PROTECTED] ⪠ICQ 26955922 ⪠MSN > [EMAIL PROTECTED] > ____________________________________________________________________________________ Need Mail bonding? Go to the Yahoo! Mail Q&A for great tips from Yahoo! Answers users. http://answers.yahoo.com/dir/?link=list&sid=396546091 ----- To unsubscribe send a message to: [EMAIL PROTECTED] -or- visit http://groups.yahoo.com/group/svg-developers and click "edit my membership" ---- Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/svg-developers/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/svg-developers/join (Yahoo! ID required) <*> To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/