Flutter Engine
The Flutter Engine
Classes | Macros | Functions
FatBitsSlide.cpp File Reference
#include "include/core/SkBlendMode.h"
#include "include/core/SkCanvas.h"
#include "include/core/SkColor.h"
#include "include/core/SkFont.h"
#include "include/core/SkImageInfo.h"
#include "include/core/SkMatrix.h"
#include "include/core/SkPaint.h"
#include "include/core/SkPath.h"
#include "include/core/SkPathUtils.h"
#include "include/core/SkPoint.h"
#include "include/core/SkRect.h"
#include "include/core/SkRefCnt.h"
#include "include/core/SkScalar.h"
#include "include/core/SkShader.h"
#include "include/core/SkString.h"
#include "include/core/SkSurface.h"
#include "include/core/SkTypes.h"
#include "src/core/SkPointPriv.h"
#include "tools/ToolUtils.h"
#include "tools/fonts/FontToolUtils.h"
#include "tools/viewer/ClickHandlerSlide.h"
#include "tools/viewer/Slide.h"

Go to the source code of this file.

Classes

class  FatBits
 
class  IndexClick
 
class  DrawLineSlide
 

Macros

#define FAT_PIXEL_COLOR   SK_ColorBLACK
 
#define PIXEL_CENTER_SIZE   3
 
#define WIRE_FRAME_COLOR   0xFFFF0000 /*0xFF00FFFF*/
 
#define WIRE_FRAME_SIZE   1.5f
 

Functions

static SkScalar apply_grid (SkScalar x)
 
static void apply_grid (SkPoint pts[], int count)
 
static void erase (SkSurface *surface)
 

Macro Definition Documentation

◆ FAT_PIXEL_COLOR

#define FAT_PIXEL_COLOR   SK_ColorBLACK

Definition at line 31 of file FatBitsSlide.cpp.

◆ PIXEL_CENTER_SIZE

#define PIXEL_CENTER_SIZE   3

Definition at line 32 of file FatBitsSlide.cpp.

◆ WIRE_FRAME_COLOR

#define WIRE_FRAME_COLOR   0xFFFF0000 /*0xFF00FFFF*/

Definition at line 33 of file FatBitsSlide.cpp.

◆ WIRE_FRAME_SIZE

#define WIRE_FRAME_SIZE   1.5f

Definition at line 34 of file FatBitsSlide.cpp.

Function Documentation

◆ apply_grid() [1/2]

static void apply_grid ( SkPoint  pts[],
int  count 
)
static

Definition at line 41 of file FatBitsSlide.cpp.

41 {
42 for (int i = 0; i < count; ++i) {
43 pts[i].set(apply_grid(pts[i].fX), apply_grid(pts[i].fY));
44 }
45}
static SkScalar apply_grid(SkScalar x)
int count
Definition: FontMgrTest.cpp:50
void set(float x, float y)
Definition: SkPoint_impl.h:200

◆ apply_grid() [2/2]

static SkScalar apply_grid ( SkScalar  x)
static

Definition at line 36 of file FatBitsSlide.cpp.

36 {
37 const SkScalar grid = 2;
38 return SkScalarRoundToScalar(x * grid) / grid;
39}
#define SkScalarRoundToScalar(x)
Definition: SkScalar.h:32
float SkScalar
Definition: extension.cpp:12
double x

◆ erase()

static void erase ( SkSurface surface)
static

Definition at line 47 of file FatBitsSlide.cpp.

47 {
48 surface->getCanvas()->clear(SK_ColorTRANSPARENT);
49}
constexpr SkColor SK_ColorTRANSPARENT
Definition: SkColor.h:99
VkSurfaceKHR surface
Definition: main.cc:49