class SkBitmap; class SkBlender; class SkData; class SkDevice; class SkImage; class SkMesh; class SkPaint; class SkPath; class SkPDFDocument; class SkRecorder; class SkRRect; class SkSpecialImage; class SkSurface; class SkSurfaceProps; class SkVertices; enumclass SkBlendMode; struct SkIRect; struct SkISize; struct SkImageInfo; struct SkPoint; struct SkRect;
namespace sktext { class GlyphRun; class GlyphRunList;
}
SkRecorder* baseRecorder() const override { // TODO(kjlubick) the creation of this should likely involve a CPU context. return skcpu::Recorder::TODO();
}
private: // TODO(vandebo): push most of SkPDFDevice's state into a core object in // order to get the right access levels without using friend. friendclass ScopedContentEntry;
class MarkedContentManager {
public:
MarkedContentManager(SkPDFDocument* document, SkDynamicMemoryWStream* out);
~MarkedContentManager();
// Sets the current element identifier. Associate future draws with the structure element // with the given element identifier. Element identifier 0 is reserved to mean no structure // element. void setNextMarksElemId(int nextMarksElemId);
// The current element identifier. int elemId() const;
// Starts a marked-content sequence for a content item for the structure element with the // current element identifier. If there is an active marked-content sequence associated with // a different element identifier the active marked-content sequence will first be closed. // If there is no structure element with the current element identifier then the // marked-content sequence will not be started. void beginMark();
// Tests if there is an active marked-content sequence. bool hasActiveMark() const;
// Accumulates an upper left location for the active mark. The point is in PDF page space // and so is y-up. Only use if this.hasActiveMark() void accumulate(const SkPoint& p);
// Returns the key (index) into the ParentsTree. Will be true if marks were made.
SkPDFParentTreeKey structParentsKey() const { return fStructParentsKey; }
void reset() { // fDoc remains the same // fOut remains the same (device's fContent may be reset but remains valid)
SkASSERT(!this->hasActiveMark()); // fCurrentlyActiveMark and fCurrentMarksElemId unset // fNextMarksElemId unchanged, it is still this device's active structure element id.
fStructParentsKey = SkPDFParentTreeKey();
}
private:
SkPDFDocument* fDoc;
SkDynamicMemoryWStream* fOut;
SkPDFStructTree::Mark fCurrentlyActiveMark; int fCurrentMarksElemId; int fNextMarksElemId;
SkPDFParentTreeKey fStructParentsKey;
} fMarkManager;
// Set alpha to true if making a transparency group form x-objects.
SkPDFIndirectReference makeFormXObjectFromDevice(bool alpha = false);
SkPDFIndirectReference makeFormXObjectFromDevice(SkIRect bbox, bool alpha = false);
// If the paint or clip is such that we shouldn't draw anything, this // returns nullptr and does not create a content entry. // setUpContentEntry and finishContentEntry can be used directly, but // the preferred method is to use the ScopedContentEntry helper class.
SkDynamicMemoryWStream* setUpContentEntry(const SkClipStack* clipStack, const SkMatrix& matrix, const SkPaint& paint,
SkScalar,
SkPDFIndirectReference* dst); void finishContentEntry(const SkClipStack*, SkBlendMode, SkPDFIndirectReference, SkPath*); bool isContentEmpty();
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 und die Messung sind noch experimentell.