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
2022-03-19 14:37:33 -0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
f88573b24b7b208125db761755a59e8d734b74a5
f88573b2
1 parent
53252cdd
Fix typo "horizontalCenter"
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
11 deletions
pdf/CHANGELOG.md
pdf/lib/src/pdf/rect.dart
pdf/lib/src/widgets/basic.dart
pdf/CHANGELOG.md
View file @
f88573b
...
...
@@ -5,6 +5,7 @@
-
Fix missing endobj with compressed xref
-
Fix missing smask subtype
-
Add missing final "~>" to Ascii85 encoder
-
Fix typo "horizontalCenter"
## 3.7.2
...
...
pdf/lib/src/pdf/rect.dart
View file @
f88573b
...
...
@@ -40,7 +40,10 @@ class PdfRect {
double
get
right
=>
x
+
width
;
double
get
top
=>
y
+
height
;
double
get
horizondalCenter
=>
x
+
width
/
2
;
@Deprecated
(
'type => horizontalCenter'
)
double
get
horizondalCenter
=>
horizontalCenter
;
double
get
horizontalCenter
=>
x
+
width
/
2
;
double
get
verticalCenter
=>
y
+
height
/
2
;
@override
...
...
pdf/lib/src/widgets/basic.dart
View file @
f88573b
...
...
@@ -341,16 +341,16 @@ class Align extends SingleChildWidget {
final
headSize
=
math
.
min
(
child
!.
box
!.
bottom
*
0.2
,
10
);
context
.
canvas
..
moveTo
(
box
!.
left
+
child
!.
box
!.
horizon
d
alCenter
,
box
!.
left
+
child
!.
box
!.
horizon
t
alCenter
,
box
!.
bottom
,
)
..
lineTo
(
box
!.
left
+
child
!.
box
!.
horizon
d
alCenter
,
..
lineTo
(
box
!.
left
+
child
!.
box
!.
horizon
t
alCenter
,
box
!.
bottom
+
child
!.
box
!.
bottom
)
..
lineTo
(
box
!.
left
+
child
!.
box
!.
horizon
d
alCenter
-
headSize
,
..
lineTo
(
box
!.
left
+
child
!.
box
!.
horizon
t
alCenter
-
headSize
,
box
!.
bottom
+
child
!.
box
!.
bottom
-
headSize
)
..
moveTo
(
box
!.
left
+
child
!.
box
!.
horizon
d
alCenter
,
..
moveTo
(
box
!.
left
+
child
!.
box
!.
horizon
t
alCenter
,
box
!.
bottom
+
child
!.
box
!.
bottom
)
..
lineTo
(
box
!.
left
+
child
!.
box
!.
horizon
d
alCenter
+
headSize
,
..
lineTo
(
box
!.
left
+
child
!.
box
!.
horizon
t
alCenter
+
headSize
,
box
!.
bottom
+
child
!.
box
!.
bottom
-
headSize
);
}
...
...
@@ -358,14 +358,14 @@ class Align extends SingleChildWidget {
final
headSize
=
math
.
min
((
box
!.
top
-
child
!.
box
!.
top
-
box
!.
bottom
)
*
0.2
,
10
);
context
.
canvas
..
moveTo
(
box
!.
left
+
child
!.
box
!.
horizondalCenter
,
box
!.
top
)
..
lineTo
(
box
!.
left
+
child
!.
box
!.
horizondalCenter
,
..
moveTo
(
box
!.
left
+
child
!.
box
!.
horizontalCenter
,
box
!.
top
)
..
lineTo
(
box
!.
left
+
child
!.
box
!.
horizontalCenter
,
box
!.
bottom
+
child
!.
box
!.
top
)
..
lineTo
(
box
!.
left
+
child
!.
box
!.
horizon
d
alCenter
-
headSize
,
..
lineTo
(
box
!.
left
+
child
!.
box
!.
horizon
t
alCenter
-
headSize
,
box
!.
bottom
+
child
!.
box
!.
top
+
headSize
)
..
moveTo
(
box
!.
left
+
child
!.
box
!.
horizon
d
alCenter
,
..
moveTo
(
box
!.
left
+
child
!.
box
!.
horizon
t
alCenter
,
box
!.
bottom
+
child
!.
box
!.
top
)
..
lineTo
(
box
!.
left
+
child
!.
box
!.
horizon
d
alCenter
+
headSize
,
..
lineTo
(
box
!.
left
+
child
!.
box
!.
horizon
t
alCenter
+
headSize
,
box
!.
bottom
+
child
!.
box
!.
top
+
headSize
);
}
...
...
Please
register
or
login
to post a comment