Change-Id: I4b6259590fa0693ee0522b4999a1c0fe250b173d Reviewed-on: https://skia-review.googlesource.com/c/skia/+/212504 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
36 KiB
undocumented
Constants
Const | Value | Description |
---|---|---|
SkClipOp::kDifference |
0 | |
SkClipOp::kIntersect |
1 |
static sk sp<SkColorSpace> MakeSRGBLinear()
bool gammaCloseToSRGB() const
static bool Equals(const SkColorSpace* src, const SkColorSpace* dst)
std::unique_ptr<SkCanvas> SK_API SkCreateColorSpaceXformCanvas(SkCanvas* target, sk sp<SkColorSpace> targetCS)
SK_API void SkDebugf(const char format[], ...)
---
Type | Member | Description |
---|---|---|
SkDeserialPictureProc | fPictureProc |
|
void* | fPictureCtx |
|
SkDeserialTypefaceProc | fTypefaceProc |
|
void* | fTypefaceCtx |
SkCanvas* beginPage(SkScalar width, SkScalar height, const SkRect* content = NULL)
void draw(SkCanvas*, const SkMatrix* = NULL)
Constants
Const | Value | Description |
---|---|---|
kNone_SkFilterQuality |
0 | |
kLow_SkFilterQuality |
1 | |
kMedium_SkFilterQuality |
2 | |
kHigh_SkFilterQuality |
3 |
Constants
Const | Value | Description |
---|---|---|
SkTextEncoding::kUTF8 |
0 | |
SkTextEncoding::kUTF16 |
1 | |
SkTextEncoding::kUTF32 |
2 | |
SkTextEncoding::kGlyphID |
3 |
Constants
Const | Value | Description |
---|---|---|
kNo_SkFontHinting |
0 | |
kSlight_SkFontHinting |
1 | |
kNormal_SkFontHinting |
2 | |
kFull_SkFontHinting |
3 |
SkFontMetrics is filled out by SkPaint::getFontMetrics. SkFontMetrics contents reflect the values computed by Font Manager using Typeface. Values are set to zero if they are not available.
All vertical values are relative to the baseline, on a y-axis pointing down. Zero is on the baseline, negative values are above the baseline, and positive values are below the baseline.
fUnderlineThickness and fUnderlinePosition have a bit set in fFlags if their values are valid, since their value may be zero.
fStrikeoutThickness and fStrikeoutPosition have a bit set in fFlags if their values are valid, since their value may be zero.
FontMetricsFlags are set in fFlags when underline and strikeout metrics are valid; the underline or strikeout metric may be valid and zero. Fonts with embedded bitmaps may not have valid underline or strikeout metrics.
Constants
Const | Value | Description |
---|---|---|
SkFontMetrics::kUnderlineThicknessIsValid_Flag |
0x0001 | set if fUnderlineThickness is valid |
SkFontMetrics::kUnderlinePositionIsValid_Flag |
0x0002 | set if fUnderlinePosition is valid |
SkFontMetrics::kStrikeoutThicknessIsValid_Flag |
0x0004 | set if fStrikeoutThickness is valid |
SkFontMetrics::kStrikeoutPositionIsValid_Flag |
0x0008 | set if fStrikeoutPosition is valid |
Type | Member | Description |
---|---|---|
uint32_t | fFlags |
is set to FontMetricsFlags when metrics are valid |
SkScalar | fTop |
Greatest extent above the baseline for any glyph. Typically less than zero. |
SkScalar | fAscent |
Recommended distance above the baseline to reserve for a line of text. Typically less than zero. |
SkScalar | fDescent |
Recommended distance below the baseline to reserve for a line of text. Typically greater than zero. |
SkScalar | fBottom |
Greatest extent below the baseline for any glyph. Typically greater than zero. |
SkScalar | fLeading |
Recommended distance to add between lines of text. Typically greater than or equal to zero. |
SkScalar | fAvgCharWidth |
Average character width, if it is available. Zero if no average width is stored in the font. |
SkScalar | fMaxCharWidth |
maximum character width |
SkScalar | fXMin |
Minimum bounding box x-axis value for all Glyphs. Typically less than zero. |
SkScalar | fXMax |
Maximum bounding box x-axis value for all Glyphs. Typically greater than zero. |
SkScalar | fXHeight |
May be zero if no lower-case height is stored in the font. |
SkScalar | fCapHeight |
May be zero if no upper-case height is stored in the font. |
SkScalar | fUnderlineThickness |
If the metric is valid, the kUnderlineThicknessIsValid Flag is set in fFlags. If kUnderlineThicknessIsValid Flag is clear, fUnderlineThickness is zero. |
SkScalar | fUnderlinePosition |
Position of the top of the underline stroke relative to the baseline.
Typically positive when valid.
If the metric is valid, the kUnderlinePositionIsValid Flag is set in fFlags. If kUnderlinePositionIsValid Flag is clear, fUnderlinePosition is zero. |
SkScalar | fStrikeoutThickness |
If the metric is valid, the kStrikeoutThicknessIsValid Flag is set in fFlags. If kStrikeoutThicknessIsValid Flag is clear, fStrikeoutThickness is zero. |
SkScalar | fStrikeoutPosition |
Position of the bottom of the strikeout stroke relative to the baseline.
Typically negative when valid.
If the metric is valid, the kStrikeoutPositionIsValid Flag is set in fFlags. If kStrikeoutPositionIsValid Flag is clear, fStrikeoutPosition is zero. |
bool hasUnderlineThickness(SkScalar* thickness) const
bool hasUnderlinePosition(SkScalar* position) const
bool hasStrikeoutThickness(SkScalar* thickness) const
bool hasStrikeoutPosition(SkScalar* position) const
void flush()
int32_t width() const
int32_t height() const
Constants
Const | Value | Description |
---|---|---|
SkPaintDefaults_Hinting |
2 | |
SkPaintDefaults_TextSize |
12 | |
SkPaintDefaults_MiterLimit |
4 |
bool SK_API Op(const SkPath& one, const SkPath& two, SkPathOp op, SkPath* result)
SkCanvas* beginRecording(const SkRect& bounds, SkBBHFactory* bbhFactory = NULL, uint32_t recordFlags = 0)
int width() const
int height() const
bool isImmutable() const
void setImmutable()
---
Type | Member | Description |
---|---|---|
SkScalar | fSCos |
|
SkScalar | fSSin |
|
SkScalar | fTx |
|
SkScalar | fTy |
static std::unique_ptr<SkCanvas> MakeCanvas(std::unique_ptr<SkRasterHandleAllocator>, const SkImageInfo&, const Rec* rec = nullptr)
bool isValid() const
---
Type | Member | Description |
---|---|---|
SkSerialPictureProc | fPictureProc |
|
void* | fPictureCtx |
|
SkSerialTypefaceProc | fTypefaceProc |
|
void* | fTypefaceCtx |
Constants
Const | Value | Description |
---|---|---|
SkShader::kClamp_TileMode |
0 | |
SkShader::kRepeat_TileMode |
1 | |
SkShader::kMirror_TileMode |
2 |
static sk sp<SkShader> MakeBitmapShader(const SkBitmap& src, TileMode tmx, TileMode tmy, const SkMatrix* localMatrix = nullptr)
static sk sp<SkShader> MakeCompose(sk sp<SkShader> dst, sk sp<SkShader> src, SkBlendMode mode, float lerp = 1)
int32_t width() const
int32_t height() const
Constants
Const | Value | Description |
---|---|---|
SkSurfaceProps::kLegacyFontHost_InitType |
0 |
Topic
bool isValid() const
SkFontID uniqueID() const