<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - PDF compliance: Always respect Annot Rect"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=105692#c15">Comment # 15</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - PDF compliance: Always respect Annot Rect"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=105692">bug 105692</a>
              from <span class="vcard"><a class="email" href="mailto:haxtibal@posteo.de" title="Tobias Deiminger <haxtibal@posteo.de>"> <span class="fn">Tobias Deiminger</span></a>
</span></b>
        <pre>(In reply to Albert Astals Cid from <a href="show_bug.cgi?id=105692#c14">comment #14</a>)
<span class="quote">> Thinking about this, i really think if we're going to go that route, it's
> better to kill appearBBox as a member, just use it to when we're creating
> the new appearance and then adjust the rect member.</span >
Yeah, I thought about that already. I hesitated a bit, maybe you can help. It's
this: We can't use Annot::setRect to adjust the rect member, because this (a)
also creates an adjusted annotObj["Rect"] Object, and (b) calls
invalidateAppearance.
(a) would cause the size change to be saved into the document which I think
would be an unexpected side effect
(b) would invalidate our just created appearance, so we never get an valid
appearance

If we instead bypass Annot::setRect on appearance creation and update
Annot::rect directly, it could work. But I have not yet checked for side
effects of Annot::rect != Annot::annotObj["Rect"]. If there's no side effect
then we should be able to do what you suggested and discard both the
Annot::appearBBox member and the Annot::getDrawRect method and as a bonus
things are simplified a bit.

<span class="quote">> I don't like having the getrect function not really returning the rect
> member, i've looked at the code and seems we really use rect for drawing and
> geometrical stuff (i.e. inRect) so it should be fine updating it in my
> opinion.</span >
In places such as inRect we would have to use getDrawRect() instead of
Annot::rect too, to be consistent. But if your suggestion above works, we don't
have to bother anyway.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>