Flutter Engine
The Flutter Engine
Classes | Functions
imagesource.cpp File Reference
#include "gm/gm.h"
#include "include/core/SkBitmap.h"
#include "include/core/SkCanvas.h"
#include "include/core/SkColor.h"
#include "include/core/SkImage.h"
#include "include/core/SkImageFilter.h"
#include "include/core/SkPaint.h"
#include "include/core/SkRect.h"
#include "include/core/SkRefCnt.h"
#include "include/core/SkScalar.h"
#include "include/core/SkSize.h"
#include "include/core/SkString.h"
#include "include/effects/SkImageFilters.h"
#include "tools/ToolUtils.h"
#include "tools/fonts/FontToolUtils.h"
#include <utility>

Go to the source code of this file.

Classes

class  ImageSourceGM
 

Functions

static void fill_rect_filtered (SkCanvas *canvas, const SkRect &clipRect, sk_sp< SkImageFilter > filter)
 

Function Documentation

◆ fill_rect_filtered()

static void fill_rect_filtered ( SkCanvas canvas,
const SkRect clipRect,
sk_sp< SkImageFilter filter 
)
static

Definition at line 28 of file imagesource.cpp.

30 {
32 paint.setImageFilter(std::move(filter));
33 canvas->save();
34 canvas->clipRect(clipRect);
35 canvas->drawPaint(paint);
36 canvas->restore();
37}
void clipRect(const SkRect &rect, SkClipOp op, bool doAntiAlias)
Definition: SkCanvas.cpp:1361
void restore()
Definition: SkCanvas.cpp:461
void drawPaint(const SkPaint &paint)
Definition: SkCanvas.cpp:1668
int save()
Definition: SkCanvas.cpp:447
const Paint & paint
Definition: color_source.cc:38
clipRect(r.rect, r.opAA.op(), r.opAA.aa())) template<> void Draw