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

Public Member Functions

SkFixed drawCap (int y, SkFixed fx, SkFixed dx, int mod64) override
 
SkFixed drawLine (int y, int stopy, SkFixed fx, SkFixed dx) 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 201 of file SkScan_Antihair.cpp.

Member Function Documentation

◆ drawCap()

SkFixed VLine_SkAntiHairBlitter::drawCap ( int  y,
SkFixed  fx,
SkFixed  dx,
int  mod64 
)
inlineoverridevirtual

Implements SkAntiHairBlitter.

Definition at line 203 of file SkScan_Antihair.cpp.

203 {
204 SkASSERT(0 == dx);
205 fx += SK_Fixed1/2;
206
207 int x = fx >> 16;
208 int a = (uint8_t)((fx >> 8) & 0xFF);
209
210 unsigned ma = SmallDot6Scale(a, mod64);
211 if (ma) {
212 this->getBlitter()->blitV(x, y, 1, ma);
213 }
214 ma = SmallDot6Scale(255 - a, mod64);
215 if (ma) {
216 this->getBlitter()->blitV(x - 1, y, 1, ma);
217 }
218
219 return fx - SK_Fixed1/2;
220 }
#define SkASSERT(cond)
Definition: SkAssert.h:116
#define SK_Fixed1
Definition: SkFixed.h:26
static int SmallDot6Scale(int value, int dot6)
SkBlitter * getBlitter() const
virtual void blitV(int x, int y, int height, SkAlpha alpha)
Blit a vertical run of pixels with a constant alpha value.
Definition: SkBlitter.cpp:119
struct MyStruct a[10]
double y
double x
skia_private::AutoTArray< sk_sp< SkImageFilter > > filters TypedMatrix matrix TypedMatrix matrix SkScalar dx
Definition: SkRecords.h:208

◆ drawLine()

SkFixed VLine_SkAntiHairBlitter::drawLine ( int  y,
int  stopy,
SkFixed  fx,
SkFixed  dx 
)
inlineoverridevirtual

Implements SkAntiHairBlitter.

Definition at line 222 of file SkScan_Antihair.cpp.

222 {
223 SkASSERT(y < stopy);
224 SkASSERT(0 == dx);
225 fx += SK_Fixed1/2;
226
227 int x = fx >> 16;
228 int a = (uint8_t)((fx >> 8) & 0xFF);
229
230 if (a) {
231 this->getBlitter()->blitV(x, y, stopy - y, a);
232 }
233 a = 255 - a;
234 if (a) {
235 this->getBlitter()->blitV(x - 1, y, stopy - y, a);
236 }
237
238 return fx - SK_Fixed1/2;
239 }

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