Skip to main content
Known Participant
Sep 21, 2010 9:16 PM UTC
Answered

Inline Graphic Element Position

Hi,

Ho can I correctly place an image in a textflow? My images look like they have padding-bottom.

Here you can see the seleccion bellow the image:

Here you can the that the image is positioned too high in relation to the text line selection.

I guess this can be fixd in the textflow marpup, here is what I'm using:

var markup2:String = "<TextFlow xmlns='http://ns.adobe.com/textLayout/2008' fontSize='16' textIndent='0' paragraphSpaceAfter='0' paddingTop='0' paddingBottom='0' paddingLeft='0' paddingRight='0' lineHeight='100%' >" +

                    "<TextLayoutFormat color='#ff0000' id='hoverOverBrand' />" +

                    "<TextLayoutFormat color='#00ff0F' id='mouseDownOverBrand' textDecoration='underline' />" +

                    "<TextLayoutFormat color='#0000ff' id='defaultLinkBrand'/>" +

                    "<TextLayoutFormat color='#0000ff' id='hoverOverEmail'/>" +

                    "<TextLayoutFormat color='#0000ff' id='mouseDownOverEmail' lineThrough='true' />";

Any ideas?

This topic is closed to new replies. Start a new post to keep the conversation going.
Correct answer
Sep 21, 2010 9:35 PM UTC

By default the image sits on the baseline of the text. If you'd like something different, you can set baselineShift to change that position - positive numbers to move the image up and negative numbers to move the image down.

8 replies

storm767Author
Known Participant
Sep 21, 2010 9:17 PM UTC

here's the TLF markup:

var markup2:String = "<TextFlow xmlns='http://ns.adobe.com/textLayout/2008' fontSize='16' textIndent='0' paragraphSpaceAfter='0' paddingTop='0' paddingBottom='0' paddingLeft='0' paddingRight='0' lineHeight='100%' fontFamily='Arial'>" +

                    "<TextLayoutFormat color='#ff0000' id='hoverOverBrand' />" +

                    "<TextLayoutFormat color='#00ff0F' id='mouseDownOverBrand' textDecoration='underline' />" +

                    "<TextLayoutFormat color='#0000ff' id='defaultLinkBrand'/>" +

                    "<TextLayoutFormat color='#0000ff' id='hoverOverEmail'/>" +

                    "<TextLayoutFormat color='#0000ff' id='mouseDownOverEmail' lineThrough='true' />";

Translate
Correct answer
Sep 21, 2010 9:35 PM UTC

By default the image sits on the baseline of the text. If you'd like something different, you can set baselineShift to change that position - positive numbers to move the image up and negative numbers to move the image down.

Translate
storm767Author
Known Participant
Sep 21, 2010 9:36 PM UTC

Thank for the response. what number should I use to position the image at the same level of the text.

Translate