Go to the source code of this file.
|
static SkScalar | approx_arc_length (const SkPoint points[], int count) |
|
static SkScalar | bilerp (SkScalar tx, SkScalar ty, SkScalar c00, SkScalar c10, SkScalar c01, SkScalar c11) |
|
static skvx::float4 | bilerp (SkScalar tx, SkScalar ty, const skvx::float4 &c00, const skvx::float4 &c10, const skvx::float4 &c01, const skvx::float4 &c11) |
|
static void | skcolor_to_float (SkPMColor4f *dst, const SkColor *src, int count, SkColorSpace *dstCS) |
|
static void | float_to_skcolor (SkColor *dst, const SkPMColor4f *src, int count, SkColorSpace *srcCS) |
|
◆ approx_arc_length()
Calculate the approximate arc length given a bezier curve's control points. Returns -1 if bad calc (i.e. non-finite)
Definition at line 154 of file SkPatchUtils.cpp.
154 {
156 return 0;
157 }
159 for (
int i = 0;
i <
count - 1;
i++) {
161 }
162 return SkIsFinite(arcLength) ? arcLength : -1;
163}
static const int points[]
static bool SkIsFinite(T x, Pack... values)
static float Distance(const SkPoint &a, const SkPoint &b)
◆ bilerp() [1/2]
Definition at line 172 of file SkPatchUtils.cpp.
176 {
177 auto a = c00 * (1.f - tx) + c10 * tx;
178 auto b = c01 * (1.f - tx) + c11 * tx;
179 return a * (1.f - ty) +
b * ty;
180}
◆ bilerp() [2/2]
◆ float_to_skcolor()
Definition at line 248 of file SkPatchUtils.cpp.
248 {
254}
SkAssertResult(font.textToGlyphs("Hello", 5, SkTextEncoding::kUTF8, glyphs, std::size(glyphs))==count)
@ kPremul_SkAlphaType
pixel components are premultiplied by alpha
@ kBGRA_8888_SkColorType
pixel with 8 bits for blue, green, red, alpha; in 32-bit word
@ kRGBA_F32_SkColorType
pixel using C float for red, green, blue, alpha; in 128-bit word
bool SkConvertPixels(const SkImageInfo &dstInfo, void *dstPixels, size_t dstRB, const SkImageInfo &srcInfo, const void *srcPixels, size_t srcRB)
sk_sp< T > sk_ref_sp(T *obj)
static sk_sp< SkColorSpace > MakeSRGB()
static SkImageInfo Make(int width, int height, SkColorType ct, SkAlphaType at)
◆ skcolor_to_float()
◆ kPartitionSize
const int kPartitionSize = 10 |
|
static |