Skip to main content
Known Participant
August 1, 2021
Question

Drawing RoundRect with line style is missing right side line?

  • August 1, 2021
  • 1 reply
  • 317 views

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:

Does anyone know why?

 

Thanks in advance.

 

    This topic has been closed for replies.

    1 reply

    kglad
    Community Expert
    Community Expert
    August 2, 2021

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

    Known Participant
    August 3, 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.

    kglad
    Community Expert
    Community Expert
    August 3, 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);