/* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 2 -*- * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
PrintTargetSkPDF::PrintTargetSkPDF(const IntSize& aSize,
UniquePtr<SkWStream> aStream)
: PrintTarget(/* not using cairo_surface_t */ nullptr, aSize),
mOStream(std::move(aStream)),
mPageCanvas(nullptr),
mRefCanvas(nullptr) {}
PrintTargetSkPDF::~PrintTargetSkPDF() {
Finish(); // ensure stream is flushed
// Make sure mPDFDoc and mRefPDFDoc are destroyed before our member streams // (which they wrap) are destroyed:
mPDFDoc = nullptr;
mRefPDFDoc = nullptr;
}
nsresult PrintTargetSkPDF::BeginPrinting(const nsAString& aTitle, const nsAString& aPrintToFileName,
int32_t aStartPage, int32_t aEndPage) { // We need to create the SkPDFDocument here rather than in CreateOrNull // because it's only now that we are given aTitle which we want for the // PDF metadata.
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.