Toggle navigation
Toggle navigation
This project
Loading...
Sign in
flutter_package
/
dart_pdf
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
David PHAM-VAN
2020-02-02 18:37:23 -0500
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
1702086d8b7464debfa89a302c2f56be131a4939
1702086d
1 parent
e8b42e27
Fix HSV and HSL Color constructors
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
5 deletions
pdf/CHANGELOG.md
pdf/lib/src/color.dart
pdf/CHANGELOG.md
View file @
1702086
...
...
@@ -6,6 +6,7 @@
-
Fix GridView when empty
-
Reorder MultiPage paint operations
-
Fix Bullet widget styling
-
Fix HSV and HSL Color constructors
## 1.4.1
...
...
pdf/lib/src/color.dart
View file @
1702086
...
...
@@ -247,8 +247,8 @@ class PdfColorHsv extends PdfColor {
blue
=
secondary
;
}
return
PdfColorHsv
.
_
(
hue
,
saturation
,
value
,
red
+
match
,
green
+
match
,
blue
+
match
,
alpha
);
return
PdfColorHsv
.
_
(
hue
,
saturation
,
value
,
(
red
+
match
).
clamp
(
0.0
,
1.0
),
(
green
+
match
).
clamp
(
0.0
,
1.0
),
(
blue
+
match
).
clamp
(
0.0
,
1.0
),
alpha
);
}
const
PdfColorHsv
.
_
(
this
.
hue
,
this
.
saturation
,
this
.
value
,
double
red
,
...
...
@@ -375,13 +375,22 @@ class PdfColorHsl extends PdfColor {
green
=
0.0
;
blue
=
secondary
;
}
return
PdfColorHsl
.
_
(
hue
,
saturation
,
lightness
,
alpha
,
red
+
match
,
green
+
match
,
blue
+
match
);
return
PdfColorHsl
.
_
(
hue
,
saturation
,
lightness
,
alpha
,
(
red
+
match
).
clamp
(
0.0
,
1.0
),
(
green
+
match
).
clamp
(
0.0
,
1.0
),
(
blue
+
match
).
clamp
(
0.0
,
1.0
));
}
const
PdfColorHsl
.
_
(
this
.
hue
,
this
.
saturation
,
this
.
lightness
,
double
alpha
,
double
red
,
double
green
,
double
blue
)
:
super
(
red
,
green
,
blue
,
alpha
);
:
assert
(
hue
>=
0
&&
hue
<
360
),
assert
(
saturation
>=
0
&&
saturation
<=
1
),
assert
(
lightness
>=
0
&&
lightness
<=
1
),
super
(
red
,
green
,
blue
,
alpha
);
factory
PdfColorHsl
.
fromRgb
(
double
red
,
double
green
,
double
blue
,
[
double
alpha
=
1.0
])
{
...
...
Please
register
or
login
to post a comment