enumclass ColorSpace : uint8_t { // Default Skia behavior: interpolate in the color space of the destination surface
kDestination,
// https://www.w3.org/TR/css-color-4/#interpolation-space
kSRGBLinear,
kLab,
kOKLab, // This is the same as kOKLab, except it has a simplified version of the CSS gamut // mapping algorithm (https://www.w3.org/TR/css-color-4/#css-gamut-mapping) // into Rec2020 space applied to it. // Warning: This space is experimental and should not be used in production.
kOKLabGamutMap,
kLCH,
kOKLCH, // This is the same as kOKLCH, except it has the same gamut mapping applied to it // as kOKLabGamutMap does. // Warning: This space is experimental and should not be used in production.
kOKLCHGamutMap,
kSRGB,
kHSL,
kHWB,
namespace SkShaders { /** Returns a shader that generates a linear gradient between the two specified points. *Iftheinputsareinvalid,thiswillreturnnullptr. *@parampointsArrayof2points,theend-pointsofthelinesegment *@paramgradDescriptionofthecolorsandinterpolationmethod *@paramlmOptionallocalmatrix,maybenull
*/
SK_API sk_sp<SkShader> LinearGradient(const SkPoint pts[2], const SkGradient&, const SkMatrix* lm = nullptr);
/** Returns a shader that generates a radial gradient given the center and radius. *@paramcenterThecenterofthecircleforthisgradient *@paramradiusMustbepositive.Theradiusofthecircleforthisgradient *@paramgradDescriptionofthecolorsandinterpolationmethod *@paramlmOptionallocalmatrix,maybenull
*/
SK_API sk_sp<SkShader> RadialGradient(SkPoint center, float radius, const SkGradient& grad, const SkMatrix* lm = nullptr);
/** Returns a shader that generates a conical gradient given two circles, or *returnsnulliftheinputsareinvalid.Thegradientinterpretsthe *twocirclesaccordingtothefollowingHTMLspec. *http://dev.w3.org/html5/2dcontext/#dom-context-2d-createradialgradient *@paramstartThecenterofthecircleforthisgradient *@paramstartRadiusMustbepositive.Theradiusofthecircleforthisgradient *@paramendThecenterofthecircleforthisgradient *@paramstartRadiusMustbepositive.Theradiusofthecircleforthisgradient *@paramgradDescriptionofthecolorsandinterpolationmethod *@paramlmOptionallocalmatrix,maybenull
*/
SK_API sk_sp<SkShader> TwoPointConicalGradient(SkPoint start, float startRadius,
SkPoint end, float endRadius, const SkGradient& grad, const SkMatrix* lm = nullptr);
/** Returns a shader that generates a sweep gradient given a center. *Theshaderacceptsnegativeanglesandangleslargerthan360,draws *between0and360degrees,similartotheCSSconic-gradient *semantics.0degreesmeanshorizontalpositivexaxis.Thestartangle *mustbelessthantheendangle,otherwiseanullpointeris *returned.Ifcolorstopsdonotcontain0and1butarewithinthis *range,therespectiveoutercolorstopisrepeatedfor0and1.Color *stopslessthan0areclampedto0,andgreaterthan1areclampedto1. *@paramcenterThecenterofthesweep *@paramstartAngleStartoftheangularrange,correspondingtopos==0. *@paramendAngleEndoftheangularrange,correspondingtopos==1. *@paramgradDescriptionofthecolorsandinterpolationmethod *@paramlmOptionallocalmatrix,maybenull
*/
SK_API sk_sp<SkShader> SweepGradient(SkPoint center, float startAngle, float endAngle, const SkGradient&, const SkMatrix* lm = nullptr); staticinline sk_sp<SkShader> SweepGradient(SkPoint center, const SkGradient& grad, const SkMatrix* lm = nullptr) { return SweepGradient(center, 0, 360, grad, lm);
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.