Flutter Engine
The Flutter Engine
Namespaces | Macros | Functions | Variables
SkPDFUtils.h File Reference
#include "include/core/SkMatrix.h"
#include "include/core/SkPaint.h"
#include "include/core/SkRefCnt.h"
#include "include/core/SkScalar.h"
#include "include/core/SkStream.h"
#include "include/private/base/SkAssert.h"
#include "include/private/base/SkDebug.h"
#include "src/base/SkUTF.h"
#include "src/base/SkUtils.h"
#include "src/shaders/SkShaderBase.h"
#include "src/utils/SkFloatToDecimal.h"
#include <cstdint>
#include <cstring>
#include <memory>

Go to the source code of this file.

Namespaces

namespace  SkPDF
 
namespace  SkPDFUtils
 

Macros

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

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,
  assertion 
)
Value:
do { \
if ((bool)(condition)) { \
PRINT_NOT_IMPL("NOT_IMPLEMENTED: " #condition "\n"); \
SkDEBUGCODE(SkASSERT(!assertion);) \
} \
} while (0)
#define SkASSERT(cond)
Definition: SkAssert.h:116

Definition at line 51 of file SkPDFUtils.h.

◆ PRINT_NOT_IMPL

#define PRINT_NOT_IMPL (   str)

Definition at line 48 of file SkPDFUtils.h.

Function Documentation

◆ SkPackedArrayEqual()

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

Definition at line 39 of file SkPDFUtils.h.

39 {
40 SkASSERT(u);
41 SkASSERT(v);
42 return 0 == memcmp(u, v, n * sizeof(T));
43}
#define T
Definition: precompiler.cc:65