Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

First impressions
Started by Quantumwave Aug 07 2013 09:52 PM

11 replies 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

  • 117 posts
  • Corona SDK

Trying out the samples and going through the migration guide. One thing struck me is the name Container, it doesn't convey its graphic nature, and less importantly, is not a short word. How about Box, DisplayBox, or RectGroup?
 
There are numerous errors in the docs, either spelling or word usage. Someone needs to proof-read the docs before final release.
 
Range changed from 0,255 to 0,1: For certain properties this seems logical... but for RGB it seems unintuitive. What is the reason behind this change for colors?
 
The new filter effects can be useful for one of my apps. Some are a bit cheesy though and are rarely used in the real-world. Another cool effect would be tilt-shift.
 
For filters such as filter.vignette, is it possible to adjust the center point so it's not always at the center of the image?
 
Will continue testing things out.
 
Cheers,
Dave


[TOPIC: post.html]
#2

walter

[GLOBAL: userInfoPane.html]
walter
  • Moderator

  • 726 posts
  • Alumni

Thanks for feedback on filters --- what are other real-world filter effects you'd like to see?

 

For color channels, we wanted to make things more consistent. The 'alpha' property was always [0,1]. And all our filter effects handle their params (including colors) in [0,1] ranges, so we thought it made a lot more sense to be consistent so you wouldn't have to remember when to use one range and when to use another.

 

We have talked about allowing you to submit values as strings, e.g. strings containing hex. 

 

rect:setFillColor( "80" ) --> same as rect:setFillColor( 0.5 )
rect:setFillColor( "FFFFFF80" ) --> same as rect:setFillColor( 1, 1, 1, 0.5 )

 

The thought here would be that this is perhaps even more natural for anyone wanting to deal with [0,255] ranges.



[TOPIC: post.html]
#3

jstrahan

[GLOBAL: userInfoPane.html]
jstrahan
  • Corona Geek

  • 1,926 posts
  • Corona SDK

one issue i see but may be just the way i do it but when i need a color i go to photoshop find the color i want and copy the rgb value now ill have to either build a function to convert these number to 0-1 or do the math and put in the number. i do like the hex option



[TOPIC: post.html]
#4

horacebury

[GLOBAL: userInfoPane.html]
horacebury
  • Corona Geek

  • 3,070 posts
  • Corona SDK

Trying out the samples and going through the migration guide. One thing struck me is the name Container, it doesn't convey its graphic nature, and less importantly, is not a short word. How about Box, DisplayBox, or RectGroup?

 

I actually like the name Container because it reflects the XCode implementation. While I don't actually read Obj-C, it has already made conversations with our in-house iOS developers more straightforward. As a function on the display.* library, I think it is fairly descriptive.

 

Having said that, "container" is quick a generic word. Is there any possibility it would be confused with future functionality as yet unknown to us outside of CoronaLabs?



[TOPIC: post.html]
#5

ingemar

[GLOBAL: userInfoPane.html]
ingemar
  • Corona Geek

  • 2,733 posts
  • Enterprise

Trying out the samples and going through the migration guide. One thing struck me is the name Container, it doesn't convey its graphic nature, and less importantly, is not a short word. How about Box, DisplayBox, or RectGroup?

 

I disagree. I think Container makes perfect sense. It conveys the meaning that you put a bunch of stuff in it, and it also limits that content (crops it) to its bounds, much like a real container.

 

...and (even though less important) how is DisplayBox or RectGroup shorter ;) ?



[TOPIC: post.html]
#6

walter

[GLOBAL: userInfoPane.html]
walter
  • Moderator

  • 726 posts
  • Alumni

One last thing about color ranges. We wanted to go to floating point in anticipation of 16 and 32 bit color channels (HDR imaging). At some point, 8 bit color channels (0-255) will become like floppy drives.



[TOPIC: post.html]
#7

Quantumwave

[GLOBAL: userInfoPane.html]
Quantumwave
  • Contributor

  • 117 posts
  • Corona SDK

We have talked about allowing you to submit values as strings, e.g. strings containing hex. 

 

rect:setFillColor( "80" ) --> same as rect:setFillColor( 0.5 )
rect:setFillColor( "FFFFFF80" ) --> same as rect:setFillColor( 1, 1, 1, 0.5 )

 

The thought here would be that this is perhaps even more natural for anyone wanting to deal with [0,255] ranges.

 

This would be very useful. I use a tool called ColorSchemer Studio where I can copy a color as a hex string; to be able to paste directly into code is very handy.



[TOPIC: post.html]
#8

bjsorrentino

[GLOBAL: userInfoPane.html]
bjsorrentino
  • Veteran

  • 8,506 posts
  • Corona SDK

Hi @qwidave,

One thing we're pondering is the "format" to accept. For example, would it accept 3-character (or 4-character) hex strings like "FFFF" for pure white with 100% opacity? Would this be confusing to developers? Do you have any strong opinions or thoughts on this?

 

Thanks,

Brent



[TOPIC: post.html]
#9

Quantumwave

[GLOBAL: userInfoPane.html]
Quantumwave
  • Contributor

  • 117 posts
  • Corona SDK

Hi Brent,

 

I prefer at least 6 characters after 0x (e.g. 0x5F4DD5) if specified as a number. For the alpha, ending with FF (e.g. 0x5F4DD5FF) for 100% opacity. Is specifying this as string a better alternative?

 

Cheers,

Dave



[TOPIC: post.html]
#10

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,534 posts
  • Enterprise

I always thought that CSS's way of letting you use 3 characters was just lazy.  In CSS you don't specify an alpha with the color code if you're using hex. You have to use the rgba() function and pass in the decimal values for them and if I'm not mistaken, the A is a 0-1 range, where the rest of 0-255. 

 

The hex option is nice for people coming from web backgrounds and an easy way to quickly get color codes out of Photoshop.



[TOPIC: post.html]
#11

Lerg

[GLOBAL: userInfoPane.html]
Lerg
  • Contributor

  • 538 posts
  • Corona Staff

In my apps I just end up creating a wrapper for those functions. I call

app.setFillColor(obj, 'green') or whatever other color name as string. And I define a special table that holds all those names as tables of color components. Like colors['green'] = {0, 255, 0}

 

It would make sense for setColor functions to accept tables as well.



[TOPIC: post.html]
#12

rakoonic2

[GLOBAL: userInfoPane.html]
rakoonic2
  • Contributor

  • 503 posts
  • Corona SDK

As a temporary measure you could just add in a helper function that you pass your old values to and it returns a new table with the same values but the RGB ones divided by 255.




[topic_controls]
[/topic_controls]