PDA

View Full Version : Javascript Help



blackmage_nuke
09-23-2010, 03:24 AM
Ive just started messing around with javascript for my desktop gadgets and i came across this class (I think it's a class) where the code uses:


image.src = someimage.png;
image.rotation = degrees;

Anyway the problem is I cant find any information on this .rotation class no matter where I google, i cant see any custom defined class in the code (unless it just doesnt show up when opened as a text document) and every other example ive seen uses a different method of rotation.

What im actually looking for though is a way to set the .rotation to rotate images using nearest neighbour filtering rather than bilinear or whatever the default is using. This is because for some reason i get these ugly purple outines on rotated images around the transparencies. There is also a purple tinge in partial transparencies whether they are rotated or not. I guess I should also note the purple only shows up when two transparencies overlap.

Any ideas?

edit: fixed the purple thing, just set it so that the 'background' image in the html used g:image instead of g:background

Would still like to hear opinions on the matter though and correct any misconceptions i might have mentioned about javascript

edit2: my bad didnt fix it, all that did was set my background to white instead of transparent.

edit3: found out it was a common problem with gadgets and transparencies but i fixed it.