Combined all 5 constructors into 1. The default argument values are the same as before in all cases except for the constructor with the bool real argument. There shouldn't have been any reason to use that constructor since "real" width lines have never been supported. But if you want to ensure the same behavior as before, specify widthStyle=lineWidthStyle.variable for any instance that previously set the bool real argument to any value.
In the majority of cases though, all that needs to be done is to add the argument hint for the width (e.g. LineType(.., .., w=5)).
Old: public constructor() { Old: public constructor(color lineColor) { Old: public constructor(color lineColor, lineStyle style, int width=0) { Old: public constructor(color lineColor, double width, bool real=false) { Old: public constructor(color lineColor, lineStyle style, lineWidthStyle widthStyle, double w) { New: public constructor(color lineColor=black, lineStyle style=lineStyle.solid, lineWidthStyle widthStyle=lineWidthStyle.unit, int w=0) {
Also consider if you should be using the LineType constructor at all. As long as the LineType instance does not need to be modified, it is recommended to get it using the lineType(..)-function instead, which returns a cached copy for improved performance.
Change the width argument from a double to an integer, which is what the value has always been converted to internally. If you have previously passed it a fractional value and is unsure what to replace it with, you can just cast it to an integer (e.g. myVar.int) to maintain the same behaviour as before.
Old: public str lineCacheKey(color c, lineStyle style, lineWidthStyle widthStyle, double width) : inline { New: public str lineCacheKey(color c, lineStyle style, lineWidthStyle widthStyle, int width) : inline { Old: public LineType lineType(color c, lineStyle style=lineStyle.solid, lineWidthStyle widthStyle=lineWidthStyle.unit, double width=0) { New: public LineType lineType(color c, lineStyle style=lineStyle.solid, lineWidthStyle widthStyle=lineWidthStyle.unit, int width=0) {