Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Namespaces | Macros | Functions | Variables
SkPDFUtils.h File Reference
#include "include/core/SkPaint.h"
#include "include/core/SkPath.h"
#include "include/core/SkShader.h"
#include "include/core/SkStream.h"
#include "include/docs/SkPDFDocument.h"
#include "src/base/SkUTF.h"
#include "src/base/SkUtils.h"
#include "src/pdf/SkPDFTypes.h"
#include "src/shaders/SkShaderBase.h"
#include "src/utils/SkFloatToDecimal.h"

Go to the source code of this file.

Namespaces

namespace  SkPDFUtils
 

Macros

#define PRINT_NOT_IMPL(str)
 
#define NOT_IMPLEMENTED(condition, assert)
 

Functions

template<typename T >
bool SkPackedArrayEqual (T *u, T *v, size_t n)
 
const char * SkPDFUtils::BlendModeName (SkBlendMode)
 
std::unique_ptr< SkPDFArraySkPDFUtils::RectToArray (const SkRect &rect)
 
std::unique_ptr< SkPDFArraySkPDFUtils::MatrixToArray (const SkMatrix &matrix)
 
void SkPDFUtils::MoveTo (SkScalar x, SkScalar y, SkWStream *content)
 
void SkPDFUtils::AppendLine (SkScalar x, SkScalar y, SkWStream *content)
 
void SkPDFUtils::AppendRectangle (const SkRect &rect, SkWStream *content)
 
void SkPDFUtils::EmitPath (const SkPath &path, SkPaint::Style paintStyle, bool doConsumeDegerates, SkWStream *content, SkScalar tolerance=0.25f)
 
void SkPDFUtils::EmitPath (const SkPath &path, SkPaint::Style paintStyle, SkWStream *content, SkScalar tolerance=0.25f)
 
void SkPDFUtils::ClosePath (SkWStream *content)
 
void SkPDFUtils::PaintPath (SkPaint::Style style, SkPathFillType fill, SkWStream *content)
 
void SkPDFUtils::StrokePath (SkWStream *content)
 
void SkPDFUtils::ApplyGraphicState (int objectIndex, SkWStream *content)
 
void SkPDFUtils::ApplyPattern (int objectIndex, SkWStream *content)
 
size_t SkPDFUtils::ColorToDecimal (uint8_t value, char result[5])
 
size_t SkPDFUtils::ColorToDecimalF (float value, char result[kFloatColorDecimalCount+2])
 
void SkPDFUtils::AppendColorComponent (uint8_t value, SkWStream *wStream)
 
void SkPDFUtils::AppendColorComponentF (float value, SkWStream *wStream)
 
void SkPDFUtils::AppendScalar (SkScalar value, SkWStream *stream)
 
void SkPDFUtils::WriteUInt16BE (SkWStream *wStream, uint16_t value)
 
void SkPDFUtils::WriteUInt8 (SkWStream *wStream, uint8_t value)
 
void SkPDFUtils::WriteUTF16beHex (SkWStream *wStream, SkUnichar utf32)
 
SkMatrix SkPDFUtils::GetShaderLocalMatrix (const SkShader *shader)
 
bool SkPDFUtils::InverseTransformBBox (const SkMatrix &matrix, SkRect *bbox)
 
void SkPDFUtils::PopulateTilingPatternDict (SkPDFDict *pattern, SkRect &bbox, std::unique_ptr< SkPDFDict > resources, const SkMatrix &matrix)
 
bool SkPDFUtils::ToBitmap (const SkImage *img, SkBitmap *dst)
 
void SkPDFUtils::AppendTransform (const SkMatrix &, SkWStream *)
 
void SkPDFUtils::GetDateTime (SkPDF::DateTime *)
 

Variables

static constexpr unsigned SkPDFUtils::kFloatColorDecimalCount = 4
 

Macro Definition Documentation

◆ NOT_IMPLEMENTED

#define NOT_IMPLEMENTED (   condition,
  assert 
)
Value:
do { \
if ((bool)(condition)) { \
PRINT_NOT_IMPL("NOT_IMPLEMENTED: " #condition "\n"); \
SkDEBUGCODE(SkASSERT(!assert);) \
} \
} while (0)
#define SkASSERT(cond)
Definition SkAssert.h:116

Definition at line 39 of file SkPDFUtils.h.

40 { \
41 if ((bool)(condition)) { \
42 PRINT_NOT_IMPL("NOT_IMPLEMENTED: " #condition "\n"); \
43 SkDEBUGCODE(SkASSERT(!assert);) \
44 } \
45 } while (0)

◆ PRINT_NOT_IMPL

#define PRINT_NOT_IMPL (   str)

Definition at line 36 of file SkPDFUtils.h.

Function Documentation

◆ SkPackedArrayEqual()

template<typename T >
bool SkPackedArrayEqual ( T u,
T v,
size_t  n 
)

Definition at line 27 of file SkPDFUtils.h.

27 {
28 SkASSERT(u);
29 SkASSERT(v);
30 return 0 == memcmp(u, v, n * sizeof(T));
31}
#define T