SkPaint paint; paint.setFilterQuality(SkFilterQuality::kHigh_FilterQuality); // ... SkFilterQuality quality = paint.getFilterQuality(); if (quality == SkFilterQuality::kLow_FilterQuality) { // ...do something }
sk_spThis code gets a canvas from a Skia surface, retrieves the current paint object with getPaint(), and then gets the filter quality with getFilterQuality(). It checks if the filter quality is low and performs some action if it is. In both examples, the SkPaint class is used in conjunction with other Skia classes and functions to create and manipulate graphics. Therefore, the package library that SkPaint belongs to is Skia.surface = ...; // create a surface SkCanvas* canvas = surface->getCanvas(); SkFilterQuality quality = canvas->getPaint().getFilterQuality(); if (quality == SkFilterQuality::kLow_FilterQuality) { // ...do something }