diff --git a/examples/drawtext/main.c b/examples/drawtext/main.c index 10f41ad5..d01d96c6 100644 --- a/examples/drawtext/main.c +++ b/examples/drawtext/main.c @@ -49,6 +49,21 @@ static void handlerDraw(uiAreaHandler *a, uiArea *area, uiAreaDrawParams *p) uiDrawClip(p->Context, path); uiDrawFreePath(path); + // TODO get rid of this later + path = uiDrawNewPath(uiDrawFillModeWinding); + uiDrawPathAddRectangle(path, -100, -100, + p->AreaWidth * 2, + p->AreaHeight * 2); + uiDrawPathEnd(path); + uiDrawBrush b; + b.Type = uiDrawBrushTypeSolid; + b.R = 0.0; + b.G = 1.0; + b.B = 0.0; + b.A = 1.0; + uiDrawFill(p->Context, path, &b); + uiDrawFreePath(path); + layout = uiDrawNewTextLayout(attrstr, &defaultFont, p->AreaWidth - 2 * margins); diff --git a/windows/graphemes.cpp b/windows/graphemes.cpp index a4aff059..2b93fab4 100644 --- a/windows/graphemes.cpp +++ b/windows/graphemes.cpp @@ -5,6 +5,8 @@ // So let's use Uniscribe (see http://archives.miloush.net/michkap/archive/2005/01/14/352802.html) // See also http://www.catch22.net/tuts/uniscribe-mysteries, http://www.catch22.net/tuts/keyboard-navigation, and https://maxradi.us/documents/uniscribe/ for more details. +// TODO the DirectWrite equivalent appears to be https://msdn.microsoft.com/en-us/library/windows/desktop/dd316625(v=vs.85).aspx but is somehow somewhat more complicated to use than Uniscribe is! maybe the PadWrite sample uses it? or should we just keep using Uniscribe? + int graphemesTakesUTF16(void) { return 1;