Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | List of all members
SkDWriteFontFileStream Class Reference

#include <SkDWriteFontFileStream.h>

Inheritance diagram for SkDWriteFontFileStream:
SkStreamMemory SkStreamAsset SkStreamSeekable SkStreamRewindable SkStream

Public Member Functions

 SkDWriteFontFileStream (IDWriteFontFileStream *fontFileStream)
 
 ~SkDWriteFontFileStream () override
 
size_t read (void *buffer, size_t size) override
 
bool isAtEnd () const override
 
bool rewind () override
 
size_t getPosition () const override
 
bool seek (size_t position) override
 
bool move (long offset) override
 
size_t getLength () const override
 
const void * getMemoryBase () override
 
std::unique_ptr< SkDWriteFontFileStreamduplicate () const
 
std::unique_ptr< SkDWriteFontFileStreamfork () const
 
- Public Member Functions inherited from SkStreamMemory
std::unique_ptr< SkStreamMemoryduplicate () const
 
std::unique_ptr< SkStreamMemoryfork () const
 
- Public Member Functions inherited from SkStreamAsset
bool hasLength () const override
 
std::unique_ptr< SkStreamAssetduplicate () const
 
std::unique_ptr< SkStreamAssetfork () const
 
- Public Member Functions inherited from SkStreamSeekable
std::unique_ptr< SkStreamSeekableduplicate () const
 
bool hasPosition () const override
 
std::unique_ptr< SkStreamSeekablefork () const
 
- Public Member Functions inherited from SkStreamRewindable
std::unique_ptr< SkStreamRewindableduplicate () const
 
- Public Member Functions inherited from SkStream
virtual ~SkStream ()
 
 SkStream ()
 
size_t skip (size_t size)
 
virtual size_t peek (void *, size_t) const
 
bool readS8 (int8_t *)
 
bool readS16 (int16_t *)
 
bool readS32 (int32_t *)
 
bool readU8 (uint8_t *i)
 
bool readU16 (uint16_t *i)
 
bool readU32 (uint32_t *i)
 
bool readBool (bool *b)
 
bool readScalar (SkScalar *)
 
bool readPackedUInt (size_t *)
 
std::unique_ptr< SkStreamduplicate () const
 
std::unique_ptr< SkStreamfork () const
 
virtual sk_sp< SkDatagetData () const
 

Private Member Functions

SkDWriteFontFileStreamonDuplicate () const override
 
SkDWriteFontFileStreamonFork () const override
 

Additional Inherited Members

- Static Public Member Functions inherited from SkStream
static std::unique_ptr< SkStreamAssetMakeFromFile (const char path[])
 

Detailed Description

An SkStream backed by an IDWriteFontFileStream. This allows Skia code to read an IDWriteFontFileStream.

Definition at line 24 of file SkDWriteFontFileStream.h.

Constructor & Destructor Documentation

◆ SkDWriteFontFileStream()

SkDWriteFontFileStream::SkDWriteFontFileStream ( IDWriteFontFileStream *  fontFileStream)
explicit

◆ ~SkDWriteFontFileStream()

SkDWriteFontFileStream::~SkDWriteFontFileStream ( )
override

Member Function Documentation

◆ duplicate()

std::unique_ptr< SkDWriteFontFileStream > SkDWriteFontFileStream::duplicate ( ) const
inline

Definition at line 38 of file SkDWriteFontFileStream.h.

38 {
39 return std::unique_ptr<SkDWriteFontFileStream>(this->onDuplicate());
40 }
SkDWriteFontFileStream * onDuplicate() const override

◆ fork()

std::unique_ptr< SkDWriteFontFileStream > SkDWriteFontFileStream::fork ( ) const
inline

Definition at line 41 of file SkDWriteFontFileStream.h.

41 {
42 return std::unique_ptr<SkDWriteFontFileStream>(this->onFork());
43 }
SkDWriteFontFileStream * onFork() const override

◆ getLength()

size_t SkDWriteFontFileStream::getLength ( ) const
overridevirtual

Returns the total length of the stream. If this cannot be done, returns 0.

Implements SkStreamAsset.

◆ getMemoryBase()

const void * SkDWriteFontFileStream::getMemoryBase ( )
overridevirtual

Returns the starting address for the data. If this cannot be done, returns NULL.

Implements SkStreamMemory.

◆ getPosition()

size_t SkDWriteFontFileStream::getPosition ( ) const
overridevirtual

Returns the current position in the stream. If this cannot be done, returns 0.

Implements SkStreamSeekable.

◆ isAtEnd()

bool SkDWriteFontFileStream::isAtEnd ( ) const
overridevirtual

Returns true when all the bytes in the stream have been read. As SkStream represents synchronous I/O, isAtEnd returns false when the final stream length isn't known yet, even when all the bytes available so far have been read. This may return true early (when there are no more bytes to be read) or late (after the first unsuccessful read).

Implements SkStream.

◆ move()

bool SkDWriteFontFileStream::move ( long  )
overridevirtual

Seeks to an relative offset in the stream. If this cannot be done, returns false. If an attempt is made to move to a position outside the stream, the position will be set to the closest point within the stream (beginning or end).

Implements SkStreamSeekable.

◆ onDuplicate()

SkDWriteFontFileStream * SkDWriteFontFileStream::onDuplicate ( ) const
overrideprivatevirtual

Implements SkStreamMemory.

◆ onFork()

SkDWriteFontFileStream * SkDWriteFontFileStream::onFork ( ) const
overrideprivatevirtual

Implements SkStreamMemory.

◆ read()

size_t SkDWriteFontFileStream::read ( void *  buffer,
size_t  size 
)
overridevirtual

Reads or skips size number of bytes. If buffer == NULL, skip size bytes, return how many were skipped. If buffer != NULL, copy size bytes into buffer, return how many were copied.

Parameters
bufferwhen NULL skip size bytes, otherwise copy size bytes into buffer
sizethe number of bytes to skip or copy
Returns
the number of bytes actually read.

Implements SkStream.

◆ rewind()

bool SkDWriteFontFileStream::rewind ( )
overridevirtual

Rewinds to the beginning of the stream. Returns true if the stream is known to be at the beginning after this call returns.

Implements SkStreamRewindable.

◆ seek()

bool SkDWriteFontFileStream::seek ( size_t  )
overridevirtual

Seeks to an absolute position in the stream. If this cannot be done, returns false. If an attempt is made to seek past the end of the stream, the position will be set to the end of the stream.

Implements SkStreamSeekable.


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