Thanks Aaditya!
Cheers
Martin
On Sat, Jul 7, 2012 at 4:01 PM, Aaditya Chauhan
<aadityachauhan1@gmail.com> wrote:
> Hi Martin,
>
> The code you have written, sets the angle, da.pG->setTextAngle(iA); before
> drawing the LINE_CONTAINER by passing the arguments : pContainer-draw(&da);
> and then again sets it back to zero, after drawing the frame :
> da.pG->setTextAngle(0.0);
>
> While my code :-
>
> + pContainer->draw(&da);
> + if(pContainer -> getContainerType() ==
> FP_CONTAINER_LINE)
> + pG->setTextAngle(iA);
> + else
> + pG->setTextAngle(0.0);
>
> first draws the container by pContainer->draw(&da); and then sets the angle,
> instead of the other way around. So it would at-best only set the angle for
> last frame container ( if any ).
> Also I used pG->setTextAngle(); where pG is a pointer to graphics class
> instead of using da.pG which is a structure element.
>
> Sorry for the Mistake, I would be more careful in the future. I will
> re-commit the changes after rectifying the mistake.
>
> Regards,
>
> Aaditya Chauhan
>
>
> On Fri, Jul 6, 2012 at 7:40 AM, Martin Sevior <msevior@gmail.com> wrote:
>>
>>
>> Hi Aaditya,
>>
>> Your code should be this:
>>
>> if(pContainer -> getContainerType() == FP_CONTAINER_LINE)
>> {
>> da.pG->setTextAngle(iA);
>> pContainer-draw(&da);
>> da.pG->setTextAngle(0.0);
>> }
>>
>> Now you have to explain to me why the code I've just written is
>> correct and what is wrong with yours.
>>
>> (Sorry it's the Professor in me :-)
>>
>> Cheers
>>
>> Martin
>>
>> + pContainer->draw(&da);
>> + if(pContainer -> getContainerType() ==
>> FP_CONTAINER_LINE)
>> + pG->setTextAngle(iA);
>> + else
>> + pG->setTextAngle(0.0);
>
>
>
>
> --
> Aaditya Chauhan
> Electronics and Communication
> NSIT - New Delhi
>
Received on Sat Jul 7 08:47:46 2012
This archive was generated by hypermail 2.1.8 : Sat Jul 07 2012 - 08:47:46 CEST