Flutter Engine
The Flutter Engine
|
#include <SkDocument.h>
Public Member Functions | |
SkCanvas * | beginPage (SkScalar width, SkScalar height, const SkRect *content=nullptr) |
void | endPage () |
void | close () |
void | abort () |
Public Member Functions inherited from SkRefCntBase | |
SkRefCntBase () | |
virtual | ~SkRefCntBase () |
bool | unique () const |
void | ref () const |
void | unref () const |
Protected Types | |
enum | State { kBetweenPages_State , kInPage_State , kClosed_State } |
Protected Member Functions | |
SkDocument (SkWStream *) | |
~SkDocument () override | |
virtual SkCanvas * | onBeginPage (SkScalar width, SkScalar height)=0 |
virtual void | onEndPage ()=0 |
virtual void | onClose (SkWStream *)=0 |
virtual void | onAbort ()=0 |
SkWStream * | getStream () |
State | getState () const |
High-level API for creating a document-based canvas. To use..
Definition at line 32 of file SkDocument.h.
|
protected |
Enumerator | |
---|---|
kBetweenPages_State | |
kInPage_State | |
kClosed_State |
Definition at line 79 of file SkDocument.h.
|
protected |
Definition at line 13 of file SkDocument.cpp.
|
overrideprotected |
Definition at line 15 of file SkDocument.cpp.
void SkDocument::abort | ( | ) |
Call abort() to stop producing the document immediately. The stream output must be ignored, and should not be trusted.
Definition at line 72 of file SkDocument.cpp.
SkCanvas * SkDocument::beginPage | ( | SkScalar | width, |
SkScalar | height, | ||
const SkRect * | content = nullptr |
||
) |
Begin a new page for the document, returning the canvas that will draw into the page. The document owns this canvas, and it will go out of scope when endPage() or close() is called, or the document is deleted. This will call endPage() if there is a currently active page.
Definition at line 32 of file SkDocument.cpp.
void SkDocument::close | ( | ) |
Call close() when all pages have been drawn. This will close the file or stream holding the document's contents. After close() the document can no longer add new pages. Deleting the document will automatically call close() if need be.
Definition at line 52 of file SkDocument.cpp.
void SkDocument::endPage | ( | ) |
Call endPage() when the content for the current page has been drawn (into the canvas returned by beginPage()). After this call the canvas returned by beginPage() will be out-of-scope.
Definition at line 45 of file SkDocument.cpp.
|
inlineprotected |
Definition at line 84 of file SkDocument.h.
|
inlineprotected |
Definition at line 77 of file SkDocument.h.
|
protectedpure virtual |
Implemented in SkPDFDocument.
|
protectedpure virtual |
Implemented in SkPDFDocument.
|
protectedpure virtual |
Implemented in SkPDFDocument.
|
protectedpure virtual |
Implemented in SkPDFDocument.