[]
        
(Showing Draft Content)

GrapeCity.Documents.DX.DirectWrite.FontFileStreamNative

Class FontFileStreamNative

Namespace
GrapeCity.Documents.DX.DirectWrite
Assembly
GcDocs.DX.Windows.dll

IDWriteFontFileStream

[Guid("6d4865fe-0ab8-4d91-8f62-5dd6be34a3e0")]
public class FontFileStreamNative : ComObjectCallback, IUnknown, IFontFileStream, ICallbackable, IDisposable
Inheritance
object
FontFileStreamNative
Implements
System.IDisposable
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()

Constructors

FontFileStreamNative(IntPtr)

Initializes a new instance of the FontFileStreamNative class.

public FontFileStreamNative(IntPtr nativePtr)

Parameters

nativePtr System.IntPtr

The native pointer.

Methods

GetFileSize()

HRESULT IDWriteFontFileStream::GetFileSize([Out] unsigned longlong* fileSize)

public long GetFileSize()

Returns

long

GetLastWriteTime()

HRESULT IDWriteFontFileStream::GetLastWriteTime([Out] unsigned longlong* lastWriteTime)

public long GetLastWriteTime()

Returns

long

ReadFileFragment(out IntPtr, long, long, out IntPtr)

Reads a fragment from a font file.

public void ReadFileFragment(out IntPtr fragmentStart, long fileOffset, long fragmentSize, out IntPtr fragmentContext)

Parameters

fragmentStart System.IntPtr

When this method returns, contains an address of a reference to the start of the font file fragment. This parameter is passed uninitialized.

fileOffset long

The offset of the fragment, in bytes, from the beginning of the font file.

fragmentSize long

The size of the file fragment, in bytes.

fragmentContext System.IntPtr

When this method returns, contains the address of

Remarks

Note that ReadFileFragment implementations must check whether the requested font file fragment is within the file bounds. Otherwise, an error should be returned from ReadFileFragment. {{DirectWrite}} may invoke IFontFileStream methods on the same object from multiple threads simultaneously. Therefore, ReadFileFragment implementations that rely on internal mutable state must serialize access to such state across multiple threads. For example, an implementation that uses separate Seek and Read operations to read a file fragment must place the code block containing Seek and Read calls under a lock or a critical section.

ReleaseFileFragment(IntPtr)

Releases a fragment from a file.

public void ReleaseFileFragment(IntPtr fragmentContext)

Parameters

fragmentContext System.IntPtr

A reference to the client-defined context of a font fragment returned from {{ReadFileFragment}}.

Operators

explicit operator FontFileStreamNative(IntPtr)

Performs an explicit conversion from System.IntPtr to FontFileStreamNative.

public static explicit operator FontFileStreamNative(IntPtr nativePointer)

Parameters

nativePointer System.IntPtr

Returns

FontFileStreamNative