Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » [Zest] Drawing grahics on a graph
[Zest] Drawing grahics on a graph [message #902796] Mon, 20 August 2012 09:32 Go to previous message
Magnus Sjöstrand is currently offline Magnus Sjöstrand
Messages: 16
Registered: June 2012
Junior Member
I think I have seen this question being mentioned somewhere else but there was no good solution to it.

The issue is that when drawing something (rectangle, drawline) on a graph and thereafter adding nodes the old drawings will disappear from being overpainted. The drawing for these shapes is done in a paintEvent. It possibly have something to do with the redrawing of figureCanvas (?)

I saw a 'dirty' solution to this in where one would make the drawings in a composite parent and place a transparent graph over that so that the drawings would be placed under the nodes.


Also, as suggested as a solution, making the graph's background transparant only gives me a empty background (this is not black)

Color c1 = new Color(Display.getDefault(), 50, 50, 200);
graph = new Graph(parent, SWT.NONE);
parent.setBackground(c1);
graph.getLightweightSystem().getRootFigure().setOpaque(false);

[Updated on: Mon, 20 August 2012 09:38]

Report message to a moderator

 
Read Message
Read Message
Read Message
Previous Topic:How to create two figures on a single Drag and drop in GEF?
Next Topic:GEF shapes example minimap
Goto Forum:
  


Current Time: Tue May 21 22:41:30 EDT 2013

Powered by FUDForum. Page generated in 0.01640 seconds