RE: aaditya - r31489 - abiword/branches/gsoc2012_rotated_text/src/text/fmt/xp

Martin Edmund Sevior <[email protected]>
Newsgroups gmane.editors.abiword.devel
Message-ID <323132D956C9584B8B1E9DC491FF9CB53990FFEE@000S-EX-MBX-QS4.unimelb.edu.au>
Hi Aaditya,

You should code with the style conventions of the rest of abiword. You "if" statement below  should be like this:

			if(pContainer -> getContainerType() == FP_CONTAINER_LINE)
			{
			        pG->setTextAngle(iA);
			}
			else
			{
			        pG->setTextAngle(0.0);
			}
Now the next thing you have to do is to only change the text angle if iA is non-zero and actually set it before you call pContainer->draw(&da); Further more you should pG within the da struct. 

da.pG->setTextAngle(0.0)

This is what we discussed a few days ago. Your code as committed has no chance of working. 

Martin
________________________________________
From: [email protected] [[email protected]] on behalf of [email protected] [[email protected]]
Sent: Wednesday, July 11, 2012 5:16 AM
To: [email protected]
Subject: aaditya - r31489 - abiword/branches/gsoc2012_rotated_text/src/text/fmt/xp

Author: aaditya
Date: 2012-07-10 21:16:17 +0200 (Tue, 10 Jul 2012)
New Revision: 31489

Modified:
   abiword/branches/gsoc2012_rotated_text/src/text/fmt/xp/fp_FrameContainer.cpp
Log:
Making Corrections to the Frame Code, and adding the Debug message to draw(), as told be Martin

Modified: abiword/branches/gsoc2012_rotated_text/src/text/fmt/xp/fp_FrameContainer.cpp
===================================================================
--- abiword/branches/gsoc2012_rotated_text/src/text/fmt/xp/fp_FrameContainer.cpp        2012-07-10 18:56:00 UTC (rev 31488)
+++ abiword/branches/gsoc2012_rotated_text/src/text/fmt/xp/fp_FrameContainer.cpp        2012-07-10 19:16:17 UTC (rev 31489)
@@ -695,7 +695,6 @@
        const UT_Rect * pPrevRect = pDA->pG->getClipRect();
        UT_Rect * pRect = getScreenRect();
        UT_Rect newRect;
-       fp_Container *pContainer = NULL;
        bool bRemoveRectAfter = false;
        bool bSetOrigClip = false;
        bool bSkip = false;
@@ -735,11 +734,16 @@
                        fp_ContainerObject* pContainer = static_cast<fp_ContainerObject*>(getNthCon(i));
                        da.xoff = pDA->xoff + pContainer->getX();
                        da.yoff = pDA->yoff + pContainer->getY();
-                       pContainer->draw(&da);
                        if(pContainer -> getContainerType() == FP_CONTAINER_LINE)
-                       pG->setTextAngle(iA);
+                       {
+                               UT_DEBUGMSG(("Angle Set for frame containers %f\n",getRotationAngle()));
+                               da.pG->setTextAngle(iA);
+                               pContainer->draw(&da);
+                               da.pG->setTextAngle(0.0);
+                       }
                        else
-                       pG->setTextAngle(0.0);
+                       pContainer->draw(&da);
+
                }
        }
        m_bNeverDrawn = false;

-----------------------------------------------
To unsubscribe from this list, send a message to
[email protected] with the word
unsubscribe in the message body.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.