[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.gef3d] Re: A couple of errors in ..draw3d
|
Hi again,
I just implemented some of the missing advanced graphics functions on
DummyGraphics, LogGraphics and LwjglGraphics. The remaining
unimplemented functions are
Graphics#drawPath(org.eclipse.swt.graphics.Path)
Graphics#drawText(String, org.eclipse.draw2d.geometry.Point, int)
Graphics#drawText(String, int, int, int)
Graphics#drawTextLayout(org.eclipse.swt.graphics.TextLayout, int, int)
Graphics#drawTextLayout(org.eclipse.swt.graphics.TextLayout, int, int, int,
int, Color, Color)
Graphics#fillPath(org.eclipse.swt.graphics.Path)
Graphics#setClip(org.eclipse.swt.graphics.Path)
These functions make use of platform dependent resources (Path,
TextLayout, Pattern) and are not trivial to implement. I am not sure if
it is possible at all to implement this functionality without changing
the clients of Graphics as well, because I don't see how I can access
the information contained in the platform dependent resources in a
platform independent way.
The only way I see right now would be to subclass Path, TextLayout and
Pattern and write implementations that can use GL to emulate this
functionality, but as I stated above, this would require modifying
client code. Another way would be to get the SWT team interested in
GLGraphics and add GL implementations of those classes to SWT directly.
But even then, I'd have to implement a lot of this functionality by
hand. For example, GL doesn't support paths as clipping regions (only
planes can be used and paths can contain arcs and curves) - I'd have to
write the clipping code for clipping paths by hand.
I hope for now that no existing GEF editor uses these features so that
we won't need to implement them for a while.
Best regards
Kristian