Nikolay Sivov : dwrite: Implement GetClusterMetrics().
Alexandre Julliard
julliard at wine.codeweavers.com
Tue Jan 20 15:20:10 CST 2015
Module: wine
Branch: master
Commit: e292385fcd80c897ebff3f17f3a85400c4a6a149
URL: http://source.winehq.org/git/wine.git/?a=commit;h=e292385fcd80c897ebff3f17f3a85400c4a6a149
Author: Nikolay Sivov <nsivov at codeweavers.com>
Date: Mon Jan 12 13:56:27 2015 +0300
dwrite: Implement GetClusterMetrics().
---
dlls/dwrite/layout.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/dlls/dwrite/layout.c b/dlls/dwrite/layout.c
index 785ded8..88a83cc 100644
--- a/dlls/dwrite/layout.c
+++ b/dlls/dwrite/layout.c
@@ -1704,13 +1704,17 @@ static HRESULT WINAPI dwritetextlayout_GetClusterMetrics(IDWriteTextLayout2 *ifa
struct dwrite_textlayout *This = impl_from_IDWriteTextLayout2(iface);
HRESULT hr;
- FIXME("(%p)->(%p %u %p): stub\n", This, metrics, max_count, count);
+ TRACE("(%p)->(%p %u %p)\n", This, metrics, max_count, count);
hr = layout_compute(This);
if (FAILED(hr))
return hr;
- return E_NOTIMPL;
+ if (metrics)
+ memcpy(metrics, This->clusters, sizeof(DWRITE_CLUSTER_METRICS)*min(max_count, This->clusters_count));
+
+ *count = This->clusters_count;
+ return max_count < This->clusters_count ? S_OK : E_NOT_SUFFICIENT_BUFFER;
}
static HRESULT WINAPI dwritetextlayout_DetermineMinWidth(IDWriteTextLayout2 *iface, FLOAT* min_width)
More information about the wine-cvs
mailing list