Is it only possible to set one lineStyle per graphics object?

All the graphics (rectangle and line) drawn are black, even though I have set a previous lineStyle for the rectangle.

  1. Is this expected behavior?

  2. What is the optimal solution for this?

// Container rectangle
// Border
graphics.lineStyle(3, 0x990000, 1);
graphics.strokeRoundedRect(x, y, CARD_WIDTH, CARD_HEIGHT, 8);

// Separator
graphics.lineStyle(1, 0x000000, 1);
graphics.moveTo(x, y + CARD_HEADER_HEIGHT);
graphics.lineTo(x + CARD_WIDTH, y + CARD_HEADER_HEIGHT);
graphics.strokePath();

:waving_hand:

// Separator
graphics.lineStyle(1, 0x000000, 1);
graphics.beginPath();
graphics.moveTo(x, y + CARD_HEADER_HEIGHT);
graphics.lineTo(x + CARD_WIDTH, y + CARD_HEADER_HEIGHT);
graphics.strokePath();
graphics.closePath();

or

// Separator
graphics.lineStyle(1, 0x000000, 1);
graphics.lineBetween(x, y + CARD_HEADER_HEIGHT, x + CARD_WIDTH, y + CARD_HEADER_HEIGHT);

Thank you @samme !