Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
Horish_SkAntiHairBlitter Class Reference
Inheritance diagram for Horish_SkAntiHairBlitter:
SkAntiHairBlitter

Public Member Functions

SkFixed drawCap (int x, SkFixed fy, SkFixed dy, int mod64) override
 
SkFixed drawLine (int x, int stopx, SkFixed fy, SkFixed dy) override
 
- Public Member Functions inherited from SkAntiHairBlitter
 SkAntiHairBlitter ()
 
virtual ~SkAntiHairBlitter ()
 
SkBlittergetBlitter () const
 
void setup (SkBlitter *blitter)
 
virtual SkFixed drawCap (int x, SkFixed fy, SkFixed slope, int mod64)=0
 
virtual SkFixed drawLine (int x, int stopx, SkFixed fy, SkFixed slope)=0
 

Detailed Description

Definition at line 171 of file SkScan_Antihair.cpp.

Member Function Documentation

◆ drawCap()

SkFixed Horish_SkAntiHairBlitter::drawCap ( int  x,
SkFixed  fy,
SkFixed  dy,
int  mod64 
)
inlineoverridevirtual

Implements SkAntiHairBlitter.

Definition at line 173 of file SkScan_Antihair.cpp.

173 {
174 fy += SK_Fixed1/2;
175
176 int lower_y = fy >> 16;
177 uint8_t a = (uint8_t)((fy >> 8) & 0xFF);
178 unsigned a0 = SmallDot6Scale(255 - a, mod64);
179 unsigned a1 = SmallDot6Scale(a, mod64);
180 this->getBlitter()->blitAntiV2(x, lower_y - 1, a0, a1);
181
182 return fy + dy - SK_Fixed1/2;
183 }
#define SK_Fixed1
Definition: SkFixed.h:26
static int SmallDot6Scale(int value, int dot6)
SkBlitter * getBlitter() const
virtual void blitAntiV2(int x, int y, U8CPU a0, U8CPU a1)
Definition: SkBlitter.h:94
struct MyStruct a[10]
double x

◆ drawLine()

SkFixed Horish_SkAntiHairBlitter::drawLine ( int  x,
int  stopx,
SkFixed  fy,
SkFixed  dy 
)
inlineoverridevirtual

Implements SkAntiHairBlitter.

Definition at line 185 of file SkScan_Antihair.cpp.

185 {
186 SkASSERT(x < stopx);
187
188 fy += SK_Fixed1/2;
189 SkBlitter* blitter = this->getBlitter();
190 do {
191 int lower_y = fy >> 16;
192 uint8_t a = (uint8_t)((fy >> 8) & 0xFF);
193 blitter->blitAntiV2(x, lower_y - 1, 255 - a, a);
194 fy += dy;
195 } while (++x < stopx);
196
197 return fy - SK_Fixed1/2;
198 }
#define SkASSERT(cond)
Definition: SkAssert.h:116

The documentation for this class was generated from the following file: