Skip to main content
Participant
August 3, 2009
Question

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

  • August 3, 2009
  • 1 reply
  • 696 views

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 has been closed for replies.

1 reply

Participant
August 3, 2009

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

Adobe Employee
August 6, 2009

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

Participant
August 6, 2009

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

<![CDATA[

Michael A. Jordan

majordan.net

email: michael@majordan.net

]]