The long subject says almost all.
I’m drawing several objects in a WebCanvas. In trying to implement lockable objects, I now want to draw a padlock at locked objects.
I’ve found that using WebGraphics.DrawPicture is broken since August 2020 (a reproductible feedback case exists, with no solution provided).
I tried with several variations, combining these:
jpeg/png formats
Picture embedded in the project/loading from file
Using only Pictures/Only WebPictures/Mixing between them
All 8 possible combinations lead to the same result (everything is first drawn (except the picture) then a refresh automatically occurs and drawing is broken (a few lines randomly draw)).
I don’t want to waste time in drawing a padlock with built-in draw commands. Is there an alternative way to draw pictures?
Thank you.
However, this solution doesn’t look ideal in my case. I’m not sure, but I think what is being done with the canvas currently would require a significant reworking to move to an ImageViewer.
With choosing between this reworking and using alternatives (just drawing an ✗, for example), the latter is easier (uglier, still).
But I get it. While this WebGraphics.DrawPicture bug isn’t fixed, a WebImageViewer probably works better, assuming you start with the idea to use the WebImageViewer from the beginning (which wasn’t the intuitive way in my case).
Would be nice to have drawing pictures capabilities in the WebCanvas, though…
The unprintable character, with the Webdings font, is a padlock.
I store and restore the FontName and FontSize because the WebGraphics Save and Restore methods seem to work only once.