Showing
2 changed files
with
4 additions
and
3 deletions
| @@ -198,7 +198,7 @@ class PdfColorHsv extends PdfColor { | @@ -198,7 +198,7 @@ class PdfColorHsv extends PdfColor { | ||
| 198 | super(red, green, blue, alpha); | 198 | super(red, green, blue, alpha); |
| 199 | 199 | ||
| 200 | factory PdfColorHsv.fromRgb(double red, double green, double blue, | 200 | factory PdfColorHsv.fromRgb(double red, double green, double blue, |
| 201 | - [double alpha]) { | 201 | + [double alpha = 1.0]) { |
| 202 | final double max = math.max(red, math.max(green, blue)); | 202 | final double max = math.max(red, math.max(green, blue)); |
| 203 | final double min = math.min(red, math.min(green, blue)); | 203 | final double min = math.min(red, math.min(green, blue)); |
| 204 | final double delta = max - min; | 204 | final double delta = max - min; |
| @@ -280,7 +280,7 @@ class PdfColorHsv extends PdfColor { | @@ -280,7 +280,7 @@ class PdfColorHsv extends PdfColor { | ||
| 280 | 280 | ||
| 281 | class PdfColorHsl extends PdfColor { | 281 | class PdfColorHsl extends PdfColor { |
| 282 | factory PdfColorHsl(double hue, double saturation, double lightness, | 282 | factory PdfColorHsl(double hue, double saturation, double lightness, |
| 283 | - [double alpha]) { | 283 | + [double alpha = 1.0]) { |
| 284 | final double chroma = (1.0 - (2.0 * lightness - 1.0).abs()) * saturation; | 284 | final double chroma = (1.0 - (2.0 * lightness - 1.0).abs()) * saturation; |
| 285 | final double secondary = | 285 | final double secondary = |
| 286 | chroma * (1.0 - (((hue / 60.0) % 2.0) - 1.0).abs()); | 286 | chroma * (1.0 - (((hue / 60.0) % 2.0) - 1.0).abs()); |
| @@ -323,7 +323,7 @@ class PdfColorHsl extends PdfColor { | @@ -323,7 +323,7 @@ class PdfColorHsl extends PdfColor { | ||
| 323 | : super(red, green, blue, alpha); | 323 | : super(red, green, blue, alpha); |
| 324 | 324 | ||
| 325 | factory PdfColorHsl.fromRgb(double red, double green, double blue, | 325 | factory PdfColorHsl.fromRgb(double red, double green, double blue, |
| 326 | - [double alpha]) { | 326 | + [double alpha = 1.0]) { |
| 327 | final double max = math.max(red, math.max(green, blue)); | 327 | final double max = math.max(red, math.max(green, blue)); |
| 328 | final double min = math.min(red, math.min(green, blue)); | 328 | final double min = math.min(red, math.min(green, blue)); |
| 329 | final double delta = max - min; | 329 | final double delta = max - min; |
-
Please register or login to post a comment