Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Classes | Public Member Functions | Protected Member Functions | List of all members
SkScalerContext_DW Class Reference

#include <SkScalerContext_win_dw.h>

Inheritance diagram for SkScalerContext_DW:
SkScalerContext

Public Member Functions

 SkScalerContext_DW (sk_sp< DWriteFontTypeface >, const SkScalerContextEffects &, const SkDescriptor *)
 
 ~SkScalerContext_DW () override
 
- Public Member Functions inherited from SkScalerContext
 SkScalerContext (sk_sp< SkTypeface >, const SkScalerContextEffects &, const SkDescriptor *)
 
virtual ~SkScalerContext ()
 
SkTypefacegetTypeface () const
 
SkMask::Format getMaskFormat () const
 
bool isSubpixel () const
 
bool isLinearMetrics () const
 
bool isVertical () const
 
SkGlyph makeGlyph (SkPackedGlyphID, SkArenaAlloc *)
 
void getImage (const SkGlyph &)
 
void getPath (SkGlyph &, SkArenaAlloc *)
 
sk_sp< SkDrawablegetDrawable (SkGlyph &)
 
void getFontMetrics (SkFontMetrics *)
 
const SkScalerContextRecgetRec () const
 
SkScalerContextEffects getEffects () const
 
SkAxisAlignment computeAxisAlignmentForHText () const
 

Protected Member Functions

GlyphMetrics generateMetrics (const SkGlyph &, SkArenaAlloc *) override
 
void generateImage (const SkGlyph &, void *imageBuffer) override
 
bool generatePath (const SkGlyph &, SkPath *) override
 
sk_sp< SkDrawablegenerateDrawable (const SkGlyph &) override
 
void generateFontMetrics (SkFontMetrics *) override
 
- Protected Member Functions inherited from SkScalerContext
void forceGenerateImageFromPath ()
 
void forceOffGenerateImageFromPath ()
 

Additional Inherited Members

- Public Types inherited from SkScalerContext
enum  Flags {
  kFrameAndFill_Flag = 0x0001 , kUnused = 0x0002 , kEmbeddedBitmapText_Flag = 0x0004 , kEmbolden_Flag = 0x0008 ,
  kSubpixelPositioning_Flag = 0x0010 , kForceAutohinting_Flag = 0x0020 , kHinting_Shift = 7 , kHintingBit1_Flag = 0x0080 ,
  kHintingBit2_Flag = 0x0100 , kLCD_Vertical_Flag = 0x0200 , kLCD_BGROrder_Flag = 0x0400 , kGenA8FromLCD_Flag = 0x0800 ,
  kLinearMetrics_Flag = 0x1000 , kBaselineSnap_Flag = 0x2000 , kNeedsForegroundColor_Flag = 0x4000
}
 
enum  { kHinting_Mask = kHintingBit1_Flag | kHintingBit2_Flag }
 
- Static Public Member Functions inherited from SkScalerContext
static size_t GetGammaLUTSize (SkScalar contrast, SkScalar paintGamma, SkScalar deviceGamma, int *width, int *height)
 
static bool GetGammaLUTData (SkScalar contrast, SkScalar paintGamma, SkScalar deviceGamma, uint8_t *data)
 
static void MakeRecAndEffects (const SkFont &font, const SkPaint &paint, const SkSurfaceProps &surfaceProps, SkScalerContextFlags scalerContextFlags, const SkMatrix &deviceMatrix, SkScalerContextRec *rec, SkScalerContextEffects *effects)
 
static void MakeRecAndEffectsFromFont (const SkFont &font, SkScalerContextRec *rec, SkScalerContextEffects *effects)
 
static std::unique_ptr< SkScalerContextMakeEmpty (sk_sp< SkTypeface > typeface, const SkScalerContextEffects &effects, const SkDescriptor *desc)
 
static SkDescriptorAutoDescriptorGivenRecAndEffects (const SkScalerContextRec &rec, const SkScalerContextEffects &effects, SkAutoDescriptor *ad)
 
static std::unique_ptr< SkDescriptorDescriptorGivenRecAndEffects (const SkScalerContextRec &rec, const SkScalerContextEffects &effects)
 
static void DescriptorBufferGiveRec (const SkScalerContextRec &rec, void *buffer)
 
static bool CheckBufferSizeForRec (const SkScalerContextRec &rec, const SkScalerContextEffects &effects, size_t size)
 
static SkMaskGamma::PreBlend GetMaskPreBlend (const SkScalerContextRec &rec)
 
static SkDescriptorCreateDescriptorAndEffectsUsingPaint (const SkFont &, const SkPaint &, const SkSurfaceProps &, SkScalerContextFlags scalerContextFlags, const SkMatrix &deviceMatrix, SkAutoDescriptor *ad, SkScalerContextEffects *effects)
 
- Static Protected Member Functions inherited from SkScalerContext
static void GenerateMetricsFromPath (SkGlyph *glyph, const SkPath &path, SkMask::Format format, bool verticalLCD, bool a8FromLCD, bool hairline)
 
static void SaturateGlyphBounds (SkGlyph *glyph, SkRect &&)
 
static void SaturateGlyphBounds (SkGlyph *glyph, SkIRect const &)
 
static void GenerateImageFromPath (SkMaskBuilder &dst, const SkPath &path, const SkMaskGamma::PreBlend &maskPreBlend, bool doBGR, bool verticalLCD, bool a8FromLCD, bool hairline)
 
- Protected Attributes inherited from SkScalerContext
SkScalerContextRec fRec
 
const SkMaskGamma::PreBlend fPreBlend
 

Detailed Description

Definition at line 27 of file SkScalerContext_win_dw.h.

Constructor & Destructor Documentation

◆ SkScalerContext_DW()

SkScalerContext_DW::SkScalerContext_DW ( sk_sp< DWriteFontTypeface ,
const SkScalerContextEffects ,
const SkDescriptor  
)

◆ ~SkScalerContext_DW()

SkScalerContext_DW::~SkScalerContext_DW ( )
override

Member Function Documentation

◆ generateDrawable()

sk_sp< SkDrawable > SkScalerContext_DW::generateDrawable ( const SkGlyph )
overrideprotectedvirtual

Returns the drawable for the glyph (if any).

The generated drawable will be lifetime scoped to the lifetime of this scaler context. This means the drawable may refer to the scaler context and associated font data.

The drawable does not need to be flattenable (e.g. implement getFactory and getTypeName). Any necessary serialization will be done with makePictureSnapshot.

Reimplemented from SkScalerContext.

◆ generateFontMetrics()

void SkScalerContext_DW::generateFontMetrics ( SkFontMetrics )
overrideprotectedvirtual

Retrieves font metrics.

Implements SkScalerContext.

◆ generateImage()

void SkScalerContext_DW::generateImage ( const SkGlyph glyph,
void *  imageBuffer 
)
overrideprotectedvirtual

Generates the contents of glyph.fImage. When called, glyph.fImage will be pointing to a pre-allocated, uninitialized region of memory of size glyph.imageSize(). This method may not change glyph.fMaskFormat.

Because glyph.imageSize() will determine the size of fImage, generateMetrics will be called before generateImage.

Implements SkScalerContext.

◆ generateMetrics()

GlyphMetrics SkScalerContext_DW::generateMetrics ( const SkGlyph ,
SkArenaAlloc  
)
overrideprotectedvirtual

Implements SkScalerContext.

◆ generatePath()

bool SkScalerContext_DW::generatePath ( const SkGlyph ,
SkPath  
)
overrideprotectedvirtual

Sets the passed path to the glyph outline. If this cannot be done the path is set to empty; Does not apply subpixel positioning to the path.

Returns
false if this glyph does not have any path.

Implements SkScalerContext.


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