Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
poppler
poppler
Commits
bfe82d7c
Commit
bfe82d7c
authored
Aug 20, 2021
by
Thomas Freitag
Committed by
Albert Astals Cid
Aug 21, 2021
Browse files
instead of creating new scanner just copy the existing ones
parent
dd507d1a
Pipeline
#385926
passed with stages
in 6 minutes and 40 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
splash/SplashClip.cc
View file @
bfe82d7c
...
...
@@ -72,7 +72,6 @@ SplashClip::SplashClip(SplashCoord x0, SplashCoord y0, SplashCoord x1, SplashCoo
SplashClip
::
SplashClip
(
SplashClip
*
clip
)
{
int
yMinAA
,
yMaxAA
;
int
i
;
antialias
=
clip
->
antialias
;
...
...
@@ -92,14 +91,7 @@ SplashClip::SplashClip(SplashClip *clip)
for
(
i
=
0
;
i
<
length
;
++
i
)
{
paths
[
i
]
=
clip
->
paths
[
i
]
->
copy
();
flags
[
i
]
=
clip
->
flags
[
i
];
if
(
antialias
)
{
yMinAA
=
yMinI
*
splashAASize
;
yMaxAA
=
(
yMaxI
+
1
)
*
splashAASize
-
1
;
}
else
{
yMinAA
=
yMinI
;
yMaxAA
=
yMaxI
;
}
scanners
[
i
]
=
new
SplashXPathScanner
(
paths
[
i
],
flags
[
i
]
&
splashClipEO
,
yMinAA
,
yMaxAA
);
scanners
[
i
]
=
clip
->
scanners
[
i
]
->
copy
();
}
}
...
...
splash/SplashXPathScanner.cc
View file @
bfe82d7c
...
...
@@ -112,6 +112,18 @@ SplashXPathScanner::SplashXPathScanner(SplashXPath *xPathA, bool eoA, int clipYM
computeIntersections
();
}
SplashXPathScanner
::
SplashXPathScanner
(
SplashXPathScanner
*
scanner
)
{
xPath
=
scanner
->
xPath
;
eo
=
scanner
->
eo
;
xMin
=
scanner
->
xMin
;
yMin
=
scanner
->
yMin
;
xMax
=
scanner
->
xMax
;
yMax
=
scanner
->
yMax
;
partialClip
=
scanner
->
partialClip
;
allIntersections
=
scanner
->
allIntersections
;
}
SplashXPathScanner
::~
SplashXPathScanner
()
{
}
void
SplashXPathScanner
::
getBBoxAA
(
int
*
xMinA
,
int
*
yMinA
,
int
*
xMaxA
,
int
*
yMaxA
)
...
...
splash/SplashXPathScanner.h
View file @
bfe82d7c
...
...
@@ -53,6 +53,9 @@ public:
// Create a new SplashXPathScanner object. <xPathA> must be sorted.
SplashXPathScanner
(
SplashXPath
*
xPathA
,
bool
eoA
,
int
clipYMin
,
int
clipYMax
);
// Copy a scanner.
SplashXPathScanner
*
copy
()
{
return
new
SplashXPathScanner
(
this
);
}
~
SplashXPathScanner
();
SplashXPathScanner
(
const
SplashXPathScanner
&
)
=
delete
;
...
...
@@ -93,6 +96,9 @@ public:
// will update <x0> and <x1>.
void
clipAALine
(
SplashBitmap
*
aaBuf
,
int
*
x0
,
int
*
x1
,
int
y
);
protected:
SplashXPathScanner
(
SplashXPathScanner
*
scanner
);
private:
void
computeIntersections
();
bool
addIntersection
(
double
segYMin
,
double
segYMax
,
int
y
,
int
x0
,
int
x1
,
int
count
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment