Skip to content
This repository was archived by the owner on Mar 30, 2019. It is now read-only.

Commit 1f89381

Browse files
authored
Merge pull request #1038 from jkoritzinsky/ColorGlyphRunEnumerator
Correctly implement ColorGlyphRunEnumerator's GetCurrentRun method
2 parents 5f28931 + 96ac88d commit 1f89381

2 files changed

Lines changed: 20 additions & 0 deletions

File tree

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
6+
namespace SharpDX.DirectWrite
7+
{
8+
public partial class ColorGlyphRunEnumerator
9+
{
10+
public unsafe ColorGlyphRun GetCurrent()
11+
{
12+
GetCurrentRun(out IntPtr ptr);
13+
var run = new ColorGlyphRun();
14+
run.__MarshalFrom(ref *((ColorGlyphRun.__Native*)ptr));
15+
return run;
16+
}
17+
}
18+
}

Source/SharpDX.Direct2D1/DirectWrite/Mapping.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,8 @@
223223
<map param="IDWriteRemoteFontFileStream::BeginDownload::asyncResult" return="true" />
224224
<map method="IDWriteAsyncResult::GetResult" check="false"/>
225225

226+
<map param="IDWriteColorGlyphRunEnumerator::GetCurrentRun::colorGlyphRun" type="void" override-native-type="true" visibility="internal" />
227+
226228
<!-- Factory 2 -->
227229
<map method="IDWriteFactory2::TranslateColorGlyphRun" hresult="true" check="false" visibility="public" name="TryTranslateColorGlyphRun" />
228230

0 commit comments

Comments
 (0)