Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Setting filters
Started by Quantumwave Aug 09 2013 05:04 PM

1 reply to this topic
[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

Quantumwave

[GLOBAL: userInfoPane.html]
Quantumwave
  • Contributor

  • 103 posts
  • Corona SDK

The way filters are set is a bit confusing by setting the effect property to a string:

 

image.fill.effect = "filter.name"

 

Once this is set, image.fill.effect is not a string, but a user data object!

 

Then to set the filter parameter(s):

 

image.fill.effect.paramName = paramValue

 

This could be even more confusing or impossible if multiple filters (highly desired feature) are applied.

 

Something like this would be much simpler:

displayObj:setFilter(filterName, filterParams)

 

Also, is there a way to disable a filter effect or reset the image? I tried setting image.fill.effect to nil and empty string without success.

 



[TOPIC: post.html]
#2

Quantumwave

[GLOBAL: userInfoPane.html]
Quantumwave
  • Contributor

  • 103 posts
  • Corona SDK

Done testing for all the filters and found some that are not working properly:

 

filter.contrast : Only see a white rect on the top-right.

 

filter.saturation : Same as above.

 

filter.linearGradient : even though the alpha channel is set to less than 100% or even 0%, there is no transparency in the gradient.

 

~

 

filter.monotone : Why aren't the parameters set as vec4 like the other filters but need to specify r,g,b,a?

 

Thanks,

Dave




[topic_controls]
[/topic_controls]