Commit 03e1da99 authored by Jeff Muizelaar's avatar Jeff Muizelaar

Add an implementation of CairoOutputDev::startPage()

The implementation initializes fill_pattern and stroke_pattern
to black matching SplashOutputDev. This fixes #12504.
parent 825c942d
...@@ -128,6 +128,15 @@ void CairoOutputDev::startDoc(XRef *xrefA) { ...@@ -128,6 +128,15 @@ void CairoOutputDev::startDoc(XRef *xrefA) {
fontEngine = new CairoFontEngine(ft_lib); fontEngine = new CairoFontEngine(ft_lib);
} }
void CairoOutputDev::startPage(int pageNum, GfxState *state) {
/* set up some per page defaults */
cairo_pattern_destroy(fill_pattern);
fill_pattern = cairo_pattern_create_rgb(0., 0., 0.);
cairo_pattern_destroy(stroke_pattern);
stroke_pattern = cairo_pattern_create_rgb(0., 0., 0.);
}
void CairoOutputDev::drawLink(Link *link, Catalog *catalog) { void CairoOutputDev::drawLink(Link *link, Catalog *catalog) {
} }
......
...@@ -82,7 +82,7 @@ public: ...@@ -82,7 +82,7 @@ public:
//----- initialization and control //----- initialization and control
// Start a page. // Start a page.
virtual void startPage(int pageNum, GfxState *state) { } virtual void startPage(int pageNum, GfxState *state);
// End a page. // End a page.
virtual void endPage() { } virtual void endPage() { }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment