1.1.1 - Painting only when asked, and not erasing what it covers
The component stopped painting outside the repaint it is given, and it stopped
erasing a background it covers itself.
Three ways it painted out of turn
An invalidation called the painting routine directly. That left the window still
invalid, so the system sent a real repaint afterwards: the picture was drawn
twice, and the background was erased in between. If the second pass met a
different size or a different set of points, the two drawings did not line up.
Results from the worker threads - crossings and extrema - were drawn into the
buffer and put on screen the same way, out of turn. While a curve is being
computed those arrive in a stream, and each one competed with the ordinary
repaint of the window.
The tracing line was drawn over the buffer rather than into it, so it was gone
at the next repaint and flickered as the mouse moved.
All three now do the same thing: mark the window invalid and let the system
repaint once. The tracing line is drawn into the buffer with everything else.
The background is no longer erased under it
The control declares csOpaque. It fills every pixel it owns from its buffer,
so erasing the background first was a white flash and nothing more.
There is a second path for the case where the control has no window on screen -
a component living on a hidden form, with the picture taken from its buffer.
There the buffer has to be assembled by the direct call, and it is. Measured by
a gallery of reference images: without that split the buffer kept marks from the
previous pass and the antialiased edges darkened by 981 pixels on one of them.
Silent mode takes the control off the screen
Silent means the picture comes from an outer layer - a web page, in the plugin
that uses this component. A silent control has no use for screen space, and
while it had some, every resize of its container sent it a repaint it answered
with nothing.
Compatibility
| Delphi | 37.0 (Delphi 13), win32 and win64 |
| Free Pascal | 3.2.2 and 3.3.1, win32 and win64 and linux64 |