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-12-29 17:33:18 -0400
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
8a7a7d91984214025cf5fe467857afbb4409cea5
8a7a7d91
1 parent
130ee7da
Reset graphic context
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
2 deletions
pdf/lib/src/pdf/graphics.dart
pdf/lib/src/widgets/multi_page.dart
pdf/lib/src/widgets/page.dart
pdf/lib/src/pdf/graphics.dart
View file @
8a7a7d9
...
...
@@ -321,6 +321,10 @@ class PdfGraphics {
buf
.
putString
(
']TJ ET
\n
'
);
}
void
reset
()
{
buf
.
putString
(
'0 Tr
\n
'
);
}
/// Sets the color for drawing
void
setColor
(
PdfColor
color
)
{
setFillColor
(
color
);
...
...
pdf/lib/src/widgets/multi_page.dart
View file @
8a7a7d9
...
...
@@ -212,8 +212,9 @@ class MultiPage extends Page {
pageFormat:
pageFormat
,
index:
index
==
null
?
null
:
(
index
++),
);
context
=
baseContext
.
copyWith
(
page:
pdfPage
,
canvas:
pdfPage
.
getGraphics
());
final
canvas
=
pdfPage
.
getGraphics
();
canvas
.
reset
();
context
=
baseContext
.
copyWith
(
page:
pdfPage
,
canvas:
canvas
);
assert
(()
{
if
(
Document
.
debug
)
{
...
...
pdf/lib/src/widgets/page.dart
View file @
8a7a7d9
...
...
@@ -111,6 +111,7 @@ class Page {
void
postProcess
(
Document
document
)
{
final
canvas
=
_pdfPage
.
getGraphics
();
canvas
.
reset
();
final
_margin
=
margin
;
var
constraints
=
mustRotate
?
BoxConstraints
(
...
...
Please
register
or
login
to post a comment