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-01-20 16:51:58 -0500
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
f13cd8c219fbde9dddcd6b22f203c0cb99126a90
f13cd8c2
1 parent
64227a39
Change PdfColor.fromInt to const constructor
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
pdf/CHANGELOG.md
pdf/lib/src/color.dart
pdf/CHANGELOG.md
View file @
f13cd8c
# 1.1.1
*
Improve PdfPoint and PdfRect
*
Change PdfColor.fromInt to const constructor
# 1.1.0
*
Rename classes to satisfy Dart conventions
...
...
pdf/lib/src/color.dart
View file @
f13cd8c
...
...
@@ -48,10 +48,11 @@ class PdfColor {
const
PdfColor
(
this
.
r
,
this
.
g
,
this
.
b
,
[
this
.
a
=
1.0
]);
factory
PdfColor
.
fromInt
(
int
color
)
{
return
PdfColor
((
color
>>
16
&
0xff
)
/
255.0
,
(
color
>>
8
&
0xff
)
/
255.0
,
(
color
&
0xff
)
/
255.0
,
(
color
>>
24
&
0xff
)
/
255.0
);
}
const
PdfColor
.
fromInt
(
int
color
)
:
r
=
(
color
>>
16
&
0xff
)
/
255.0
,
g
=
(
color
>>
8
&
0xff
)
/
255.0
,
b
=
(
color
&
0xff
)
/
255.0
,
a
=
(
color
>>
24
&
0xff
)
/
255.0
;
factory
PdfColor
.
fromHex
(
String
color
)
{
return
PdfColor
(
...
...
Please
register
or
login
to post a comment