Skip to main content
Participant
Aug 3, 2009 3:24 PM UTC
Question

How can one get backgroundColor to include leading like text selection?

Is there any way to get a SpanElement's background color to include the leading, rather than just extend from ascent to descent. Like this:

This is some text.

This is another line of text.

This topic is closed to new replies. Start a new post to keep the conversation going.

3 replies

Participant
Aug 3, 2009 3:30 PM UTC

OK, so the example above wasn't so great as rendered in browser.  Think more like closed captioning, rather than a highlighter pen.

Translate
Adobe Employee
Aug 6, 2009 5:07 PM UTC

That functionality isn't part of TLF, because we figured most users would want just the text highlighted, but you can change it to behave as you wish. See FlowLeafElement.updateAdornments(). You can change it to calculate the bounds differently, or to do a stroke instead of fill (see FlowLeafElement.updateAdornmentsOnBounds()).

- robin

Translate
Participant
Aug 6, 2009 5:20 PM UTC

Thanks for the response. I'll give that a try.

<![CDATA[

Michael A. Jordan

majordan.net

email: michael@majordan.net

]]

Translate