Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » SingleSourcing: Server Side Image
SingleSourcing: Server Side Image [message #869783] Fri, 04 May 2012 09:58 Go to next message
Marc T. is currently offline Marc T.Friend
Messages: 17
Registered: November 2009
Junior Member
Hallo,

just an other question about SingleSourcing.

I have a method, that draws a graph using a GC:

drawGraph(GC gc)...

I can draw the graphic using a RAP GC and see the result in the application running on the browser.

But how can this graphic be saved (downloaded) ?

I can't create a GC for a server side empty Image, to create the Graph in the memory of the server and use ImageLoader.save() to create a file for a download.

Is there a way to create a (pure) server side GC / Image ?

Regards

Marc

Re: SingleSourcing: Server Side Image [message #869798 is a reply to message #869783] Fri, 04 May 2012 10:41 Go to previous messageGo to next message
Rüdiger Herrmann is currently offline Rüdiger HerrmannFriend
Messages: 335
Registered: July 2009
Senior Member
Marc,

as you already figured out, drawing images with GC isn't yet supported
[1]. The only workaround I know is to draw onto AWT BufferedImages and
deliver them as resources. See this FAQ entry [2] for a short how-to.

HTH
Rüdiger

[1] 318900: [GC] Image class doesn't implement Drawable
https://bugs.eclipse.org/bugs/show_bug.cgi?id=318900
[2]
http://wiki.eclipse.org/RAP/FAQ#How_to_display_dynamically_created_images.3F

On 04.05.2012 11:58, Missing name Mising name wrote:
> Hallo,
>
> just an other question about SingleSourcing.
>
> I have a method, that draws a graph using a GC:
>
> drawGraph(GC gc)...
>
> I can draw the graphic using a RAP GC and see the result in the
> application running on the browser.
> But how can this graphic be saved (downloaded) ?
>
> I can't create a GC for a server side empty Image, to create the Graph
> in the memory of the server and use ImageLoader.save() to create a file
> for a download.
>
> Is there a way to create a (pure) server side GC / Image ?
>
> Regards
>
> Marc
>
>
--
Rüdiger Herrmann
http://codeaffine.com
Re: SingleSourcing: Server Side Image [message #869822 is a reply to message #869798] Fri, 04 May 2012 12:07 Go to previous message
Marc T. is currently offline Marc T.Friend
Messages: 17
Registered: November 2009
Junior Member
Thanks,

that would have been me second approach.

I just tried to avoid to rewrite the method using AWT's Graphics2D....

Marc


Previous Topic:SingleSourcing: How to determine between RCP and RAP
Next Topic:Single Sourcing: Some solutions for simple problems
Goto Forum:
  


Current Time: Fri Mar 29 06:39:24 GMT 2024

Powered by FUDForum. Page generated in 0.03638 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top