Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Functions
f16to8888busted.cpp File Reference
#include "tools/fiddle/examples.h"

Go to the source code of this file.

Functions

 REG_FIDDLE (f16to8888busted, 256, 256, false, 0)
 

Function Documentation

◆ REG_FIDDLE()

REG_FIDDLE ( f16to8888busted  ,
256  ,
256  ,
false  ,
 
)

Definition at line 4 of file f16to8888busted.cpp.

4 {
5void draw(SkCanvas* canvas) {
6 // Create the linear-rgb color space and the image info
10
13 offscreen->getCanvas()->drawRect(SkRect::MakeXYWH(25, 25, 50, 50), paint);
14
15 // Take a snapshot from surface and draw it on the canvas
16 sk_sp<SkImage> img = offscreen->makeImageSnapshot();
17 canvas->drawImageRect(img, SkRect::MakeWH(100, 100), SkSamplingOptions());
18}
19} // END FIDDLE
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
Definition DM.cpp:213
@ kPremul_SkAlphaType
pixel components are premultiplied by alpha
Definition SkAlphaType.h:29
@ kRGBA_F16_SkColorType
pixel with half floats for red, green, blue, alpha;
Definition SkColorType.h:38
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
Definition aaclip.cpp:27
void drawImageRect(const SkImage *, const SkRect &src, const SkRect &dst, const SkSamplingOptions &, const SkPaint *, SrcRectConstraint)
static sk_sp< SkColorSpace > MakeSRGBLinear()
const Paint & paint
SK_API sk_sp< SkSurface > Raster(const SkImageInfo &imageInfo, size_t rowBytes, const SkSurfaceProps *surfaceProps)
static SkImageInfo Make(int width, int height, SkColorType ct, SkAlphaType at)
static constexpr SkRect MakeXYWH(float x, float y, float w, float h)
Definition SkRect.h:659
static constexpr SkRect MakeWH(float w, float h)
Definition SkRect.h:609