Bug 326477 - SVG Problem: GraphicsToGraphics2DAdaptor drawTextLayout renders as an Image
Summary: SVG Problem: GraphicsToGraphics2DAdaptor drawTextLayout renders as an Image
Status: NEW
Alias: None
Product: GMF-Runtime
Classification: Modeling
Component: General (show other bugs)
Version: 2.3.1   Edit
Hardware: Macintosh Mac OS X - Carbon (unsup.)
: P3 minor
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-28 23:10 EDT by Simon Pope CLA
Modified: 2013-04-15 07:36 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Pope CLA 2010-09-28 23:10:35 EDT
GraphicsToGraphics2DAdaptor drawTextLayout renders as an Image. This would not be a problem, except that when passing in an SVGGraphics2D object, we end up with an ugly image inserted into an otherwise lovely SVG file.

Does anyone have any idea how we can get around this? We have a Draw2D composite figure that uses TextFlow objects, that render using the SWT TextLayout objects.

A credible workaround (or suggestion) would be *very* welcome!
Comment 1 Simon Pope CLA 2010-10-16 07:46:44 EDT
Workaround is to scale the output resolution of the SVGDocument when created and set the height, width and viewBox of the 'svg' element to adjust. By doing so, the SVG document will render the text layout at any arbitrary resolution (eg. 300 dpi) instead of the screen resolution (72 dpi) but will have the correct size in an HTML or PDF document.