[Date Prev][Date Next][Thread Prev][Thread Next][Thread Index]
[XaraXtreme-commits] Commit Complete
Commit by : alex
Repository : xara
Revision : 1658
Date : Thu Aug 3 15:50:07 BST 2006
Changed paths:
M /Trunk/XaraLX/wxOil/dragbmp.cpp
M /Trunk/XaraLX/wxOil/grndrgn.cpp
Fix redraw problem in the line gallery (see Bug #1378)
Diff:
Index: Trunk/XaraLX/wxOil/dragbmp.cpp
===================================================================
--- Trunk/XaraLX/wxOil/dragbmp.cpp (revision 1657)
+++ Trunk/XaraLX/wxOil/dragbmp.cpp (revision 1658)
@@ -848,6 +848,8 @@
GRenderRegion::StaticPlotBitmap(&MemDC, DIBPal, TempInfo, TempBits, 0, 0, DestWidth, DestHeight, pPal, 0, 0);
}
+ GD->SetDefaultBitmapParameters(); // restore this, as else it upsets things
+
FreeDIB(TempInfo, TempBits);
}
Index: Trunk/XaraLX/wxOil/grndrgn.cpp
===================================================================
--- Trunk/XaraLX/wxOil/grndrgn.cpp (revision 1657)
+++ Trunk/XaraLX/wxOil/grndrgn.cpp (revision 1658)
@@ -5041,6 +5041,7 @@
INT32 bw = BoundsRect.Width()/PixelWidth;
INT32 bh = BoundsRect.Height()/PixelWidth;
+#if 0
// Clip the windows rect so that is no bigger than the required rectangle
if (w < bw)
bw = w;
@@ -5050,9 +5051,10 @@
if ((bh<=0) || (bw<=0)) // Still a valid rectangle?
return;
+#endif
// Create a memory DC
- wxBitmap bitmap(bw, bh);
+ wxBitmap bitmap(w, h);
wxMemoryDC MemDC;
MemDC.SelectObject(bitmap);
MemDC.SetFont(FixedFont);
@@ -5082,12 +5084,13 @@
return;
// Calculate the orgin needed to centre the bitmap vertically
- INT32 Height = bh * PixelWidth;
+ INT32 Height = h * PixelWidth;
DocCoord BottomLeft;
BottomLeft.x = BoundsRect.lo.x;
BottomLeft.y = (BoundsRect.lo.y + BoundsRect.Height()/2) - Height/2;
+ GetDrawContext()->SetDefaultBitmapParameters();
// Get gavin to plot the kernel bitmap
DrawBitmap(BottomLeft, pBitmap);
Xara