Sunday, January 01, 2006

VML, SVG and Canvas

Take a couple weeks off from blogging and it's real hard to get back into it. I have been working toward a BETA at my day job, playing around with a web project at home and enjoying the end of year holidays as well.

Anyway, the web project is a web application that makes heavy use of graphics. Started building on IE with VML (Vector Markup Language). I gained experience using VML from my day job. Had no problems putting together a pretty good vector graphic editor, complete with HTML text inside shapes. The editor would be a core component in the web application. Then I started adding in support for Firefox. The plan was to abstract the VML/SVG differences and use as much common code as possible. JavaScript libraries like Prototype made lots of the work easy.

The big pain was the feature differences between VML and SVG. Here are some of the problems:

  • VML was built as an extension to HTML. SVG is a separate specification. It took a little time to figure out how to get SVG inside an HTML document (called Inline SVG) to work correctly. Also, I can mix HTML and VML together easily in any combination. SVG requires the use of <foreignObject> to mix in HTML and Firefox does not enable <foreignObject> by default.
  • Shapes in VML (<rect>, <ellipse>, etc.) support text child elements. When I reposition the shape, the text moves with it. It appears that shapes can't hold text child elements until SVG 1.2, which supports <flowPara> child elements. For now, changes to the shape must be manually mirrored to the sibling text elements.
  • Text in VML supports wordwrap. SVG does not and I can't believe it. Again, SVG 1.2 supports <flowPara>, but I am not sure wordwrap is part of <flowPara>. How long will it take SVG 1.2 to get implemented in Firefox, Safari and Opera?
  • VML supports the same level of CSS attributes as HTML. SVG does not support the same level. One attribute I could not use was 'cursor'.

My biggest problems with SVG are text related. Maybe I just don't know the right way to do it in SVG. I'm still learning.

And then there's <canvas>. It has good support in Firefox, Safari and Opera (soon). Along comes Emil Eklund with an implementation of <canvas> in IE and now I have to consider switching to <canvas> as the lowest common denominator. My biggest problem with <canvas> is text (I see a theme here). I am not sure how to handle text with <canvas>.

36 Comments:

At 11:34 AM, Anonymous Anonymous said...

You've not taken a couple of WEEKS of blogging. Years, I'd say is closer to the truth.... ;)

 
At 8:57 AM, Blogger Martin said...

Raphael looks like the solution to this.

 
At 7:16 PM, Blogger Adi said...

Oes Tsetnoc one of the ways in which we can learn seo besides Mengembalikan Jati Diri Bangsa. By participating in the Oes Tsetnoc or Mengembalikan Jati Diri Bangsa we can improve our seo skills. To find more information about Oest Tsetnoc please visit my Oes Tsetnoc pages. And to find more information about Mengembalikan Jati Diri Bangsa please visit my Mengembalikan Jati Diri Bangsa pages. Thank you So much.

 
At 1:31 PM, Anonymous Anonymous said...

酒店經紀 酒店打工 酒店工作 酒店上班 酒店兼差 酒店兼職 打工兼差 打工兼職 台北酒店 酒店應徵 禮服酒店 酒店 經紀 打工 兼差

 
At 5:17 AM, Blogger Larah said...

Critique of article will be excess.

 
At 4:59 AM, Anonymous Anonymous said...

i dont know if there suitalbe to write something good website i meet here, for i hope every body could have a good shopping experience online.

here i want to introduce this website, mainly selling nfl jerseys,
ghd, christian louboutin, and air max 95.

they offer 24 hours online service, and very very good customer service.
i buy the air max 90 shoes online on the website, nice design and good quality. that is why i strongly introduce you here.

it is not a advertisment, just share my shopping experience with everybody. hope you have a nice day, and could enjoy the good shopping.

 
At 6:45 AM, Blogger polo shirts said...

History of polo ralph lauren. Polo fashions had its humble beginnings in 1968 when tie salesman Ralph Lauren gave it a kick start. By 1969 he had a boutique polo ralph lauren factory stores within the Manhattan department store Bloomingdale's. ... Brands and luxury standard. Since Ralph Lauren's first brand, Polo Ralph Lauren, was launched, the company has expanded to include a variety of luxury brands such as Polo Golf, Polo Denim, Polo Sport. You can buy cheap Ralph Lauren Clothing at Ralph Lauren outlet.Also We provide polo shirts
Ralph Lauren polo shirt, 50% OFF! polo ralph lauren outlet online is your best choice!In 2006, polo ralph lauren outlet became the first designer in Wimbledon's 133-year history to create official uniforms for the tournament. As part of this year's event, which starts next week, polo ralph lauren sale will introduces the first ... determination to maintain and enhance the values for which our two brands are famous throughout the world. The rugby ralph lauren brand brings to Wimbledon the look of timeless elegance, drawing on our rich history and traditions

 
At 10:07 PM, Blogger 咪摩兔 said...

借貸
汽車借款
借錢
借錢
二胎
票貼
票貼
借錢
二胎

 
At 6:49 AM, Blogger Young said...

These onitsuka tiger online shop are buy asics tigers online awesome, tiger asics shoes but huge! I cheap onitsuka tiger had to asics tiger australia return twice cheap onitsuka tiger shoes because they onitsuka tiger zodiac were so big asics tiger I normally onitsuka tiger australia wear a 7.5 but ended up fitting asics onitsuka tiger mexico nicely into a tiger mexico 66. Other than that, onitsuka tiger shoes australia they look spiffy, seem onitsuka tiger mexico 66 black well made tiger mini cooper only had asics onitsuka so far, and they tiger shoes australia are still holding buy onitsuka tiger shoes online together mexico 66 perfectly, onitsuka tiger yellow black as they should be), and onitsuka tiger tokyo they came onitsuka tiger ultimate 81 with two asics onitsuka tiger trainers colors of laces asics kinsei. I onitsuka tiger mexico 66 yellow black would certainly tiger shoes onitsuka buy other onitsuka tiger sale colors of discount asics running shoes that I know onitsuka tiger mexico 66 my correct onitsuka tiger black white this brand buy onitsuka tiger shoes is a good asics international shipping best online onitsuka tiger online store

 
At 9:40 AM, Anonymous nancy said...

Good post! I love reading this blog about VML, SVG and Canvas. Nice job!

grow bigger breast

natural breast augmentation

natural breast enhancement

 
At 3:22 AM, Anonymous air max 24-7 said...

I love this article , Very good collection of informati on,thanks.

 
At 3:03 AM, Blogger 2011bagnews said...

Cheap Coach Purses have become more popular sfiucxy0dsdf and more women choose to stay replica Gucci purses aware of their fashion do not pay large sums of money even though there are many fake coach handbags outlet how production and replica Gucci handbags sales around the world ,you can even buy it as a gift to someone else who would like to shop at Coach handbags outlet stores online.In any case,this is a designer brand,will mean a high anywhere replica Chanel handbags in the world,but always there for a Coach handbags outlet long time -to-datecoach outlet.Place on the network,where you can really get a coach to help export coupons save money on buying quality.

These two models will be filled with feminine -type prints Juan replica Coach wallets gracefully embroidered in a pearl -like luster of leather,each type models are limited production 28,and a unique number and a special mark to indicate their special status.The Whitney Coach handbags outlet flagship replica Coach handbags store only sales,and has two matching small leather goods and launched – a medium and a multi-function wallet wrist trendy handbags.

 
At 12:14 PM, Blogger trevor75 said...

Post is well written and it contains many good things for me. I am glad to find your inspiring way of writing the post.thesis writing service

 
At 10:28 PM, Blogger 一笑千年 said...

In reality, almost almost all colors enables you vbnfuyt to brush or perhaps tint prescribed oakley frogskins . Generally, cheap Oakley sunglasses virtual test can become fallen directly into several sorts and different online vendors could have their distinct ones. oakley frogskins can be abbreviated directly into "try-on" or perhaps "virtual try-on". In any manner, one can easily open this kind of item when he desires to choose his / her beloved low-cost oakley jawbone . Another extremely professional low-cost Oakley sunglasses virtual test is founded on the info of peoples' faces and also heads. Such test oakley flak jacket will be professional and also complicated, yet very correct. Some blanks concerning people's face can be filled, like the length, size, height with the face, brow, and a great many other oakley radar

 
At 4:04 AM, Blogger bestzyh said...

Though these kind of oakley frogskins may be fabricated along with uijgfnhm classy, these are cheap. this specific actually is primarily since nearly all while using users involving Oakley sunglasses, your enormous men and women, are not able to spend on deluxe solutions. most of the charges involving oakley frogskins presented from the market are generally underneath one hundred bucks. Your temple involving oakley jawbone can be wide-ranging along with comprehensive involving creative imagination.Zero matter your fine rounded radian or maybe your oblong composition, your temple involving oakley flak jacket can be delicate. The idea not simply calls for your seen elegance into mind, but in addition can be warm for you to don. moreover for you to these kind of, your permanent fixture involving chemical along with shade can be fair. Right now, you may can understand the contact lenses involving individual's oakley radar come to be even bigger along with more substantial. buyers whom place on some Oakley sunglasses using enormous contact lenses declare who's may screen his or her good individuality.

 
At 3:15 PM, Blogger JimHalpert said...

I am happy to find your distinguished way of writing the post. Now you make it easy for me to understand and implement the concept. Thank you for the post. research papers online | buy book report

 
At 5:32 AM, Anonymous Essay Writing Services said...

a well explained concept that can solve many problems

 
At 5:38 AM, Anonymous Essay writing help said...

this post is great i think i can solve many of my problems through it

 
At 8:56 PM, Blogger 一笑千年 said...

Oakley Sunglasses Discount is visual compromise and the other hfkjtylt is eye protection. In fact, bifocal safety glass is neither a sole nor a strange member in the large family of eyewear products. Prescription Cheap Oakley Sunglasses and prescription goggles are both special types of eyewear that come in a similar design principle.They are designed to shield your eyes from the ultra violet rays of the sun and make it more comfortable for you to see when you're outside. Why do some people want to wear them indoors or at night? In fact, there is no need in wearing them. Maybe they think wearing cool Oakley Frogskins can make them cooler. Other occasions like a social gathering or setting, it is also not suitable to wear Oakley sunglasses. People at the parties will presumably have conversations with others they are interested in.Children will think those Oakley Jawbone are good and can make them more attractive. Of course, now the Oakley sunglasses for children vary a lot in styles that can fit any demand and interest. The Oakley Jawbone Sunglasses of some film characters are also very popular among children. Those Oakley sunglasses are a little expensive than ordinary Oakley sunglasses. Parents should thus let their children do their own choices on what to buy. As sometimes, children will be unsatisfied with the patents' choices. What parents should do only is to consider whether those Oakley sunglasses are durable, comfortable, suitable, etc.It is difficult to approach a new person and say hello to them when someone is wearing dark, cool Oakley sunglasses.

 
At 2:59 PM, Anonymous Anonymous said...

Nike Air Max| Nike free run|Nike free run cheap|Nike free run womens|Nike Air Max TN|Nike Air Max tailwind|Nike Air Max 2009|Nike Air Max 95|Nike Air Max 97|Nike Air Max shoes|cheap Air force ones

 
At 4:39 AM, Anonymous Resume writing service said...

I am thrilled to hear that the electricity produced by the project will be exported to the grid and will displace highly polluting diesel-based power generation.

 
At 4:32 AM, Blogger jaysonrexs said...

I think it might help me a lot in the related stuff and is particularly quite definitely useful for me. Adequately written I appreciate & must say good job.. Generic drugs

 
At 1:35 AM, Anonymous android developers said...

I am very much pleased with the contents you have mentioned.I wanted to thank you for this great article. I enjoyed every little bit part of it and I will be waiting for the new updates.Thanks.

 
At 7:30 AM, Anonymous cheap skip hire said...

It's really good post. nice sharing about VML and SVG.I had gain good knowledge about VML and SVG.

 
At 9:27 PM, Anonymous cheap uggs australia said...

Discount UGG Boots The couple said in a tone of discontent for the first time.

cheap uggs australia Yinbai confused, and this really be sincere or insincere? If the intrigues, why waste money and manpower to do the show played, if the truth, not the fake smile filled with false words. gd21cmy

ugg kenly black changed is Yinbai, it is impossible to use the advantages of the Han Mingsheng was so thorough, many features have been repeated: he have a passport, Yinbai there, he has a house, Yinbai had actually, he was familiar with foreign life, Yinbai no different.

tall uggs on sale Yinbai laughed: "Yes Jubilee, Jingzhe to."

www.uggsaustralia.me.uk Shen also strange embarrassing, "not small, just do not grow, we are in the same year, I May, Blue October, just graduated from college this year, twenty-year-old."

 
At 3:34 AM, Anonymous cheapest boots said...

Cheap UGG Yinbai heart smiled to himself, Miaohong so enthusiastic, of course, is to find a substitute for the Han Mingsheng.

cheapest uggs ever Mr. Shen listening, mused, "both to please the children, the children go." gd21cmy

cheap uggs for women See Mrs. Shen excessive cruelty, "Well, well, first take a picture sent to parents."

cheapest place to buy uggs He worried, "said Shen Yin Bai, may wish to tell you frankly, my time is not much to return to Canada next week."

www.cheapestbootsshop.com The original blue and Shen Shen Jue sharing a hemisphere, there has been contact, send them a letter received Yinbai, inexplicable joy, but also move the feelings of homesickness.

 
At 3:18 AM, Anonymous cheapest boots said...

Cheap UGG Stone could not help but ask: "At the moment the summer, why come back?"

cheapest uggs ever Stones inconvenience comment, went to check the bathroom, Marley's work is very thoughtful, she was very satisfied. yt66dyg

cheap uggs for women I am eight o'clock tomorrow morning, ten o'clock you take more, so you may need to work overtime.

where to buy uggs cheap Underwear to buy for a large number two, as taken out from the laundry dryer is precisely the fit, the girls try on the occasion itself at the door, etc., have to give him a few comic boredom, leisurely also small, squat serve need, stone busy a sweat.

www.cheapestbootsshop.com She borrowed the car owner's driving down the mountain, this process does not account for what her house petrol cheaper.

 
At 6:21 AM, Anonymous Computer said...

Wow! This can be one particular of the most beneficial blogs we have ever arrived across on this subject. Actually Magnificent. I am also a specialist in this topic so I can understand your hard work.

Computer Accessories | buy webcam

 
At 8:14 AM, Anonymous SEO services (50%) said...

I love reading this post about "VML, SVG and Canvas". Thanks!

 
At 3:16 AM, Blogger qinbincai123 said...

And then, in a twinkling, I heard on the roofThe prancing and pawing of each little hoof.
As I drew in my head, and was turning around,Down the jus81ds chimney St. Nicholas came with a bound.
Cheap Snapback Hats
Cheap New Era Hats
Wholesale New Era Hats
Cheap Snapback Hats Wholesale
New Era Hats

 
At 7:46 AM, Anonymous Computer said...

Wow! This can be one particular of the most beneficial blogs we have ever arrived across on this subject. Actually Magnificent. I am also a specialist in this topic so I can understand your hard work.

buy webcam | Computer Accessories

 
At 5:58 AM, Anonymous dissertation assistance said...

Wow! This can be one particular of the most beneficial blogs we have ever arrived across on this subject.

 
At 4:43 PM, Anonymous pay per head said...

Wonderful post. If only I'd of come across something as wise and straightforward when I was starting out! See you at the reading!

 
At 2:47 AM, Anonymous Anonymous said...

Thanks for sharing such a nice post regards….

 
At 2:48 AM, Anonymous hearing aid said...

Thanks for sharing such a nice post regards….

 
At 9:34 AM, Anonymous Caloundra Bookkeeping said...

It's good to hear from you that you are sharing about the web project, a web application that makes heavy use of graphics. Thanks for sharing!

 

Post a Comment

<< Home