Community
Participate
Working Groups
Created attachment 158791 [details] patch GraphicsToGraphics2DAdaptor#drawTextLayout(...) is not implemented. Hence, GMF fails to export to PNG, JPEG, SVG and PDF diagrams containing Arabic strings. I had to add an extra method to ImageConverter to be able to generate AWT image based on ImageData to avoid generating another SWT image based on the image data updated with transparent pixel. (SWT image created from ImageData cannot be painted on) Transparent pixel is set the current background color of the graphics object. Think this is the best we can do in terms of the transparent background. Otherwise, perhaps I should just set the transparent pixel to white? Lidija, can you review this patch please?
Created attachment 158793 [details] corrected patch Actually, i didn't need the transparent color - all I needed was to to call checkState() before painting the image, such that appliedState == currentState and all colors and attributes are up-to-date. Here is the corrected patch - no new API required.
Created attachment 158795 [details] patch Last change: added some unimplemented getters to GraphicsToGraphics2DAdaptor
Created attachment 158801 [details] patch Lidija, I tested other formats than a PDF and found that without transparent background the background for the text is white. Therefore, I do set the transparent pixel == the pixel of the current graphics background color. Also, added two methods in ImageConverter to convert AWT to/from buffered image from/to ImageData. These would be useful, because they don't require Display thread. That was the final change :-) Anthony, for GMF 2.3 plugin versions are supposed to be 1.3.0 correct? I changed the version of draw2d.ui.render.awt from 1.2.1 to 1.3.0 and added @since 1.3. Sounds good?
(In reply to comment #3) > Created an attachment (id=158801) [details] > patch > > Lidija, > I tested other formats than a PDF and found that without transparent background > the background for the text is white. > Therefore, I do set the transparent pixel == the pixel of the current graphics > background color. > Also, added two methods in ImageConverter to convert AWT to/from buffered image > from/to ImageData. These would be useful, because they don't require Display > thread. That was the final change :-) > > Anthony, > for GMF 2.3 plugin versions are supposed to be 1.3.0 correct? I changed the > version of draw2d.ui.render.awt from 1.2.1 to 1.3.0 and added @since 1.3. > Sounds good? Yes, @since 1.3 and it should be 1.3.1 for now, here is why; GMF Runtime in Galileo 3.5.2 SR2 is 1.3.0. It was a minor version change to indicate we made API additions in SR2 that clients needed. i.e. clients depending on the new API need to depend on bundle 1.3.0, if they used 1.2.x the API is not there. Now draw2d.ui.render.awt has newer API since 3.5.2 SR2, so we need to make bundles 1.3.1, since the Runtime for Helios 3.6.0 is 1.3.1. According to the rules, new public API would should mean a minor version change to 1.4.0. @since 1.3 is not correct since the API was not in 1.3.0 of the bundle. I do not think this new API is needed by clients right? For now, make it 1.3.1 and I have flagged this issue in Bug 292918.
Alex, patch looks and works fine.
Thanks, Lidija! I set the plugin version as well as @since for 2 new methods to 1.3.1 as you adviced, Anthony. Committed for 2.3
[target cleanup] 2.3 M6 was the original target milestone for this bug
[GMF Restructure] Bug 319140 : product GMF and component Runtime Diagram was the original product and component for this bug
*** Bug 336523 has been marked as a duplicate of this bug. ***