如何使用html5 canvas创建垂直表标题文本? [英] how to create vertical table heading text with html5 canvas?

查看:203
本文介绍了如何使用html5 canvas创建垂直表标题文本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有人知道是否可以在html5画布中创建垂直文本然后将画布调整为内容?

Does anyone know if it's possible to create vertical text in a html5 canvas and then have the canvas resize to the content?

我看过有关添加文字的帖子然后旋转它但不知道如何让画布随后自动调整大小。

I've seen posts about adding text and rotating it but don't know how to have the canvas resize automatically to it afterwards.

这是一个带有其中一个表的页面的链接:这里

Here is a link to a page with one of the tables: here

我基本上想用不同画布中的垂直文字替换顶部标题。团队名称需要是动态的,我宁愿不将它们生成为jpg的。

I basically want to replace the top headings with vertical text in different canvases. The team names need to be dynamic and I'd rather not have them generated as jpg's.

谢谢!

推荐答案

在最后我重新写了它,所以它完全符合我的要求而且它是在 http://wncba.co.uk/results/javascript/vertical-text.js 如果有人想使用它。

In then end I re-wrote it so it did exactly what I wanted and it's at http://wncba.co.uk/results/javascript/vertical-text.js if anyone wants to use it.

这是一个显示其工作的页面: http://wncba.co.uk/results/?action=navigate&season=2012&league_id=2&division_id=7&nav_key=4e16159770efb07ac6e6bae4f86c7dc5

Here is a page that shows it working: http://wncba.co.uk/results/?action=navigate&season=2012&league_id=2&division_id=7&nav_key=4e16159770efb07ac6e6bae4f86c7dc5

这篇关于如何使用html5 canvas创建垂直表标题文本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆