Drawing RoundRect with line style is missing right side line?

Community Beginner ,
Aug 01, 2021 Aug 01, 2021

Copy link to clipboard

Copied

Hi, for some reason, whenever I draw a roundRect with a line style (an no fill), the right side of the rect is missing:

var _shape:Shape = new Shape();
_shape.graphics.lineStyle(lineThickness, _color, alpha);

_shape.graphics.drawRoundRect(0, 0, width, height, rounded, rounded);
addChild(_shape);

This is the result:

LWR_Recording

Does anyone know why?

 

Thanks in advance.

 

Views

63

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Aug 01, 2021 Aug 01, 2021

Copy link to clipboard

Copied

something must be overlying them or your param values are problematic.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Aug 03, 2021 Aug 03, 2021

Copy link to clipboard

Copied

Thanks for your response. I don't see any issues with my params.

 

It would help a lot if you could post code that works in your environment.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Aug 03, 2021 Aug 03, 2021

Copy link to clipboard

Copied

var _shape:Shape = new Shape();
var _lineThickness:int =2;
var _color:uint = 0xff0000;
var _width:int =100;
var _height:int = 200;
var _alpha:Number = 1;
_shape.graphics.lineStyle(_lineThickness, _color, _alpha);

_shape.graphics.drawRoundRect(10, 10, _width, _height, 10, 10);
addChild(_shape);

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Aug 06, 2021 Aug 06, 2021

Copy link to clipboard

Copied

Thanks so much. I will test that out and see if I get the same issue.

Cheers

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Aug 06, 2021 Aug 06, 2021

Copy link to clipboard

Copied

LATEST

you're welcome.  post your results.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines