8 #ifndef SkDocument_DEFINED
9 #define SkDocument_DEFINED
13 #include "include/private/base/SkAPI.h"
static constexpr SkScalar SK_ScalarDefaultRasterDPI
SK_ScalarDefaultDPI is 72 dots per inch.
Definition: SkDocument.h:20
float SkScalar
Definition: SkScalar.h:14
SkCanvas provides an interface for drawing, and how the drawing is clipped and transformed.
Definition: SkCanvas.h:99
High-level API for creating a document-based canvas.
Definition: SkDocument.h:32
SkCanvas * 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.
virtual void onClose(SkWStream *)=0
void close()
Call close() when all pages have been drawn.
State
Definition: SkDocument.h:78
@ kInPage_State
Definition: SkDocument.h:80
@ kBetweenPages_State
Definition: SkDocument.h:79
State getState() const
Definition: SkDocument.h:83
void abort()
Call abort() to stop producing the document immediately.
virtual SkCanvas * onBeginPage(SkScalar width, SkScalar height)=0
virtual void onEndPage()=0
void endPage()
Call endPage() when the content for the current page has been drawn (into the canvas returned by begi...
SkWStream * getStream()
Definition: SkDocument.h:76
Definition: SkRefCnt.h:119
Definition: SkStream.h:218
SkRect holds four float coordinates describing the upper and lower bounds of a rectangle.
Definition: SkRect.h:582