• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Drawing RoundRect with line style is missing right side line?

Explorer ,
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

128

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 Expert ,
Aug 01, 2021 Aug 01, 2021

Copy link to clipboard

Copied

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

Votes

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
Explorer ,
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.

Votes

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 Expert ,
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);

Votes

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
Explorer ,
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

Votes

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 Expert ,
Aug 06, 2021 Aug 06, 2021

Copy link to clipboard

Copied

LATEST

you're welcome.  post your results.

Votes

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