From ba4be91d228beeae8144261d815c753f096ee583 Mon Sep 17 00:00:00 2001 From: george82 Date: Mon, 27 Mar 2006 15:26:11 +0000 Subject: [PATCH] Small ScaledPixelBuffer class code improvements. Rename scaled_rect to changed_rect. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@505 3789f03b-4d11-0410-bbf8-ca57d06f2519 --- rfb/ScaledPixelBuffer.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/rfb/ScaledPixelBuffer.cxx b/rfb/ScaledPixelBuffer.cxx index b2304ff0..61f81e2d 100644 --- a/rfb/ScaledPixelBuffer.cxx +++ b/rfb/ScaledPixelBuffer.cxx @@ -87,19 +87,19 @@ void ScaledPixelBuffer::scaleRect(const Rect& r) { static double c1_sub_dx, c1_sub_dy; static double dx, dy; static int i, j; - static Rect scaled_rect; + static Rect changed_rect; - // Calculate the scale boundaries - scaled_rect = calculateScaleBoundary(r); + // Calculate the changed pixel rect in the scaled image + changed_rect = calculateScaleBoundary(r); // Scale the source rect to the destination image buffer using // bilinear interplation - for (int y = scaled_rect.tl.y; y < scaled_rect.br.y; y++) { + for (int y = changed_rect.tl.y; y < changed_rect.br.y; y++) { j = (int)(dy = y / scale_ratio); dy -= j; c1_sub_dy = 1 - dy; - for (int x = scaled_rect.tl.x; x < scaled_rect.br.x; x++) { + for (int x = changed_rect.tl.x; x < changed_rect.br.x; x++) { ptr = &scaled_data[(x + y*scaled_width) * 4]; i = (int)(dx = x / scale_ratio); -- 2.39.5