This site requires JavaScript, please enable it in your browser!
Greenfoot back

Report as inappropriate.

JetLennit
JetLennit presents ...

2013/10/6

Negative Color

I am working on a negative color class..

2703 views / 15 in the last 7 days

2 votes | 0 in the last 7 days

Tags: with-source

open in greenfoot
Your browser does not support the canvas tag.
Well, I'm logged in... I'll log in and back out and see if that works.
Not working still...
Busch2207Busch2207

2013/10/6

Maybe try to restart your browser. That always works for me! :)
Other scenarios that use my image work, just not this one... I'll try resetting browser as well.
Got the scrollbars, instead of an error.
JetLennitJetLennit

2013/10/6

Try zooming out and zooming back in in your browser
Entity1037Entity1037

2013/10/7

Then negative color of my blue fire in my Profile Pic is red fire... interesting...
SPowerSPower

2013/10/7

About the getKey stuff, I think if ("space".equals(Greenfoot.getKey()) is best, because the thing you check on is never null and is capable of being compared to something that is null. And I think if (Greenfoot.getKey() == "space") compares the pointers, because the 2 Strings are instances, not data types like integers, so this will always return false. But I may be wrong, because I can't run the scenario on this device and therefore don't know if it will work :)
Busch2207Busch2207

2013/10/7

In older Java-versions 'Greenfoot.getKey() == "space"' always returned wrong. But in the current version, this will return true, if both strings are the same! :)
SPowerSPower

2013/10/8

Oh, ok, thanks for the info!

See all comments

Want to leave a comment? You must first log in.

Who likes this?

birdy Kartoffelbrot