--- a/javauis/lcdui_akn/lcdui/src/CMIDTextEditorEdwinCustomDraw.cpp Tue May 25 12:34:19 2010 +0300
+++ b/javauis/lcdui_akn/lcdui/src/CMIDTextEditorEdwinCustomDraw.cpp Wed Jun 09 09:34:07 2010 +0300
@@ -31,8 +31,8 @@
const MLafEnv& aLafEnv,
const MFormCustomDraw& aParentDraw,
const CMIDTextEditorEdwin& aEdwin) :
- CLafEdwinCustomDrawBase(aLafEnv, aEdwin),
- iEdwin(aEdwin), iParentDraw(aParentDraw)
+ CLafEdwinCustomDrawBase(aLafEnv, aEdwin),
+ iEdwin(aEdwin), iParentDraw(aParentDraw)
{
DEBUG("CMIDTextEditorEdwinCustomDraw::CMIDTextEditorEdwinCustomDraw");
}
@@ -76,7 +76,8 @@
// Only drawing otherwise.
if (iEdwin.IsScalingOn())
{
- aParam.iGc.SetClippingRect(iEdwin.GetOnScreenCanvasRect());
+
+ aParam.iGc.SetClippingRect(GetClippingRectForScaling());
iParentDraw.DrawBackground(aParam, aBackground, aDrawn);
@@ -103,7 +104,8 @@
// Only drawing otherwise.
if (iEdwin.IsScalingOn())
{
- aParam.iGc.SetClippingRect(iEdwin.GetOnScreenCanvasRect());
+
+ aParam.iGc.SetClippingRect(GetClippingRectForScaling());
iParentDraw.DrawLineGraphics(aParam, aLineInfo);
@@ -146,7 +148,7 @@
// Only drawing otherwise.
if (iEdwin.IsScalingOn())
{
- aParam.iGc.SetClippingRect(iEdwin.GetOnScreenCanvasRect());
+ aParam.iGc.SetClippingRect(GetClippingRectForScaling());
iParentDraw.DrawText(
aParam,
@@ -204,7 +206,8 @@
// Only drawing otherwise.
if (iEdwin.IsScalingOn())
{
- aParam.iGc.SetClippingRect(iEdwin.GetOnScreenCanvasRect());
+
+ aParam.iGc.SetClippingRect(GetClippingRectForScaling());
iParentDraw.DrawText(
aParam,
@@ -258,4 +261,17 @@
return ret;
}
+// ---------------------------------------------------------------------------
+// CMIDTextEditorEdwinCustomDraw::GetClippingRectForScaling()
+// (other items were commented in the header file)
+// ---------------------------------------------------------------------------
+//
+const TRect CMIDTextEditorEdwinCustomDraw::GetClippingRectForScaling() const
+{
+ // It gets intersection of editor and canvas rectangles.
+ TRect rect = iEdwin.GetOnScreenCanvasRect();
+ rect.Intersection(iEdwin.Rect());
+ return rect;
+}
+
// End of file