Stroke size?

Hello!

How can I increase size stroke of object like rectangle? Or how can you do strokeWidth?

For a long time there was no news about LevelDirector. Will there be a new version or something else?

Oh come on :smiley: Just google it! Or http://letmegooglethat.com/?q=corona+sdk+stroke+width&l=1 :smiley:

The very first result is https://docs.coronalabs.com/api/type/ShapeObject/stroke.html which contains several code samples, including:

local paint = { 1, 0, 0.5 } local rect = display.newRect( 200, 300, 300, 300 ) rect.stroke = paint rect.strokeWidth = 4

LevelDirector is old news, as far as I can tell/remember. The official scene management library these days is composer (https://docs.coronalabs.com/api/library/composer/index.html).
 

Thank you!

Maybe there is a way to define .strokeWidth in the LDX?

I have no idea as to what LDX is.

Pease don’t confuse the old Director Class which was a Lua based scene manager and Level Director X which is a third-party layout tool from Retrofit Productions.

Rob

Unfortunately, there is not an option to specify the strokewidth, it was never requested, but I’ll certainly consider adding it.

You can always reference the object in code and then set a strokewidth.

Can i categorize objects with “Class” in object properties and set them global .strokeWidth? How can i implement that?

Ah, seems like I got the two mixed :smiley: Thanks for the heads up!

I tried learning about what the actual Level Director is, but I can’t actually connect to the website. I’m met with:

Access has been blocked.

Your IP [173.254.28.39] has been identified as spam

Protected by: AVH First Defense Against Spam

You’ve got some issues going on with your site. That IP isn’t mine and it isn’t even from my country. I also tried with a proxy and another device as well, but I’m met with the same message. It could be that your site has cached this error message and it is delivering it to all visitors. In any case, I thought to let you know as you are potentially losing business because of it.

@Xedur, thanks for letting me know about this, one of the plugins I use went rogue and seems to be blocking everyone, so I have now disabled it, you should be able to access it now.

@ok-sg - with regards to setting a class, if you want to set them to the same strokewidth, or use different class names for different stroke widths then this would be possible.

You can’t set them globally, but you can find the objects with a class name, and then iterate through the objects like below (untested)

local objects = myLevel:objectsWithClass("stroke2")

for k, v in pairs (objects) do v.view.strokeWidth=2 end

Thank you! 

Looking forward to new LDX updates!

Oh come on :smiley: Just google it! Or http://letmegooglethat.com/?q=corona+sdk+stroke+width&l=1 :smiley:

The very first result is https://docs.coronalabs.com/api/type/ShapeObject/stroke.html which contains several code samples, including:

local paint = { 1, 0, 0.5 } local rect = display.newRect( 200, 300, 300, 300 ) rect.stroke = paint rect.strokeWidth = 4

LevelDirector is old news, as far as I can tell/remember. The official scene management library these days is composer (https://docs.coronalabs.com/api/library/composer/index.html).
 

Thank you!

Maybe there is a way to define .strokeWidth in the LDX?

I have no idea as to what LDX is.

Pease don’t confuse the old Director Class which was a Lua based scene manager and Level Director X which is a third-party layout tool from Retrofit Productions.

Rob

Unfortunately, there is not an option to specify the strokewidth, it was never requested, but I’ll certainly consider adding it.

You can always reference the object in code and then set a strokewidth.

Can i categorize objects with “Class” in object properties and set them global .strokeWidth? How can i implement that?

Ah, seems like I got the two mixed :smiley: Thanks for the heads up!

I tried learning about what the actual Level Director is, but I can’t actually connect to the website. I’m met with:

Access has been blocked.

Your IP [173.254.28.39] has been identified as spam

Protected by: AVH First Defense Against Spam

You’ve got some issues going on with your site. That IP isn’t mine and it isn’t even from my country. I also tried with a proxy and another device as well, but I’m met with the same message. It could be that your site has cached this error message and it is delivering it to all visitors. In any case, I thought to let you know as you are potentially losing business because of it.

@Xedur, thanks for letting me know about this, one of the plugins I use went rogue and seems to be blocking everyone, so I have now disabled it, you should be able to access it now.

@ok-sg - with regards to setting a class, if you want to set them to the same strokewidth, or use different class names for different stroke widths then this would be possible.

You can’t set them globally, but you can find the objects with a class name, and then iterate through the objects like below (untested)

local objects = myLevel:objectsWithClass("stroke2")

for k, v in pairs (objects) do v.view.strokeWidth=2 end