Flutter Engine
The Flutter Engine
Public Member Functions | Public Attributes | List of all members
SkMask::AlphaIter< SkMask::kBW_Format > Struct Reference

#include <SkMask.h>

Public Member Functions

 AlphaIter (const uint8_t *ptr, int offset)
 
 AlphaIter (const AlphaIter &that)
 
AlphaIteroperator++ ()
 
AlphaIteroperator-- ()
 
AlphaIteroperator>>= (uint32_t rb)
 
uint8_t operator* () const
 
bool operator< (const AlphaIter &that) const
 

Public Attributes

const uint8_t * fPtr
 
int fOffset
 

Detailed Description

Definition at line 136 of file SkMask.h.

Constructor & Destructor Documentation

◆ AlphaIter() [1/2]

SkMask::AlphaIter< SkMask::kBW_Format >::AlphaIter ( const uint8_t *  ptr,
int  offset 
)
inline

Definition at line 137 of file SkMask.h.

137: fPtr(ptr), fOffset(7 - offset) {}
SeparatedVector2 offset

◆ AlphaIter() [2/2]

SkMask::AlphaIter< SkMask::kBW_Format >::AlphaIter ( const AlphaIter< SkMask::kBW_Format > &  that)
inline

Definition at line 138 of file SkMask.h.

138: fPtr(that.fPtr), fOffset(that.fOffset) {}

Member Function Documentation

◆ operator*()

uint8_t SkMask::AlphaIter< SkMask::kBW_Format >::operator* ( ) const
inline

Definition at line 161 of file SkMask.h.

161{ return ((*fPtr) >> fOffset) & 1 ? 0xFF : 0; }

◆ operator++()

AlphaIter & SkMask::AlphaIter< SkMask::kBW_Format >::operator++ ( )
inline

Definition at line 139 of file SkMask.h.

139 {
140 if (0 < fOffset ) {
141 --fOffset;
142 } else {
143 ++fPtr;
144 fOffset = 7;
145 }
146 return *this;
147 }

◆ operator--()

AlphaIter & SkMask::AlphaIter< SkMask::kBW_Format >::operator-- ( )
inline

Definition at line 148 of file SkMask.h.

148 {
149 if (fOffset < 7) {
150 ++fOffset;
151 } else {
152 --fPtr;
153 fOffset = 0;
154 }
155 return *this;
156 }

◆ operator<()

bool SkMask::AlphaIter< SkMask::kBW_Format >::operator< ( const AlphaIter< SkMask::kBW_Format > &  that) const
inline

Definition at line 162 of file SkMask.h.

162 {
163 return fPtr < that.fPtr || (fPtr == that.fPtr && fOffset > that.fOffset);
164 }

◆ operator>>=()

AlphaIter & SkMask::AlphaIter< SkMask::kBW_Format >::operator>>= ( uint32_t  rb)
inline

Definition at line 157 of file SkMask.h.

157 {
158 fPtr = SkTAddOffset<const uint8_t>(fPtr, rb);
159 return *this;
160 }

Member Data Documentation

◆ fOffset

Definition at line 166 of file SkMask.h.

◆ fPtr

const uint8_t* SkMask::AlphaIter< SkMask::kBW_Format >::fPtr

Definition at line 165 of file SkMask.h.


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