Flutter Engine
The Flutter Engine
SkPDFGraphicStackState.h
Go to the documentation of this file.
1// Copyright 2019 Google LLC.
2// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
3#ifndef SkPDFGraphicStackState_DEFINED
4#define SkPDFGraphicStackState_DEFINED
5
11
12#include <cstdint>
13
15struct SkIRect;
16
17// It is important to not confuse SkPDFGraphicStackState with SkPDFGraphicState, the
18// later being our representation of an object in the PDF file.
20 struct Entry {
24 SkScalar fTextScaleX = 1; // Zero means we don't care what the value is.
25 int fShaderIndex = -1;
27 };
28 // Must use stack for matrix, and for clip, plus one for no matrix or clip.
29 inline static constexpr int kMaxStackDepth = 2;
31 int fStackDepth = 0;
33
35 void updateClip(const SkClipStack* clipStack, const SkIRect& bounds);
36 void updateMatrix(const SkMatrix& matrix);
37 void updateDrawingState(const Entry& state);
38 void push();
39 void pop();
40 void drainStack();
42};
43
44#endif // SkPDFGraphicStackState_DEFINED
constexpr float SK_FloatNaN
static const uint32_t kWideOpenGenID
Definition: SkClipStack.h:387
static const SkMatrix & I()
Definition: SkMatrix.cpp:1544
float SkScalar
Definition: extension.cpp:12
struct MyStruct s
AtkStateType state
unsigned useCenter Optional< SkMatrix > matrix
Definition: SkRecords.h:258
Optional< SkRect > bounds
Definition: SkRecords.h:189
Definition: SkRect.h:32
Entry fEntries[kMaxStackDepth+1]
void updateMatrix(const SkMatrix &matrix)
SkPDFGraphicStackState(SkDynamicMemoryWStream *s=nullptr)
void updateDrawingState(const Entry &state)
SkDynamicMemoryWStream * fContentStream
static constexpr int kMaxStackDepth
void updateClip(const SkClipStack *clipStack, const SkIRect &bounds)