Showing
2 changed files
with
6 additions
and
4 deletions
| @@ -48,10 +48,11 @@ class PdfColor { | @@ -48,10 +48,11 @@ class PdfColor { | ||
| 48 | 48 | ||
| 49 | const PdfColor(this.r, this.g, this.b, [this.a = 1.0]); | 49 | const PdfColor(this.r, this.g, this.b, [this.a = 1.0]); |
| 50 | 50 | ||
| 51 | - factory PdfColor.fromInt(int color) { | ||
| 52 | - return PdfColor((color >> 16 & 0xff) / 255.0, (color >> 8 & 0xff) / 255.0, | ||
| 53 | - (color & 0xff) / 255.0, (color >> 24 & 0xff) / 255.0); | ||
| 54 | - } | 51 | + const PdfColor.fromInt(int color) |
| 52 | + : r = (color >> 16 & 0xff) / 255.0, | ||
| 53 | + g = (color >> 8 & 0xff) / 255.0, | ||
| 54 | + b = (color & 0xff) / 255.0, | ||
| 55 | + a = (color >> 24 & 0xff) / 255.0; | ||
| 55 | 56 | ||
| 56 | factory PdfColor.fromHex(String color) { | 57 | factory PdfColor.fromHex(String color) { |
| 57 | return PdfColor( | 58 | return PdfColor( |
-
Please register or login to post a comment