Neil Deakin 写道:
> [EMAIL PROTECTED] wrote:
> >
> > presShell->GetPrimaryFrameFor(content, &frame);
> > if (frame)
> > {
> > nsRect rect=frame->GetRect();
> > printf("x=%f\ty=%f width=%f height=%f
> > \n",rect.x,rect.y,rect.width,rect.height);
> > }
> >
> > the rsult is x=0 y=0 width=0 height=0
> > What's wrong with these codes?Why all 0?
> >
>
> Unless you're writing code which changes Gecko layout code itself, you
> shouldn't be using frames directly at all.
>
> Can you please state what you're overall goal is? That is, what you plan
> on doing with the position and size information once you have it.
>
> / Neil
I need calculate a kind of relationship between elements ,which based
on their coordinate . So, I need to know their posiztion and size.But I
am lost in gecko source code and not know how to do this.
Can I do this with gecko? And how?
Wayne
_______________________________________________
dev-tech-layout mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-layout