|
|
|
|
Re: Displaying Images in an SWT StyledText [message #595374 is a reply to message #63243] |
Tue, 09 December 2008 12:19  |
Eclipse User |
|
|
|
Yau wrote:
> Hi David,
>
> as in
> http://greensopinion.blogspot.com/2008/09/beyond-rich-text-d isplaying-images-in.html ,
> "Images don't flow with the text", but why can't using font metrics to
> compute the number of blank spaces required to create enough horizontal
> space (in pixels) to display the image without obscuring text?
>
> Thanks!
>
> Yau.
>
>
Yau, this is in fact difficult to do. Of course it is possible to pad
the text with spaces to have the text flow around the image, however
adjusting text flow and wrap as the control is resized is more than just
tricky.
The best place to implement this feature is in the StyledText control.
Given that StyledText paints to a Canvas and already handles text flow
and wrap, it's entirely possible for StyledText to be modified to handle
images as well. I recommend that you work with the SWT team if you are
interested in such a feature.
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02961 seconds