// forceQuality will prevent BoxBlur from falling back to the low quality approach when sigma // is very small -- this can be used predict the margin bump ahead of time without completely // replicating the internal logic. This permits not only simpler caching of blurred results, // but also being able to predict precisely at what pixels the blurred profile of e.g. a // rectangle will lie. // // Calling details: // * calculate margin - if src.fImage is null, then this call only calculates the border. // * failure - if src.fImage is not null, failure is signal with dst->fImage being // null.
// the "ground truth" blur does a gaussian convolution; it's slow // but useful for comparison purposes.
[[nodiscard]] staticbool BlurGroundTruth(SkScalar sigma,
SkMaskBuilder* dst, const SkMask& src,
SkBlurStyle,
SkIVector* margin = nullptr);
// If radius > 0, return the corresponding sigma, else return 0 static SkScalar SK_SPI ConvertRadiusToSigma(SkScalar radius); // If sigma > 0.5, return the corresponding radius, else return 0 static SkScalar SK_SPI ConvertSigmaToRadius(SkScalar sigma);
/* Helper functions for analytic rectangle blurs */
/** Look up the intensity of the (one dimnensional) blurred half-plane. @paramprofileTheprecomputed1Dblurprofile;initializedbyComputeBlurProfilebelow. @paramlocthelocationtolookup;Thelookupwillclampinvalidinputs,but meaningfuldataareavailablebetween0andblurred_width @paramblurred_widthThewidthofthefinal,blurredrectangle @paramsharp_widthThewidthoftheoriginal,unblurredrectangle.
*/ static uint8_t ProfileLookup(const uint8_t* profile, int loc, int blurredWidth, int sharpWidth);
/** Populate the profile of a 1D blurred halfplane. @paramprofileThe1Dtabletofillin @paramsizeShouldbe6*sigmabytes @paramsigmaThestandarddeviationofthegaussianblurkernel
*/ staticvoid ComputeBlurProfile(uint8_t* profile, int size, SkScalar sigma);
/** Compute an entire scanline of a blurred step function. This is a 1D helper that willproduceboththehorizontalandverticalprofilesoftheblurryrectangle. @parampixelsLocationtostoretheresultingpixeldata;allocatedandmanagedbycaller @paramprofilePrecomputedblurprofilecomputedbyComputeBlurProfileabove. @paramwidthSizeofthepixelsarray. @paramsigmaStandarddeviationofthegaussianblurkernelusedtocomputetheprofile; thisimplicitlygivesthesizeofthepixelsarray.
*/
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.