From 46829cbb6feaffa40ac94e767efd91d55c4684c6 Mon Sep 17 00:00:00 2001 From: spx Date: Sat, 27 Nov 2010 20:54:21 +0000 Subject: [PATCH] Fixed that Flip=1 is broken in Meter=HISTOGRAM. --- Library/MeterHistogram.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Library/MeterHistogram.cpp b/Library/MeterHistogram.cpp index ae22843c..ad3945a8 100644 --- a/Library/MeterHistogram.cpp +++ b/Library/MeterHistogram.cpp @@ -422,7 +422,7 @@ bool CMeterHistogram::Draw(Graphics& graphics) // Cache image/color rectangle for the both lines { Rect& r = (m_Flip) ? - Rect(x + i, y + bothBarHeight, 1, -bothBarHeight) + Rect(x + i, y, 1, bothBarHeight) : Rect(x + i, y + m_H - bothBarHeight, 1, bothBarHeight); bothPath.AddRectangle(r); // cache @@ -432,7 +432,7 @@ bool CMeterHistogram::Draw(Graphics& graphics) if (secondaryBarHeight > primaryBarHeight) { Rect& r = (m_Flip) ? - Rect(x + i, y + secondaryBarHeight, 1, -(secondaryBarHeight - bothBarHeight)) + Rect(x + i, y + bothBarHeight, 1, secondaryBarHeight - bothBarHeight) : Rect(x + i, y + m_H - secondaryBarHeight, 1, secondaryBarHeight - bothBarHeight); secondaryPath.AddRectangle(r); // cache @@ -440,7 +440,7 @@ bool CMeterHistogram::Draw(Graphics& graphics) else { Rect& r = (m_Flip) ? - Rect(x + i, y + primaryBarHeight, 1, -(primaryBarHeight - bothBarHeight)) + Rect(x + i, y + bothBarHeight, 1, primaryBarHeight - bothBarHeight) : Rect(x + i, y + m_H - primaryBarHeight, 1, primaryBarHeight - bothBarHeight); primaryPath.AddRectangle(r); // cache @@ -449,7 +449,7 @@ bool CMeterHistogram::Draw(Graphics& graphics) else { Rect& r = (m_Flip) ? - Rect(x + i, y + primaryBarHeight, 1, -primaryBarHeight) + Rect(x + i, y, 1, primaryBarHeight) : Rect(x + i, y + m_H - primaryBarHeight, 1, primaryBarHeight); primaryPath.AddRectangle(r); // cache