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
2019-05-17 09:31:31 -0400
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
f36f4858c3569ab831bc16c61818c175228d7e7f
f36f4858
1 parent
1bda9dbc
Add default value to alpha in PdfColor variants
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
pdf/CHANGELOG.md
pdf/lib/src/color.dart
pdf/CHANGELOG.md
View file @
f36f485
# 1.3.10
*
Deprecate the document argument in Printing.sharePdf()
*
Add default value to alpha in PdfColor variants
# 1.3.9
*
Fix Transform Widget alignment
...
...
pdf/lib/src/color.dart
View file @
f36f485
...
...
@@ -198,7 +198,7 @@ class PdfColorHsv extends PdfColor {
super
(
red
,
green
,
blue
,
alpha
);
factory
PdfColorHsv
.
fromRgb
(
double
red
,
double
green
,
double
blue
,
[
double
alpha
])
{
[
double
alpha
=
1.0
])
{
final
double
max
=
math
.
max
(
red
,
math
.
max
(
green
,
blue
));
final
double
min
=
math
.
min
(
red
,
math
.
min
(
green
,
blue
));
final
double
delta
=
max
-
min
;
...
...
@@ -280,7 +280,7 @@ class PdfColorHsv extends PdfColor {
class
PdfColorHsl
extends
PdfColor
{
factory
PdfColorHsl
(
double
hue
,
double
saturation
,
double
lightness
,
[
double
alpha
])
{
[
double
alpha
=
1.0
])
{
final
double
chroma
=
(
1.0
-
(
2.0
*
lightness
-
1.0
).
abs
())
*
saturation
;
final
double
secondary
=
chroma
*
(
1.0
-
(((
hue
/
60.0
)
%
2.0
)
-
1.0
).
abs
());
...
...
@@ -323,7 +323,7 @@ class PdfColorHsl extends PdfColor {
:
super
(
red
,
green
,
blue
,
alpha
);
factory
PdfColorHsl
.
fromRgb
(
double
red
,
double
green
,
double
blue
,
[
double
alpha
])
{
[
double
alpha
=
1.0
])
{
final
double
max
=
math
.
max
(
red
,
math
.
max
(
green
,
blue
));
final
double
min
=
math
.
min
(
red
,
math
.
min
(
green
,
blue
));
final
double
delta
=
max
-
min
;
...
...
Please
register
or
login
to post a comment