2 Replies Latest reply: Aug 3, 2010 11:54 PM by joeln3 RSS

    Retrieve coordinates of PDEElement which are in PDEForm

    joeln3 Community Member

      Hello,

       

      I try to retrieve the coordonates of PDEElement using PDEElementGetBBox() and I have a problem while the PDEElements are defined in PDEForm which are defined in another PDEForm etc...

       

      Here is a summarize of my implementation :

       

      1. Retrieve PDEElement --> Check the type

       

      -- If PDEForm

       

      2. Retrieve the PDEElement --> Check the type

       

      -- ......

      -- If PDEForm

       

      3. Retrieve the PDEElement --> Check the type


      -- ......

      -- If PDEPath

       

      4. Retrieve the BBox Using PDEElementGetBBox. I also retrieve the Matrix of the Form using the PDEFormGetMatrix (using it I have the CMT).

      Then I apply the Form matrix to the BBox and normaly I must have the coordinates of my PDEElements.

       

      Unfortunately it does'nt work while the PDEForm have different BBox. I mean that the BBox have differents values and the llx and lly values are different than 0.

       

      So do you have to take into account the BBox to have the correct coordinates of the elements which are stored in Form?

       

      Thanks in advance,

      Joe

       

      Edit : Actually in my sample I retrieve the Form matrix at each level and concat them. It works but I guess I'm lucky because normally the last matrix is already the concatenation of all (but it isn't).

       

      Message was edited by: joeln3