From 663e9e99a7bb6dca2be3341cad6e025398d732e8 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Tue, 23 Dec 2014 14:21:27 -0500 Subject: Optimized Table drawing by only drawing visible rows. --- wintable/new/draw.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'wintable') diff --git a/wintable/new/draw.h b/wintable/new/draw.h index dc19788..409a1ad 100644 --- a/wintable/new/draw.h +++ b/wintable/new/draw.h @@ -100,6 +100,8 @@ static void draw(struct table *t, HDC dc, RECT cliprect, RECT client) p.x += p.width; } p.y += p.height; + if (p.y >= client.bottom) // >= because RECT.bottom is the first pixel outside the rect + break; } deselectFont(dc, prevfont, newfont); -- cgit v1.2.3