Added methods to draw and measure text.
These methods provide a common way to draw HTML text above a canvas. The getTextInfo method generates div HTML for text with a given font style/class and angle, measures the element's dimensions, and saves everything in a cache. The drawText method takes the resulting entry, finishes generating the inline styles necessary to position the div, and adds the result to a buffer. The render method dumps the buffer into an overlay and expires unused cache entries.
Showing
Please
register
or
sign in
to comment