JAM-Software / Virtual-TreeView

Virtual Treeview is a Delphi treeview control
http://www.jam-software.de/virtual-treeview/
631 stars 244 forks source link

problem with painting nodes PaintTree with poUnbuffered in options and setMapMode... #1074

Open johnek123 opened 2 years ago

johnek123 commented 2 years ago

When using mapping mode - nodes draw in incorrect positions.

setMapMode       (image.canvas.handle, MM_ANISOTROPIC);
setWindowExtEx   (image.canvas.handle, 1, 1, nil);
setViewportExtEx (image.canvas.handle, 2, 2, nil);

treeview.paintTree (
                    image.canvas,
                    rect  (0, 0, image.width, 100),
                    point (0, 0),
                    [poGridLines, poUnbuffered],
                    pfDevice
                    );

image vt.paint.tree.zip

joachimmarder commented 2 years ago

I'm not sure if the painting code of virtual treeview is prepared for other map modes than MM_TEXT. Please attach your sample project as ZIP file.

johnek123 commented 2 years ago

I added a sample file

joachimmarder commented 2 years ago

Sorry, I never worked with poUnbuffered so far and have no idea how to fix this. This all looks like a corner case to me. It is somehow related to #579.