These forums are currently read-only due to receiving more spam than actual discussion. Sorry.

It is currently Sat Dec 02, 2017 4:10 pm Advanced search

How small can you slice a HTML5 Canvas pixel?

Here you can discuss things related to HTML and the Web in general that do not fit in to other categories.

How small can you slice a HTML5 Canvas pixel?

Postby marcusbooster » Tue May 03, 2011 6:11 am

In Flash, pixels are calculated using twips, or twentieth of a pixel. Consequently, every position is always in multiples of 0.05. I haven't seen this mentioned in the HTML Canvas spec and am unable to trace the cursor position on Canvas. Does anyone know the accuracy of its pixel calculations?
marcusbooster
<h6>
 
Posts: 2
Joined: Tue May 03, 2011 6:09 am

Re: How small can you slice a HTML5 Canvas pixel?

Postby zcorpan » Tue May 03, 2011 2:02 pm

There's no limit. Or the limit is UA-defined. Browsers can have a high-res backing store for canvas.
zcorpan
<article>
 
Posts: 807
Joined: Tue Feb 06, 2007 8:29 pm
Location: Sweden

Re: How small can you slice a HTML5 Canvas pixel?

Postby marcusbooster » Tue May 03, 2011 3:10 pm

Sorry, I'll try to clarify what I mean.
I'm referring more to Zeno's paradox which says in order to move something from point A to point B, it must first move to a point halfway between the two. And then halfway again, ad infinitum.

So if I want to move on the x axis from point 0 to 100 at 0.5:
At frame 1: 50
Frame 2: 75
Frame 3: 87.5
Then: 93.75, 96.875, 98.4375... etc.
So at what step does the Canvas actually round-up to the next pixel?
marcusbooster
<h6>
 
Posts: 2
Joined: Tue May 03, 2011 6:09 am

Re: How small can you slice a HTML5 Canvas pixel?

Postby zcorpan » Tue May 03, 2011 3:57 pm

It's UA-defined. :)
zcorpan
<article>
 
Posts: 807
Joined: Tue Feb 06, 2007 8:29 pm
Location: Sweden


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest