Mail Archives: geda-user/2013/06/18/10:17:55
OK, that really isn't my question, though.
I want to mimic gschem's computations, broken or not, closely enough
that my tool can lay out symbol text with reasonable accuracy.
-dave
On 06/18/2013 03:17 AM, Roland Lutz wrote:
> Hi,
>
> In my opinion, the way text measurements are handled in gEDA is
> somewhat broken. The bounding box of an object is usually retrieved
> via world_get_single_object_bounds. This, however, depends on the
> TOPLEVEL context because libgeda by itself is unable to tell the
> bounding box of a text object, effectively asking the GUI to do so.
> So there is data stored in the OBJECT struct which actually belongs to
> a TOPLEVEL object, making it impossible to share objects between
> contexts.
>
> This is a problem in the FLAG_TEXT_OUTLINE rendering mode where the
> object's bounding box should be drawn but there is no TOPLEVEL context
> available in the renderer, so the objects' cached (and maybe invalid)
> bounding boxes are drawn instead.
>
> One possible solution to address this would be to add a TOPLEVEL
> reference to the renderer.
>
> Roland
>
- Raw text -