Fixed runtime errors. Yay it works on all platforms now! Also more TODOs. Now the real work is getting the rest of the functionality in.
This commit is contained in:
parent
c0781a13ae
commit
88ea7c4665
|
@ -69,8 +69,9 @@ static void computeLineInfo(uiDrawTextLayout *tl)
|
|||
tl->lineInfo = (struct lineInfo *) uiAlloc(tl->nLines * sizeof (struct lineInfo), "struct lineInfo[] (text layout)");
|
||||
|
||||
dlm = new DWRITE_LINE_METRICS[tl->nLines];
|
||||
// TODO make sure pasisng NULL here is legal
|
||||
hr = tl->layout->GetLineMetrics(dlm, tl->nLines, NULL);
|
||||
// we can't pass NULL here; it outright crashes if we do
|
||||
// TODO verify the numbers haven't changed
|
||||
hr = tl->layout->GetLineMetrics(dlm, tl->nLines, &unused);
|
||||
if (hr != S_OK)
|
||||
logHRESULT(L"error getting IDWriteTextLayout line metrics", hr);
|
||||
|
||||
|
@ -204,6 +205,7 @@ static ID2D1SolidColorBrush *mkSolidBrush(ID2D1RenderTarget *rt, double r, doubl
|
|||
return brush;
|
||||
}
|
||||
|
||||
// TODO this ignores clipping?
|
||||
void uiDrawText(uiDrawContext *c, uiDrawTextLayout *tl, double x, double y)
|
||||
{
|
||||
D2D1_POINT_2F pt;
|
||||
|
|
Loading…
Reference in New Issue