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

Drawing RoundRect with line style is missing right side line?

Explorer ,
Aug 01, 2021 Aug 01, 2021

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.

 

256
Translate
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

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

Translate
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

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.

Translate
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

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

Translate
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

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

Cheers

Translate
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
LATEST

you're welcome.  post your results.

Translate
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