Closed mscherotter closed 7 years ago
The problem is not with the command list itself, but with the blend mode you are using when later drawing the command list image. Highlighter ink uses a min blend mode, but by default your DrawImage call will be using standard sourceover blend. You'll need to configure that DrawImage call to match the blend operations used by the highlighter rendering, which as far as I know are not documented anywhere :-(
In general, highlighter ink is best drawn directly over whatever image you want it to highlight. Trying to cache this kind of ink in intermediate surfaces gets surprisingly complex.
See issue #428 and http://stackoverflow.com/questions/36397638/win2d-uwp-wont-save-a-highlight-stroke-in-an-inkcanvas/36509014#36509014 for discussion of similar issues.
Ink that has InkDrawingAttributes.DrawAsHighlighter=true will draw fine when used directly like this session.DrawInk(ink);
but will not draw when used in a command list session: using (var list = new CanvasCommandList(session)) { using (var listSession = list.CreateDrawingSession()) { listSession.DrawInk(ink); }
}