How to myText.attr('text-decoration':'underline'); ?

327 views
Skip to first unread message

invincible

unread,
Apr 18, 2011, 2:34:52 AM4/18/11
to Raphaël
Is there a way to get underlined text with RaphaëlJS ?

I thought for something like this: myText.attr('text-
decoration':'underline'); but this doesn't work.

Lito

unread,
May 2, 2011, 8:53:19 PM5/2/11
to Raphaël
I have the same problem .. you solved it?

Serg Pechenov

unread,
May 3, 2011, 12:02:53 AM5/3/11
to raph...@googlegroups.com
No, please, show it!

2011/5/3 Lito <inte...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "Raphaël" group.
To post to this group, send an email to raph...@googlegroups.com.
To unsubscribe from this group, send email to raphaeljs+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/raphaeljs?hl=en-GB.


Lito

unread,
May 3, 2011, 12:07:16 AM5/3/11
to Raphaël
I don't know, how it's make.
I think, draw line under line.

On 3 май, 00:02, Serg Pechenov <pe4e...@gmail.com> wrote:
> No, please, show it!
>
> 2011/5/3 Lito <intel...@gmail.com>

Serg Pechenov

unread,
May 3, 2011, 12:11:29 AM5/3/11
to raph...@googlegroups.com
I did something like this:

Raphael.el.underline = function(show) {
    if (this.type == 'text') {
        if (show) {
            var bbox = this.getBBox();
            this.uline = R.path('M' + bbox.x + ' ' + (bbox.y + bbox.height) + 'L' + (bbox.x + bbox.width) + ' ' + (bbox.y + bbox.height));
        } else {
            if (this.uline != null) this.uline.remove();
        };
    };
};

2011/5/3 Lito <inte...@gmail.com>

Lito

unread,
May 3, 2011, 12:12:58 AM5/3/11
to Raphaël
Yes, something that I was going to do ..
Reply all
Reply to author
Forward
0 new messages